
348
7 APPLICATION INSTRUCTION
7.4 Structuring instruction
Returning from the subroutine program
RET/SRET
These instructions indicate an end of a subroutine program.
The RET instruction can be used as SRET.
Processing details
• These instructions indicate an end of a subroutine program.
• When the RET instruction is executed, the program execution returns to the step following the CALL(P) or XCALL
instruction that called the subroutine program.
Precautions
• If the RET (SRET) instruction is executed in a user interrupt program (I-IRET), a compiling error occurs.
Operation error
Ladder diagram
Structured text
Not supported
Error code
(SD0/SD8067)
Description
3381
The END, FEND, GOEND, or STOP instruction is executed before the RET instruction is executed.
3382
While the number of nesting levels is decreased by the return instruction, the result becomes negative.
(The number of RET (SRET) instructions is larger than that of the CALL instructions.)
CALL (P)
END
(P)
RET(SRET)
Subroutine program
Main routine program
Summary of Contents for MELSEC iQ-F FX5 series
Page 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Page 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Page 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Page 887: ......