Code Reading and Traceability Systems

Barcode verification systems built in Singapore: reading versus grading to ISO/IEC 15415 and 15416, DataMatrix readers, DPM lighting, reject and reconciliation.

Talk to an Engineer
Code verification station on a conveyor: a fixed-mount code reader on an adjustable bracket with a red bar light illuminating a carton beneath it, a print head just upstream, a pneumatic reject arm with a quarantine bin, and a stack light on the frame

Motionwell Automation builds barcode verification systems in Singapore as stations inside the machines and lines we deliver, rather than as scanners sold on their own. The delivered reference is the GMP filling and sealing platform, where Cognex DataMan 370 fixed-mount readers verify 2D DataMatrix codes printed by Domino Gx150i thermal inkjet coders at up to 150 units per minute, and Festo DSBC pneumatic cylinders eject packs whose codes are unreadable or duplicated. On the electronics side we grade printed barcode quality against ISO/IEC 15416 while the line keeps running, and in distribution work a barcode scanner reads the carton ID that then decides which tool set the robot picks up. Machines are designed, assembled and tested at our Woodlands Link facility, and the company has delivered more than 150 special purpose machines since 2014 under ISO 9001:2015 and bizSAFE Level 3.

The short answer, before you read further. A printer reports that it sent a print command. It does not report that a readable mark landed on the pack, which is why a traceability line reads the code back. Reading is not grading: reading says this reader decoded it today, grading says how much margin was left before it would not have, and only the second predicts what happens at somebody else’s scanning tunnel next month. The code is also only half the job. The other half is the record built from those reads, which has to be reconstructable after an error recovery rather than only during a clean run.

Where we stand, said plainly. We do not manufacture readers, cameras or printers; we specify and integrate them, and the units in regular use here are Cognex and Keyence on Allen-Bradley, Siemens, Omron, Mitsubishi and Beckhoff control platforms. We are not a serialization software vendor, so that platform stays with whoever sold it to you, and we are not a notified body. Where a handheld scanner and an existing WMS already solve your problem, the useful answer is to say so.

This page is about the read side and the record. The printing and label side is on our labelling and coding systems page, and the regulatory scope of a serialised pharmaceutical pack, market by market, is on our pharmaceutical serialization page. If you already have a pack sample and a rate, talk to an engineer.

Why Is a Printer Reporting Success Not Proof of a Readable Code?

Because the printer is reporting on its own intention, not on the pack. Every one of the following produces a unit the printer counts as good: a blocked nozzle dropping part of a module, a cartridge that emptied mid-batch, a code printed across a carton fold, a smear from a container wall that was still wet, a substrate change from a new supplier the print settings were never tuned for, and the quiet one, a perfectly formed code carrying the wrong batch data because a changeover step was skipped.

A print command with no read-back is an open loop. Closing it means a reader downstream of the marking station doing three separate jobs, and it is worth knowing which you are paying for, because they cost differently and catch different faults.

What the station does What it proves What it still misses
Decode A readable symbol exists on this unit, at this reader, under this light Nothing about margin, so a symbol on the edge of failure passes silently
Grade How much margin is left, scored against a published method Nothing about content, so a well-formed code with yesterday’s expiry passes
Compare The decoded string equals what the line was told to print Nothing about the units that never reached the reader at all
Reconcile Every unit the batch commissioned is accounted for Nothing, if the counting logic was never designed to close

Read the last two rows together, because they are the pair specifications often leave out. A comparison check is what catches yesterday’s date code on today’s batch, and it is a different tool from a decode.

What Is the Difference Between Reading a Code and Grading It?

A read is a verdict from one reader on one day. A grade is a measurement against a published method, and it is the version of the answer that transfers to anybody else.

2D symbol quality is graded to ISO/IEC 15415, which scores symbol contrast, modulation, fixed pattern damage, axial non-uniformity, grid non-uniformity and unused error correction, then reports the worst of them on a 0 to 4 scale mapped to F through A. Linear symbols are graded to ISO/IEC 15416. Both standards define not only the scoring but the conditions the score is taken under, and this is the part that gets dropped in transcription. A grade quoted without its aperture, wavelength and angle is not a grade, it is a number with no units.

