EasyManuals Logo

Omron CX-Supervisor Reference Manual

Omron CX-Supervisor
164 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #16 background imageLoading...
Page #16 background image
SECTION 2 Expressions
15
Note: Boolean Expressions execute when the expression is TRUE so it can be said
that every Boolean expression has an inferred "== TRUE". Sometimes
Boolean expressions can be difficult to read e.g. "bMyFlagPoint" or "BitMask &
0x80. It can help maintenance if this "== TRUE" is explicitly specified e.g.
"bMyFlagPoint == TRUE" or "BitMask & 0x80 == TRUE".
Note: When using Boolean operators (e.g. ==, !=, &&, ||, |) never mix tests for
Boolean and non Boolean operands. For example never use "bMyFlagPoint
== 1" or "bMyFlagPoint == 0". Instead always test using the correct Boolean
constant i.e. "TRUE" or "FALSE" for CX-Supervisor scripts, or "True" and
"False" when using VBScript.
Note: On Condition scripts are only executed when the expression is TRUE.
Sometimes this leads to peculiar results, for example using $Second as it will
be executed when $Second changes to 59, and to 1 but not when it changes
to 0. To execute a condition script any time a point changes, force the
expression to always evaluate to TRUE for example "$Second || TRUE". This
works because the $Second forces the expression to be tested when the point
changes, but the || TRUE means the test will return TRUE regardless of the
value of the point.
Note: Use array points in On Condition expressions with caution. The expression
"MyArray[3] == 1" does not mean "execute every time the third element
changes to 1". It means execute when any element of MyArray changes and
the third element happens to be 1
Note: Using an array point without any index is the same as specifying element 0 i.e.
MyArray actually means MyArray[0] == 1

Table of Contents

Other manuals for Omron CX-Supervisor

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CX-Supervisor and is the answer not in the manual?

Omron CX-Supervisor Specifications

General IconGeneral
BrandOmron
ModelCX-Supervisor
CategorySoftware
LanguageEnglish

Related product manuals