Return From Subroutine Programs - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

Return from subroutine programs

RET
High
Basic
Process
Redundant Universal
performance
RET
Setting
Internal device
data
Bit
Word
Processing details
• Indicates end of subroutine program
• When the RET instruction is executed, returns to the step following the CALL (P), FCALL (P), ECALL (P), EFCALL (P) or
XCALL instruction which called the subroutine program.
Main routine
program
CALL
Pn
END
Operation error
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Error
Error details
code
4211
After the CALL(P), FCALL (P), ECALL (P), EFCALL (P) or XCALL instruction
was executed, an END, FEND, GOEND, or STOP instruction was executed
prior to the RET instruction.
4212
The RET instruction was executed prior to the CALL (P), FCALL (P), ECALL
(P), EFCALL (P) or XCALL instruction.
LCPU
R, ZR
J\
Bit
Subroutine
program
Pn
RET
U\G
Zn
Word
Q00J/
QnH
QnPH
Q00/
Q01
7 APPLICATION INSTRUCTIONS
7.6 Structure Creation Instructions
RET
Constant
Others
QnPRH
QnU
LCPU
467
7

Advertisement

Table of Contents
loading

Table of Contents