![background image](http://html1.mh-extra.com/html/omron/cx-supervisor-script-reference-rev2-0/cx-supervisor-script-reference-rev2-0_reference-manual_744212025.webp)
CHAPTER 4 – CX-Supervisor Script Language
OMRON
Page 12
Revision 2.0
Logic and Arithmetic
Arithmetic Operators
Syntax
pointname = expression
Remarks
Argument Description
pointname
The point name to be assigned a value based on an arithmetical expression.
expression
The value to be assigned to
pointname
. The expression may include the
following operators with points and constants:
•
Addition ‘+’.
•
Subtraction ‘-’.
•
Multiplication ‘*’.
•
Division ‘/’.
•
Modulus ‘%’.
•
Increment ‘++’.
•
Decrement ‘--’.
Typical Examples
result = 60 + 20/5
The Integer or Real point ‘result’ is assigned the value calculated by the value of 20 divided by 5,
plus 60.
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.
References
Refer to chapter 4, Punctuation
for details of the use of parenthesis.
Bitwise Operators
Syntax
pointname = expression
or
IF expression
or
DO WHILE expression
Summary of Contents for CX-SUPERVISOR - SCRIPT REFERENCE REV2.0
Page 2: ...CX Supervisor Script Language Software Revision 2 0...
Page 3: ......
Page 5: ...CX Supervisor Script Language OMRON Page ii Revision 2 0...
Page 7: ...CX Supervisor Script Language OMRON Page iv Revision 2 0...
Page 9: ...CX Supervisor Script Language OMRON Page vi Revision 2 0...
Page 13: ......
Page 15: ...CHAPTER 1 Introduction OMRON Page 2 Revision 2 0...
Page 19: ...CHAPTER 2 Expressions OMRON Page 6 Revision 2 0...
Page 21: ...CHAPTER 3 Scripts OMRON Page 8 Revision 2 0...
Page 151: ...CHAPTER 8 Colour Palette OMRON Page 138 Revision 2 0...