Consulting
Verticals
Co-operative BankingSEBI and FintechMSM ManufacturingEducation
Technology Stacks
How the chain worksNetwork and infrastructure architectureData traffic engineeringInformation-security data engineeringCybersecurity control architectureGovernanceIndustrial edge and IoT gatewaysIndustrial IoT and asset lifecycle
Compliance
DPDP ActRBI CSFSEBI CSCRFNIST CSF 2.0
Case Studies
For Partners
Insights
ArticlesBulletinTalks and Events
About
The LabFounderRecognitionProfessional projects

Articles / 23 October 2026

Facts Up, Intentions Down: The IoT Gateway Journey

One secure path takes plant data up to the ERP and brings validated instructions back down to the floor. This article follows the whole journey, from sensor signal to business system and back to the machine, and shows how careful reading, layered validation and hardwired safety keep every step trustworthy

IoT Gateway, Sensor to ERP and Back: One Secure Path for Plant Data and Validated Instructions

One Path, Both Directions

One secure path takes plant data up to the ERP and brings validated instructions back down to the floor.

A reading starts its journey at a sensor on the shop floor, and a decision finishes the journey back at a machine. In between, the data crosses wires, protocols, networks, security zones and business systems. When that journey follows one well-designed path, the plant gains something valuable: the ERP sees what the floor is doing, and the floor receives only instructions that deserve to be followed. This article walks the whole path in both directions, from sensor to ERP and from ERP back to the floor.

One secure path takes plant data up and brings validated instructions down.

The journey has two halves with different characters. The upward half carries facts, so it values completeness, accuracy and timing. The downward half carries intentions, so it values identity, validation and verification. Designing each half for its own purpose keeps both simple.

Where the Journey Begins

A sensor turns a physical quantity into an electrical signal. A thermocouple or an RTD gives a temperature, a pressure transmitter gives a 4-20 mA loop current, a proximity switch gives a digital contact, an energy meter speaks Modbus over RS-485, and a counter on an older machine reports part numbers on a serial line.

Every machine already speaks, and the first task is to listen well.

The signals differ in character. An analog loop carries a continuous value, where 4 mA marks the bottom of the range, 20 mA the top, and anything below 4 mA reveals a broken wire. A digital contact carries a state, open or closed. A serial device carries structured registers that a master can poll. The gateway’s field interfaces meet each of these on its own terms, with isolated analog inputs, digital inputs and outputs, and RS-232 and RS-485 ports.

Isolation at the front door protects everything behind it.

What the Gateway Does with a Raw Signal

The gateway is the translator that stands between the machine’s world and the network’s world. A signal reaches it as a raw number, and it leaves as a named, scaled, timestamped value that any system can understand.

The work goes in a clear order. The gateway reads each device on a defined cycle, with a timeout and a retry policy for every device, so a slow machine never slows the others. It then scales the raw value into an engineering value, so that a loop current of 12 mA on a 0 to 10 bar transmitter becomes 5 bar. It attaches a unit, a quality flag and a timestamp taken at the moment of the read. Finally it gives the value its place in the plant model, a name that states the line, the machine and the measurement.

A raw number becomes information the moment it gains a unit, a name and a timestamp.

Good gateways add a little intelligence at this point, close to the machine. They filter noise with a small deadband, so a reading that wiggles in the last decimal does not generate traffic. They derive useful events, such as machine running, machine idle, cycle complete and alarm raised, from the raw signals. They also calculate counters and rolling values, such as parts per hour, so the upper systems receive meaning in place of volume.

The edge turns a flood of readings into a stream of events.

A short design session on the plant model before connecting devices pays back at every later stage. When the names, units and event definitions are agreed in advance, the gateway configuration becomes a repeatable template, and a new machine of a known type takes minutes to onboard.

Carrying the Data: MQTT and Sparkplug B

Once the value is ready, it travels as a message. MQTT is a natural carrier for this task: a small, efficient publish and subscribe protocol that tolerates imperfect links. The gateway connects outward to a broker and publishes each value to a topic, and every authorised consumer subscribes to what it needs. Because the gateway initiates the connection from the plant side, the plant network can keep its inbound doors closed.

The gateway calls out, and the plant keeps its inbound doors shut.

Many plants add Sparkplug B on top of MQTT, so that every message arrives with a defined structure: metric name, data type, unit and timestamp, together with birth and death messages that announce when a gateway or device comes online or goes offline. Subscribers then know which devices exist and whether their data is current. The gateway reports by exception, sending a value when it changes beyond its deadband and sending a slow heartbeat in between that confirms the device is alive.

The plant speaks when something changes, and the heartbeat confirms that silence means calm.

The gateway also protects the data against network trouble. When the link or the broker becomes unavailable, store-and-forward buffering writes values to local storage with their original timestamps, then sends them in order on reconnect.

An outage costs the plant a delay and leaves the record intact.

A well-sized buffer, matched to the longest outage the plant expects, gives the upper systems a complete history that they can trust.

Crossing the Zones Safely

A secure path respects the structure of the plant network. The Purdue model describes layers, from the physical process and its sensors at the bottom, through control and supervision, up to site operations and the enterprise at the top. IEC 62443 adds the vocabulary of zones and conduits: groups of assets with a similar security need, and the controlled channels that connect them. Between the operational zones and the enterprise sits the industrial DMZ, a buffer zone where brokers, gateways and integration services live.

The DMZ is the plant’s customs office: everything that crosses is inspected and recorded.

In this design, the gateway sits at the lower level, close to the machines, and talks to a broker that serves the plant. A second hop, through a firewall rule that permits only the required MQTT traffic, takes selected data into the DMZ, and from there to the enterprise. Every connection runs over TLS, each gateway proves its identity with its own certificate, and access control lists limit each client to the branches of the namespace it needs.

Every device earns its own identity, and every identity earns only the access it needs.

Per-device certificates and narrow permissions give each gateway an auditable role from the first day. When one device needs to be retired or replaced, its certificate is revoked and the rest of the system carries on undisturbed.

Arriving at the ERP

By the time the data reaches the enterprise, the ERP is waiting for business facts. It rarely wants every temperature reading. It wants production counts per work order, machine downtime with a reason, material consumption, quality results, energy per batch and the start and end of operations.

The ERP wants answers, and the edge supplies them.

An integration service in the DMZ, such as a middleware layer, subscribes to the namespace, aggregates the events, maps them to ERP objects such as work orders, operations and materials, and posts them through the ERP’s integration interface, whether that is an API, a message queue or a standard connector. The service keeps the mapping in one place, so a change in either system needs one update and leaves the other untouched. A production confirmation then reaches the ERP within moments of the machine finishing, with counts and times that came straight from the machine rather than from a manual entry.

When the floor reports for itself, the ERP gains an accurate mirror of the plant.

The same stream feeds other readers: a historian for trends, dashboards for supervisors, and analytics for maintenance and quality. Each one subscribes to the same source, so they all agree with one another and with the ERP.

The Return Journey Begins with an Intention

The downward path begins in the business layer. A planner releases a work order, the ERP or MES issues a new set of production parameters, a quality system asks for a machine to hold, or an operator approves a recipe change. Each one is an intention, and between an intention and a machine action sits a chain of checks.

An instruction earns the right to move a machine by passing every check on the way.

The first check happens where the instruction is created. A command message carries the details that make it checkable: a unique command ID, the target machine, the parameter and value with its unit, the issuer, a timestamp, an expiry time and a digital signature. The expiry time gives the command a short life, so a message that arrives late, after the situation has changed, can never act on an outdated decision. The unique ID makes the command idempotent, which means that if MQTT delivers it twice, which delivery level one allows, the gateway recognizes the repeat and acts once.

A command that carries its own identity, expiry and signature can be checked by anyone who receives it.

Validation: The Heart of the Return Path

Validation happens in layers, and each layer asks a different question.

The first layer asks who is speaking. The broker authenticates the issuer through its certificate, and the access control list confirms that this issuer may publish commands to this machine’s command branch. The second layer asks whether the instruction is well-formed, in other words whether the message matches the defined schema, with the right fields, types and units. The third layer asks whether the value is sensible, comparing it with the engineering limits defined for that parameter. A spindle speed has a minimum and a maximum, a temperature setpoint has a safe band, and a rate of change has a ceiling. The fourth layer asks whether the moment is right, by checking the machine’s current state, such as running, idle, in maintenance or in a changeover, and confirming that this command is allowed in that state. The fifth layer asks whether the authority is sufficient, since some commands call for a second approval, and a gateway can wait for that second approval before it acts.

