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.
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.
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
| Question | Typical fields | What breaks without them |
|---|---|---|
| Who | Station ID, camera ID, line ID | You cannot narrow the search to a location |
| When | Event timestamp, shift, production date | Shift effects and time trends become invisible |
| Doing what | Work order, part number, operation number, program version | Data from different products is mixed and analysis misleads |
| Checked what | Check item ID and name, e.g. screw present, sequence correct | Alarms arrive without a cause and process has nothing to act on |
| Verdict | Verdict, confidence or deviation, threshold version | After a threshold change, past verdicts cannot be reproduced |
| Evidence | Image reference or path, model version | A 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.
Related articles
-
Alarm Fatigue: Why the Floor Turns the System Off
Many visual SOP systems are not beaten by technical problems — they are muted by…
Read more → -
Visual SOP Camera Selection and Mounting
Camera selection for visual SOP is not the same as for product inspection. The s…
Read more → -
Vision Monitoring at the Semiconductor Die Bonder
Semiconductor packaging stations are characterised by high precision, fast cycle…
Read more → -
Wrong-Assembly Alarms Without the False Alarms
The most common reason a visual SOP project fails is not poor recognition — it i…
Read more →
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