Chapter 5 Instruction Specifications
5-111
Item number
Control instructions-10
Name
End of subroutine program (RETURN SUBROUTINE)
Ladder format
Condition code
Processing time (
µ
s)
Remark
R7F4
R7F3
R7F2
R7F1
R7F0
Average Maximum
RTS
DER
ERR
SD
V
C
z
z
z
z
z
Instruction format
Number of steps
25
Condition
Steps
RTS
1
Bit
Word
Double word
Usable I/O
X
Y
R,
M
TD, SS,
CU, CT
WX WY
WR,
WM TC DX DY
DR,
DM
C
o
nstant
Other
Function
•
This instruction declares the end of a subroutine program.
•
When this instruction is executed, the program is resumed starting from the line following the CAL n instruction that called
the subroutine.
•
Do not set a startup condition with this instruction.
Notes
•
This instruction is checked prior to execution, and when there is an error, the following error code is set in the special
internal output WRF001. Also, the CPU error code '34' is set to special internal output WRF000.
CPU error code
Special internal output
Error code
Error description
H0011
SB undefined
34
WRF001
H0020
SB area error
H0030
RTS startup condition error
Instruction for use
R000
R001
CAL 0
END
SB 0
CAL 1
RTS
SB 1
RTS
1] 2] 3]
Subroutine 1 program
Subroutine 0
program
Subroutine 0 program
1]
The program is executed when R000 and R001 are both off
2]
The program is executed when R000 is on and R001 is off
CAL 0 is executed, then the subroutine 0 program is executed.
CAL 1 is not executed, the subroutine 0 program is terminated and the
execution is returned to the code following the CAL 0.
3]
The program is executed when R000 and R001 are both on
CAL 0 is executed, then the subroutine 0 program is executed.
CAL 1 is executed, then the subroutine 1 program is executed.
The subroutine 1 program is completed and execution is returned to the code
following the CAL 1.
The subroutine 0 program is completed and execution is returned to the code
following the CAL 0.
RT
S
Содержание HIDIC MICRO-EH
Страница 1: ...HITACHI PROGRAMMABLE CONTROLLER APPLICATION MANUAL NJI 350B X ...
Страница 12: ...MEMO ...
Страница 14: ...Chapter 1 Features 1 2 MEMO ...
Страница 50: ...Chapter 4 Product lineup and wiring 4 18 MEMO ...
Страница 196: ...Chapter 5 Instruction Specifications 5 146 ...
Страница 263: ...Chapter 11 Communication Specifications 11 10 MEMO ...