Tag Data Types
- Last UpdatedJul 18, 2023
- 2 minute read
Tags in Plant SCADA hold data values that can be defined as one of the following data types.
|
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 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 |
|
ULONG |
Unsigned Long Integer |
4 bytes |
0 to 4,294,967,295 |
|
LONGBCD |
Long Binary- Coded Decimal |
4 bytes |
0 to 99,999,999 |
|
REAL |
Floating Point |
4 bytes |
-3.4E38 to 3.4E38 |
|
STRING |
String |
256 bytes (maximum) |
ASCII (null terminated) Note: Non printable characters within string tag values will be substituted with spaces. For example, string [ 0x01, 0x41, 0x10, 0x42 ] will appear as "A B" so cache loading continues to operate. |
While numeric variables are more common, some I/O devices also support ASCII strings. You can use strings to store text data (for example, from a bar code reader). All strings needs to be NULL-terminated in the I/O device , as Plant SCADA uses the NULL character to check for the end of a string. If no NULL character is present, Plant SCADA reads (and displays) any extra characters in memory, after the end of the string.
When you are using a disk I/O device, you can also specify a string data type for storage of recipes, or for operator display information.
Not every I/O device supports strings. However, if your I/O device does support integer data types, Plant SCADA can use these integer registers to store ASCII strings in your I/O device. Plant SCADA strings can only be stored in contiguous blocks (consecutive registers), and are stored as an array.
A Cicode variable of INT data type can be used to store Tag data types: BCD, BYTE, DIGITAL, INT, UINT, LONG, ULONG and LONGBCD.
A Cicode variable of the QUALITY or TIMESTAMP data type can be used to store the Tag quality and timestamp items.
Tag values can be used with the Cicode variable data types (see Declaring the Variable Data Type).