Skip to main content

Data types

Every tag has a data type that says how the raw bytes of the device are read. Pick the type that matches the PLC variable. A wrong type gives wrong numbers, not an error, unless the area does not allow it (MI-3004).

Types​

The Console keeps one canonical catalogue of 14 types. Names you may see in a device or tag form (such as FLOAT, DOUBLE, WORD, DWORD, LWORD) are aliases of these.

TypeSizeRange or contentAliases
bool (Boolean)1 bittrue or false. A single coil, discrete input or boolean node.BOOL, boolean
bit1 bitA named bit inside a register or packed integer (address .0 to .15).BIT
int88 bit-128 to 127SINT
uint88 bit0 to 255USINT
int1616 bit-32,768 to 32,767INT
uint1616 bit0 to 65,535WORD, UINT
int3232 bit-2,147,483,648 to 2,147,483,647DINT
uint3232 bit0 to 4,294,967,295UDINT, DWORD
int6464 bit-9.22e18 to 9.22e18LINT
uint6464 bit0 to 1.84e19ULINT, LWORD
float3232 bitIEEE 754 single precision, about 7 significant digitsFLOAT, REAL
float6464 bitIEEE 754 double precision, about 15 significant digitsDOUBLE, LREAL
stringvariableCharacters with an explicit length (address form such as .10 for 10 bytes).STRING
bytesvariableAn opaque byte array.BYTES

Notes:

  • There is no separate unsigned float, and no BCD type in the tag editor.
  • Precision (0 to 17 decimal places) can be set only for FLOAT and DOUBLE tags. It rounds the value after scaling.
  • Scaling: the engineered value is raw * multiplier + offset (a multiplier of 0 is treated as 1). Example from the demo plant: Temperature is stored as INT16 in tenths of a degree, so the tag uses scale 0.1. A scaled tag cannot use safe write.
  • Numbers wider than 53 bits (int64, uint64) lose precision when a client reads them as JSON numbers. Prefer uint32 or float64 for values you need to chart.

Types the tag editor offers​

The list of types depends on the protocol family:

FamilyTypes offered
GenericBOOL, BIT, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, DOUBLE, STRING, BYTES
ModbusINT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, DOUBLE, BIT, BOOL, WORD, DWORD, LWORD, STRING, BYTES
Siemens S7the Modbus list plus INT8 and UINT8
HollySysINT16, UINT16, WORD, BIT, BOOL
EtherNet/IP (CIP)INT8 to UINT64, FLOAT, DOUBLE, BOOL, BIT, WORD, DWORD, LWORD (no STRING)

The default type of a new tag differs by protocol: Modbus UINT16, HollySys INT16, S7 and MPI UINT16, CIP FLOAT.

Which protocols support which types​

The Console's catalogue marks each combination as yes (supported) or planned (not yet in the catalogue). The tag editor may still offer a type the catalogue marks as planned; the address pattern in the protocol's schema is the final rule for what a given area accepts. Always check the protocol page.

Protocol familySupported (yes)Planned
Modbus family (Modbus TCP, RTU, RTU over TCP, ASCII variants, Inovance, Xinje, HollySys, Delta)bool, int16, uint16, int32, uint32, int64, uint64, float32, float64bit, string, bytes, int8, uint8
OPC UA clientbool, int8 to int64, uint8 to uint64, float32, float64bit, string, bytes
EtherNet/IP (CIP), Omron EtherNet/IP, Allen-Bradley 5000bool, int8 to int64, uint8 to uint64, float32, float64bit, string, bytes
Siemens S7 (modern, legacy)bool, int8 to int64, uint8 to uint64, float32, float64everything else
Siemens S5 FetchWrite, Siemens MPIbool, int8 to int64, uint8 to uint64, float32, float64bit, string, bytes
Omron FINS TCP and UDPall except bytesbytes
Omron Host Linkbool, int16, uint16, int32, uint32, int64, uint64, float32, float64, stringint8, uint8, bit, bytes
Mitsubishi MC (1E, 3E, 4E) and FX serialbool, int8 to int64, uint8 to uint64, float32, float64bit, string, bytes
Allen-Bradley DF1bool, bit, int16, uint16, int32, uint32, float32, stringfloat64, int64, uint64, bytes, int8, uint8
Allen-Bradley MicroLogixbool, int16, uint16, int32, uint32, float32all others
CODESYS V3bool, uint8, int16, uint16, int32, uint32, float32, float64int8, int64, uint64, bit, string, bytes
GE SRTPbool, int16, uint16, int32, uint32, float32int8, uint8, int64, uint64, float64, bit, string, bytes
ABB COMLIall except bytesbytes
Beckhoff ADS, Panasonic Mewtocol, IEC 60870-5-104, DNP3, BACnet/IP, KNX, HJ212, NON A11, HSMS, SNMP, OPC DA gatewaybool, int8 to int64, uint8 to uint64, float32, float64string, bit, bytes
MQTT client, Kafka clientthe line above plus stringbit, bytes

