Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 1012

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

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
TRUE
(s1)
XOR
XOR
TRUE
TRUE
(s2)
(s3)
TRUE
FALSE
(1): For 3 INs
(2): For 4 INs
(3): For 5 INs
(4): XOR is repeated by the number of variables (s).
■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.
22 STANDARD BITWISE BOOLEAN FUNCTIONS
1010
22.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
(1)
(2)
FALSE
XOR
TRUE
(s4)
(s5)
TRUE
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
(3)
TRUE
XOR
TRUE
(4)
FALSE
*1
(d)
Operation output value
Indefinite value

Hide quick links:

Advertisement

loading