addaScan home
Assessment
Application // 02

OCR/OCV inspection of date codes, batch codes and barcodes

Date code inspection, batch code verification and barcode reading on cartons, bottles, cans, pouches and labels, whatever coder printed them.

Technical review: Frank GuoReviewed

Request an assessment for this application
// Short answer

OCR/OCV inspection is a camera check of the best-before or expiry date, the batch code and the barcode on every pack. OCR reads the characters; OCV checks that the text expected for the run is present, complete and legible. It works when the code lands in a predictable area with consistent contrast. Reading a barcode is not the same as grading its print quality. We confirm what is achievable on your own coded samples first.

// What it checks

What an OCR/OCV inspection station checks

Four checks cover most coding faults, from OCR and OCV to barcode reading. Which you need, and how strict the limits are, is set at the sample test.

01 // OCR

Read the code (OCR)

Reads the printed characters so the code can be logged or passed to a traceability system.

NeedsConsistent font, size and print contrast
02 // OCV

Verify the expected text (OCV)

Date code verification and batch code verification: the printed code is compared with the string expected for the run.

NeedsThe expected string for every run
03 // Print

Code print quality

Faint, broken or smeared characters, and codes printed outside their area.

NeedsGood and poor print samples to set limits
04 // Barcode

Barcode and 2D code reading

Decodes barcodes and 2D codes such as DataMatrix and QR, with the camera or a fixed-mount barcode scanner (code reader), and checks the content matches the product: the core of a barcode inspection system.

ScopeReading only, not print-quality grading
Medicine carton inspection details: recognised printing, missing printing and misplaced printing, with English field labels.
Application guide · Medicine cartons · HIKROBOT SC5000

Date codes: readable does not always mean acceptable

On medicine cartons, missing or displaced print can fail even when some characters remain readable. Compare the separate content, print and position decisions.

Read the application guide →
Laser-marked cap with OCR and outline overlays alongside the translated camera and lighting schematic.
Application guide · Marked caps · Industrial camera + VM

Laser-marked caps: OCR, outline and colour recipes

On laser-marked caps, compare traditional digit OCR, image-region reduction and colour-specific recipes, alongside a separate visible-outline check.

Read the application guide →

OCR vs OCV, and barcode reading vs barcode grading

OCR, OCV, barcode reading and barcode grading compared
CapabilityQuestion it answersWhat you getFrom us
OCRWhat is printed here?The text as read, for logging or comparison.Offered
OCVIs the expected text printed and legible?Pass or fail against the expected string.Offered
Barcode readingDoes the code decode with the right content?The decoded data, matched to the product.Offered
Barcode gradingHow good is the print, to a formal standard (ISO/IEC 15416 for linear codes, ISO/IEC 15415 for 2D codes)?A quality grade from a dedicated, calibrated verifier.Not offered

Coding technologies we check

Inkjet

Characters made of dots; ink spread changes their look, so we test codes from your own coder.

Thermal transfer

Ribbon print on film or labels; worn print heads leave white lines through characters.

Laser

Marks the material or its coating; contrast depends on the material.

We inspect the output of the coder you already run. We do not sell or service coders. Codes marked directly on parts, such as dot-peen or laser Data Matrix codes, are covered under DPM code reading and traceability. Codes read and matched against a data file before sorting are shown in the envelope verification case.

For raised sidewall markings, see how to read a tyre manufacturing date. It explains the date group and the imaging task; a successful barcode-label read does not establish the moulded date.

// In your words

What operators report: date code rubbing off, wrong date, printer out of ink

Coding faults are reported by what went wrong on the pack. This is how the common reports map to what an OCR/OCV inspection station checks.

