Skip to main content

Data types and quality

Every sample the Site Runtime reads has a value, a type, a quality and a timestamp. This page explains each one, so you can pick the right type for a tag and judge a value you see in a trend, a dashboard or an MQTT message.

Data types​

The Type of a tag is the type of the value on the device. Choose the one the device documents.

TypeSizeRange or meaningAliases accepted by the API
BOOL1 bittrue or falsebool, boolean
BIT1 bitOne bit of a word or a coilbit
INT88 bit-128 to 127int8, sint
UINT88 bit0 to 255uint8, usint
INT1616 bit-32 768 to 32 767int16, int
UINT1616 bit0 to 65 535uint16, uint, word
INT3232 bitabout ±2.1 billionint32, dint
UINT3232 bit0 to about 4.29 billionuint32, udint, dword
INT6464 bitsignedint64, lint
UINT6464 bitunsigneduint64, ulint, lword
FLOAT32 bitIEEE 754 singlefloat32, float, real
DOUBLE64 bitIEEE 754 doublefloat64, double, lreal
STRINGbytesText. The address carries the length.string
BYTESbytesRaw bytes. The address carries the length.bytes

The dialog also lists WORD, DWORD and LWORD for some plugins. In the Console they are the unsigned 16, 32 and 64-bit types. Prefer UINT16, UINT32 and UINT64, which say the same thing.

Which types each plugin offers​

Plugin familyTypes in the dialog
Modbus (TCP, RTU, ASCII and variants)INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, DOUBLE, BIT, BOOL, WORD, DWORD, LWORD, STRING, BYTES
Siemens S7, MPIthe 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)
All othersBOOL, BIT, INT8, UINT8, INT16, UINT16, INT32, UINT32, INT64, UINT64, FLOAT, DOUBLE, STRING, BYTES

The list in the dialog is a superset. What a protocol really supports is in the Tag addresses and data types table of its protocol reference. For example, Modbus coils and discrete inputs can only be BOOL or BIT.

Registers per type (Modbus)​

TypeRegisters (16 bit)
BOOL, BIT, INT16, UINT161
INT32, UINT32, FLOAT2
INT64, UINT64, DOUBLE4

Scaling​

A numeric tag can be scaled: value = raw × Decimal + Bias, then rounded to Precision if set. The raw value stays available as rawValue in live samples. See Groups and tags.

Byte order​

Devices store 32-bit and 64-bit values in several registers. Vendors disagree about the order. Four orders exist for 32 bits (letters are the bytes of the value, A is the most significant):

OrderBytes in the registersTypical
ABCDbig endianMost Modbus devices, the demo plant
BADCbytes swapped inside each register
CDABregisters swapped (word swap)Many PLCs and drives
DCBAfully reversedLittle endian devices

For 64 bits the options are 12 34 56 78, 21 43 65 87, 87 65 43 21 and 78 56 34 12 (digits are byte positions).

How to set the order:

WhereSettingApplies to
Device connection form (Modbus family)Endianess of 4-Byte Data (ABCD, BADC, DCBA, CDAB) and Endianess of 8-Byte Dataevery 32-bit and 64-bit tag of the device
Per-tag suffix, Modbus#BB, #LB, #LL, #BL on a 64-bit tagthat tag only. #BB = 12 34 56 78, #LB = 21 43 65 87, #LL = 87 65 43 21, #BL = 78 56 34 12.
Per-tag suffix, Siemens S7#L on a 16-bit tag swaps the two bytes. On a 32-bit tag #BB = ABCD, #BL = BADC, #LL = DCBA, #LB = CDAB.that tag only
StringsH or L after the length (FINS, MC), for example D200.20Lthat tag only
Modbus 16-bit and 32-bit suffixes

For Modbus the Site Runtime applies the byte order of 32-bit values from the device setting. The suffixes #B and #L on a 16-bit Modbus tag are accepted but do not change the value in this version. On a 32-bit Modbus tag the form only accepts #BB, #BL, #LL and #LB, which act on 64-bit values. Set 32-bit order on the device.

