
7-12
7.8 Constant
A constant is an expression with a fixed value.
Constants in the PAC language are classified into the following.
1 Numeric value data Type I: integer type constant
Type F: single precision real type constant
Type D: double precision real type constant
2 Character string
data
Type S: character string type constant (maximum of
247 characters)
3 Vector data Type V: vector type constant (X,Y,Z)
4 Pose data Type P:
position type constant (X,Y,Z,RX,RY,RZ,FIG) (in
case of 6 axes)
Type J:
joint type constant (J1,J2,J3,J4,J5,J6) (in case
of 6 axes)
Type T: homogeneous transformation type constant
(Px,Py,Pz,Ox,Oy,Oz,Ax,Ay,Az,FIG)
(Each element of type V, P, J, and T is single
precision real.)
Constants of each type are explained as follows.
7.8.1 Numeric Value Constant
[ 1 ] Integer Type Constant
This constant is an integer from -2147483648 to +2147483647.
There are 3 kinds of notations for integer type constants: decimal, binary and
hexadecimal.
Decimal Format
This is an integer type constant expressed using decimal numbers.
If you add an integer type postposition “%” to a real type within a range of –
2147483648 to +2147483647, it is regarded as a constant integer type with the
digits after the decimal point rounded down.
Example: 32767
-125
+10
3256.21% → Since this is an integer type
postposition, it is regarded as 3256.
Binary Format
This is an integer type constant expressed using binary numbers.
This is expressed by an arrangement of 0s and 1s using “&B” at the head of
the numeric value.
If the range for a numeric value of an integer type constant is expressed in the
binary format, it is
&B0~&B11111111111111111111111111111111
(in the range of 32 bits).
Example: &B110
&B0011
Comentários a estes Manuais