Omron CS1W-MCH71 Operation Manual page 394

Sysmac cs/cj-series
Hide thumbs Also See for CS1W-MCH71:
Table of Contents

Advertisement

Command Details
Sub-Program Call
(GOSUB)
Command type
Format
Operand
Operand
Setting range
Sub-program num-
500 to 999
ber
1500 to 1999
Note
Description
• 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.
The specified sub-program is called.
Single execution command
GOSUB_P<sub-program number>
Ex: GOSUB_P500;
Decimal
Bit
No
No
(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.
• 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.
Main program
GOSUB P500
Variable specification
Word
Long
Real
word
number
Yes (See
Yes
Yes (See
note 1.)
note 2.)
Sub-program 500
GOSUB P501
RETURN
Section 6-3
INC/ ABL
influ-
Indirect
ence
specifi-
cation
Yes
No
Sub-program 501
RETURN
349

Advertisement

Table of Contents

Troubleshooting

loading

This manual is also suitable for:

Cj1w-mch71

Table of Contents