Skip to main content

10.4.1.1. Global Variable

10.4.1.1. Global Variable

 

Global variables are shared and used by all types of tasks and job programs. For example, as shown below, the value of the global variable V10% can be read and written in all job programs of all tasks, including 0002.JOB and 0005.JOB. For example, when 5 is assigned to V10% in JOB 1 and JOB 5 outputs V10%, 5 will be outputted.

 

Table 107 Robot language global variables

Variable

Syntax

Example

Arithmetic

Integer

(short)

V1%~V600% or

V%[1]~V%[600]

V10%, V%[20], V%[50+V2%]

(Formulas should be in [ ].)

Real number

(float)

V1!~V600! or

V![1]~V![600]

V10!, V![20], V![50+V2%]

String

V1$~V999$ or

V$[1]~V$[999]

V10$, V$[20], V$[V2%]

Pose

P1~P9999 or

P[1]~P[9999]

P50, P[70], P[50+V2$] , P[20].RZ, P[10].X

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

Shift

R1~R9999 or

R[1]~R[9999]

R20, R[30], R[20+V2$], R[20].RZ, R[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.

 

l  R1~R8 are mapped to online shift register as they are. For example, assignment statements such as R2 = (shift constant) are used for No. 2 online shift register setup.