MES Write-back: Designing Fields That Stay Useful

There is a simple test for a write-back schema. Imagine a bad batch surfaces in three months. Using only these fields, can you identify the shift, the station, the item that was checked, and what the camera saw at the time? If not, there are too few fields, and the system has quietly become a device that only lights a lamp. This article works through six questions — who, when, where, what was checked, what the verdict was, and what the evidence was — and covers how to choose between piece, batch and work-order granularity, plus what to drop when write-back competes with takt.

Diagram of verdict record fields being written back to a database

Key takeaways

  • Test the field list against a three-month retrospective, not against what feels sufficient today.
  • Writing only pass or fail compresses the whole process record into one useless bit.
  • Finer granularity is not automatically better; piece-level tracing needs a piece that can be identified.
  • When write-back competes with takt, land the key fields locally first and push images asynchronously.
Isometric diagram of an industrial camera and an edge computing box connected by a single cable
The station-level hardware: one industrial camera plus one edge computing box

There is a plain test for a write-back schema. Suppose a customer returns a batch in three months. Using only these fields, can you identify which shift, which station, which checked item, and what the camera saw at the time? If not, there are too few fields, and the system has quietly become a device that only lights a lamp — it cannot be used for process improvement after the fact. The reverse failure is just as real: every column has to be maintained, stored and read by somebody, and a schema stuffed with unused fields only bloats the database and makes the next person afraid to touch it. The useful starting point is answering six questions: who, when, where, what was checked, what the verdict was, and what the evidence was.

Six questions, six groups of fields

Suggested write-back field groups
QuestionTypical fieldsWhat breaks without them
WhoStation ID, camera ID, line IDYou cannot narrow the search to a location
WhenEvent timestamp, shift, production dateShift effects and time trends become invisible
Doing whatWork order, part number, operation number, program versionData from different products is mixed and analysis misleads
Checked whatCheck item ID and name, e.g. screw present, sequence correctAlarms arrive without a cause and process has nothing to act on
VerdictVerdict, confidence or deviation, threshold versionAfter a threshold change, past verdicts cannot be reproduced
EvidenceImage reference or path, model versionA verdict cannot be reviewed and cannot be defended in a dispute

The last two rows are the ones that get dropped. Threshold version and model version look like internal detail, but once a parameter has been changed, historical verdicts can never be reproduced — somebody opens an image from three months ago and asks why it was passed, and nobody can answer. The image reference works the same way. This is not a demand to keep every frame forever; it is a demand for a window of replayability, with an explicit policy after that. How long the window should be depends on the traceability requirement for the product and the storage cost of the images, which is discussed in more depth in building traceability.

Granularity: piece, batch or work order

Granularity is not a question of how advanced the technology is. It is a question of whether the product can be identified at all. Piece-level tracing assumes every item carries something unique — a serial number, a barcode, an RFID tag, or at least a stable position relative to an identifiable carrier. If parts arrive in a loose bin with no identifier, piece-level tracing can only be inferred from time sequence, and a single missed frame or double trigger shifts every subsequent record. That is worse than having no record, because a shifted record still looks credible. In that situation the honest choice is batch-level or work-order-level tracing: record how many alarms occurred in this batch and when, which cannot name the individual piece but is entirely sufficient for process improvement and trend analysis.

  • Piece level: for products with a unique identifier and high individual value — semiconductors, medical devices — where the question is which piece.
  • Batch level: for unlabelled parts that move in batches, where the question is which batch drifted.
  • Work-order level: for high-mix low-volume, where the question is how this order performed, usually paired with first-article confirmation.
  • Mixed: the common compromise is work-order level overall with piece level at the few stations where it pays.

When write-back competes with takt

On a tight station, write-back is itself a load. If every verdict waits synchronously for MES to acknowledge, a small network hiccup stalls the line. A sensible layering is to land the key fields — verdict, timestamp, station, check item — locally first, so nothing is lost, then push to MES asynchronously with latency allowed. Large objects like images should never travel the synchronous path at all; they stay local with an index, and only the index reaches MES. The order matters: trading local persistence for real-time synchronisation means that a network outage erases that period permanently, and a missing period cannot be reconstructed later. For how the interface gets agreed across vendors, see integrating with MES vendors.

Fields you should probably drop

Be willing to cut fields as well. Three kinds of redundancy are common. First, pushing entire images or large raw payloads into MES tables — MES is not built to store large objects, and the database swells and slows. Second, writing back values MES can derive itself, such as the shift computed from a timestamp and a shift table; storing a copy only creates a chance for the two to disagree. Third, writing back system health metrics, which belong to equipment management and distort process analysis when they sit in production data. A practical filter is to ask whether process or quality would ever query this field for analysis. If the answer is no, it probably does not belong in the production record.

Write-back questions we get asked

MES will not change its table structure. What then?

A common compromise is to keep vision records in a separate table and reference only the work-order key in the main flow. Existing logic stays untouched while joining after the fact still works, which removes most of the resistance.

Do we need to keep every image?

Usually not. Keep statistics and sampled images for conforming parts, keep all images for alarms and borderline cases for a defined period, and expire the rest. A three-tier policy balances storage cost against replayability.

How much write-back latency is acceptable?

It depends on the use. On-station prompts need to be real time; team dashboards tolerate minutes; process analysis can be written in daily batches. Decide the purpose first, then the timing requirement per channel.


Will your write-back fields still answer questions in three months?

Send us your current field list and we will walk it against the traceability scenarios you actually face.

Contact us

Related articles

View all

Need specific advice for your production line?

Our engineers can share practical approaches to process error prevention and SOP compliance inspection for your scenario.

Request a free trial plan