Logic Operation - Omron CS1W-MCH71 MOTION CONTROL UNIT - 09-2004 Manual

Motion control unit
Hide thumbs Also See for CS1W-MCH71 MOTION CONTROL UNIT - 09-2004:
Table of Contents

Advertisement

Command Details
Precaution for Handling the Data Types
1,2,3...
6-3-7

Logic Operation

Logic Operations (|,
&, ~)
Command type
Format
Operand
Operand
Setting range
First term
Variable
−2147483648 to
Second term
2147483647
−2147483648 to
Third term
2147483647
Note
Description
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.
This specified logic operation is executed.
|, &, and ~: Not executed as an independent command (no type).
<First term> = <Second term> Operator <Third term>;
Ex: #MW1000 = #MW0010 & #MW0011;
Decimal
Bit
No
Yes (See
note.)
No
Yes (See
note.)
No
Yes (See
note.)
For XOR (LOGICAL EXCLUSIVE OR) (~), the bit type cannot be used for
variables.
• 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.
Logic
Function
operator
|
OR (LOGICAL OR)
&
AND (LOGICAL
AND)
~
XOR (LOGICAL
EXCLUSIVE OR)
• 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.
Variable specification
Word
Long
Real
word
number
Yes
Yes
No
Yes
Yes
No
Yes
Yes
No
Assigns the LOGICAL OR (OR) of the 2nd
and 3rd terms to the 1st term.
Assigns the LOGICAL AND (AND) of the
2nd and 3rd terms to the 1st term.
Assigns the LOGICAL EXCLUSIVE OR
(XOR) of the 2nd and 3rd terms to the 1st
term.
Section 6-3
INC/ ABL
influ-
Indirect
ence
specifi-
cation
No
No
Yes
No
Yes
No
Description
329

Advertisement

Table of Contents

Troubleshooting

loading

This manual is also suitable for:

Sysmac cs-series

Table of Contents