User guide

20
VTB USER GUIDE
6 VARIABLES TYPE
VTB can manage several types of variables which can be used in programming phase.
Commonly all VARIABLES will be allocated in the VOLATILE MEMORY (RAM) of the system and they are zeroed at reset.
In systems equipped with NON-VOLATILE RAM (as NG35 or PEC70) it's also possible to allocate them in this area, they
are defined as STATIC VAR and they will retain its value also after turn-off. VARIABLES follow the STANDARD terminology
similar to common programming languages.
Furthermore it can be declared VARIABLES referred to external component like CANOPEN or ETHERCAT configurator.
These are managed automatically from the system in transparent mode.
6.1 Numeric Values
VTB manages numeric values in conventional mode as other compilators. A numeric value can be written in DECIMAL
NOTATION as well as in HEXADECIMAL NOTATION by preceding the number with the prefix 0x (ZERO X). For example
the decimal number 65535 is translated with the hexadecimal 0xFFFF.
FLOATING-POINT values must be written with decimal point and it can not written in hexadecimal format.
Example:
A=1236 assigning 1236 to variable A
A=0x4d assigning hexadecimal value 0x4d to variable A
corresponding at decimal value 77
B=1.236 assigning floating-point value 1.236 to variable B