
361
Command Details
Section 6-3
6-3-6
Simple Arithmetic Operation
ASSIGN ( = )
Values are assigned for the specified variable.
Command type
Multiple execution command
Format
<First term> = <Second term>;
Ex: #MF1000 = 123.45;
Operand
Note
Both immediate values and variables can use the values within the ranges
defined for each type.
• Integer immediate value:
−
2147483648 to 2147483647
• Decimal immediate value:
−
2147483648. to 2147483647.
• Bit type: 0, 1
• Word type:
−
32768 to 32767
• Long word type:
−
2147483648 to 2147483647
• Real number type:
±
(1.175E-38 to 3.402E+38), 0
• Indirect specification type: 0 to 10239
Description
• The value in the second term is assigned to the first term.
• If the types are different on both sides, the type on the right is converted
to that of the left.
• If the value on the right side cannot be stored in the left side, the alarm
[2005h: Operation overflow] will occur.
Precaution for Handling the Data Types
1,2,3...
1.
Bit type
• When the bit type is used, all the operands must be the bit type.
• The integer immediate values 0 and 1 are treated as the bit type.
2.
Types other than the bit type
• Types other than the bit type are prioritized in the following order
Real number type > Long word type > Word type
• Operation is performed in the type of the highest priority, and the op-
eration result will be stored after being converted to the type on the left.
• The integer immediate value is treated as long word type, and the dec-
imal immediate value is treated as real number type.
Operand
Setting range
Decimal
Variable specification
INC/ ABL
influ-
ence
Bit
Word
Long
word
Real
number
Indirect
specifi-
cation
First term
Variable
No
Yes
Yes
Yes
Yes
No
No
Second term
Operation
numerical value
range (See
note.)
Yes
Yes
Yes
Yes
Yes
Yes
No
Summary of Contents for CS1W-MCH71 -
Page 2: ...CS1W MCH71 CJ1W MCH71 Motion Control Unit Operation Manual Revised June 2008 ...
Page 3: ...iv ...
Page 29: ...xxx ...
Page 33: ...xxxiv ...
Page 35: ...xxxvi ...
Page 39: ...xl ...
Page 69: ...24 Performance Section 1 7 ...
Page 99: ...54 Connecting MECHATROLINK Devices Section 3 5 ...
Page 283: ...238 Saving Data Section 5 4 ...
Page 417: ...372 Command Details Section 6 3 ...