Extrusion line connected through edge gateway to MES, historian and ERP data network

Connecting Extrusion Lines to MES With OPC UA and MQTT

Posted on
October 25, 2026

Upgrade Your Extrusion Control System

Discover how advanced control systems improve product consistency, reduce waste, and optimize your extrusion process. Explore our solutions or connect with our team to learn how ICT can modernize your production line.

Get Started Today

Most extrusion plants already collect plenty of data. It just lives in the wrong places: zone temperatures on the HMI, lot numbers on a clipboard and work orders in the ERP. Connecting the line to a manufacturing execution system (MES), a process historian and the ERP closes those gaps, but only if the integration is planned around a clear data model, sensible sampling, and a firm rule about who is allowed to change what on the machine. OPC UA and MQTT are the two protocols most plants end up using, often together.

Deciding What Data the Line Should Expose

Machine States and Production Rates

The most useful single signal for MES is a reliable machine state. A defined set such as running, idle, starved, blocked, faulted, changeover and planned stop lets the MES calculate availability without guessing. The state should be determined in the PLC logic, which knows whether the screw is turning and downstream equipment is ready, rather than inferred later in a historian.

Alongside state, expose rates and counts: line speed, extruder output or throughput, screw speed, puller speed, and good and scrap length or piece counts from the cutter or saw. Totalizers are more robust than instantaneous rates, because a missed sample does not lose production. If you are building toward availability, performance and quality metrics, our post on measuring OEE on continuous extrusion lines covers how these signals feed the calculation.

Process Values, Recipes and Lot Numbers

Process data for the historian typically includes barrel and die zone temperatures (setpoint, actual and output percentage), melt pressure and melt temperature, drive load and inline gauge readings such as wall thickness. Include setpoints next to actuals, since a deviation only means something relative to the request.

Recipe and lot context turns raw process data into quality records. Expose the active recipe or product code, the recipe version, the work order number and the resin and additive lot numbers currently being fed. When these change at the PLC, they should change in the data stream at the same moment.

Alarms and Events

Alarms are events, not continuous values, and they deserve their own structure: an identifier, a description, a severity, the time it became active, when it was acknowledged and when it cleared. Separate operator events, such as recipe loads, setpoint changes and manual mode selections, from equipment alarms so both can be audited.

Building a Consistent Data Model and Tag Naming

An ISA-95 Style Hierarchy

ISA-95 describes an equipment hierarchy of enterprise, site, area, line or work center, and work unit. Using that structure for your namespace gives every tag a predictable location, for example site, extrusion area, pipe line 3, then the extruder, puller and saw. MES, historian and dashboards browse the same tree, and a new line copies a known pattern.

Tag Naming Rules That Hold Up

Write the naming convention down before anyone builds a tag. Good conventions are hierarchical, consistent in case and separators, and describe the measurement rather than the PLC address. Something like Line3/Extruder1/Zone2/TempActual is far easier to maintain than an address or an abbreviation that only the original programmer understood. Engineering units, ranges and descriptions belong in tag metadata, not encoded into the name.

Reusable Equipment Templates

Define a template, sometimes called a user-defined type or object type, for each kind of equipment: an extruder, a temperature zone, a puller, a cutter. Each template carries the same members on every line, such as state, speed, setpoint, actual and alarm status. Templates keep lines from different eras and vendors consistent, so MES screens and historian queries are built once.

OPC UA and MQTT: How Each Protocol Fits

OPC UA Client/Server and Security

OPC UA uses a client/server model in which the server, often in the PLC or an edge gateway, publishes an address space of nodes that clients browse and subscribe to. OPC UA supports structured types, metadata, alarms and conditions, historical access and method calls, making it a strong fit for detailed equipment models.

Security is built into the specification. Connections can use signing and encryption, applications authenticate each other with X.509 certificates, and users can be authenticated with credentials or certificates and given role-based access. In practice, plants should disable the unsecured mode on production servers, manage certificate trust deliberately rather than auto-accepting, and give MES and historian clients read-only accounts unless a specific write path is required.

MQTT Publish/Subscribe

MQTT is a lightweight publish/subscribe protocol. Devices publish messages to topics on a central broker, and any authorized client subscribes to the topics it needs. Adding a new consumer does not add load to the PLC. Quality of service levels, retained messages and last will messages help manage delivery and detect disconnects. TLS and broker-side authentication and access control should be considered mandatory.

Sparkplug B

Plain MQTT does not define topic structure or payload format, which leads to every integrator inventing their own. Sparkplug B, an Eclipse Foundation specification, fills that gap with a defined topic namespace, a compact binary payload and state management. Birth and death certificates tell consumers whether an edge node and its values are current or stale. Many plants use OPC UA at the machine level and Sparkplug B over MQTT to move data up to site and enterprise systems.