Grading concept What it means on your line What buyers get wrong
Reference decode Whether a reference algorithm can decode the symbol at all Treated as the whole test, when it is only the entry condition
Symbol contrast Difference between light and dark elements as measured Assumed to be a property of the printer, when the substrate sets it
Fixed pattern damage Wear or damage to the finder pattern and clock track of a 2D symbol Blamed on the reader, when handling after printing can damage the finder pattern just as easily
Unused error correction How much of the symbol’s built-in redundancy is already being spent An early warning available on every read, and one that rarely gets trended
Measurement conditions Aperture, wavelength and angle the grade was taken under Omitted from the specification, making the grade unarguable either way

Unused error correction deserves its own sentence. A 2D DataMatrix carries redundancy so it can still be decoded when part of it is damaged, and every damaged module spends some of that reserve. A symbol reading perfectly while consuming most of its error correction has nothing left, and it fails on the first substrate batch that is slightly worse. That is the number that turns code reading from a pass or fail flag into maintenance you can schedule.

There is also a hardware distinction worth naming, because the two get quoted against each other. An inline reader is a production device: it images the code as the pack moves, at line rate, under the lighting the station gives it. A verifier is a measurement device, used offline on a sample under the standard’s own controlled conditions. Inline grading gives a grade on every unit, which is what trending needs; offline verification gives a defensible measurement under stated conditions, which is what a customer specification usually asks for. The two numbers are not expected to be identical. We first bought Cognex DataMan readers in 2026 specifically for serialization work, where DataMatrix grading against ISO/IEC 15415 mattered more than defect tooling, and the choice between that and a Keyence platform is discussed on our machine vision inspection page.

Why Does a Code That Reads Here Fail at a Trading Partner Tomorrow?

Because your reader is not their reader, and neither of you is the standard. Yours sees the code at a fixed distance, under lighting chosen for that substrate, on a pack held in a known orientation, seconds after marking. Theirs sees it handheld or through a tunnel, at whatever angle a person or a conveyor presents, under warehouse lighting, weeks later, possibly through a shrink film or behind a strap.

Three things change between those two moments, and each of them eats margin.

The symbol ages. Ink abrades in transit, labels lift at the corner, cartons scuff against each other in a case, and cold-chain condensation leaves a film. None of that shows up at the machine that made it.

The optics change. A red-light configuration that reads beautifully on white board can collapse on a coloured print, because contrast is a property of the light and the substrate together, not of the printer. Glossy carton stock wants diffuse dome lighting, laser-marked glass usually wants dark field, and a station lit for one is not lit for the other.

Nobody agreed the conditions. Where a contract says grade B and does not say under what aperture and wavelength, two honest parties can measure the same pack and disagree, and the argument happens after a pallet has been turned away.

The practical response is to build margin rather than compliance. Specify the grade your customer requires, then set the line’s own alarm limit above it, so a symbol drifting downward raises a maintenance ticket while it is still shipping acceptable product. A printhead does not fail suddenly, it degrades, so a grade sliding from B toward C across a shift is a ticket you can raise before the line makes a single reject.

What Changes When the Code Is Marked Directly on the Part?

Direct part marking changes the lighting problem completely, and it changes it before it changes anything else.

A printed code is dark ink on a light, diffuse, roughly flat surface. Contrast is chemical: the ink absorbs light and the substrate scatters it, so ordinary front illumination produces a readable image. A directly marked code has no ink in it. A dot peen mark is a field of indentations, a laser mark is an oxidised or ablated area, an etched mark is a change in surface texture. In every case the contrast is geometric, and geometry only becomes contrast when the light arrives at the correct angle.

That single difference produces most of what makes DPM hard.

Property Printed code Direct part mark
Source of contrast Ink against substrate Surface geometry against the light angle
What decides readability Print quality and substrate Lighting geometry, at least as much as the mark itself
Effect of a shiny or curved surface Manageable with diffuse light Specular reflection can wash out the field of view, and the useful light angle changes across the mark
Effect of downstream processing Smearing and abrasion Blasting, plating, heat treatment and machining all alter the mark
Part presentation Pack is carried past the reader Part often has to be held and oriented for the reader

The consequences for station design are direct. Lighting stops being an accessory and becomes the instrument: dark field, diffuse dome and on-axis coaxial illumination each reveal a different mark on a different surface, and picking wrongly produces a station that works on the sample and fails on the shift. Fixturing gets stricter, because a part that rocks under directional light changes its own contrast between cycles. And grading gets contentious, since a grade is only meaningful with its measurement conditions stated, and a marked metal part is generally not read under the same illumination as a printed label. If a customer requires a graded DPM mark, agree the assessment method and its conditions with them in writing before anyone specifies a reader.

