Справочник Пользователя для Mitsubishi Electronics FX2NC

Скачать
Страница из 382
FX Series Programmable Controlers
Applied Instructions 5
5-8
5.1.3
SRET (FNC 02)
Operation:
SRET signifies the end of the current subroutine and returns the program flow to the step
immediately following the CALL instruction which activated the closing subroutine.
Points to note:
a) SRET can only be used with the CALL instruction.
b) SRET is always programmed after an FEND instruction - please see the CALL (FNC 
01)
instruction for more details.
Mnemonic
Function 
Operands
Program steps
D
SRET
FNC 02
(
Subroutine 
return)
Returns operation
from a subroutine
program
N/A
Automatically returns to the step immediately 
following the CALL instruction which activated 
the subroutine.
SRET:
1 step
Special subroutine timers:
Because of the chance of intermittent use of the subroutines, if timed functions are
required the timers used must be selected from the range T192 to T199 and T246 to
T249. 
Details of using CALL with other program flow instructions
Further details can be found on pages 7-12 and 7-13 about the combined use of different
program flow techniques (such as master control, MC etc).
FX
0(S)
FX
0N
FX FX
(2C)
FX
2N(C)
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
PULSE-P
FX
(2C)
FX
FX
2N(C)
FX
0N
FX
0(s)
16 BIT OPERATION
FX
FX
0N
FX
0(s)
FX
(2C)
FX
2N(C)
32 BIT OPERATION