Hitachi HIDIC MICRO-EH Applications Manual page 161

Table of Contents

Advertisement

Item number
Control instructions-10
Ladder format
RTS
Instruction format
RTS
Usable I/O
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
34
Instruction for use
1] 2]
R000
CAL 0
END
SB 0
Subroutine 0
R001
program
CAL 1
Subroutine 0 program
RTS
SB 1
Subroutine 1 program
RTS
Name
Condition code
R7F4
R7F3
R7F2
DER
ERR
SD
Number of steps
Condition
Bit
R,
TD, SS,
X
Y
M
CU, CT
WX WY
Error code
H0011
WRF001
H0020
H0030
1]
The program is executed when R000 and R001 are both off
3]
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.
5-111
Chapter 5 Instruction Specifications
End of subroutine program (RETURN SUBROUTINE)
Processing time (µs)
R7F1
R7F0
Average Maximum
V
C
25
Steps
1
Word
Double word
WR,
DR,
WM TC DX DY
DM
Error description
SB undefined
SB area error
RTS startup condition error
Remark
Other

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents