EasyManua.ls Logo

CRE Technology GENSYS 2.0 - Variables; Table 51 - Available Instructions

CRE Technology GENSYS 2.0
244 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
Loading...
A53 Z0 9 0020 L En Technical documentation
Chapter : Text file & PLC
149
Instruction family
PLC instruction
Definition
Affectation
:=
Affectation
Comparison operators
EQ
Equal
NE
Not Equal
GT
Greater Than
LT
Less Than
GE
Greater or Equal
LE
Less or Equal
Array
[...]
Array element
Tests
TEST
THEN
ELIF
ELSE TEND
Comments
@
Table 51 - Available instructions
Instructions are separated by a semicolon (;) except before reserved words BEND, ELIF, ELSE and TEND. INIT
and PROG blocks are terminated by a dot (.).
Each instruction is terminated by a semicolon (;) except before reserved words (BEND, ELIF, ELSE, TEND).
14.5
Variables
14.5.1
Variable type and size
The PLC equations only use 16 bit signed integer values. This means that all variables and data should be
between -32768 and +32767. This is an important point to keep in mind when comparing values or doing
calculations. For example, 20000*10 will produce a calculation overflow. For the same reason, variables
displayed with decimal digits are treated in the equations as if the decimal point wasn’t there. For example,
a power supply voltage of “24.5 V” will be treated as “245” in the equations.
Be careful when entering values which have digits after the decimal point. If you have one digit after the
dot, you have to multiply the number by 10. If you have two digits, multiply by 100.
For instance, the battery voltage measure (variable E0041), is from 0.0 to 6553.5, so you have one digit
after the dot. If you want to compare the battery voltage to 25.0 volts, you have to write:
TEST E0041 GT 250 THEN...
To know the number of digits after the dot, look in the “A53 Z0 9 0030-x.xls” file. In the 'Mini' / 'Maxi'
columns, the number of digits after dot appears.
14.5.2
Locked variables versus dynamic variables
The PLC works with two complete sets of variables.
The first set is a snapshot of the values before the execution of the equations
The second set of variables is the result of the different equations already executed. Before
execution of the very first equation, the second set is an exact copy of the first set of
variables. It is then altered by the results of the custom equations.
Access to these two sets of variables is differentiated by the way you refer to a variable:
Eyyyy means that you want to use the value of variable YYYY before any equation was
executed.
Xyyyy means that you want the actual value of variable YYYY, which has been modified by
previous equations.

Table of Contents

Related product manuals