7 - 164 
7  MOTION PROGRAMS FOR POSITIONING CONTROL 
 
7.16.23 Program call 2 (GOSUBE) 
Code GOSUBE 
Function  Program call 2 
The specified control program or axis designation program is 
called
. 
The call source program is ended at the error occurrence.  
 
 
Format 
J+starting axis name. 
Eight or less can be specified. 
OUGSB
E
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] 
GOSUBE  P#D2010  ; 
D2010 : Motion program No. 
D2011 : Sequence No. 
 
[Axis designation program call] 
GOSUBE  JXJY  P#D2010  ; 
D2010 : Motion program No. 
D2011 : Sequence No. 
D2012 : Parameter block No. 
 
(5)   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. 
 
(8)   Call source program is ended at the error occurrence. After the control program 
and the axis designation program are called, the next block is executed after 
waiting the end of called program.