Being straight about our own scope. Our delivered code reading is on printed codes and applied labels, and the 5-axis CNC shot peening machine we delivered for turbine blade surface treatment is a reminder of why marking sequence matters: a process that changes a surface changes any mark already on it. Where marks have to be read directly off metal or moulded plastic, the honest first step is imaging your real parts, including the worst ones, before anyone quotes a reader. A mark that cannot be shown clearly to an engineer on a monitor will not be read reliably on the floor.

What Actually Makes a Code Unreadable in Production?

Unreadable codes come from a short and repeatable list, and few of the items are the reader’s fault. Knowing which one you have decides whether you adjust a printer, a light, a fixture or a purchasing specification.

Symptom on the line Common cause Where the fix belongs
Reads fall off after a substrate change New carton stock or label material with different gloss or colour Purchasing specification and a re-verified lighting setup, not the reader
Grade drifts down slowly across a shift Printhead wear, ink supply, ribbon or nozzle condition Trended grade triggering maintenance before the first reject
Sudden total loss of reads on one lane Light failed, lens fouled, or a guard was moved and let ambient light in Shrouding the station and monitoring the light rather than assuming it
Reads fail only at high line speed Motion blur, or a trigger firing before the pack is settled Strobed illumination tied to the trigger, and trigger position
Reads fail only on one pack orientation Code lands on a fold, seam, curve or under a later-applied band Pack layout, settled before equipment is ordered
Codes damaged after a good read Downstream handling, brushes, transfers, shrink tunnels Read position moved later, or handling redesigned
Intermittent misreads with no pattern Pack not repeatably presented to the reader Mechanical: a puck, guide or nest, not a better camera
Right code, wrong content Recipe not changed at changeover Recipe control that binds artwork, code content and inspection settings together

One pattern repeats across these lines. A camera cannot compensate for a part that moves: if a pack rocks, tips or skews at the read position, the reader records that variation as a quality problem and the trend data becomes noise. Fix presentation mechanically first, then light it, then choose the reader. Doing those three in the other order is how a station passes its buy-off and then drifts.

What Happens to a Code That Fails, and Why Does the Reconciliation Matter Most?

Two things have to happen to a failed unit, and the line has to prove both: the unit has to physically leave, and the record has to show that it left and where it went.

On the delivered GMP filling and sealing platform, that is Festo DSBC pneumatic cylinders ejecting packs with unreadable or duplicated codes. On the same machine, containers failing the closure vision check go to a quarantine bin by pneumatic pusher, each rejection logged with container serial number, rejection reason and inspection image. The mechanism is cheap. The logic around it is the engineering.

Ejection is confirmed, not assumed. A sensor after the reject device verifies the unit actually left the line. No confirmation, no continuation. A reject that quietly fails to fire is worse than having no reject at all, because the record now asserts a removal that did not happen.

Tracking is a shift register, not a timer. Stations usually sit between the reader and the reject point, so the PLC carries each result along with its unit, indexed to a conveyor encoder or a machine cycle. Short-changing that conveyor distance is a common cause of the wrong unit being ejected, and it presents as a vision fault when it is not one.

The bin is locked and monitored. Key-switch access, a full-level sensor, and a documented count before it is emptied. A quarantine bin anyone can reach into is not quarantine.

Duplicates are rejected regardless of grade. If the reader sees an identity it has already seen in this batch, that unit goes out even though the code may grade A. A duplicate identity in the field is the failure the whole system exists to prevent.

Then the part that outlives all of it. Reconciliation is the arithmetic that closes the batch: identities commissioned equals good units, plus rejects, plus quality samples, with no gap. It matters more than the rest because of what stays visible afterwards. Months later nobody can watch the pusher fire, the bin is long emptied and the conveyor has run a thousand batches since. What survives is a set of numbers, and either they close or they do not.

Ledger line Where the number comes from Failure it exposes
Identities commissioned Serial pool issued to the line for this batch Numbers issued and never accounted for
Good units shipped Confirmed reads that passed and left the line downstream Units counted twice at a merge or an accumulation table
Rejects Confirmed ejections, each with a reason code A pusher that fired without the unit leaving
Quality samples Units removed deliberately, logged as removals Samples taken by hand and never recorded
Delete the ‘Damaged or unread’ row so the ledger’s four lines map one-to-one onto the site’s formula, and change the following sentence to: ‘A line that cannot produce those four numbers without a manual count has a compliance problem waiting rather than a data problem now.’

