
18
– 6
CAL
[Function]
This command is used to call a subroutine program of a designated step
identified by tag No.
[Explanation]
This command is used to call a subroutine program of a designated
program step identified by tag No.
This instruction requires a RET (return) command after the last step
jumped to. Each subroutine must end with a RET command.
When the return instruction is executed, the program returns to the step
immediately following the CAL (call) step.
Subroutines can be nested up to 10 levels. Nesting is the system in which
another subroutine is called in a subroutine program.
A diagram of the main routine and subroutine relation is shown below.
[Main routine program]
[Key operation]
STEP 1
Press
CAL
4
.
NOP changes to CAL.
Press
ENT
.
STEP 2
Use the numeric keypad to enter the tag No. to
be called. Press
ENT
.
(Input range: 0 to 999.)
NOTE
The tag No. for STEP 2 can be set to "0" as a temporary value. However, if the
command is executed with that value, the "NO TAG FOUND" error will occur.
When using multitasking, a tag No. in another task cannot be called.
[
P
R
G
M
]
0
0
0
1
C
A
L 0
0
0
[
P
R
G
M
]
0
0
0
1
N
O
P
Unconditional Call
Start
Process
CAL10
Process
End
TAG10
Process
CAL20
Process
RET
TAG20
Process
RET
1st nesting (call)
2nd nesting (call)
[Subroutine program]
Summary of Contents for CA20-M10
Page 2: ......
Page 14: ...XII 21 6 Spare parts 21 5 21 6 1 Controller spare parts 21 5 21 6 2 Axis spare parts 21 5...
Page 24: ...1 10 This page is blank...
Page 104: ...4 20 This page is blank...
Page 112: ...5 8 This page is blank...
Page 152: ...7 20 This page is blank...
Page 190: ...10 20 This page is blank...
Page 234: ...11 44 This page is blank...
Page 244: ...12 10 This page is blank...
Page 286: ...15 4 This page is blank...
Page 300: ...17 12 This page is blank...
Page 352: ...18 52 This page is blank...
Page 382: ...21 6 This page is blank...
Page 383: ......
Page 384: ...Back cover Q3178E 03 APR 20...