OEE OPC UA Tag Mapping JSON Generator
OEE depends on four signals from the machine: its state, its total count, its reject count and its cycle time. This generator writes a clean JSON mapping that lists them, with the rules a collector needs.
Fill in
Tag mapping
{
"machine": "LINE-03",
"endpoint": "opc.tcp://192.168.10.20:4840",
"sampleIntervalMs": 1000,
"tags": [
{ "name": "machine_state", "nodeId": "ns=2;s=Line03.MachineState", "type": "int", "purpose": "availability" },
{ "name": "total_count", "nodeId": "ns=2;s=Line03.TotalCount", "type": "counter", "purpose": "performance and quality" },
{ "name": "reject_count", "nodeId": "ns=2;s=Line03.RejectCount", "type": "counter", "purpose": "quality" },
{ "name": "cycle_time", "nodeId": "ns=2;s=Line03.CycleTimeMs", "type": "int", "unit": "ms", "purpose": "performance" }
],
"stateMap": {
"0": "stopped",
"1": "running",
"2": "fault",
"3": "setup",
"4": "idle"
},
"rules": {
"minStopSeconds": 30,
"counterRollover": "treat decrease as reset",
"goodCount": "total_count - reject_count"
}
}Node IDs, state values and tag names are examples. Replace them with the addresses and enumerations used in your PLC program, and check them with a browser tool before going live. This is a generic structure, not the config format of any specific gateway product.
Plan machine data to ERP integration
Optional review of the tags, events and ERP records needed to automate OEE.
Optional. The tool and every export work without this. No spam.
How to use it
Get the node IDs from your controls engineer or from the PLC symbol table. Fill the form and copy the JSON into the configuration of your gateway, collector script or historian. Start with one machine, check the numbers against a manual count for a shift, and then repeat for the others.
- Agree a state enumeration with controls first
- Use counters, not rates
- Confirm time sync across devices
Why these four signals
State gives run and stop time, which drives availability. Total count and cycle time give performance. Reject count gives quality. With those four signals and a planned time calendar, you can compute OEE without any manual entry. Downtime reasons can then be added by operators on top of the stops that the state tag found.
Handling real signals
Counters reset on power cycles and roll over at their maximum, so treat a decrease as a reset and not as negative production. Short stops below your minimum length are usually small stops, and should be counted but not asked about. Sampling every second is enough for most discrete machines.
Common mistakes
Teams map a fault bit but not the idle and blocked states, so every non running time looks like a breakdown. Others read the cycle time from the last cycle, not the ideal. Keep ideal cycle time in a master data table and use the measured one for diagnostics only.
Frequently Asked Questions
Do I need OPC UA?
No. The same four signals can come from Modbus, MQTT, a historian or a PLC export. OPC UA is common because it is a standard with named nodes. Use whatever your equipment and plant network support securely.
How do I get node IDs?
Use an OPC UA client to browse the server, or ask the controls engineer for the exported tag list. Copy the full node ID including the namespace index, because that part is needed for the connection.
Should the collector write to the PLC?
No. Keep the integration read only. Reading machine data for reporting does not need write access, and a read only account lowers the safety and security risk on the plant network.
How do I tie counts to ERP orders?
Record the active work order or part number as another tag or as an event from the MES. Then join counts by time window to the order, so the ERP gets completed quantity and scrap by job.
If you want machine signals joined with ERP orders so OEE is tied to jobs and parts, we can help design the integration.
Related Tools
OEE SQL Query Generator
Fill in your table and column names and get a SQL query that calculates availability, performance, quality and OEE per line per day.
Developer ToolsOEE Power BI DAX Measures Generator
Enter your table and column names and get DAX measures for availability, performance, quality and OEE that you can paste into a Power BI model.
MES & Shop FloorDowntime Reason Code Hierarchy Reference
A starter list of downtime reason codes arranged in a hierarchy, mapped to the six big losses and to planned or unplanned status.
MES & Shop FloorOEE Rollout Readiness Checklist
A checklist covering definitions, data capture, people and routines to complete before and during an OEE rollout.
More MES & Shop Floor tools
See all- Line Balancing Worksheet
- SMED Changeover Reduction Worksheet
- Finite Capacity Scheduling Worksheet
- Production Schedule Template
- Bottleneck Analysis Calculator
- Drum Buffer Rope Buffer Sizing Calculator
- Production Schedule Adherence Calculator
- Production Schedule Release Checklist
- Daily Production Schedule Board Worksheet