CALL, RET
- 135 -
RET
(1) The end of the sub-routine program is indicated.
(2) When the RET command is executed, the sequence program in the step after the CALL
command will be executed.
Execution conditions
The execution conditions of the CALL command are as shown below.
Sub-routine execution command OFF
CALL
Executed per scan
ON
Executed per scan
Program example
Program to execute sub-routine program when X1 changes from OFF to ON.
Coding
No. of
steps
Com-
mand
Device
10 LD X8
11 OUT Y11
12 LD X1
13 CALL P33
15 LD X9
16 OUT Y13
17 FEND
18
:
500 P33
501 LD XA
502 OUT Y33
503 OUT Y34
504 RET
FEND
Y34
P33
500
X1
12
X8
Y11
10
XA
Y33
17
CALL
P33
504
X9
Y13
15
RET
505