Coding faults as reported on the line, what an OCR/OCV station checks, and its limits
What the line reportsWhat a station checksWhere it stops
“Date code rubbing off”, “faded or smeared code”Faint, broken and smeared characters at the camera position, against print limits set on your samples.Rubbing that happens later, in the case or in distribution, is not visible at the station; that needs a rub test on the packaging.
“Wrong date code printed”, “one digit got switched”OCV of every pack against the date and batch code expected for the run, taken from the recipe, coder or PLC.If the expected value itself is wrong at source, the print and the expected value agree and the error passes.
“The printer ran out of ink”, “the print head jammed”Missing and incomplete codes are rejected; several failures in a row raise an alarm or stop the line.The station reports the symptom; coder maintenance is still needed.
“Codes smudge on chilled product”Code legibility on the pack as it passes; lighting chosen for wet or shiny film.Condensation can also blur the image itself, so it is tested on real chilled samples.
“The barcode does not scan at the retailer”Barcode reading at line speed with a content check; codes that do not decode are rejected.A pass at an in-line reader is not a verifier grade; for listing, GS1 South Africa tests to ISO/IEC 15416 (GS1 South Africa verification service).
“Does the camera alarm when the date changes?”, “check the inkjet date code before production”At each day or shift change the expected date from the recipe or PLC changes with it, so the first pack still carrying the old date is rejected; a start-up check confirms the coder prints the new date before the run.The station cannot work out shelf life itself; the expected date must come from the PLC, MES or recipe.
“A vision system to check the lot number and best-by date on the filling line”A smart camera or vision sensor with OCR at the filler outfeed reads the lot number and best-by date on every container and compares both with the run.Codes on curved, wet or shiny containers are tested on your own containers first.
“The date on the unit differs from the outer carton”The code on each unit is read and logged; matching to the case label is done at the carton station.Both codes must be visible on the line; see carton and pallet verification.
// Expiry dates

OCR inspection for expiry date checking

How a camera checks the expiry date on every pack, and the one input it cannot work without.

OCR inspection for expiry date checking reads the date printed on each pack and compares it with the date the line should be printing. A camera that only checks that some date is present will pass yesterday’s date, so the expected date must come from the PLC, MES or the product recipe, and it must change at every day or shift change. For date code inspection in South Africa, the expected string follows the date format your packs carry under R146, described below.

Plants that search for an “expiry date checking machine”, an expiry date inspection system or a date code verification system usually need this station rather than a separate machine: a smart camera or vision sensor with OCR, fitted after the coder, wired to the reject and the PLC. It checks presence, legibility and the content of the date; it does not grade print quality to a standard, and it does not decide what the shelf life should be. More on why wrong expiry dates still leave the line.

01

Read

OCR reads the expiry or best-before date on every pack straight after the coder, in the format your packs carry.

02

Compare

The read date is compared with the date the line should be printing, sent by the PLC, MES or the product recipe for this run.

03

Reject

A missing, unreadable or wrong date rejects the pack, and a run of failures stops the coder or the line before a whole batch is printed wrongly.

Before teaching the date check, use best before vs use by in South Africa to distinguish the approved date statement and shelf-life rule from the text the camera reads and compares.

// Limits

Where code inspection stops

We agree these boundaries before a project starts, so nobody expects the camera to do what it cannot.

Not covered by this station

  • Formal barcode grading. Reading shows a code decodes with the right data; a formal print-quality grade needs a dedicated verifier.
  • Codes out of view. Codes underneath, under a fold or on a freely rotating container cannot be read from one fixed view.
  • Wrong data at source. If the recipe and the coder both hold the wrong date, they agree and the error passes.

Works reliably when

  • The code lands in a predictable area. Stable presentation keeps the code inside the camera's view.
  • Contrast is stable. Shielded station lighting, chosen for shiny films or curved surfaces.
  • The expected string arrives automatically. From the recipe, coder or PLC, not typed in at each changeover.
// Evidence

What you can check before you ask us

How feasibility is decided on your own samples, and the published budgets of complete line solutions that use this check.

Engineering method

How a sample test is judged

Samples
Good samples that show normal variation, and defective samples for each defect you need to catch, including borderline ones.
Imaging
Imaged under candidate lighting and optics; what is, and is not, visible is recorded.
Acceptance
False rejects and missed defects are agreed in writing and measured at FAT and SAT.
Outcome
A written feasibility conclusion with example images, before any proposal.

The method used on every project; not a measured result.

How to prepare inspection samples →
Budget model

Installed budgets of line solutions that use this check

Bread bag closures
R 80 000 – R 540 000
Sachets and pouches
R 80 000 – R 930 000
Can ends and dents
R 100 000 – R 1 180 000
Juice box straws
R 110 000 – R 390 000
Staple food bags
R 110 000 – R 770 000
Basis
Indicative budget for a typical application, in rand, excluding VAT, as at 2 October 2026, low to high configuration. A firm price follows the sample test.

Each figure is for a complete station on that line, not a price for this check on its own.

All line solutions with budgets →
// South Africa

South African date and batch code rules (R146)

