
349
Command Details
Section 6-3
• END command cancels axis operation commands (MOVELINK/CAM-
BOX/CONNECT/ADDAX/SYNC/ SPEED/TORQUE) being executed.
• In execution of axis operation commands other than the above, END com-
mand execution will be completed after the axis status bits [Positioning
completed] (x+32, bit06 for Axis 1) for all the axes operated with the pro-
gram are turned ON (1).
• Modal data is initialized according to the default setting (motion task).
• All the axes reserved by axis declaration are released.
• End command execution will be completed when all the processing above
is completed.
Sub-Program Call
(GOSUB)
The specified sub-program is called.
Command type
Single execution command
Format
GOSUB_P<sub-program number>
Ex: GOSUB_P500;
Operand
Note
(1) Word data is extended to long word data with a sign in the MC Unit.
(2) Figures below the decimal point are to be omitted.
Description
• Sub-programs are executed.
• Sub-programs can be nested up to 5 levels.
• If the nesting limit is exceeded, the alarm [2002h: Sub-program nesting
error] will occur.
• GOSUB command execution will be completed when the operation
moves to the sub-program successfully.
Operand
Setting range
Decimal
Variable specification
INC/ ABL
influ-
ence
Bit
Word
Long
word
Real
number
Indirect
specifi-
cation
Sub-program num-
ber
500 to 999
1500 to 1999
No
No
Yes (See
note 1.)
Yes
Yes (See
note 2.)
Yes
No
GOSUB P500
GOSUB P501
RETURN
RETURN
Main program
Sub-program 500
Sub-program 501
Summary of Contents for CS1W-MCH71 -
Page 2: ...CS1W MCH71 CJ1W MCH71 Motion Control Unit Operation Manual Revised June 2008 ...
Page 3: ...iv ...
Page 29: ...xxx ...
Page 33: ...xxxiv ...
Page 35: ...xxxvi ...
Page 39: ...xl ...
Page 69: ...24 Performance Section 1 7 ...
Page 99: ...54 Connecting MECHATROLINK Devices Section 3 5 ...
Page 283: ...238 Saving Data Section 5 4 ...
Page 417: ...372 Command Details Section 6 3 ...