Returning from the subroutine program called
RET
RnPCPU
RnPCPU
RnCPU RnENCPU
(Process)
(Redundant)
This instruction indicates the end of a subroutine program.
Ladder
FBD/LD
Not supported
■Execution condition
Instruction
RET
Processing details
• This instruction indicates the end of a subroutine program.
• When the instruction is executed, the program returns to the next step where the CALL(P), FCALL(P), ECALL(P),
EFCALL(P), or XCALL instruction that called the subroutine program is executed.
A
CALL (P)
END
A: Main routine program
B: Subroutine program
Operation error
Error code
Description
(SD0)
3381H
After execution of the CALL(P), FCALL(P), ECALL(P), EFCALL(P), or XCALL instruction, the END, FEND, GOEND, or STOP instruction
is executed before the RET instruction.
3382H
The RET instruction is executed before the CALL(P), FCALL(P), ECALL(P), EFCALL(P), or XCALL instruction.
RnSFCPU RnSFCPU
(Standard)
(Safety)
Execution condition
Every scan
B
(P)
RET
ST
Not supported
7 APPLICATION INSTRUCTIONS
7.4 Structure Creation Instructions
7
563