IndustrialPublished 7 min read

How Is OEE Calculated From Machine and PLC Data?

OEE (Overall Equipment Effectiveness) is calculated as Availability multiplied by Performance multiplied by Quality, using running state, total count and reject count from the PLC (programmable logic controller) plus planned production time and ideal cycle time from engineering data. This guide shows the formula, a worked example with hypothetical numbers and the data checks that keep the result honest.

How Is OEE Calculated From Machine and PLC Data?

OEE (Overall Equipment Effectiveness) is calculated as Availability × Performance × Quality. From machine and PLC (programmable logic controller) data you derive the three factors from a running state signal, a total part count and a reject count, combined with two reference values the PLC rarely holds: planned production time and ideal cycle time. The result is only as good as the definitions behind those inputs, so agreeing them in writing comes before any calculation.

What is the OEE formula?

The standard decomposition, consistent with the OEE definition in ISO 22400 Part 2, is:

  • Availability = Run time ÷ Planned production time
  • Performance = (Ideal cycle time × Total count) ÷ Run time
  • Quality = Good count ÷ Total count
  • OEE = Availability × Performance × Quality
  • Equivalent shortcut: OEE = (Good count × Ideal cycle time) ÷ Planned production time

Which PLC signals and reference data do you need?

Each input has a source and a known failure mode. Map them before writing any calculation code.

OEE inputs and their sources
InputTypical sourceUsed forWatch out for
Running stateCycle active bit, spindle on bit or motor contactor feedbackRun time and Availability"Running" must be defined with the process engineer, for example cycle active rather than power on
Stop reason codeAlarm word or integer registerDowntime ParetoCodes need a reason list agreed with production
Total countCycle complete counter in the PLCPerformance and Quality16 bit counters wrap at 65,535; PLC restarts may reset them
Reject countInspection station counter or operator entryQualityOften missing in the PLC; may need HMI (human machine interface) or tablet entry
Ideal cycle timeEngineering master data per productPerformanceA value slower than reality pushes Performance above 100%
Planned production timeShift calendar in the MES (manufacturing execution system) or a configuration tableAvailabilityPlanned breaks and planned maintenance must be excluded consistently
Product or recipe IDInteger registerSelecting the right ideal cycle timeChangeovers mid shift need time weighted handling

Worked example with hypothetical numbers

The numbers below are hypothetical and chosen for illustration only. A shift lasts 480 minutes with 30 minutes of planned breaks, so planned production time is 450 minutes. The running state signal shows 45 minutes of stops, so run time is 405 minutes. The ideal cycle time is 30 seconds (0.5 minutes) per part. The PLC counts 720 parts in total, of which 18 are rejected, leaving 702 good parts.

Applying the formula:

  • Availability = 405 ÷ 450 = 0.900 (90.0%)
  • Performance = (0.5 min × 720) ÷ 405 min = 360 ÷ 405 = 0.889 (88.9%)
  • Quality = 702 ÷ 720 = 0.975 (97.5%)
  • OEE = 0.900 × 0.889 × 0.975 = 0.780 (78.0%)
  • Cross check: (702 × 0.5 min) ÷ 450 min = 351 ÷ 450 = 0.780

Always run the cross check. If the two results differ, one of the inputs (usually run time or counts) is being taken from different time windows. In this example the largest loss is Performance: the machine ran for 405 minutes but produced only what an ideal machine would make in 360 minutes, so 45 minutes were lost to slow cycles and short stops. Availability lost another 45 minutes to recorded stops. Reading the factors this way points the team at speed losses first, which a single 78% figure would not reveal.

How do you compute OEE from PLC data step by step?

A repeatable procedure for one machine, which then becomes a template for the line:

  • Step 1: Agree definitions in writing: planned production time, which stops are planned, what "running" means and the ideal cycle time per product.
  • Step 2: Map every input to a PLC address or a master data table, using the method in our guide on connecting an existing PLC to an Internet of Things (IoT) dashboard.
  • Step 3: Capture state transitions with timestamps. If you poll the state bit, poll well below the duration of the shortest stop you want to count, or read a PLC side stop counter so short stops are not lost between samples.
  • Step 4: Convert counters to deltas per interval, handling rollover (for example at 65,535 for a 16 bit counter) and resets after PLC restarts.
  • Step 5: Compute the factors per hour and per shift on the edge gateway or server, and store the raw inputs alongside the result so history can be recomputed if definitions change.
  • Step 6: Attribute downtime to reason codes and flag unclassified stops for review rather than hiding them.
  • Step 7: Validate against manual production records for several shifts and explain every difference before publishing.
  • Step 8: Display Availability, Performance and Quality next to the composite OEE, because the composite alone does not tell anyone what to fix.

