Bitwise Boolean Functions and Operators

Introduction

Fernhill SCADA supports these bitwise boolean functions and operators:

FunctionOperatorDescription
AND & Logical AND
OR Logical OR
XOR Logical XOR
NOT Logical NOT

Bitwise Boolean functions AND, OR and XOR accept a variable number of parameters. For example:

AND( A, B, C ) is equivalent to A AND B AND C.

Bitwise Boolean functions support parameters of type ANY_BIT or ANY_INT.

Examples

ExampleReturn Value
2#10001 OR 2#10112#11011
2#10001 AND 2#10112#1
2#10001 & 2#10112#1
2#10001 XOR 2#10112#11010
NOT BYTE#2#100012#11101110
TRUE OR FALSETRUE
TRUE AND FALSEFALSE
OR( 2#10001, 2#1011 )2#11011
AND( 2#10001, 2#1011 )2#1
XOR( 2#10001, 2#1011 )2#11010

Standards Compliance

Table 26 - IEC 61131-3 2nd Edition.

Table 31 - IEC 61131-3 3rd Edition.

Further Information

Common Elements

To learn about other language Common Elements.

Glossary

For definitions of the terms used in Fernhill SCADA.