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 or
CALLP command will be executed.
Execution conditions
The execution conditions of the CALL, CALLP are as shown below.
Sub-routine execution command OFF
CALL
CALLP
Program example
Program to execute sub-routine program when X1 changes from OFF to ON.
X8
10
X1
12
X9
15
17
XA
P33
500
504
8. Function Commands
CALL, CALLP, RET
ON
Executed per scan
Y11
CALL
P33
Y13
FEND
Y33
Y34
RET
- 228 -
Get other manuals https://www.bkmanuals.com
Executed per scan
Coding
No. of
Com-
Device
steps
mand
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
505