How to find the right order: read a FLOAT of which you know the value, for example 3.2 bar. If you get a huge number or 0, try the other three orders. The demo plant uses ABCD.

Quality​

Quality tells you whether you may trust a value. Every sample has one of four.

QualityMeaningIn the Console
goodThe device answered and the value is valid.Label "Good".
uncertainThe value is there but is doubtful (for example a source status in the uncertain range)."Uncertain". Trend lines are dashed ("uncertain or partly bad readings").
badThe read failed or the device flagged the value as invalid. A bad sample has no value."Bad, no value". Trend lines break: a gap means "bad readings or no data".
unknownQuality was not recorded, or is not known yet."Quality not recorded".

Rules:

  • A failed read (device not connected, timeout, wrong address) gives bad.
  • For OPC UA the quality follows the severity of the status code: good gives good, uncertain gives uncertain, anything else gives bad. The original code is kept in statusCode of the live sample.
  • The historian stores quality with every value (0 unknown, 1 good, 2 uncertain, 3 bad). OEE shows what is not known as unknown and never guesses it.
  • A bad sample carries an error code. It appears as errors in the MQTT values-format and as error in the tags-format. See Uplinks.

Error codes​

The runtime gives each failed tag a numeric code:

CodeMeaning
2201Tag name already exists
2202Address format invalid
2204Attribute not supported by this tag or protocol
2205Type not supported
3000Read failure
3001Write failure
3002Device disconnected
3003Tag is not allowed to be read
3004Tag is not allowed to be written
3007Type mismatch
3010Protocol decode error
3011Plugin not running
3012Tag not ready (no value yet)
3014Timeout
3015Station offline
3030Write cancelled before it was sent

See Error codes for the complete list.

Timestamps​

WhereFormatSource
MQTT uplink payloads (values, tags)timestamp: epoch millisecondsThe Site Runtime clock, when the group message is published. It is not the device clock.
Public MQTT feed mii/uns/...ts: ISO 8601 UTC with milliseconds, e.g. 2026-12-02T10:15:30.123ZThe Site Runtime.
Webhook samplestimestamp: RFC 3339 stringThe Site Runtime.
Historian and reportsUTC, shown in the site time zoneThe sample time.

Keep the clocks of the Site Runtime hosts right (NTP). A runtime clock that is off shifts every value of its devices.

Stale data​

A value is stale when it is old, even if its last quality was good. The Console shows it in different places:

  • Overview and equipment insight mark a tag Stale when it is older than three poll intervals (at least 60 seconds). For a tag without a known interval the limit is 5 minutes, and for on-change tags 15 minutes. A stale or bad tag makes the equipment status worse ("unknown" if no value).
  • Trends show a gap where there are bad readings or no data.
  • OEE treats missing run-signal data as unknown time, not as running or stopped.
  • A rule or an AI write has a freshness check. A safe write limit Newest reading at most this old (ms) refuses a write based on an old reading.

On-change tags (attribute Subscribe) stay quiet while the value does not change. Their last value can be old and still right. For OEE run signals use a regularly polled tag.

Limits and good practice​

  • Use the exact device type. Wrong signedness is the second most common mistake after a wrong address.
  • Do not use FLOAT for counters that can pass 16 million. A 32-bit float loses whole numbers above 2^24. Use UINT32.
  • Put the unit on every analog tag. It is stored with the history, and a change of unit is marked in trends.
  • Handle bad explicitly in your consumers. A missing value and a zero are not the same.

Troubleshooting​

SymptomCauseFix
All tags of a device are badDevice disconnected, or wrong unit id.Check the device status.
One tag is badWrong address or type.Check Addressing.
Float values look randomByte order.Change the byte order.
Values are 10 times offRaw value in tenths.Set Decimal.
Counter jumps backwards16-bit counter wrap, or a PLC reset.Use a 32-bit counter; see the OEE counter settings.
Timestamps are hours offRuntime clock or time zone.Fix the host clock. The site time zone only changes display.