Skip to content
QSWEQB
mediumConceptEntryMidSenior

Walk me through what a PLC, a SCADA system, a historian and an MES each do, and how they relate to ERP.

A PLC runs the machine on a deterministic scan cycle and holds the truth about plant state; SCADA gives operators a view and supervisory control; a historian archives the resulting time series; an MES turns a production plan into work orders and a batch record; ERP sits above with the commercial view.

4 min readUpdated 2026-07-26

What the interviewer is scoring

  • Does the candidate place the four systems in a control hierarchy rather than describing them as four databases
  • Whether the PLC is identified as authoritative, with everything above it treated as a later and lossy copy
  • That they distinguish an MES from an ERP production module instead of collapsing the two
  • Any sign they have thought about what each layer does when the layer above it is unreachable
  • Whether they name a concrete instinct from web work that would get them into trouble here

Answer

Four layers describing one physical process

Start at the bottom, because everything above it is a description of what happens there. A PLC (programmable logic controller) is a small deterministic computer wired to sensors and actuators. It runs a scan cycle — read all inputs, evaluate the logic, write all outputs — and repeats that every few milliseconds, indefinitely. The logic is written in the languages standardised by IEC 61131-3, of which ladder logic is the one you will see most. The design consequence that matters to you is this: the PLC's memory is the state of the plant. It is not a mirror of the state or a cache of it. If the register says the valve is open, the valve is open, and if your database disagrees your database is wrong.

SCADA (supervisory control and data acquisition) is the layer above, together with the HMI screens operators stand in front of. It polls or subscribes to controllers across a site, draws the process, raises alarms, and lets an operator issue supervisory commands such as changing a setpoint or acknowledging a fault. It supervises; it does not close the fast control loops, which stay in the PLC precisely so that a supervisory system going down does not stop the process.

A historian is a time-series archive of process values. It is the layer most software engineers touch first, and the one most likely to mislead them, because it looks like an ordinary database and is not. Historians usually record on change with a deadband, so the series is irregularly sampled and a two-minute gap means "this value did not move", not "data missing".

An MES (manufacturing execution system) is the layer that knows what is being made and why. It takes a production plan, breaks it into work orders and operations, dispatches them to stations, records which material lots and machine settings went into which batch or serial number, holds the operator confirmations and quality checks, and computes measures such as OEE. That record of what went into what is genealogy, and it is what makes a recall answerable in hours rather than weeks.

Where ERP fits, and why it is not the MES

ERP owns the commercial and planning view: demand, purchase orders, inventory valuation, costing, the master production schedule. The handshake is narrow and worth being able to describe. ERP sends the MES what to make and when, plus the bill of materials and the material availability. The MES sends back what was actually made, what was actually consumed, scrap and rework, and labour and machine time. ERP does not want the readings; it wants the totals it can put a price on.

The distinction is worth defending because of timescale and granularity. ERP works in shifts and days on aggregated quantities, because that is what finance needs. The MES works in minutes on individual units, because that is what a line needs. An ERP production module can hold a work order, but it will not sequence twelve stations, block a unit that failed a torque check, or reconstruct which of four material lots is inside a specific serial number.

LayerOwnsTimescaleIf it stops
PLCActual machine state and control logicMillisecondsThe process stops
SCADA / HMIOperator visibility and supervisory commandsSub-second to secondsOperators go blind; the process continues
HistorianThe archive of process valuesSecondsYou lose history, not control
MESWork orders, genealogy, quality gatesSeconds to minutesThe line runs but cannot be released or traced
ERPPlan, cost, inventory, ordersHours to daysProduction continues; the paperwork queues

Where instincts from web development misfire

The specific misjudgement, and the thing that separates a candidate who has done this from one who has read about it, is treating the four layers as a data stack when they are a control hierarchy. In a data stack each layer is a store you may query, and the bottom is just the slowest one. Here the bottom layer is the thing itself, and every layer above it is a late, lossy, opinionated copy that exists so the layer below can be left alone.

That single misreading produces a family of bad proposals. Reading a value directly from the PLC because it is freshest — but a poll loop a web backend would consider gentle can disturb scan timing, and a controller has no notion of a query budget. Writing a setpoint because the API allows it — but that write moves an actuator, is not a transaction, and cannot be undone by issuing the inverse. Restarting a component to clear a bad state, which here may drop the operators' view of a running line. Assuming the historian's gaps are ingestion bugs.

The habit to build instead is to ask, for every read and every write, which layer owns that fact and what the blast radius is if you are wrong. Data flows up the stack freely. Commands flow down through the systems designed to issue them, or they do not flow at all.

Likely follow-ups

  • If the historian and the MES disagree about when a batch started, which one do you believe and why?
  • What would you have to be sure of before writing a value into a PLC register from your application?
  • Where does OEE get calculated, and what does it need from each layer to be correct?
  • A plant has SCADA and a historian but no MES. What can it not answer?

Related questions

Further reading

plcscadahistorianmesisa-95