11. Robot Language Explanation
------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
11 - 17
11.2.4.4 CALL Command
11.2.4.5 ON∼GOTO Command
11.2.4.6 DELAY Command
Description
Calls for the specified program.
When met with END command, returns to the next line of CALL command called.
Syntax CALL <Program Number> ...... END
Parameter
Program
Number
Positive integer, Program number to call 1∼999
example
‘ Distance calculation
between P4 and P7.
P300=P4
P301=P7
CALL 902
‘ Result Output
PRINT #0, "Dist = "; V300!
REM --- subprog. 902 -------------------
REM V300! = <Distance between P300 and P301>
REM - ------------------------------
V300! = (P300.X-P301.X)^2 + (P300.Y-P301.Y)^2
+ (P300.Z-P301.Z)^2
END
Description Jumps to the various address depending on the condition number after ON.
Syntax ON <Number> GOTO <Address>[, <Address>, <Address>,.....]
Number
Arithmetic Equation. Number determining the jump
address.
The digit after the decimal point is discarded if
Float type. If it's smaller than 1 or bigger than the
address number, moves to the next command line.
Parameter
Address
It jumps to if the condition is set to 1, the first
address, if 2, second address. Up to 10 addresses can
be used.
example
ON V5% GOTO 210, 220, *CONT
GOTO *ERR
210 PRINT #0, "V5%=1"
GOTO *CONT
220 PRINT #0, "V5%=2"
*CONT
Description Delays as much as the specified time.
Syntax DELAY <Time>
Parameter Time Arithmetic Equation. Standby time
Unit : sec
0.1∼60.0
example DELAY 0.5