User guide

28
VTB USER GUIDE
6.8 Static Variables
The variables of type STATIC are declared in NON-VOLATILE RAM: they aren't zeroed at reset and maintain their value
also after turn off. They are very useful to retain data which change frequently (as encoders, counters, etc.), and which
could not be saved in flash memory (IMS). Besides they are common variables.
STATIC variables are always GLOBAL that is visible in all page and in all tasks.
TYPE
DIMENSION
RANGE
BIT
1 bit
From 0 to 1
CHAR
8 bit signed
From –128 to +127
UCHAR
8 bit unsigned
From 0 to 255
INT
16 bit signed
From –32.768 to +32.767
UINT
16 bit unsigned
From 0 to 65.535
LONG
32 bit signed
From –2.147.483.648
to +2.147.483.647
FLOAT
64 bit (standard DOUBLE format IEEE 75)
From -1,79769313486232e308
to +1,79769313486232e308
ARRAY
Single dimension for all variable types
except BIT type
DELEGATE
Pointer to FUNCTIONS
32 bit
ATTENZIONE: Not all systems support the STATIC variables, then refer to hardware manual.