Hyundai HI4 operation manual Call Command, 11.2.4.5 on ∼GOTO Command, Delay Command

Models: HI4

1 427
Download 427 pages 29.73 Kb
Page 382
Image 382

11. Robot Language Explanation

------------------------------------------------------------------------------------------------

11.2.4.4 CALL 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

 

Positive integer, Program number to call

 

 

 

1999

Number

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Distance calculation

REM --- subprog. 902

 

 

 

 

 

 

between P4 and P7.

 

 

 

 

 

 

REM

V300! = <Distance between P300 and P301>

 

P300=P4

 

 

 

 

 

REM -

------------------------------

 

 

 

example

P301=P7

 

 

 

 

 

 

 

V300! = (P300.X-P301.X)^2 + (P300.Y-P301.Y)^2

 

CALL 902

 

 

+ (P300.Z-P301.Z)^2

 

 

 

 

 

 

Result Output

 

 

 

 

 

 

 

END

 

 

 

 

 

 

 

PRINT #0, "Dist = "; V300!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

11.2.4.5 ONGOTO Command

 

 

 

 

 

 

 

 

 

 

 

 

 

Description

Jumps to the various address depending on the condition number after ON.

 

 

 

 

 

 

 

 

 

Syntax

ON <Number> GOTO <Address>[, <Address>, <Address>,.....]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Arithmetic Equation. Number determining the jump

 

 

 

 

 

 

 

 

address.

 

 

 

 

 

 

 

 

Number

 

The digit after the decimal point is discarded if

 

 

 

Parameter

 

 

 

 

Float type. If it's smaller than 1 or bigger than the

 

 

 

 

 

 

 

address number, moves to the next command line.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

It jumps to if the condition is set to 1, the first

 

 

 

 

Address

 

address, if 2, second address. Up to 10 addresses can

 

 

 

 

 

 

 

 

be used.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ON V5% GOTO 210, 220, *CONT

 

 

 

 

 

 

 

GOTO *ERR

 

 

 

 

 

 

 

example

 

210 PRINT #0, "V5%=1"

 

 

 

 

 

 

 

 

GOTO *CONT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

220 PRINT #0, "V5%=2"

 

 

 

 

 

 

 

 

 

*CONT

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

11.2.4.6 DELAY Command

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Description

Delays as much as the specified time.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Syntax

DELAY <Time>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Parameter

Time

 

Arithmetic Equation. Standby time

Unit : sec

 

 

 

0.160.0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

example

DELAY 0.5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

----------------------------------------------------------------------------------------

11 - 17

Page 382
Image 382
Hyundai HI4 operation manual Call Command, 11.2.4.5 on ∼GOTO Command, Delay Command