Skip to main content

10.4.1.2. Local Variable

10.4.1.2. Local Variable

 

A main program and each called assistant program have its own local variable. Each program cannot access local variable of other programs.

 

Table 108 Robot language local variables

Variable

Syntax

Example

Arithmetic

Integer

(short)

LV1%~LV50% or

LV%[1]~LV%[50]

LV10%, LV%[5], LV%[5+LV2%]

(Formulas should be in [ ].)

Real number

(float)

LV1!~LV50! or

LV![1]~LV![50]

LV10!, LV![5], LV![5+LV2%]

String

LV1$~LV100$ or

LV$[1]~LV$[100]

LV10$, LV$[5], LV$[LV2%]

Pose

LP1~LP100 or

LP[1]~LP[100]

LP5, LP[7], LP[5+LV2$], LP[2].RZ, LP[10].X

(Elements (X, Y, Z, RX, RY, RZ, T1, T2,... T6, CFG) are accessible.)

Shift

LR1~LR50 or

LR[1]~LR[50]

LR2, LR[3], LR[2+LV2$], LR[2].RZ, LR[10].X

(Elements (X, Y, Z, RX, RY, RZ) are accessible.)

 

 

 

l The pose elements and shift elements will be treated as fixed point real numbers.

 

l  Number of pose elements T1, T2... should be the same as the number of additional axes.

 

l  As soon as controller system is initialized, all arithmetic variables, pose, shift variables become 0 and string variables are initialized to empty string. When a new cycle begins or a program is changed, they are not automatically initialized.

 

l  All variable values remain, even though the power is off.