Blog / MES
MES · Guide

PLC Signals for OEE: What to Read and How

OL By OEE Lab Editorial |Updated 1 November 2026 |6 min read
Short answer

You can build OEE from a handful of PLC signals. The two you must have are a producing state and a good-part counter. Add rejects, fault codes, mode, speed and the order ID for the full picture. Build states from several bits, not one, and handle counter rollover.

The signals, one by one

A PLC holds many values. OEE needs only a few.

The skill is picking the right bit and knowing what it really means. Here are the seven that matter, in order of importance.

SignalUsual formUsed forWatch out for
Run or producingBit (true / false)AvailabilityA motor "run" bit is not the same as producing
Good countCounter (integer)Performance, qualityRollover, resets at order change
Reject countCounter (integer)QualityCounted once or twice?
Fault or alarmBit or code wordStop cause at machine levelMany codes, few real causes
Mode (auto, manual, setup)Bit or integerPlanned vs unplanned timeManual mode may still be producing
Speed or cycle timeReal or integerPerformanceSetpoint vs actual
Order or recipe IDInteger or stringRates and cost by productChanges before the machine does

If you can read only two, read the producing bit and the good counter. Everything else improves the picture but is not needed for a first OEE number. See what is machine monitoring.

Building states from bits

One bit rarely tells the truth. A state is a rule over several bits. Example rules for a packing machine:

Auto modeRun bitFault bitCount risingState
YesYesNoYesRunning
YesYesNoNo for 3 ideal cyclesStop, starved or blocked
YesNoNoNoStopped, no fault
YesNoYesNoFault
No (setup)AnyAnyAnyPlanned stop, setup

The second row is the important one. The machine says it is running, but nothing comes out.

Without the count test, that time counts as good. With it, the loss shows up as a stop you can chase.

This is the same trap as in retrofit sensors for OEE with a current clamp.

Example: a counter that rolls over

Many PLCs hold a counter in a 16-bit word. An unsigned one counts from 0 to 65,535, then wraps to 0.

A report that just subtracts the start from the end will go negative.

Example: at the start of the shift the counter reads 64,900. At the end it reads 1,350.

Parts to the wrap: 65,536 - 64,900 = 636
Parts after the wrap: 1,350
Parts made: 636 + 1,350 = 1,986
Naive result: 1,350 - 64,900 = -63,550 (wrong)
Use modular math: (end - start) mod 65,536. Check the counter type first: some are 32-bit, and a signed 16-bit counter overflows at 32,767.

Better still, ask the PLC programmer for a count that resets at the order start, or compute deltas on every read and keep the running total outside the PLC.

Example: how often to read

Example: a line has 30 short stops in a shift, each 20 seconds long. A system that reads the run bit once every 60 seconds sees a given stop only if a read lands inside it.

That chance is 20 / 60, about one in three.

Chance a read lands in a 20 s stop: 20 / 60 = 33%
Stops seen: about 30 x 33% = 10
Stops missed: about 20, or 20 x 20 s = 400 s = 6.7 min
Share of a 480 min shift: 6.7 / 480 = 1.4%
Slow reads hide short stops. The loss does not vanish, it moves into performance with no label.
Read every 60 s10 of 30 stops
Read every 30 s20 of 30 stops
Read every 10 s30 of 30 stops
Same 30 stops of 20 seconds. Only the read interval changes. Hypothetical example.

The fix is to read every second or two, or to let the PLC time-stamp changes of state and send each one. Then every stop is seen, even the 5-second ones. See micro-stops for why those matter.

Turning fault codes into causes

A fault word may hold dozens of codes. Do not copy them all to a report.

Map them to a short list of causes people understand.

PLC fault code (example)Meaning on the machineReason on the report
12Infeed photo-eye blocked too longJam at infeed
27Sealer temperature out of rangeProcess out of range
31No film detectedWaiting for material
44Guard door openedOperator intervention

Codes are a start, not an answer. Many causes are not faults at all: waiting for a forklift, a missing label roll, a lunch break.

Those need an operator choice. See downtime reason codes.

How to read the signals safely

1
Ask for a read-only path
A copy of the values, not write access. The MES should never change a setpoint.
2
List addresses and meaning
Write each tag with its address, type and what a "1" means. The controls team usually has this.
3
Choose the protocol
OPC UA, Modbus TCP, EtherNet/IP and PROFINET are common routes. Use what the PLC supports.
4
Read at the right speed
Read often enough to catch your shortest stop. Do not flood a busy PLC.
5
Check against the floor
Run one shift with a person watching. Compare each state change with what happened.
Five steps to read PLC data without risk to the machine.

Common mistakes

  • Trusting the name of a tag. "Machine_Running" may mean the motor contactor is on. Test it.
  • Ignoring the PLC clock. PLC clocks drift and may use another time zone. Use one clock for all records.
  • Counting what enters, not what leaves. Use the count at the end of the machine, after rejects and rework are removed.
  • Changing the PLC program without telling the data team. A moved tag or a new counter breaks the OEE feed silently. Agree a change note.
  • Skipping the line view. A machine can be fine and still wait for the machine before it. See line OEE vs machine OEE.
  • Not agreeing on the ideal rate. The count alone does not give performance. You need a rate to compare it with. See ideal cycle time.

The OEE math is in how to calculate OEE, and PLC fault problems are listed in PLC controls troubleshooting. For method choices, see OEE data collection methods.

See it live in Fabrico

Fabrico reads stops, speed and counts live from PLCs, then operators tag the cause at the line, so a fault code becomes a reason people understand. See how Fabrico reads PLC data.

What people ask next

Which PLC signals do I need for OEE?

At least a producing state and a good count. For quality add a reject count. For stop analysis add the fault word and the mode. For rates add the order or recipe ID.

Will reading PLC data affect the machine?

Reading should be read-only, at a sensible rate, through a path the controls team approves. A heavy poll on a busy PLC can slow it, so ask the controls team about load.

What if the PLC has no good-part counter?

Add a part sensor, or count a cycle bit. See retrofit sensors for OEE.

How do I deal with counter rollover?

Compute the difference between reads using modular math, and check the counter width, 16 or 32 bit. Or reset the count at each order start.

Do fault codes give me the cause of every stop?

No. They cover machine faults only. Waiting, changeover and operator actions need another source. See how to track downtime.

Related guides: ISA-95 Levels Explained: From Sensors to ERP · Modbus Machine Data for OEE: Registers and Polling · MES OPC UA Integration: Setup and Common Traps · MES PLC Integration: Routes, Tag List and Tests

← More OEE Lab guides

OEE essentials: OEE calculator · What is OEE · Six big losses · Availability · TEEP · Cost of downtime · OEE benchmark · Free OEE tracker · Free OEE software · How to track downtime · How to implement OEE · Light MES vs full MES