Validation asks five questions: who, what, how much, when and with whose approval.

The same layers run twice. The integration service validates at the top, and the gateway validates again at the bottom, where the machine lives.

Checking at both ends gives every command two independent chances to be right.

This defence in depth keeps the plant safe even if one layer is misconfigured.

Keeping the limits and the allowed states in a configuration owned by the process engineer gives the validation a clear owner. When the limits live in one reviewed place, a change to a limit follows a change process, and the audit trail shows who approved it and when.

Acting on the Floor

When a command passes every layer, the gateway executes it through an output. For a digital action, it closes a relay or sets a coil. For a setpoint, it writes a value to a Modbus register or drives an analog output. For a device with its own interface, it sends the equivalent command in that device’s protocol. The gateway then performs the most important step of the whole return path: it reads the result back.

Execution without read-back is a hope, and execution with read-back is a fact.

If the machine accepts the new value, the gateway reports success with the confirmed value and a timestamp. If the machine refuses or the read-back differs, the gateway reports the difference and keeps the machine in its previous state. Either way, the answer travels back up the same secure path, so the issuer sees a clear outcome: executed, rejected with a reason, or expired. The outcome appears in the ERP or MES next to the original instruction, and the loop closes.

Every instruction ends with a receipt.

A modest, well-defined set of command types, each with its own limits and states, keeps the return path simple and reviewable. Many plants begin with commands such as recipe selection, setpoint adjustment within a band, machine hold and release, and a production counter reset, and then add further types as confidence grows.

Safety Stays Where It Belongs

Safety functions form their own layer, built from hardwired circuits: emergency stops, safety relays, interlocks and guards. They act in milliseconds, independent of any network, and they take priority over every software command.

Safety is wired, and the network works within it.

The gateway’s role is to respect that structure. It never replaces a safety circuit, and a command from the ERP never overrides an interlock. Business instructions live comfortably at the pace of seconds, and that pace gives the validation layers time to do their work.

The gateway also has a defined behaviour for trouble. A watchdog supervises its own health. If the link to the broker drops, outputs move to their configured safe state or hold their last safe value, according to what the process needs. When the link returns, the gateway reports what it did, and the commands that expired during the outage are simply discarded.

When communication is lost, the machine falls back to a safe state that the process engineer chose in advance.

Watching Over the Whole Path

A path that carries business and plant instructions deserves continuous observation. The gateway writes a local audit log of every command, validation result and action. The same events flow to the SIEM (Security Information and Event Management), with the connection events, the birth and death messages and the certificate activity, so that the security team sees the path in its own tools. Dashboards show message rates, queue depths, buffer fill levels, command outcomes and the age of the latest value from every device. A gap in that last measure is often the first sign that something on the floor needs attention.

The path that carries the plant’s data is observed as closely as the plant itself.

The platform also needs care. Gateways receive signed updates through a managed process, configuration lives in version control, certificates rotate on a schedule, and a staged rollout brings changes to one line before the next. The gateway’s operating system runs a minimal footprint with a read-only root, so a power loss leaves it in a known state.

A gateway that updates safely and restarts cleanly earns a place on the plant floor for years.

Starting Small and Growing with Confidence

The path suits an incremental journey. A sensible first stage connects a few machines and sends data up, so that the plant sees its own production for the first time. A second stage adds the integration to the ERP, so that counts, downtime and consumption arrive without manual entry. A third stage adds the first validated commands, such as a recipe selection or a setpoint inside a narrow band, with every layer of validation in place. Each stage builds confidence for the next, and each stage delivers value on its own.

Data up comes first, and instructions down follow when trust is earned.

Closing Thoughts

A gateway is more than a protocol converter. It is the point where physical signals become business facts, and where business intentions become checked, verified and recorded actions. When the upward path carries named, scaled, timestamped data, when the downward path carries signed, bounded and validated instructions, and when safety circuits stay hardwired and supreme, the ERP and the floor begin to work as one system. We hope this walkthrough gives engineers and decision-makers a clear picture of the full journey from sensor to ERP and back.

One secure path takes plant data to the ERP and returns validated instructions to the floor. Reading carefully, naming consistently, validating in layers, verifying every action and keeping safety hardwired are the five habits that make that path trustworthy.

Consulting · first engagements

Start with a small engagement.

Start small, prove it, then scale. Six first engagements, each with a plain question and a written plan.

Book an assessment