Pharmaceutical serialization and traceability means giving every saleable unit its own identity, then keeping a record of what happens to that identity as it is packed into a case, the case onto a pallet, and the pallet out the door. The identity is a 2D DataMatrix carrying product code, serial number, batch and expiry. The record is held in serialization software. Between the two sits the part most vendors gloss over: a printer, a camera, a reject device and a controller that has to be right on every single pack, at line speed, on the worst carton stock your purchasing department ever bought.
Motionwell integrates that physical layer on packaging lines in Singapore. Cognex DataMan readers and Domino coders on delivered lines, the tracking and reject logic in the PLC that keeps hardware and data honest, and the handshake up to whichever serialization platform the customer has already bought. The platform stays with whoever sold it to you, since we are not a serialization software vendor; our job is making the line do what that software claims it does.
Written for the plant engineer who has a compliance deadline and now has to decide where the equipment physically goes.
What does a serialization system have to do on the line?
Strip away the vocabulary and there are four jobs, in order.
| Job | What the hardware does | Where it goes wrong |
|---|---|---|
| Mark | Print or apply a unique code on the unit | Code lands on a fold, a seam, or a surface that later gets covered |
| Verify | Read the code back and grade its quality | Camera reads at 60/min, misses at 90/min, nobody notices until audit |
| Decide | Reject anything unreadable or duplicated | Reject fires, pack does not leave, line keeps running |
| Aggregate | Link unit to case, case to pallet | Case sealed before the last child code was confirmed |
Every serialization failure a regulator or a customer finds traces back to one of those four rows. Software cannot fix a code that was never printed properly.
Which pharmaceutical track and trace regulations drive the specification?
The two schemes that set the pattern for most of the world:
US Drug Supply Chain Security Act (DSCSA). Each saleable unit carries a product identifier, a 2D DataMatrix encoding the National Drug Code, a serial number, lot and expiry, plus a human-readable version of the same fields. Trading partners exchange transaction data electronically and must be able to respond to verification requests at unit level.
EU Falsified Medicines Directive and Delegated Regulation (EU) 2016/161. A unique identifier in a 2D DataMatrix containing product code, serial number, batch and expiry, with a national reimbursement number where a member state requires it, plus an anti-tampering device on the pack. Data is uploaded to the European repository system and decommissioned when the pack is dispensed.
Both schemes come down to the same two stations on the line. Projects P23005 and P25026 pair code printing with verification on the GMP filling platform, and whichever data set a destination market imposes has to fit the print area and the reader that pair leaves you with.
Other markets each add their own twist: China, South Korea, Brazil, Russia, India for exports, Saudi Arabia. Requirements move, so confirm the current text per destination before the line is designed rather than after.
Singapore itself has no national serialization mandate on the same model. For most plants here the requirement arrives from the export market and from the customer’s global standard, which is often stricter than any single regulation because it has to satisfy all of them at once. That matters for a practical reason: the data set decides how many fields must fit in the print area, and the print area decides the code module size, which decides the camera and lens.
Where do the printer and the camera actually go?
Print as late as possible, and never onto something that gets covered
The code goes on after the last operation that could damage, smear or hide it. On a carton, that usually means after cartoning and before the case packer. On a label, print-and-apply is normal, and the code is verified before the label ever reaches the pack. On glass, laser marking on the vial or laser onto a label are both used, and the readable one depends on your lighting more than your marker.
The mistake we see most often is a code printed on a panel that later ends up under a shrink band, a tamper seal or a case flap. Walk the pack through every downstream station with a marker pen on the intended code position before anyone orders equipment.
The camera goes downstream, not next door
Print and verify are two stations, not one. Thermal inkjet needs travel distance for the ink to set before a camera looks at it, and putting the reader immediately after the printhead produces grade drift that has nothing to do with print quality. Far enough for the substrate to settle, close enough that no handling happens in between: that gap is a real design number, and it is set by belt speed and ink type.
Print registration comes from a line encoder plus a product-present sensor, not from a timer. With encoder tracking, the code lands in the same place at 40 packs a minute and at 120. With a timer, the print position walks every time the line changes speed, and it changes speed every time an operator touches the infeed.
The reject station needs room you have not allowed for
A reject device needs the pack, a confirmation sensor, a locked bin with a level sensor, and enough conveyor between the camera and the pusher for the controller to track the pack reliably. Short-changing that distance is the single most common cause of the wrong pack being ejected. Pneumatic pushers and air blasts (we use SMC and Festo throughout) are cheap; the tracking shift register behind them is where the engineering sits.
How is code quality graded, and what grade do you actually need?
Reading a code is not the same as grading it. A reader tells you it decoded. A grade tells you how much margin was left before it would not have.
2D symbol grading follows ISO/IEC 15415, which scores contrast, modulation, fixed pattern damage, axial and 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 barcodes use ISO/IEC 15416. Your customer’s specification will state a minimum grade and, just as important, the measurement conditions: aperture, wavelength and angle. A grade quoted without those conditions is not a grade.
Two practical consequences. First, specify readers that report the grade rather than only pass or fail, and trend it. A printhead does not fail suddenly; it degrades, and a grade sliding from B toward C over a shift is a maintenance ticket you can raise before you make a single reject. Second, lighting decides the result more than the camera does. Glossy carton stock wants diffuse dome lighting, laser-marked glass usually wants dark field, and a red-light setup that works beautifully on white board can collapse on a coloured print. Lens selection, working distance and lighting geometry for this kind of station are covered in our page on machine vision inspection systems.
What happens to a code that fails?
This is the question that separates a serialized line from a line with a printer on it.
A failed pack must be physically removed and its serial number must be prevented from ever entering the supply chain. Both halves matter, and the line has to prove both.
- Ejection is confirmed, not assumed. A sensor after the reject device verifies the pack left the line. No confirmation, no continuation: the line stops. A reject that quietly fails to fire is worse than no reject at all, because the data now says the pack was removed.
- The bin is locked and monitored. Key-switch access, a full-level sensor, and a documented reconciliation before the bin is emptied.
- The serial is decommissioned upward. Reported as rejected or destroyed to the site system, never reissued to another pack.
- The batch reconciles to zero. Serials commissioned equals good packs, plus rejects, plus quality samples. Any gap is a deviation, and the line has to give quality assurance the numbers to close it without a manual count.
Duplicate codes deserve their own rule. If a reader sees a serial it has already seen in this batch, that pack is rejected regardless of how good the code looks, because a duplicate in the field is the failure mode the entire regulation exists to prevent.
How does aggregation from item to case to pallet work?
Aggregation records the parent-child relationships: which units are in this case, which cases are on this pallet. The pallet carries an SSCC, so one scan at goods receipt tells the receiver everything inside it.
There are three ways to build the case level, and the right one depends on your pack pattern:
- Read every unit before it enters the case. A reader over the infeed lane captures each serial as the pack passes, and the case is closed only after the expected count is confirmed. Works well with robotic case packing, where the pick sequence is already deterministic. The secondary packaging line we currently have in delivery uses four SCARA robots on exactly this pattern.
- Read the assembled stack from above. A camera or a multi-reader tunnel reads all codes in the open case before flap closing. Fast, but it demands that every code faces up and stays visible, which constrains your collation pattern.
- Read on the way out. A tunnel around the closed case reads what is visible through cut-outs or windows. Convenient to retrofit, and the least reliable of the three.
Whichever you use, the case label is printed with its own SSCC and verified before it is applied, and the pallet is built from confirmed cases only. Plan for disaggregation too: repack, quality sampling and damaged-case handling all break a parent-child link, and if the system has no controlled way to do that, the warehouse will do it with a spreadsheet.
What breaks a serialized line, and how do you design around it?
Line clearance
Before the next batch starts, every unit of serial-bearing material from the previous batch has to be off the line and accounted for. Machine design decides how long that takes. Open guarding, no dead pockets under transfer plates, removable guide rails without tools, and a clear view into every accumulation table: those choices are the difference between a fifteen-minute clearance and an hour-long one, four times a day, forever.
Line stops and power loss
The controller holds the state of every pack position. A stop must not lose it. We keep pack tracking in retentive memory, and on restart the machine declares any position it cannot vouch for as unknown and defaults it to reject. Operators get a defined purge routine rather than a judgement call. Serial numbers that were commissioned but never printed are returned to the pool or destroyed, according to the customer’s procedure, and never left floating.
Buffer and offline operation
The line will lose its network connection at some point. It needs a local pool of serial numbers large enough to finish the batch, and enough local event storage to keep producing while it cannot report. Size both against your longest realistic outage, not your average one, and warn the operator before the pool runs dry rather than after.
How does the machine layer connect to serialization software?
The usual model runs from device level up through line, site and enterprise systems. Motionwell builds and owns the bottom two. The line controller requests a block of serial numbers, commissions them onto packs, reports the outcome for each, and passes aggregation events upward for the site system to turn into the reporting format each market needs.
Two things make that interface work: an agreed message set defined before either side writes code, and an unambiguous rule about who owns the serial number pool. Where records are subject to 21 CFR Part 11, the machine layer contributes the audit trail, the time synchronisation and the access control that the record depends on, which we cover in our page on 21 CFR Part 11 compliance for production equipment. Validation follows the same route as any regulated machine: IQ, OQ and PQ, with the challenge tests written around deliberate bad codes, forced rejects and simulated line stops rather than only around happy-path production.
Does the same traceability system work outside pharmaceutical packaging?
Yes, and the mechanics barely change. A traceability system for manufacturing does the same three things in any regulated industry: bind a unique identity to a physical thing, record what was done to it and by whom, and make the record retrievable later. For a medical device OEM we deliver an electronic device history record system that captures build data unit by unit, in rolling site-by-site deployment. The identity is a serial on a device rather than a DataMatrix on a carton, but the reject logic, the reconciliation and the audit trail are the same discipline.
What Motionwell integrates
Coding and marking: Domino thermal inkjet coders on delivered packaging lines. Vision and code reading: Cognex DataMan readers, Keyence vision systems, with lighting designed per substrate. Control: Allen-Bradley CompactLogix and ControlLogix, Siemens, Omron and Beckhoff, depending on your existing plant standard. Handling and reject: SMC and Festo pneumatics, Yamaha SCARA robots for case packing, Interroll and Intralox conveying. Safety: interlocked guarding, laser scanners, LVD and CE testing, because adding a reject station changes the risk assessment on a line that was already signed off.
Serialization sits on the same delivered GMP platform as our pharmaceutical filling and sealing machines, where projects P23005 and P25026 combined SUS316L product-contact construction and IQ/OQ/PQ documentation with code printing and verification. The build detail is in the filling and sealing machine case study, and the wider production context on the pharmaceutical and packaging automation page.
Frequently Asked Questions
What is pharmaceutical serialization and traceability?
Serialization gives every saleable unit a unique identity, usually a GS1 DataMatrix carrying product code, serial number, batch and expiry. Traceability is the record of what happened to that identity: commissioned at the printer, verified at the camera, packed into a case, palletised, shipped. The regulation is written about the data. The line has to produce codes that are readable, decide pass or fail on every unit, and make sure the physical pack and its record never disagree.
Which pharmaceutical track and trace regulations apply to a line in Singapore?
Singapore has no national serialization mandate equivalent to the US DSCSA or the EU Falsified Medicines Directive, so for most plants here the requirement arrives from the export market and from the customer's own corporate standard. A line shipping to the US, the EU, Korea, China, Brazil or Saudi Arabia inherits that market's data set, code content and reporting rules. Confirm the current requirement per destination before the line is specified, because the data fields drive the print field layout.
What is aggregation in serialization, and do I need it?
Aggregation is the parent-child link between a unit and its case, and between a case and its pallet SSCC. Scan the pallet and the system knows every serial inside it without opening anything. Some markets require it, many trading partners demand it contractually even where the law does not, and warehouses want it because receiving becomes one scan instead of a hundred. Adding aggregation later is far more disruptive than designing the case packer for it up front.
Can an existing packaging line be serialized, or do I need a new one?
Most lines can be retrofitted. The work is usually a coding station, a verification camera with its lighting, a reject device with confirmation sensing, a line encoder for print registration, and a controller that tracks each pack position through the machine. The constraints that decide feasibility are conveyor length between operations, available floor space for the reject bin, and whether the existing control platform can be extended or needs modernisation.