A line that cannot produce those five numbers without a manual count has a compliance problem waiting rather than a data problem now. Where the record falls under 21 CFR Part 11, the reconciliation stops being process data and becomes a record, and the audit trail, time synchronisation and access control behind it are covered on our 21 CFR Part 11 for production equipment page.

How Does Unique Identity Aggregate From Unit to Case to Pallet?

Reading a code gives you an identity. Aggregation is the record of which identities sit inside which container, and it is built entirely from reads.

The chain runs unit, case, pallet. Each unit carries its own identity. The case carries a label of its own, and the parent-child link says which units are inside it. The pallet carries a Serial Shipping Container Code, an SSCC under GS1 practice, and that link says which cases are on it. Scan the pallet at goods receipt and the receiver knows everything inside without opening anything. On the delivered GMP platform, aggregation data is logged to a Level 3 serialization server for parent-child tracking, and how the case level is physically built is set out on the pharmaceutical serialization page rather than repeated here.

Two read-side rules decide whether the aggregation record is worth anything.

Nothing joins a parent until its own read is confirmed. A case is closed only after the expected count of confirmed child reads is present. A pallet is built from confirmed cases only. The moment a container is sealed on an assumed count, the record and the physical goods have permission to disagree, and the disagreement is discovered by somebody else.

Every parent-child link needs a controlled way to break. Repacking, quality sampling and damaged-case handling all separate a child from its parent, and if the system has no disaggregation function the warehouse will do it with a spreadsheet. That is not a software preference, it is a design requirement on the reading stations, because a broken link has to be recorded by the same mechanism that made it.

Where case and pallet building are part of the same project, the collation and case-packing side is covered on our case packing and wrapping page, and the pallet label position that a reader can actually see is a layout question on the palletizing systems page.

What Does the Traceability Record Have to Survive?

Not a clean run. Any logging scheme survives a clean run. A record earns its keep when the line stopped mid-cycle, an operator opened a guard, a unit was removed by hand, and somebody asks six months later what happened to one specific identity.

The architecture we build for this comes from the QA laboratory automation programme, re-ordered in four consecutive years, where every sample moves through a formal six-state machine implemented in the Allen-Bradley PLC: Queued, In-Transit, At-Station, In-Test, Completed and Failed. Every state transition is timestamped with millisecond resolution and logged with the sample identity, the source state, the destination state, the station and the operator identity where a person intervened. The state machine enforces its own transition rules, so a sample cannot jump from Queued to In-Test without passing through In-Transit and At-Station, and an invalid transition attempt is blocked and logged as an exception rather than discarded.

That last clause is the point. The system records what went wrong in the same ledger and at the same resolution as what went right. The same programme retries each positioning check up to three times before escalating, with the specific failure mode logged, because a retry that leaves no trace is worse than a stoppage.

Applied to a code reading line, the same discipline produces five requirements.

  1. State lives in retentive memory. A stop must not lose the position of every unit on the line. We keep unit tracking retentive, so the controller comes back knowing what it knew.
  2. Unknown is a state, and it defaults to reject. On restart, any position the controller cannot vouch for is declared unknown and rejected. Operators get a defined purge routine rather than a judgement call at 3 a.m.
  3. Identities issued but never used are closed out. Numbers commissioned and never marked go back to the pool or are recorded as destroyed, never left floating.
  4. Manual intervention is a logged event, not a gap. A unit removed by hand is a removal with a reason and a person against it. Every unlogged manual action becomes an unexplained hole in the reconciliation.
  5. The line survives losing its network. A local pool of identities big enough to finish the batch, and enough local event storage to keep producing while it cannot report, sized against the longest realistic outage rather than the average one.

Where the record sits inside a validated quality system the state history is qualified alongside the machine, and that route from user requirements through IQ, OQ and PQ is on our computer system validation page.

Does the Same Discipline Apply Outside Pharmaceutical Packaging?

It does, and the mechanics barely change. Bind an identity to a physical thing, record what was done to it and by whom, make the record retrievable later.

Distribution and co-packing. On the modular carton unloading station built for a consumer goods distribution centre, a barcode scanner reads the carton ID label as the carton arrives and tote IDs are scanned as totes enter. The carton ID then decides which tool set the robot picks from its change rack, the carton ID is updated with a process code when unloading completes, and each filled tote is updated with its SKU information. Barcode tracking accounts for every carton and every tote through the process, so a mis-pick is traceable to a station and a timestamp instead of to a shift. That is a read driving machine behaviour, not just recording it, and the tooling side of it is on our end of arm tooling page.

