5-146
5.4 Standard Bitwise Boolean Functions
5.4.1 Boolean AND, boolean OR, boolean exclusive OR, and boolean NOT
AND(_E), OR(_E), XOR(_E), NOT(_E)
Operation Error
No operation error occurs in the execution of the AND(_E), OR(_E), XOR(_E), and NOT(_E)
functions.
Program Example
(1) The program which performs Boolean AND on bit, word (unsigned)/16-bit string or double
word (unsigned)/32-bit string type data input to variables to bit by bit, and outputs the
operation result from in the same data type as that of variables to .
(a) Function without EN/ENO (AND)
[Structured ladder]
[ST]
g_word3 :=(g_word1) AND (g_word2);
or
g_word3 :=(g_word1) & (g_word2);
(b) Function with EN/ENO (AND_E)
[Structured ladder]
[ST]
g_bool3 := AND_E (g_bool1, g_word1, g_word2, g_word3);
s1
s27
d
s1
s27