Local variables allow you to store data in memory when you start your runtime system. They are created each time the system starts, and therefore do not retain their values when you shut down. Local variables may be of any data type supported by CitectSCADA, including two-dimensional arrays of standard CitectSCADA types.
Local variables are useful when you need each process to have a separate copy of the data. Each process has its own copy of each local variable configured in the project, and the values in a local variable are available only to the process that wrote them.
To configure a local variable:
Data Type |
Variable |
Size |
Allowed Values |
BCD |
Binary- Coded Decimal |
2 bytes |
0 to 9,999 |
BYTE |
Byte |
1 byte |
0 to 255 |
DIGITAL |
Digital |
1 bit or 1 byte |
0 or 1 |
INT |
Integer |
2 bytes |
-32,768 to 32,767 |
UINT |
Unsigned Integer |
2 bytes |
0 to 65,535 |
LONG |
Long Integer |
4 bytes |
-2,147,483,648 to 2,147,483,647 |
LONGBCD |
Long Binary- Coded Decimal |
4 bytes |
0 to 99,999, |
REAL |
Floating Point |
4 bytes |
-3.4E38 to 3.4E38 |
STRING |
String |
up to 256 bytes |
ASCII (null terminated) |
Numeric and digital variables have a default value of 0 and string variables default to "" (empty string). If you do not specify a data type, the local variable will be treated as 16-bit integer.
See Also