
97
19.4 Process instruction
19.4.1 CALL Instruction
Description
:
CALL instruction is used for calling subprogram, execute the content of subprogram.
CALL Program’s name.PRG
Example
:
These are two programs, main program MAIN.PRG, subprogram
SON.PRG.
‘MAIN.PRG(Main program)
J JR[1] VEL=50
J JR[2] VEL=50
CALL SON.PRG ‘Calling the subprogram
‘SON.PRG
(
Subprogram
)
DO[1]=ON
WAIT TIME 500
DO[1]=OFF
The above execution flow means: move the joints to JR[1] and JR[2] in turn, execute
DO[1]=ON, wait for 500 milliseconds, DO[1]=OFF, turn off the pulse signal, and
complete the program execution.