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
Keep exploring
Free tools
- Kepware and OPC UA Private AI Layer Blueprint GeneratorFill in your Kepware and OPC UA environment and get a shareable architecture plan for a private, read-only AI layer: components, controls, rollout and open questions.
- Kepware and OPC UA AI Assistant Sizing and Value CalculatorEstimate GPUs, index size, hours saved and payback for a private AI assistant over Kepware and OPC UA.
- ERP Record JSON Schema GeneratorDefine an item, order or supplier record as JSON Schema with types, patterns, enums and required fields for validation and AI tool input.
ERP fixes and how-tos
- How to Connect OPC UA Machine Data to Your ERPHow to connect OPC UA machine data to ERP the right way: edge gateway, MES or historian layer, event filtering, security, air-gapped networks and what ERP should receive.
- How to connect an on-prem AI assistant to Kepware and OPC UA serversHow to connect an on-prem AI assistant to Kepware and OPC UA servers read-only: namespaces, security policies, history store, tool server, audit.
- How to Calculate OEE from MES Data and ERP StandardsHow to calculate OEE correctly from MES events and ERP routing standards: planned time, availability, performance, quality, ideal cycle time and common data traps.
Guides
- Real-Time Manufacturing Analytics: Architecture and PaybackReal-time manufacturing analytics: streaming ERP and machine data with CDC, Kafka, and materialized views to deliver sub-minute shop floor visibility.
- Shop Floor Data Collection: Connecting Machines and Operators to Your ERPShop floor data collection guide: connect CNC machines, barcode scanning, and IIoT sensors to ERP. Covers OPC UA, MTConnect, Factory Track, costs, and AI agents.
- IoT-to-ERP Integration for Manufacturing OperationsIoT-to-ERP integration in manufacturing: stream machine and sensor data through MQTT and an edge broker into ERP work orders, downtime, and quality records.
AI on your ERP
- AI for Kepware KEPServerEX: Linking Shop-Floor Tags to ERP Work Orders, Read-OnlyConnect Kepware KEPServerEX tag data to ERP with private, read-only AI: explain downtime against work orders and review tag config without touching PLCs.
- AI for Ignition SCADA: Ask Tag History, Alarms and OEE Questions, Joined to the ERPPrivate AI for Inductive Automation Ignition: query tag history, alarms and MES modules in plain English, joined to ERP orders, on-prem and read-only.
Software
- Kepware KEPServerEXWhat Kepware KEPServerEX is: an industrial connectivity server with PLC drivers, OPC UA, IoT Gateway and logging, plus integrations, limits and alternatives.
- AWS IoT SiteWiseWhat AWS IoT SiteWise is: a managed service for collecting, modelling and querying industrial equipment data, with edge gateway, APIs, limits and alternatives.