
363
Command Details
Section 6-3
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.
6-3-7
Logic Operation
Logic Operations (|,
&, ~)
This specified logic operation is executed.
Command type
|, &, and ~: Not executed as an independent command (no type).
Format
<First term> = <Second term> Operator <Third term>;
Ex: #MW1000 = #MW0010 & #MW0011;
Operand
Note
For XOR (LOGICAL EXCLUSIVE OR) (~), the bit type cannot be used for
variables.
Description
• The logic operation is executed with logic operators on each bit corre-
sponding to the second and third terms. The result will be output to the bit
corresponding 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.
Operand
Setting range
Decimal
Variable specification
INC/ ABL
influ-
ence
Bit
Word
Long
word
Real
number
Indirect
specifi-
cation
First term
Variable
No
Yes (See
note.)
Yes
Yes
No
No
No
Second term
−
2147483648 to
2147483647
No
Yes (See
note.)
Yes
Yes
No
Yes
No
Third term
−
2147483648 to
2147483647
No
Yes (See
note.)
Yes
Yes
No
Yes
No
Logic
operator
Function
Description
|
OR (LOGICAL OR)
Assigns the LOGICAL OR (OR) of the 2nd
and 3rd terms to the 1st term.
&
AND (LOGICAL
AND)
Assigns the LOGICAL AND (AND) of the
2nd and 3rd terms to the 1st term.
~
XOR (LOGICAL
EXCLUSIVE OR)
Assigns the LOGICAL EXCLUSIVE OR
(XOR) of the 2nd and 3rd terms to the 1st
term.
Содержание CS1W-MCH71 -
Страница 2: ...CS1W MCH71 CJ1W MCH71 Motion Control Unit Operation Manual Revised June 2008 ...
Страница 3: ...iv ...
Страница 29: ...xxx ...
Страница 33: ...xxxiv ...
Страница 35: ...xxxvi ...
Страница 39: ...xl ...
Страница 69: ...24 Performance Section 1 7 ...
Страница 99: ...54 Connecting MECHATROLINK Devices Section 3 5 ...
Страница 283: ...238 Saving Data Section 5 4 ...
Страница 417: ...372 Command Details Section 6 3 ...