10.3.7.1. Global Variable
10.3.7.1. Global Variable
Global variable are shared by all programs.
Variable | Grammar | Example | |
Arithmetic | Integer | V1%~V600% or V%[1]~V%[600] | V10%, V%[20], V%[50+V2%] (Formulas should be in [ ].) |
Real number | 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 Pose elements and shift elements are treated as real number.
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.