Points
4-1
Points
4-1-1
Basic Point Assignment
Note:
4-1-2
Further Point Assignment
20
Syntax
pointname = expression
Remarks
Argument
Description
pointname
The point name to be assigned a value.
expression
The value to be assigned to pointname. The expression
may be of type Boolean, Integer, Real or Text.
Typical Examples
count = 100
The Integer or Real point 'count' is assigned the value 100.
result = TRUE
The Boolean point 'result' is assigned the state ''TRUE''.
name = "Valve position"
The Text point 'name' is assigned the associated text, contained within
quotation marks.
When assigning Real (floating point) values to an Integer point the assignment
uses the 'Symetrical Rounding Down' (towards 0) standard. This means a
value of 4.1 would be assign a value 4. A value of -4.1 would asign a value of -
4.
References
Refer to chapter 4, Punctuation for details of the use of quotation marks.
Syntax
pointname = expression
Remarks
Argument
Description
pointname
The point name to be assigned a value.
expression
The value to be assigned to pointname. The expression
may be of type Boolean, Integer or Real and can include
other points, logical or arithmetical expressions.
Mathematical precedence is applied as follows:
SECTION 4 CX-Supervisor Script Language
•
Parenthesis (highest).
•
Unary minus and NOT logical operator.
•
Multiplication, division and modulus.
•
Addition and subtraction.
•
Greater than, less than, greater than or equal to, and
less than or equal to relational operators.
•
Shift Left (SHL) and Shift Right (SHR).
•
Equal to and not equal to relational operators.
•
Bitwise AND, XOR, OR.
•
AND logical operator, OR logical operator (lowest).