Expression Building Guidelines
- Last UpdatedJun 06, 2017
- 1 minute read
Follow these guidelines when you define expressions:
-
Dividing by zero returns a result of zero.
-
Negate is only valid on numeric operands.
-
Add, Subtract, Multiply, and Divide are valid only when used with numeric operands.
-
Use Modulus only with numeric integer values.
-
Less Than, Greater Than, Less Than or Equal To, Greater Than or Equal To, Equal To, and Not Equal To are valid only when evaluating non-Boolean operands or expressions that have a non-Boolean result.
-
And and Or operators are valid only when evaluating Boolean operands or expressions that have a Boolean result.
-
The operand to the left of the Assign operator (:=) must be a Tag operand.
-
You can make tag assignments, but they require a special format so that the overall expression results in a Boolean value. You must define assignment expressions with the following format:
({Tag}:=Value)=1
Examples of tag assignment expressions are provided later in this section.
-
Equipment must be allocated for tags to work properly in the expression.
WARNING! Tag assignment can be constructed in the Expression Editor. However, use caution in defining these expressions. Only tags with an access of Read/Write can be used in assignment expressions. If you create assignment expressions using Read Only tags, run-time errors are generated.