7 Applied Instructions (Program Flow)
7.3 SRET / Subroutine Return
116
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
7.3 SRET / Subroutine Return
Outline
This instruction returns the program execution from a subroutine to the main program.
1. Format and operation, execution form
2. Set data
3. Applicable devices
Function and operation explanation
When CALL instruction in the main program is executed, the program execution jumps to a subroutine.
SRET instruction returns the program execution to the main routine.
→ Refer to Section 7.2.
FX3U(C) FX3G(C) FX3S FX2N(C) FX1N(C) FX1S FXU/FX2C FX0N FX0(S)
Instruction
name
Operation
Execution
form
Expression in each language
Structured ladder/FBD ST
SRET 16 bits Continuous
Use a subroutine program by reading out the
function block made of other program parts.
Variable Description Data type
Input
variable
EN Execution condition Always TRUE
Output
variable
ENO Execution state Bit
Operand
type
Bit Devices Word Devices Others
System User Digit Specification
System
User
Special
Unit
Index
Constant
Real
Number
Character
String
Pointer
XYMTCS
D.b
KnX KnY KnM KnS T C D R
U\G
VZModifier K H E
""
P
- No target device is available.
SRET
EN ENO