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.
| Type | Size | Range or meaning | Aliases accepted by the API |
|---|---|---|---|
BOOL | 1 bit | true or false | bool, boolean |
BIT | 1 bit | One bit of a word or a coil | bit |
INT8 | 8 bit | -128 to 127 | int8, sint |
UINT8 | 8 bit | 0 to 255 | uint8, usint |
INT16 | 16 bit | -32 768 to 32 767 | int16, int |
UINT16 | 16 bit | 0 to 65 535 | uint16, uint, word |
INT32 | 32 bit | about ±2.1 billion | int32, dint |
UINT32 | 32 bit | 0 to about 4.29 billion | uint32, udint, dword |
INT64 | 64 bit | signed | int64, lint |
UINT64 | 64 bit | unsigned | uint64, ulint, lword |
FLOAT | 32 bit | IEEE 754 single | float32, float, real |
DOUBLE | 64 bit | IEEE 754 double | float64, double, lreal |
STRING | bytes | Text. The address carries the length. | string |
BYTES | bytes | Raw 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 family | Types 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, MPI | the Modbus list plus INT8 and UINT8 |
| HollySys | INT16, UINT16, WORD, BIT, BOOL |
| EtherNet/IP (CIP) | INT8 to UINT64, FLOAT, DOUBLE, BOOL, BIT, WORD, DWORD, LWORD (no STRING) |
| All others | BOOL, 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)
| Type | Registers (16 bit) |
|---|---|
| BOOL, BIT, INT16, UINT16 | 1 |
| INT32, UINT32, FLOAT | 2 |
| INT64, UINT64, DOUBLE | 4 |
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):
| Order | Bytes in the registers | Typical |
|---|---|---|
ABCD | big endian | Most Modbus devices, the demo plant |
BADC | bytes swapped inside each register | |
CDAB | registers swapped (word swap) | Many PLCs and drives |
DCBA | fully reversed | Little 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:
| Where | Setting | Applies to |
|---|---|---|
| Device connection form (Modbus family) | Endianess of 4-Byte Data (ABCD, BADC, DCBA, CDAB) and Endianess of 8-Byte Data | every 32-bit and 64-bit tag of the device |
| Per-tag suffix, Modbus | #BB, #LB, #LL, #BL on a 64-bit tag | that 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 |
| Strings | H or L after the length (FINS, MC), for example D200.20L | that tag only |
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.
| Quality | Meaning | In the Console |
|---|---|---|
good | The device answered and the value is valid. | Label "Good". |
uncertain | The 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"). |
bad | The 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". |
unknown | Quality 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 givesuncertain, anything else givesbad. The original code is kept instatusCodeof 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
badsample carries an error code. It appears aserrorsin the MQTT values-format and aserrorin the tags-format. See Uplinks.
Error codes
The runtime gives each failed tag a numeric code:
| Code | Meaning |
|---|---|
| 2201 | Tag name already exists |
| 2202 | Address format invalid |
| 2204 | Attribute not supported by this tag or protocol |
| 2205 | Type not supported |
| 3000 | Read failure |
| 3001 | Write failure |
| 3002 | Device disconnected |
| 3003 | Tag is not allowed to be read |
| 3004 | Tag is not allowed to be written |
| 3007 | Type mismatch |
| 3010 | Protocol decode error |
| 3011 | Plugin not running |
| 3012 | Tag not ready (no value yet) |
| 3014 | Timeout |
| 3015 | Station offline |
| 3030 | Write cancelled before it was sent |
See Error codes for the complete list.
Timestamps
| Where | Format | Source |
|---|---|---|
MQTT uplink payloads (values, tags) | timestamp: epoch milliseconds | The 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.123Z | The Site Runtime. |
| Webhook samples | timestamp: RFC 3339 string | The Site Runtime. |
| Historian and reports | UTC, shown in the site time zone | The 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
badexplicitly in your consumers. A missing value and a zero are not the same.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
All tags of a device are bad | Device disconnected, or wrong unit id. | Check the device status. |
One tag is bad | Wrong address or type. | Check Addressing. |
| Float values look random | Byte order. | Change the byte order. |
| Values are 10 times off | Raw value in tenths. | Set Decimal. |
| Counter jumps backwards | 16-bit counter wrap, or a PLC reset. | Use a 32-bit counter; see the OEE counter settings. |
| Timestamps are hours off | Runtime clock or time zone. | Fix the host clock. The site time zone only changes display. |