Where this table says bool for a Modbus coil or discrete input, the address area decides (see below).

Byte and word order (endianness)​

A 32-bit value is stored in two 16-bit registers, and devices disagree about the order of bytes and registers. MakeIntelligent lets you choose per device (connection options) and per tag (address suffix).

Think of the four bytes of a 32-bit value as A B C D, where A is the most significant byte. The option Endianess of 4-Byte Data reads "ABCD corresponds to 1234".

CodeByte order on the wireNameTypical use
ABCD (default)A B C DBig-endianThe Modbus standard order
BADCB A D CBytes swapped in each registerSome PLCs
CDABC D A BRegisters (words) swappedVery common on Modbus devices
DCBAD C B ALittle-endianSome meters and drives

Worked example. The 32-bit float 123.45 is 0x42F6E666, so A=42, B=F6, C=E6, D=66.

SettingRegisters as sent
ABCD42F6, E666
BADCF642, 66E6
CDABE666, 42F6
DCBA66E6, F642

For 8-byte types (int64, uint64, double) the option Endianess of 8-Byte Data has four choices, shown as byte positions: 12 34 56 78 (default, big-endian), 21 43 65 87, 87 65 43 21 (full little-endian) and 78 56 34 12.

If a float reads as nonsense such as 1.0e-38 or 3.4e+38, the order is wrong. Try CDAB first, then BADC and DCBA.

Per-tag suffixes #B and #L​

Some address forms accept a suffix that overrides the device option for one tag:

SuffixApplies toMeaning
#B, #L16-bit valuesByte order inside the register: #B big, #L little. Example 1!40001#L.
#BB, #BL, #LL, #LB32-bit and 64-bit values, floatsWord and byte order. The two letters give the order of the words and of the bytes within them.

The suffix is allowed only where the protocol page lists it in the address form (for example Modbus TCP, Inovance, Siemens S7 and Omron FINS). Check there.

caution

The exact meaning of each two-letter code is protocol specific. If you rely on #BL and similar, read a test value from the device and compare it with the PLC before you trust the tag.

Modbus address areas and types​

The first digit of the reference chooses the table.

ReferenceTableTypical types
0xxxxCoilbool
1xxxxDiscrete inputbool
3xxxxInput registerint16, uint16, 32 and 64 bit across registers
4xxxxHolding registerint16, uint16, 32 and 64 bit across registers, bit with .0 to .15, string with .<length>

Demo plant, unit id 1 (Filler): 1!40001 State UINT16, 1!40003 Temperature INT16 (scale 0.1), 1!40004 Pressure FLOAT (two registers), 1!40006 GoodCount UINT32.

TypeRegisters used
16 bit1
32 bit, FLOAT2
64 bit, DOUBLE4

Quality and timestamps​

Every value carries a quality: good, uncertain, bad or unknown. A bad sample carries no value. Timestamps in uplink payloads are epoch milliseconds set by the Site Runtime; in public UNS payloads they are ISO 8601 UTC. See Data types and quality.

Limits and good practice​

  • Match the type to the PLC variable, then scale in the tag (not in a rule).
  • Choose float32 for values with decimals, uint32 for counters.
  • Test one tag per type after you change the order option.

Troubleshooting​

SymptomCauseFix
Value is far too large or tinyWrong word orderChange ABCD to CDAB.
Value is off by a factor of 10Missing scaleSet the multiplier, for example 0.1.
Negative where positive expectedSigned type on an unsigned valueUse the uint type.
MI-3004Type not valid for the address areaSee the tables above and the protocol page.
MI-3003Address invalidCheck the address form.