
8-1
8. Variable settings
8-1. Variables
•
A quantity capable of assuming any of a set of values, whose value can be changed by such actions as
substitution, replacement, arithmetic operation, logic operation etc. in combination with sequence commands.
•
Variables can be classified into 2 types; one is called a LOCAL VARIABLE which can be used only in one
program, and the other one is called a GLOBAL VARIABLE which is common to all programs.
•
It is necessary to specify and register a variable name to each global variable in order to use over an entire
system.
Local variables
Global variables
Variable whose values are assigned within that program and
which has no value, or a different value, outside the program.
Variable whose values are maintained in all programs.
‘L’ and an identifier are automatically added to each local
variable name.
‘G’ and an identifier are automatically added to each
global variable name.
Identifier
B : Byte
I : Integer
L : Long integer
R : Real number
P : Position
3-digit number
[Local variable name]
·
‘L’ is
not
attached in front of the
identifier “P”.
·
It is not necessarily followed by
3-digit number.
L
Identifier
B : Byte
I : Integer
L : Long integer
R : Real number
P : Position
D : 3-Demensional
T : Rotary/Shift
A : Robot
Default (Auto name)
is 3-digit number.
G
[Global variable name]
Global variable names (including the identifier) can be
changed to any 8-alphanumeric character name.
Identifier
Variable type
Definition
B
Byte
1 byte integer (Set range: from 0 to 255)
If the variable represents ON or OFF, assign ‘0’ for OFF and ‘1’ for ON.
I
Integer
2-byte integer (Set range: from –32768 to 32767)
L
Long integer
4-byte integer (Set range: from-2147483648 to 2147483647)
R
Real number
4-byte real number. Decimal fraction can be assigned. (-99999.99 to +99999.99)
P
Position
Teaching point, which includes position of an external axis.
Position data of X, Y and Z, as well as data of tool vector TX and TZ.
D
3-demensional
Element of X, Y and Z
Use the variable as point, vector or shift buffer.
T
Rotary/Shift
Variable to specify the rotary and shift conversion amount
With SHIFT-ON command, it executes rotary/shift conversion.
A
Robot
Teaching point on the robot coordinates system, which does not include the position
of an external axis. Position data of X, Y and Z on the robot coordinates system and
data of tool vector TX and TZ.
See application examples
When you see this sign, you can find application
example(s) of the item in Chapter 8.
Note