Electronics assembly and test. On the SCARA sensor panel line, electric screwdrivers work to a target torque per fastener and the PLC records final torque and total rotation angle for every fastener against the panel serial number. The identity is a serial rather than a DataMatrix and the record is a process signature rather than a code grade, but the requirement is identical: a measurement is worthless unless it is bound to the identity at the moment it was taken. Our automated test equipment records test parameters, results and timestamps the same way, exported SPC-ready.

Warehousing. On the palletizing cell integrated with ASRS stacker-crane storage, WMS barcode verification runs while one heavy-duty linear track serves multiple palletizing stations. Same loop, applied to bin locations rather than to saleable units.

What transfers between all three is unglamorous. Retrofitting the link between a measurement and an identity is painful, and it is far cheaper to decide at design stage that every result gets a part identifier, serial number, panel ID or sequence counter attached at the moment of inspection.

When Is a Custom Code Reading Station the Wrong Buy?

Worth being direct, so nobody spends a month finding out.

When a handheld scanner and an existing system already close the loop. If units are handled individually at a bench, a person with a scanner and a WMS that records it is faster to deploy and cheaper to own than an inline station. Automate the read when rate, reconciliation or reject latency makes a person impractical, not before.

When the code is not the problem. If units are being lost between stations, or the batch will not reconcile, a second reader rarely helps. The gap is usually a place where units can leave the line unrecorded, and it closes with sensing and tracking logic rather than with optics.

When nobody downstream has stated a requirement. Grading to a level nobody asked for adds cost with no defence attached. Get the grade and its measurement conditions in writing from whoever will scan the pack, then build to it with margin.

When the mark itself cannot be improved. A reader cannot recover a symbol that was never formed properly. If the marking process is at its limit on that substrate, the money belongs in marking or in substrate, not in a better camera. The same applies where a proven catalogue unit already reads your code at your rate for less than anything we would build: we will say so.

Two exclusions from our side as well. We do not build or resell serialization software, so that platform stays with its vendor and we build the line that feeds it. And we do not publish prices, because the same nominal station moves a long way on decisions taken before hardware is ordered: how many read positions, whether grading is required inline or only offline, how much reconciliation logic the batch record carries, and whether the reject has to be confirmed and locked.

Next step: Send five things and we can give you a straight answer instead of a brochure. One: a pack or part sample carrying the code, including the worst ones you have rather than the best. Two: the symbology and the data fields it carries, with the grade requirement and its measurement conditions if a customer has stated one. Three: units per minute at peak, and how many shifts. Four: a photo or layout of the metre of line either side of where the reader has to fit, with the make and model of the existing controller. Five: what has to reconcile at the end of a batch, and who reads that record afterwards. That is enough to say whether you need a reading station, a grading station, or a change to how the code is marked in the first place.

Frequently Asked Questions

What is a barcode verification system, and how is it different from a scanner?

A scanner tells you a code decoded. A verification system tells you how much margin was left before it would not have. The two answers come from the same image and mean very different things: a symbol can decode perfectly on the reader that made it and still fail at a distributor whose scanner sees it under different light, at a different angle, through a shrink film. Verification grades the symbol against ISO/IEC 15415 for 2D codes or ISO/IEC 15416 for linear ones, and reports the grade with the measurement conditions it was taken under. Specify readers that report the grade, then trend it, because a printhead degrades rather than fails.

Which code grade should we specify, and who decides it?

Your customer or your destination market decides it, and the number is worthless without its measurement conditions stated alongside. A specification saying grade B means nothing until it also names the aperture, the wavelength and the angle the grade was measured at, because the same symbol grades differently under different conditions. Get the requirement in writing from whoever will scan the pack downstream, then build the station to hold a margin above it rather than to sit on the line. Codes drift with substrate batches, printhead wear and ink supply, so a station tuned to just pass on day one has nothing left when the first substrate batch drifts.

Can code reading be retrofitted to a line we already run?

Usually yes, and the reader is the easy part. Three things have to line up. Mechanically, the pack has to pass the read position in a repeatable orientation with the code facing the camera, which often means adding a guide or a puck rather than a camera. Electrically, the station needs a handshake with the existing controller: pack present, read result, reject asserted, fault. And the reject needs somewhere to go, with a sensor confirming the pack actually left and a locked bin that gets reconciled. Control system modernisation on existing production machines is our largest line of work this year, so a retrofit reading station is familiar territory.

Not sure what configuration fits your product?

Talk to our engineering team. We will help you map the right approach.