EasyManuals Logo

Galil Motion Control DMC-40x0 Series User Manual

Default Icon
280 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #18 background imageLoading...
Page #18 background image
8 ^a, ^b, ^c, ^d, ^e, ^f, ^g, ^h DMC-40x0 Command Reference
^a, ^b, ^c, ^d, ^e, ^f, ^g, ^h
FUNCTION: JS subroutine stack variable
DESCRIPTION:
Provides local subroutine access for up to 8 variables passed on the subroutine stack when using
the JS (jump to subroutine) command.
Passing values on the stack is advanced DMC programming, and is recommended for
experienced DMC programmers familiar with the concept of passing arguments by value and
by reference.
See the
JS command for a full explanation of passing stack variables.
Notes:
1. Passing parameters has no type checking, so it is important to exercise good programming
style when passing parameters. See examples below for recommended syntax.
2. Do not use spaces in expressions containing ^.
3. Global variables MUST be assigned prior to any use in subroutines where variables are
passed by reference.
USAGE: Defaults:
While Moving Yes Default Value -
In a Program Yes Default Format -
Command Line Yes
Controller Usage DMC-4000
RELATED COMMANDS:
MG Message
& | Pass by reference
JS Jump to subroutine
EXAMPLE:
#Add
JS#SUM(1,2,3,4,5,6,7,8) ;' call subroutine, pass values
MG_JS ;' print return value
EN
'
#SUM ;NO(^a,^b,^c,^d,^e,^f,^g,^h) syntax note for use
EN,,(^a+^b+^c+^d+^e+^f+^g+^h) ;' return sum
:Executed program from program1.dmc
36.0000
Note: For additional examples, see the “JS Subroutine Stack Variables (^a, ^b, ^c, ^d, ^e, ^f, ^g, ^h)”
section in the DMC-40x0 User Manual.

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Galil Motion Control DMC-40x0 Series and is the answer not in the manual?

Galil Motion Control DMC-40x0 Series Specifications

General IconGeneral
BrandGalil Motion Control
ModelDMC-40x0 Series
CategoryController
LanguageEnglish

Related product manuals