Mitsubishi Electronics 13JW55 Network Card User Manual


 
4 - 32
Nesting
• The CALL (P) instructions can be nested up to 16 levels.
CALL P1
CALL P3
CALL P4
CALL P5
RET
RET
RET
RET
RET
Sequence program
0
FEND
Subroutine
program
Subroutine
program
Subroutine
program
Subroutine
program
Subroutine
program
CALL P2
P1
P2
P3
P4
P5
The following ladder circuit shows the above nested program.
CALL
P1
FEND
CALL
P2
RET
CALL P3
RET
CALL P4
RET
CALL
P5
RET
RET
0
P1
P2
P3
P4
P5
Sequence program
Subroutine program P1
Subroutine program P2
Subroutine program P3
Subroutine program P4
Subroutine program P5
Applicable device
Internal device
(system or
user)
File
register
MELSECNET/
10 (H) Direct
Jn\
Index
register
Constant
Pointer
Level
Bit Word R Bit Word
Intelligent
function
module
Un\G
Z K H P I N
Digit
Number of basic
steps
P
CALL(P) P**
RET
2
1
The number of basic steps of CALL (P) is 2 tn, and that of the RET instruction is one.
("n" is an argument passed to the subroutine.)