Mitsubishi MELSEC iQ-F FX5 series Programming Manual page 802

Melsec iq-f fx5 series
Hide thumbs Also See for MELSEC iQ-F FX5 series:
Table of Contents

Advertisement

2.
OR(_E)
• These functions perform the logical OR on the BOOL, WORD, or DWORD type data input in (s1) to (s28) bit by bit, and
output the operation result from (d) in the same data type as (s).
Ex.
When the data type is WORD
1
1
0
0
(s1)
0
0
0
0
(s2)
1
1
0
0
(d)
3.
XOR(_E)
• These functions perform the exclusive logical OR on the BOOL, WORD, or DWORD type data input in (s1) to (s28) bit by
bit, and output the operation result from (d) in the same data type as (s).
Ex.
When the data type is WORD
1
0
1
0
(s1)
0
0
0
1
(s2)
1
0
1
1
(d)
• When three or more variables (s) exist, XOR is performed between (s1) and (s2) first, and XOR is successively performed
between the result and (s3). When the expression includes (s4), XOR is performed between the result of XOR with (s3) and
(s4). In this manner, XOR is repeated by the number of variables (s) in the order with (s5), (s6), and so on.
Ex.
When the data type is BOOL
FALSE
(s1)
XOR
TRUE
(s2)
(s3)
Result
TRUE
Result
■Operation result
1.
Function without EN/ENO
The operation processing is executed. The operation output value is output from (d).
2.
Function with EN/ENO
The following table lists the execution conditions and operation results.
Execution condition
EN
TRUE (Executes operation)
FALSE (Stops operation)
*1 When FALSE is output from ENO, data output from (d) is undefined. In that case, modify a program so that the data output from (d) is
not used.
Operation error
There is no operation error.
19 STANDARD BITWISE BOOLEAN FUNCTIONS
800
19.1 AND Operation, OR Operation, XOR Operation
1
1
1
1
0
0
0
OR
0
0
1
0
0
0
1
Logical Word OR
1
1
1
1
0
0
1
1
0
1
0
1
0
1
XOR
1
0
1
1
1
1
1
Logical Exclusive OR
0
0
0
1
0
1
0
For 3 INs
For 4 INs
TRUE
FALSE
XOR
XOR
TRUE
TRUE
(s4)
FALSE
Result
TRUE
Result
Operation result
ENO
TRUE
FALSE
0
1
1
1
1
1
0
1
0
0
1
1
1
1
1
0
1
0
1
0
1
0
0
0
0
1
1
0
1
0
For 5 INs
TRUE
XOR
TRUE
(s5)
XOR is repeated by the
number of variables (s).
FALSE
*1
(d)
Operation output value
Indefinite value

Advertisement

Table of Contents
loading

Table of Contents