What must be printed on food packs, and why a readable batch code matters when something goes wrong.

These rules set what must be printed, not how it is checked; none of them requires a camera. An OCR/OCV station is one way to confirm, on every pack, that the code the rules require is there, correct and legible.

  • R146, regulation 11: every container must be clearly marked with a batch number so that the batch is easily identifiable and traceable. R146 defines a batch as at most 24 hours of production under the same conditions (R146 gazette copy).
  • R146, regulation 12: the date marking must be clearly indicated and preceded by “best before”, “use by” or “sell by” (the only abbreviation allowed is “BB”); it may not be removed or altered; numeric dates are written day, month, year (R146 gazette copy).
  • R146, regulation 7(1)(b): required information must be clearly visible, easily legible and indelible (R146 gazette copy).
  • Draft R3337 (April 2023, not in force): proposes a batch code and a manufacturing date on every container, date formats with keys such as (DD/MM/YYYY), and dates permanently printed rather than applied as stickers (draft R3337). The draft would bring the date rules in six months after the final version is published, so coders and inspection recipes may need to change quickly if it is finalised.
  • Recall notification: the product details the National Consumer Commission asks for include tracking information such as batch numbers (dtic/NCC recall presentation). A legible, correct batch code on every pack is what lets a recall be limited to the affected batches.
  • GS1 South Africa: tests barcodes to ISO/IEC 15416 and states that many retailers require its Barcode Test report as a step in listing a product (GS1 South Africa verification service). GS1 also aims for retailers to scan 2D barcodes, which can carry batch and expiry data, at the till by the end of 2027 (GS1 South Africa, 2D in retail).
// Station layout

How a code inspection station is laid out

Plan view of a typical station after the coder. The real layout follows the site survey.

[Schematic]Plan view · not to scale

Swipe sideways to see the whole drawing →

Plan view of a code inspection station Packs pass the existing coder, then a trigger sensor, then a camera inside a dome light that reads the printed code. The camera exchanges the expected code and the result with the line PLC, and a reject air jet removes packs whose code is wrong. PRODUCT FLOW → [1] CODER (EXISTING) [2] TRIGGER SENSOR [3] CAMERA + LENS [4] DOME LIGHT LINE PLC / RECIPE EXPECTED CODE ⇄ RESULT [5] REJECT (AIR JET)
[1] Coder: your existing inkjet, thermal transfer or laser coder.
[2] Trigger sensor: tells the station a pack has arrived.
[3] Camera: images the code area; resolution is chosen from the smallest character detail.
[4] Dome light: even light that reduces glare on film and curved packs.
[5] Reject: removes failed packs; the PLC tracks each one and supplies the expected code.
// Pass and reject[Illustrative examples]

What a pass and a reject look like

Illustrations of three common outcomes, not images from a real line. How faint a character may be before it fails is agreed with you during the sample test.

EXP DD MMM YYLOT ABCCODE AREA
PASS
Example // Carton end

Code correct

Date and lot code are complete and legible, and match the expected text for the run.

OCV: MATCHACTION: PASS
EXP DD MMM YYLOT ABCBROKEN CHARACTERS
FAINT
Example // Inkjet on film

Characters broken

Some characters are faint or missing dots, below the agreed print limit.

PRINT: ✗ BELOW LIMITACTION: REJECT
EXP DD MMM YYLOT ABDEXPECTED: ABCCODE AREA
MISMATCH
Example // Bottle label

Wrong lot code

The lot code does not match the run: the typical fault when the coder was not updated at changeover.

OCV: ✗ WRONG CODEACTION: REJECT / ALARM
// Line interface

What we need to know about your line

These conditions decide the station design. None of them has a fixed answer; each is confirmed on site or during the sample test.

Line conditions for a code inspection station
ConditionWhat we need to knowWhy it mattersConfirmed during
Coder and modelCoder type and model, and whether it can send out the printed string.Decides lighting and whether the expected string can come from the coder.Site survey
Expected data sourceWhere the correct date and batch code are held: recipe, coder, PLC or a production system.OCV needs to know what should be printed for every run.Design review
Code position and materialWhere the code sits, and the material and colour underneath.Sets camera angle, lighting and the number of views.Sample test
Line speed and spacingPacks per minute and the gap between them.Sets exposure and trigger method.Site survey
PLC and rejectPLC make and model, spare I/O or network ports, existing reject.Decides how results and the expected string are exchanged, and whether read results are logged.Design review
// Acceptance

