Understanding data
types
When creating a transport map or listener map, you will encounter different data types. That is because the data types support different solution layers:
- The device or sensor layer. These data types are specific to the device, sensor or other objects that have device variables.
- The map layer. These data types represent the map variables that you define using the Workbench.
- The enterprise layer. These data types are specific to the enterprise applications.
Device variable data types
These data types are specific to the device that
contains the device variable. You will see these data types
when the specific device and device variable are
selected.
The following table lists a subset of the available device
variable data types and their ranges, additional
information is provided in the specific device section of
Device types.
Data type |
Description |
Range |
---|---|---|
BOOLEAN |
Boolean data is used in one-bit units. | zero to 1 |
INT2 | 2 bytes. Word data is 16-bit numeric data used by basic and application instructions. | -32768 to 32767 |
INT4 | 4 bytes. Double word data is 32-bit numerical data used by basic and application instructions. | -2147483648 to 2147483647 |
FLOAT4 |
4 bytes. Real number data is 32-bit floating decimal point data used with basic and application instructions. | 3.4028234663852886 E 38 to 1.401298464324817 E -45 both positive and negative |
STRING | String data is character data used by basic and application instructions. | A sequence of contiguous WORDs up to a user specified length that contains character data. |
Transport map and listener map data types
Map data types support map variables that you define.
The data types translate all device variable data types to
enterprise application data types.
You will see these data types when creating map variables
from the Input or Output tab on the Transport Map and
Listener Map windows.
The following table lists available map data types and
their ranges:
Data type | Description | Range |
---|---|---|
INT1 | 1-byte integer |
-128 to 127 |
INT2 | 2-byte integer | -32768 to 32767 |
INT4 | 4-byte integer | -2147483648 to 2147483647 |
INT8 |
8-byte integer | - 9223372036854775808 to 9223372036854775807 |
UINT1 | 1-byte unsigned byte | 0 to 255 |
UINT2 | 2-byte unsigned word | 0 to 65535 |
UINT4 | 4-byte unsigned double
word |
0 to 4294967295 |
UINT8 | 8-byte unsigned long word | 0 to 18,446,744,073,709,551,615 |
Enterprise application data types
There are data types associated with each supported enterprise application product including IBM DB2, DB2 400, Oracle, Microsoft SQL server, and MySQL. You will see these data types when defining the map variables to the enterprise payload.
In the following example, the DB Type
column shows IBM DB2 data types that were specified when
the database table was created.
In the following example, the DB Type
column shows data types from Oracle.
Example data conversion
The following shows how data types from a PLC are mapped
to DB2 database data types.