Logical operators
Logical operators determine the validity of one or more statements. The operators return a value of 1 (or another nonzero value) if the expression is True, or a value of 0 if it is False. Any statement that evaluates to a nonzero value is True.
Parentheses are essential in expressions using logical operators. Curly brackets are required when using a non-HMI tag in the expression.
The following table lists the logical operators.
Symbol | Operator | Example |
---|---|---|
AND, && | and | (tag_1 < tag_ 2) AND (tag_1 = 5) |
OR, || | or | (tag_1 = 5) OR (tag_1 = 10) |
NOT | negation | NOT(tag_1 > tag_2) |
Provide Feedback