Glossary · Automation software engineering and architecture
Data encoding
Also known as: Encoding, Serialization format
German: Datenkodierung
In computing, data encoding is the representation of information in a defined format for storage or transmission, for example character encodings such as UTF-8, number formats and byte order, or serialization formats such as JSON, XML, Protocol Buffers or the OPC UA binary encoding.
- Software engineering
In one sentence
Data encoding is the representation of information in a defined format, such as UTF-8, byte order or JSON, for storage or transmission.
Example
A gateway misreads 32-bit floating-point values from a device because the device sends them with swapped word order; configuring the correct encoding fixes the values.
How it applies
- Engineering: Encoding details, such as byte and word order, character sets, time formats, scaling and bit numbering, must match exactly between sender and receiver. Many integration errors come from mismatched assumptions about these details.
- Integration: Industrial protocols define their own encodings, such as the OPC UA binary and JSON encodings or register layouts in Modbus. Gateways translate between them, and each translation is a potential source of loss or error.
- Documentation: Interface documentation should state the encoding of every data item: type, length, byte order, unit, scaling and character set. For localized texts in HMIs and manuals, the documentation team should make sure the whole toolchain uses a Unicode encoding such as UTF-8.
Encoding vs. data model
A Data model defines what information exists and how it is structured; an encoding defines how that information is written as bytes or text. The same data model can have several encodings, and changing the encoding does not change the meaning of the data.