What mistakes distort OEE?

Common errors in OEE implementations are definition problems, not maths problems:

  • Ideal cycle time set to a conservative value, which hides speed losses and can push Performance above 100%.
  • Micro stops counted as running because the state bit is sampled too slowly.
  • Plant OEE computed as a simple average of machine values instead of weighting by planned production time.
  • Changeovers excluded from planned production time in one area and included in another, which makes comparisons meaningless.
  • Reject count entered at end of shift and assigned to the wrong hour or product.

What does health monitoring add for computer numerical control (CNC) machines?

OEE needs state and counts; machine health monitoring needs condition data. For a CNC machine that typically means spindle load and speed, axis loads, feed override, alarm history and program number from the controller (often available over MTConnect, OPC UA (Open Platform Communications Unified Architecture) or a vendor API), plus added sensors for spindle vibration and bearing or motor temperature. The two data sets share the same gateway and timestamps, which lets you link a falling Performance factor to a developing mechanical issue. Our CNC machine health page describes that architecture.

Validation checklist

Before OEE is used in management reviews, confirm:

  • Written definitions approved by production and engineering.
  • Ideal cycle time stored per product and reviewed when tooling or programs change.
  • Counter rollover and PLC restart handling tested.
  • Short stop detection tested by creating a deliberate short stop.
  • Calculated values match manual records for several shifts.
  • Raw inputs retained so OEE can be recomputed.

Limitations

OEE suits discrete production with countable parts and a known ideal rate. Continuous process plants usually work with rate and yield measures instead. OEE says nothing about energy, labour or material cost, and a plant level OEE figure compared across sites is only valid when every site uses the same definitions. Treat OEE as a way to find losses on your own equipment over time, not as a benchmark score.

Sources and standards

Standards and specifications referenced in this guide:

  • ISO 22400 Part 2 (key performance indicators for manufacturing operations management)
  • IEC 61131 Part 3 (PLC programming languages)
  • IEC 62541 (OPC UA)
  • MTConnect Standard (MTConnect Institute)
OEEPLCManufacturing KPIsIndustrial IoTMachine Monitoring

EmbedCrest Engineering Team

Embedded Systems Engineers at EmbedCrest Technology

Embedded systems, IoT and Edge AI engineering, delivered from Kalyan, Maharashtra, India.

FAQ

Frequently Asked Questions

How is OEE calculated from machine and PLC data?

OEE equals Availability × Performance × Quality. Availability is run time divided by planned production time, Performance is ideal cycle time × total count divided by run time, and Quality is good count divided by total count. Running state and counts come from the PLC, while planned production time and ideal cycle time come from engineering and scheduling data.

What is a good OEE score?

There is no universal target that applies to every process. A meaningful OEE target depends on product mix, batch sizes, changeover frequency and how planned time is defined. The useful comparison is against your own measured baseline on the same machine with the same definitions, tracking which of the three factors improves.

Why is my Performance factor above 100%?

Performance above 100% almost always means the ideal cycle time is set slower than the machine actually runs, or the total count and run time come from different time windows. Correct the ideal cycle time per product to the validated fastest sustainable rate and confirm that both inputs are calculated over identical intervals.

Can OEE be calculated without a reject signal from the PLC?

Yes, but Quality then depends on another source, such as operator entry on an HMI or tablet, an inspection station counter or end of shift records. Manual entry works if it is timestamped and linked to the product and hour; otherwise Quality losses get assigned to the wrong period.

Which CNC signals complement OEE data for machine health monitoring?

Machine health monitoring on a CNC machine typically needs spindle load and speed, axis loads, alarm history and program number from the controller, plus added sensors for spindle vibration and motor or bearing temperature. Controller data often comes over MTConnect, OPC UA or a vendor interface, and sensor data through an edge device.

Ready to Build Your Embedded Solution?

From Edge AI to industrial IoT, our engineering team delivers end to end embedded systems solutions. Let us discuss your project requirements.

Discuss This With an Engineer