Required syntax for expressions and scripts
- Last UpdatedJul 31, 2024
- 1 minute read
The syntax in scripts is similar to the algebraic syntax of a calculator. Most statements are presented using the following form:
a = (b - c) / (2 + x) * xyz;
This statement places the value of the expression to the right of the equal sign (=) in the variable location named "a."
-
A single entity must appear to the left of the assignment
operator =.
-
The operands in an expression can be constants or variables.
-
Statements must end with a semicolon (;).
Entities can be concatenated by using the plus (+) operator. For example, if a data change script such as the one below is created, each time the value of "Number" changes, the indirect entity "Setpoint" changes accordingly:
Number=1;
Setpoint = "Setpoint" + Text(Number, "#");
Where the result is "Setpoint1."