PLC MQTT Tag Naming and Schema Versioning Guide for Edge Gateways

The Robustel EG5120 Edge Computing Gateway can acquire selected industrial data and publish MQTT through verified applications, but stable PLC tag naming must be designed as a contract for dashboards, historians and analytics rather than copied from one controller’s address table. Keep asset identity, measurement name, unit, timestamp, quality and schema version explicit so a gateway or PLC change does not silently change meaning.
The guiding rule is that a consumer should understand a record without knowing the source register address. Preserve that raw identity in metadata for traceability, while exposing a durable operational name.
Separate physical identity from the controller address
Use a stable hierarchy such as organisation/site/area/asset/measurement, with a documented character set and case convention. Do not embed credentials, personal names or sensitive plant labels in public broker paths.
| Field | Example | Purpose |
|---|---|---|
| site_id | de01 | stable deployment identity |
| area_id | utilities | operational grouping |
| asset_id | pump_07 | maintainable equipment identity |
| measurement | discharge_pressure | human-readable meaning |
| source_ref | plc2.db14.dbd20 | traceability to raw controller mapping |
| schema_version | 2.1 | consumer contract |
Avoid encoding unit or data type only in the topic. Those properties can change and belong in a versioned payload or registry.
The Robustel video “How to Collect PLC Data for SCADA, MES & Cloud with an Edge Gateway” shows the source-to-northbound path. Topic and payload design must then be agreed with the actual consumers.
Define a payload that carries meaning and health
A minimal industrial record normally needs value, engineering unit, measurement time, quality and source identity. Add gateway receipt time when it helps diagnose latency or replay. For counters, include rollover or reset semantics in the schema documentation.
| Field | Required question |
|---|---|
value | what type and scale is valid? |
unit | which canonical engineering unit is used? |
ts_source | did the source provide a trusted measurement time? |
ts_gateway | when did the gateway acquire the value? |
quality | good, stale, bad, substituted or uncertain? |
source_ref | which raw PLC identity produced it? |
schema_version | which consumer contract applies? |
Robustel’s smart-parking application example illustrates several asset types feeding a common platform. The same principle applies in a plant: common governance should not erase source-specific meaning.
Version breaking and non-breaking changes differently
Adding an optional field with a default interpretation may be backward compatible. Renaming a field, changing units, changing type, altering topic hierarchy or redefining quality values is breaking. Use a new major schema version or a parallel topic and give consumers a migration window.
Do not overwrite raw register identity when a PLC programme changes. Maintain a mapping history that links old and new addresses to the stable asset measurement, with effective dates and approval.
| Change | Version action | Migration evidence |
|---|---|---|
| add optional diagnostic field | minor version | old consumer ignores it safely |
| change °C to K | major version or explicit new field | both units verified during overlap |
| rename asset | identity-governance decision | alias and historical continuity tested |
| change integer to floating point | major version | parser and historian validation |
| move PLC register | mapping revision, not public rename | source comparison before cutover |
How Robustel EG5120 Edge Computing Gateway supports a governed data contract
The Robustel EG5120 Edge Computing Gateway provides serial/Ethernet interfaces, native Modbus paths, MQTT-to-cloud capability, RobustOS Pro, containers and local storage. It can host the mapping and publishing layer close to the PLC, allowing source references and operational names to be managed separately.
For compatible EG5120 deployments, Robustel E2C Factory supplies documented data collection, management, local operations and northbound forwarding. The combined value is a verified gateway boundary plus an operational data layer; exact drivers, payloads and version rules remain project configuration.
| Governance pain | Verified role | Operating effect | Acceptance evidence |
|---|---|---|---|
| PLC addresses change | local mapping application | stable northbound identity can remain | before/after source comparison |
| WAN interruptions | local processing/storage | preserve timestamped records for replay | sequence and duplicate test |
| many gateways drift | RCMS-managed operations | deploy approved gateway/application versions | audit and version inventory |
Run contract tests before every schema change
Maintain golden sample messages for good, stale, bad, missing, high/low limit and counter-reset cases. Validate them against every critical consumer: broker rules, dashboard, historian, alerting and analytics. A broker accepting JSON proves syntax, not semantic compatibility.
Robustel’s secure remote access to industrial robots application example illustrates why a maintainable service path matters when deployed equipment changes. Apply the same discipline to data: record who approved the mapping and which consumer versions were tested.
During rollout, publish the old and new schema in parallel where practical, compare values and quality, then retire the old path only after consumer owners sign off. Keep rollback until retention and replay have passed.
Protect names, ownership and long-term meaning
Create a naming authority and change board proportionate to the estate. The PLC engineer owns source identity, the asset owner approves operational names, the data owner approves schema meaning, and platform owners validate consumers. Avoid letting one dashboard developer rename the plant contract unilaterally.
Store the schema, examples, mapping and compatibility policy in version control. The gateway configuration should reference that approved version so an incident can trace a published value back to its source and rule set.
FAQs
Q1. What are the restrictions on MQTT topic names?
MQTT topics are case-sensitive UTF-8 strings and use / as a hierarchy separator. Avoid wildcard characters in published topic names, leading/trailing ambiguity, empty levels and sensitive information.
Q2. What are tags in PLC programming?
Tags are named references to controller variables such as inputs, states, setpoints and measurements. Their controller names are useful source references but may not be stable or meaningful enough for enterprise consumers.
Q3. Is MQTT still relevant for industrial data?
Yes. It is widely used for lightweight publish/subscribe integration, but it does not define the business meaning, quality or schema of the payload. Those require an agreed contract.
Q4. Is MQTT TCP or UDP?
Standard MQTT runs over TCP. Other transports or related protocols may exist, so document the broker endpoint, TLS and client behaviour used by the project.
Q5. How does the Robustel EG5120 Edge Computing Gateway support PLC-to-MQTT naming?
It provides industrial interfaces, Modbus and MQTT capabilities plus a Linux application environment for mapping and publishing. A compatible E2C Factory deployment can add a documented data layer, while naming and schema governance remain project responsibilities.
Conclusion
The Robustel EG5120 Edge Computing Gateway is best suited to PLC-to-MQTT architectures that need local mapping, processing and managed deployment close to the source. The gateway can implement the contract, but asset and data owners must define its meaning.
Stabilise identity, preserve raw source references, carry units/time/quality explicitly and version breaking changes. Test every critical consumer before cutover so a neat topic tree does not hide a broken operational record.
Explore More Articles About Robustel Edge Computing Gateways
About the Author
Robustel Editorial Team
The Robustel Editorial Team publishes practical articles on industrial connectivity, edge computing, LoRaWAN and device management, focusing on deployment considerations, technical limitations and long-term operation.





