Pharmaceutical Serialization and Traceability, Built Into the Line

Pharmaceutical serialization on the packaging line: printer and camera placement, code grading, reject handling, aggregation, and what happens on a line stop.

Talk to an Engineer
Pharmaceutical serialization station with an inkjet print head, code-reading camera and pneumatic reject pusher

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: the coder and the reader, specified against your substrate, your line speed and the grade your customer audits to; the tracking and reject logic in the PLC that keeps the packs on the belt and the records in the system saying the same thing; and the handshake up to whichever serialization platform the customer has already bought. The platform stays with whoever sold it to you, and our job is making the line do what that software claims it does.

What follows is written for the plant engineer holding a compliance deadline and a layout drawing, who 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.

JobWhat the hardware doesWhere it goes wrong
MarkPrint or apply a unique code on the unitCode lands on a fold, a seam, or a surface that later gets covered
VerifyRead the code back and grade its qualityThe camera reads reliably at the speed it was commissioned at and starts missing when the line is run faster, and nobody notices until an audit
DecideReject anything unreadable or duplicatedReject fires, pack does not leave, line keeps running
AggregateLink unit to case, case to palletCase 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, a printer and a reader, 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.

Singapore itself has no national serialization mandate on the same model. The requirement here usually 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?

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.

A mistake we see repeatedly 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

Print and verify are two stations. 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. 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 a common cause of the wrong pack being ejected. Pneumatic pushers and air blasts are cheap, and the device is rarely what fails; the tracking shift register behind it is where the engineering sits, because a reject that fires one position late takes out a good pack and passes the bad one, and nothing on the line tells you that is what happened.

Human-readable printing needs comparison with the correct pack record. OCR pack-data verification keeps character reading separate from the wider serialization workflow.

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, 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. 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 Should a Serialized Line Handle Reprints and Rework?

On an unserialized line a bad print is fixed by printing it again. The pack is the same pack, the code says what it said before, and nobody is worse off. On a serialized line the code is the pack’s identity, and that identity was issued by a system that is counting. The difference looks small on paper and it changes what an operator is allowed to do.

The physical pack and its serial record have to remain linked through rejection and rework. An unreadable pack is segregated and its state recorded. The approved workflow then determines whether it is destroyed and replaced, or reworked through a controlled reprint and verification step. Permissions, duplicate checks and audit events keep one active identity associated with the correct physical unit.

Design work follows from it, because a rule the machine does not enforce lasts until the first bad night shift. Three situations arrive on every line:

What the line meetsThe instinct it triggersWhat the machine has to make easy instead
A sound pack carrying an unreadable codePrint over it, or put a fresh label on topSegregate it and follow the approved reject or controlled-rework route, recording the serial-state change
A pack knocked off the conveyor and picked upSet it back on the belt a little further alongReconcile its identity and state before re-entry at the defined verification point
Print quality being dialled in at the start of a batchRun live packs through until the code looks rightSetup material that never carries a live serial, or serials logged as consumed and destroyed

What the right-hand column has in common is that the compliant action has to be the least effort available at the machine. Where doing it properly needs a supervisor, a key and a form, while doing it improperly needs one hand and no witness, the line drifts toward the second under production pressure, and the gap surfaces at reconciliation weeks later in front of somebody who was not there.

That is also the argument for keeping the decision inside the controller, and out of the operator’s judgement. The reader grades, the controller decides, the reject fires, and the person on the line is told what happened. Operator attention then goes where it earns something, which is noticing that the grade has been sliding all shift, and never into adjudicating pack by pack at line speed.

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:

  1. 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. This suits robotic case packing with a tracked pick sequence. The controller commits the parent-child relationship after confirming that the expected units entered the case.
  2. 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.
  3. 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. 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, and warn the operator before the pool runs dry.

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, and never 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, but the reject logic, the reconciliation and the audit trail are the same discipline.

What Does Motionwell Integrate on a Serialization Line?

We integrate the physical layer and the logic that makes it defensible, which is why the useful thing to publish here is not a vendor list but what decides each choice.

