
Chapter 5. Application instructions
5-102
5.13.2 CALL, CALLP, SBRT, RET
CALL / SBRT
(Subroutine)
FUN(014) CALL
FUN(015) CALLP
FUN(016) SBRT
FUN(004) RET
Applicable
CPU
All CPUs
Available Device
Flag
Instructions
M
P
K
L
F
T
C
S
D
#D Integer
Steps
Error
(F110)
Zero
(F111)
Carry
(F112)
CALL(P)
SBRT
O
1
RET
1) Functions
-
When the input condition turns on, stops the sequence program and executes the corresponding
subroutine program specified by pointer ‘n’. After finishing execution of subroutine, resume to
execute sequence program from the next step of ‘CALL n’ instruction.
-
Multiple levels of nesting of the CALL(P) instruction are allowed as much as 64.
-
The range of pointer ‘n’ is various according to the type of CPU. (See the above picture)
-
If a ‘CALL(P) n’ instruction has no corresponding ‘SBRT’ instruction that has same pointer ‘n’ with
the ‘CALL(P) n’ instruction, an instruction error occurs.
-
Execution conditions
n
CALL(P)
n
Operand setting
K10S1
: 0 ~ 15
K10S/K30S/K60S
: 0 ~ 63
K200S/K300S/K1000S
: 0 ~ 127
n
SBRT
n
RET
END
Input condition
CALL
CALLP
Executed only once
Executed only once
Executed per scan
Executed per scan