19 STANDARD BITWISE BOOLEAN FUNCTIONS
19.1 AND Operation, OR Operation, XOR Operation
799
19
19 STANDARD BITWISE BOOLEAN FUNCTIONS
19.1 AND Operation, OR Operation, XOR Operation
AND(_E), OR(_E), XOR(_E)
• AND(_E): Outputs the logical product of input values.
• OR(_E): Outputs the logical sum of input values.
• XOR(_E): Outputs the exclusive logical sum of input values.
*1 The input variable "s" can be changed in the range of 2 to 28.
â– Descriptions, types, and data types
â– Operation processing
1. AND(_E)
• These functions perform the logical AND 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).
When the data type is WORD
Ladder diagram
*1
Structured text
*1
[Without EN/ENO] [With EN/ENO] [Without EN/ENO]
d:=AND(s1,s2);
d:=OR(s1,s2);
d:=XOR(s1,s2);
[With EN/ENO]
d:=AND_E(EN,ENO,s1,s2);
d:=OR_E(EN,ENO,s1,s2);
d:=XOR_E(EN,ENO,s1,s2);
Argument Description Type Data type
EN Execution condition (TRUE: Execution, FALSE: Stop) Input variable BOOL
s1 to s28 Input Input variable ANY_BIT
ENO Output status (TRUE: Normal, FALSE: Abnormal) Output variable BOOL
d Output Output variable ANY_BIT
EN ENO
ds1
s2
001001000 0110100
001001000 0000100
011111111 0001111
Logical Word AND
AND
(s1)
(s2)
(d)