3.51
EDH0162En1040 – 06/99
MM4005
EX — Execute a program
Usage
IMM
PGM
MIP
Syntax
xxEXnn
Parameters
Description
xx
[int]
— Program number.
nn
[int]
— Number of times to execute the program.
Range
xx
—
1
to
127.
nn
—
1
to
2147483648.
Units
xx
— None.
nn
— None.
Defaults
xx
Missing: Error F.
Out of range: Error F.
Floating point: Error A.
nn
Missing: 1.
Out of range: Error C.
Floating point: Decimal part truncated.
Description
This command starts executing a program. When the command is received,
the controller first compiles the program, checking for errors similar to the
CP command. If an error is encountered, the compilation stops and the
controller reports the type of error found. If no error is found, the con-
troller executes the program line by line or according to the flow control
instructions.
During program execution, only commands that ask for information or that
stop the motion are allowed. Any of the following commands will terminate
a program: AB, AP, MF, RS and ST. The easiest way to stop program execu-
tion is by using the AP command, the other ones have wider effects.
EX command is capable to execute subroutines (program without EX com-
mand inside, integrated in the main program)
Returns
None.
Errors
A
—
Unknown message code.
C
—
Parameter out of limits.
F
—
Program number incorrect.
G
—
Program does not exist.
I
—
Unauthorized command in programming mode.
See Appendix A for additional list of programming errors.
Rel. Commands
AP
—
Abort program.
CP
—
Compile program.
Example
1EP
|
Program 1 edition (main program).
1PA10, 2PA10
|
Displacement of two axis.
2EX
|
Execute the program 2 .
3EX
|
Execute the program 3.
4EX
|
Execute the program 4.
OR
|
Origine search for all of axis.
QP
|
Quit main program.
2EP
|
Program 2.
SB
|
Set bits.
1AS"This "
|
Define string #1.
2AS"is "
|
Define string #2.
1CS$S2
|
Concatenate string #1 and string #2.
DS$S1"a string"
|
Display on screen.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com