Mitsubishi Electronics Q173HCPU/Q172HCPU Work Light User Manual


 
6 - 163
6 MOTION PROGRAMS FOR POSITIONING CONTROL
6.16.22 Program call 1 (GOSUB)
Code GOSUB
Function Program call 1
The specified control program or axis designation program is
called.
Format
J+starting axis name.
Eight or less can be specified.
OUGSB
Motion program No. (1 to 1024)
(Indirect setting is possible)
JX p;JYJZJUJ
V
JWJAJB P
[Explanation]
(1) Other control programs or axis designation programs are called from the control
program.
(2) Do not set the axis and parameter block No. to call the control program.
(3) Set the axis name used by the axis designation program to call the axis
designation program.
(4) This instruction cannot be used in the axis designation program.
(5) As for set Motion program No."Pn" and parameter block No."PBn", indirect setting
by #@ or D (word data) is also possible. In this case, sequence No. can be
specified as follows.
[Control program call]
GOSUB P#D2010 ;
D2010 : Motion program No.
D2011 : Sequence No.
[Axis designation program call]
GOSUB JXJY P#D2010 ;
D2010 : Motion program No.
D2011 : Sequence No.
D2012 : Parameter block No.
(6) When the program No. of the axis designation program is specified directly, the
parameter block No. is called as the default value (PB1).
(7) After the control program and axis designation program are called, the next block
is executed after waiting the end of called program.
Refer to the explanation of "Program start" for the difference between the program start
and program call.