LayerWhat we integrateWhat decides the choice
Coding and markingInkjet, laser marking and print-and-apply labelling, mounted as a station with enough access to wipe a printhead without breaking the lineSubstrate and line speed first, then whether the code has to survive a downstream process such as a heat tunnel or a wipe with alcohol
Code reading and gradingReaders that report a graded result, with lighting geometry designed for the substrateThe grade your customer audits to, the measurement conditions that grade is quoted under, and whether you want the degradation trend before the first reject
Control and trackingThe shift register that follows each pack, the reject decision, the reconciliation counters and the interface up to the serialization platform, on the control platform your plant already runsYour existing plant standard, because pack tracking has to live in the same program as the conveyor that moves the pack
Handling and rejectPneumatic pushers and diverters, a locked reject bin with level sensing, and the conveyor length the tracking needsDistance between camera and pusher, line speed, and what the line is allowed to do when the bin fills
SafetyInterlocked guarding, laser scanners, LVD and CE testingA reject station adds a moving hazard to a line that was already signed off, so the risk assessment is reopened

Coder integration onto an existing conveyor is work we have delivered, and the awkward part is never the printer. It is finding the print-to-read distance on a conveyor somebody else laid out, and finding the straight run the reject tracking needs downstream of that.

Serialization is scoped as its own subsystem, with its own printer, camera and reject station, alongside our pharmaceutical filling and sealing machines. The delivered filling machine is described in the filling and sealing machine case study, and the wider production context on the pharmaceutical and packaging automation page.

Next step: Send us four things and we can tell you what your line needs. One, the destination markets and the data fields each requires. Two, a photo or drawing of the pack with the intended code position marked. Three, your case and pallet pattern with counts. Four, the current line layout with speeds and the make and model of the existing controller. If serialization software is already selected, name it and we will scope the interface from your side. Talk to an engineer.

Standards Used in Machine Design and Validation

These references inform the design, testing and documentation described on this page. Each row links to its primary source and records the edition checked.

StandardCurrent editionWhat it means for your machine
US Drug Supply Chain Security Act (DSCSA): package-level identification and tracing of prescription drugs Title II of the Drug Quality and Security Act (2013); FDA exemptions for small dispensers run to 27 November 2027 Requires package-level identification and interoperable electronic tracing for prescription drugs within its scope. Packaging systems print and verify product identifiers and provide records for supply-chain exchange. FDA exemptions to 27 November 2027 cover eligible small dispensers and, where applicable, their trading partners, as specified on the FDA exemptions page.Checked 11 Sep 2026 against FDA DSCSA page and the FDA exemptions page (fda.gov/drugs/drug-supply-chain-security-act-dscsa/exemptions-under-drug-supply-chain-security-act)
Commission Delegated Regulation (EU) 2016/161: safety features on the packaging of medicinal products for human use (under the Falsified Medicines Directive 2011/62/EU) (EU) 2016/161, in application since 9 February 2019 Specifies safety features for medicines within its scope: a Data Matrix unique identifier and an anti-tampering device. The packaging line verifies the required code content and readability and supplies records for repository upload. Case and pallet aggregation can support logistics and trading-partner workflows alongside the unit-level identification requirements.Checked 11 Sep 2026 against EUR-Lex Regulation (EU) 2016/161, Articles 2, 4–6 and 33; European Commission safety features Q&A version 22, July 2026
21 CFR Part 11: FDA rule on electronic records and electronic signatures Current eCFR text; most recent amendment to the part dated 2 March 2023 Applies to electronic records maintained under FDA predicate rules and to the electronic signatures within its scope. Identify those records during machine specification, then design access control, audit trails, retention, accurate copies and signature binding around their intended use.Checked 7 Sep 2026 against eCFR versioner API (ecfr.gov/api/versioner/v1/versions/title-21.json, part 11), latest section amendment_date 2023-03-02

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 a line here usually inherits the requirement from its 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. Adding aggregation later is far more disruptive than designing the case packer for it up front.

Not sure what configuration fits your product?

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