How the station is accepted

False rejects and missed defects pull against each other. We define both, and how they are measured, before FAT and SAT.

01

False reject rate

The share of correctly coded packs rejected, measured on agreed good samples at line speed. The acceptable level is agreed per project.

02

Missed defect rate

The share of wrong, missing or illegible codes that pass, measured with seeded faulty codes. The target is set with you.

03

Changeover handling

A test that the expected string updates at every product or date change.

// Before we start

What to prepare for the sample test

We check codes from your own coder before proposing a station. We confirm quantities and shipping with you first.

Sample preparation guide

Good samples

Packs coded on the production coder, covering each material and code position.

Defective samples

Faint, smeared, incomplete and wrong codes, clearly marked.

Code specification

Date and batch code format, example strings, and the barcode types used.

Line information

Coder and PLC models, line speed, and where the expected data is held.

// FAQ

Code inspection questions

What is the difference between OCR and OCV?
OCR reads the characters and reports what is printed. OCV starts from the text that should be printed and checks that it is there, complete and legible. For date and batch codes, OCV is usually the right check, because the line already knows what the code should say.
How can expiry dates and batch codes be verified on a bottling line?
A camera after the coder images each code. The station receives the expected date and batch code from the recipe, coder or PLC, compares it with the print, and has the PLC reject any bottle whose code is wrong, missing or illegible.
What is date code inspection?
A camera check straight after the coder that confirms every pack carries a complete, legible and correct date and batch code. OCR inspection reads the printed text; OCV inspection compares it with the text expected for the run; batch code verification is the same comparison for the batch or lot number.
What does a barcode inspection system check?
On a packing line, barcode inspection means reading every code and checking its content: the code decodes, it carries the right GTIN, batch or expiry data for the run, and a no-read counts as a fail. A barcode inspection system does not grade print quality; that needs a verifier.
Is barcode reading the same as barcode quality verification?
No. Reading confirms that a code decodes and its content is right. Verification, or grading, measures print quality against a formal standard with a dedicated verifier. We offer reading, not formal grading.
What is a DataMatrix code?
A DataMatrix is a square 2D code made of dark and light cells. It holds far more data than a linear barcode in a small area, so it is used for serial numbers, batch and expiry data, and direct part marks. GS1 DataMatrix is the version that carries GS1 data such as the GTIN, batch and expiry date.
What are the barcode grading standards?
Print quality of linear barcodes is graded to ISO/IEC 15416 and of 2D codes such as DataMatrix and QR to ISO/IEC 15415; direct part marks use ISO/IEC 29158. GS1 sets the minimum grade each application needs. Grading needs a dedicated, calibrated verifier; an in-line reader confirms the code decodes with the right content.
How often should date codes be checked on the line?
Manual checks are usually done at set intervals, at start-up and at every changeover. A camera checks every pack in between, so a code that goes wrong between two manual checks is caught on the first bad pack instead of at the next check.
Which software runs the inspection?
We build stations on HIKROBOT VisionMaster, whose OCR HIKROBOT describes as deep-learning based, with code reading covering 1D and 2D codes (vendor-stated). We build on it as an independent integrator; this website does not claim any official HIKROBOT partnership or distributor status.

Sources

  1. HIKROBOT VisionMaster product page (OCR and code reading) (vendor page, checked 2026-09-24)
// Code inspection

Request an assessment for this application

Tell us which codes you print and where the correct values are held, and send good and bad samples. We will tell you what a station can check.

Use the country guidance to prepare the line data, interfaces and delivery scope for a project assessed from Johannesburg.

FDA Ghana-related label and date-code checks on the line

Separate approved label content from evidence on each pack. Project scope, references and Johannesburg delivery for Ghana.

Egypt Pharma Codes: DataMatrix and Printed-Text Checks

A successful DataMatrix read can still contain the wrong data. Project scope, references and Johannesburg delivery for Egypt.

Étiquetage en arabe en Algérie : contrôle sur la ligne

Read the country-specific inspection guidance and the limits of optical verification.

Excise Stamp Inspection for Kenya and Ghana

For a line in Kenya or Ghana, define visible stamp checks and separate them from activation, authenticity and tax-system reporting.

NAFDAC label, date and batch checks

For Nigeria: date of manufacture, best before, batch and NAFDAC number checked against the registered artwork.