Edge Gateways, Sampling Rates and Report by Exception

Bridging Legacy PLCs

Older extrusion lines often run PLCs that speak only serial or older fieldbus and Ethernet protocols. An edge gateway can poll those controllers in their native protocol and present the data as an OPC UA server or MQTT publisher. The gateway also shields the legacy controller from direct connections by multiple systems, though polling load on an old processor should still be checked.

Choosing Sampling Rates

Not every value needs the same rate. Barrel zone temperatures change slowly and are usually well served by sampling every few seconds. Melt pressure, drive load and gauge readings that are used to diagnose surging or thickness variation may need faster sampling. States, counts and lot numbers should be event-driven. Set rates per tag group based on the question the data needs to answer.

Deadband and Report by Exception

Report by exception sends a value only when it changes by more than a configured deadband, rather than on every scan. OPC UA subscriptions support this through monitored items with sampling intervals and deadband filters, and Sparkplug B is built around reporting changes. Traffic drops sharply with no meaningful loss, provided the deadband is tighter than the variation you care about. Coordinate deadbands with historian compression so data is not filtered twice.

Control Authority, Traceability and Network Segmentation

Read-Only by Default, Writes With Limits

The safest starting point is a read-only integration. When the MES does need to write, for example downloading a recipe or a work order, the PLC should treat that as a request rather than a command. The PLC validates values against limits and line state, requires operator confirmation where appropriate, and logs the change. Safety interlocks, permissives and alarm responses must remain in the PLC and safety system, and nothing written from the network should be able to bypass them. Our post on safety interlocks in extrusion covers why that boundary matters.

Lot Genealogy and Traceability

Genealogy links what went in to what came out. For an extrusion line that means recording which resin, regrind, color and additive lots were in the feed system during each period, and associating them with the output identified by length, piece, coil, box or pallet. A good model accounts for residence time between hopper and cutter rather than assuming an instant switch. With synchronized timestamps, the MES can show which product came from a given resin lot and what conditions it saw.

Segmenting the OT Network

Connecting controls to business systems should not mean flattening the network. Common practice, reflected in the ISA/IEC 62443 series, groups equipment into zones and controls traffic through defined conduits. Keep PLCs and HMIs on a control network, place edge gateways and brokers at a boundary, and use a demilitarized zone between the plant floor and the enterprise network so ERP and corporate systems never connect directly to controllers. Tight firewall rules and centralized logging further reduce risk.

Evaluating Your Lines for MES and ERP Integration

Start With an Inventory

Begin by listing each line's controllers, firmware, available protocols and existing instrumentation. Note which values exist in the PLC, which need new sensors and which are recorded manually. The hardest part is usually not the protocol but missing or inconsistent data at the source.

Fix the Controls Foundation First

Integration works best when the control system already produces clean states, consistent tag structures and properly handled recipes and alarms. ICT designs extruder control systems with structured data, defined machine states and secure connectivity in mind, so the line is ready to feed MES, historian and ERP systems without compromising control authority at the PLC.

FAQs

Should we use OPC UA or MQTT for extrusion line data?

Often both. OPC UA is well suited to rich, browsable equipment models and secure client/server access at the machine and line level. MQTT with Sparkplug B is efficient for moving data from many sources to many consumers across a site or enterprise.

Can MES safely write setpoints to the PLC?

It can, if the PLC treats writes as requests and validates them against limits, line state and operator permissions. Interlocks and safety functions must stay in the PLC and safety system, and every external change should be logged.

Do we need to replace legacy PLCs to connect them to MES?

Not necessarily. An edge gateway can read older controllers in their native protocols and publish the data through OPC UA or MQTT using a standard model. Replacement makes sense when the controller lacks the data, capacity or support the line needs.

How fast should we sample process data?

Match the rate to the purpose of the data. Slow-moving temperatures can be sampled every few seconds, faster variables used for diagnosis may need quicker rates, and states, counts and lot changes should be event-driven, with deadbands limiting unnecessary traffic.

Explore more updates

Extruder control panel with solid state relays on heat sinks wired to barrel heater bands
October 17, 2026

SSRs, Contactors and SCRs: Choosing Barrel Heater Power Control

Three-roll polishing stack in a sheet extrusion line with temperature control units and gauge
October 5, 2026

Roll Stack Control in Sheet Extrusion: Gap, Speed and Temperature

Extruder with drive motor, gravimetric feeder and energy trend chart showing kWh per kilogram
October 29, 2026

Specific Energy Consumption: Using kWh per kg to Diagnose Extruders