OMRON
CHAPTER 4 – CX-Supervisor Script Language
Revision 2.0
Page 11
Further Point Assignment
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:
•
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).
Typical Examples
lift = rate/5.0
The Integer or Real point ‘lift’ is assigned the value calculated by the value of point ‘rate’ divided by
5, plus the value of point ‘height’. Precedence can be changed by the introduction of parenthesis.
lift = lift - 0.2
The Integer or Real point ‘lift’ is assigned the value calculated by the current value of point ‘lift’
minus 0.2.
distance = distance * time
The Integer or Real point ‘distance’ is assigned the value calculated by the current value of point
‘distance’ multiplied by point ‘time’.
References
Refer to chapter 4, Logic and Arithmetic
for details of the use of arithmetic and logic functions.
Refer to chapter 4, Punctuation for details of the use of parenthesis.
Содержание CX-SUPERVISOR - SCRIPT REFERENCE REV2.0
Страница 2: ...CX Supervisor Script Language Software Revision 2 0...
Страница 3: ......
Страница 5: ...CX Supervisor Script Language OMRON Page ii Revision 2 0...
Страница 7: ...CX Supervisor Script Language OMRON Page iv Revision 2 0...
Страница 9: ...CX Supervisor Script Language OMRON Page vi Revision 2 0...
Страница 13: ......
Страница 15: ...CHAPTER 1 Introduction OMRON Page 2 Revision 2 0...
Страница 19: ...CHAPTER 2 Expressions OMRON Page 6 Revision 2 0...
Страница 21: ...CHAPTER 3 Scripts OMRON Page 8 Revision 2 0...
Страница 151: ...CHAPTER 8 Colour Palette OMRON Page 138 Revision 2 0...