Call - Yamaha SRCP User Manual

Single-axis robot controller
Hide thumbs Also See for SRCP:
Table of Contents

Advertisement

8-4 Robot Language Description
8
10
8-

8-4-8 CALL

Function:
Format:
Example:
Explanation:
Other:
8-4-9 DO
Function:
Format:
Example:
Explanation:
Calls and executes another program.
CALL
<program number>, <number of times>
CALL
5, 2
Calls program 5 and executes it twice. Program execution then proceeds
to the next step.
When repeating the same operation a number of times, the CALL state-
ment is used as needed to call and execute the subroutine defined as a
separate program.
(1) Program number
The program number is a number used to identify the 100 individual
programs from 0 to 99.
(2) Number of times
This is the number of times that the program is to be repeated. This
can be specified from 1 to 255.
• The nesting level is 6.
• When the end of the program initiated by the CALL statement is de-
tected, program execution advances to the step following the CALL
statement in the main program.
• An error occurs and program execution stops if the program being
executed is called by the CALL statement.
• Even when the program number is changed by the CALL statement,
resetting it will return to the original program number when program
execution begins.
• An error "stack overflow" might occur if a jump is made to another
program by the JMP or JMPF statement in a program called as a sub-
routine by the CALL statement.
Controls ON/OFF of general-purpose output or memory output.
DO
<DO or MO number>, <output status>
DO
3, 1
Turns on DO3.
This command turns the general-purpose output or memory output on
and off.
(1) DO or MO number
Specify one of the general-purpose output numbers from 0 to 4 (5
points) or memory output numbers from 100 to 131 (32 points).
(2) Output status
"1" means "on" and "0" means "off".

Advertisement

Table of Contents
loading

Table of Contents