Book a consultation

Cognex Machine Vision Applications: What Vision Does on a Plant Line

Cognex Packaging Inspection: Cartons, Case Codes, Labels and Seals

Cognex packaging inspection: cartons, case coding, label placement, seal integrity, the GS1 2D transition (Sunrise 2027) and line-speed limits.

Vladimir Romanov


Cognex packaging inspection covers the checks that happen between a filled product and a shipped pallet: is the carton formed and closed, is the seal intact, is the label on straight and correct, is the case code printed and readable, and is the right thing inside. This page goes through each, covers the move to 2D barcodes known as GS1 Sunrise 2027, and does the line-speed arithmetic that decides whether a check is possible at all. It belongs to Cognex machine vision applications in the Cognex hub.

The application list comes from Cognex’s packaging guide, which is marketing material, so it is attributed as Cognex’s. Facts are as of November 2026.

Where the checks sit on a line

Vision checks along a packaging line Six stages from left to right: fill and close, seal check, code print, code read and grade, label apply and label check, then palletize with a scan. Each stage lists the typical vision check: presence and cap or seal height, seal integrity, printed text, code read or grade, label position and content, and the code scan at the pallet. Fill, close cap, presence Seal voids, wrinkles Code print date, lot text Read, grade OCR, barcode Label position, content Palletize scan, route Every check ends the same way: a result to the PLC, a reject, a confirmed reject The order matters: check the print before the label is applied, and the code before the case is closed. Illustrative sequence. Real lines vary in the order and number of stations.
Put each check where a failure can still be fixed cheaply, which is usually before the next value-adding step.

Cartons, seals and closures

Cognex’s packaging guide describes several checks here:

  • Seals. It states that seal inspection is hard for conventional vision because defects vary in appearance and failure modes are many, and that AI-based tools can identify foreign matter and void seals.
  • Tamper seals. 3D laser displacement checks that the seal covers the whole opening, with no bubbles, wrinkles or holes, and edge tools measure height, width, position and gap against limits.
  • Caps. Measuring cap height above the neck and horizontal position, and, with a laser sensor over open boxes, checking every cap before the box is closed.
  • Missing or wrong items. In-Sight vision sensors count objects and pass or fail against a programmed value, and AI tools locate and classify items for kitting.

(Cognex Packaging Guide). In our view, a 3D check earns its cost only where the defect is a height or a gap, which a 2D image cannot see reliably.

Case coding and label placement

Case codes. Cases carry a printed date and lot code and often a barcode. Cognex lists OCRMax for date and lot reading, DataMan readers for multi-code and high-speed reading, and verifiers for GS1 quality. Reading is not grading, as the pharmaceutical serialization page explains.

Label placement. Cognex describes In-Sight systems checking label alignment and skew, wrinkles and bubbles on curved surfaces, and colour consistency. Print and apply labels drift at speed, so a placement tolerance should be set from what the downstream scanner or retailer accepts, not from appearance.

Hand feeding a roll of labels into a packaging machine
The label roll loaded at changeover is where the wrong label usually enters the line, so the check should compare content with the recipe.

Deciding which checks to automate

Not every check earns a camera. Rank candidates by three questions.

  1. What does a miss cost? A wrong allergen carton or an unsealed pack can mean a recall. A cosmetic scuff on a shipping case may mean nothing. Cognex’s guide ties its examples to recalls, returns and chargebacks, and those are the costs to put numbers on at your site.
  2. How stable is the pack? A pack that looks the same every time suits rule-based tools. A pack with variable film, natural product or recycled board pushes toward trained models, which need representative images including bad ones.
  3. Can the reject be executed and confirmed? An inspection with no reliable way to remove the failure is a counter, not a control. Check the physical space for a gate and a confirm sensor before the camera is chosen.

Anti-counterfeiting and special codes. Cognex’s guide also describes item-level serialization with Data Matrix and invisible UV codes, read by readers with a UV lighting module and a lens filter, and capturing images of no-reads and string validation failures. These are for goods where authenticity matters, such as pharmaceuticals, cosmetics and tobacco, per the guide. For most food and consumer lines the case code and a GS1 barcode are the job.

Changeover discipline. On mixed-SKU lines the most common packaging failure is procedural. The roll of labels, the printer message and the camera job must all change together. A good design reads the printed result and compares it with the recipe the PLC holds, so one wrong step shows up as a reject at the first pack.

Data from the checks. Cognex states its vision systems connect to industrial networks over protocols such as EtherNet/IP, PROFINET, SLMP, OPC UA and FTP, with the supported set depending on the model. In a packaging plant the useful outputs are the reject count by cause, the no-read rate by line and shift, and stored images of failures. Those turn a station into a source of process data, and they are also what shows lighting drift before it causes rejects. See PLC integration for how results reach the controller and image archiving and data for where images go.

The GS1 2D transition

Sunrise 2027 is a retailer-driven initiative, not a law. GS1 US describes it as a global transition from 1D UPC barcodes to 2D barcodes such as QR codes, with retailers installing scanners that can read 2D barcodes at the point of sale, and NACS (October 2026, sponsored by GS1 US) reports the aim of 2D scanning at point of sale by the end of 2027. GS1 US says it is not necessary to implement all 2D capabilities by that date, and recommends a phased approach (GS1 US). Keyence states that it is not a legal requirement but a retailer-driven initiative (Keyence). Sources disagree on whether linear codes will be phased out later, so do not tell a plant they are going away.

What it means on the line, in our view. A plant that prints and checks pack barcodes will want printers, readers and verifiers that handle GS1 DataMatrix or QR with Digital Link, plus line software that can build the new data. Which Cognex DataMan and In-Sight models read and parse these codes was not verified, so ask for it per model.

Line-speed realities

The interval between products is 60,000 divided by products per minute, in milliseconds. At a 300 mm pitch (illustrative):

Products per minuteIntervalBelt speedBlur at 100 µs exposure
601,000 ms0.3 m/s0.03 mm
120500 ms0.6 m/s0.06 mm
300200 ms1.5 m/s0.15 mm
600100 ms3.0 m/s0.30 mm

Blur is speed times exposure. A feature of 0.3 mm at three pixels is 0.1 mm per pixel, so at 600 per minute the same exposure smears three pixels, and a strobe or a shorter exposure is needed. The camera must also finish, answer the PLC and let the reject fire inside the interval. For a worked scoping example see the applications page (Edmund Optics for the optics arithmetic).

Where it gets hard

  • Mixed SKUs. Many CPG lines run several products, so job management and changeover time are the daily pain, and a wrong job selected is a common failure.
  • Print variation. Codes that pass at the printer degrade through ribbon, ink or laser wear.
  • Lighting on film and gloss. Reflections create false defects.
  • Speed. At high rates, inspection may need a faster camera, strobe, or a second station.
  • Reject at speed. The reject must be timed and confirmed, as the food and beverage page shows.
  • 2D transition unknowns. Per-model support for GS1 2D parsing is unverified.

Related: systems integration, DataMan.

Frequently asked questions

What is GS1 Sunrise 2027?

Sunrise 2027 is the GS1 name for the move of retail point-of-sale scanners to reading 2D barcodes alongside the familiar linear ones by the end of 2027. It is a retailer-driven initiative, not a law. GS1 US says it is not necessary to implement every 2D capability by that date and suggests a phased approach.

Do I have to replace my 1D barcodes by 2027?

No source we read says linear barcodes must be removed by 2027, and sources disagree on whether they will be phased out later. Brands are encouraged to add a 2D code alongside the existing one. Plan for readers and verifiers that handle 2D, and confirm model support with the vendor.

What can vision check on a case-packing line?

Cognex's packaging guide lists seal and tamper-seal checks, cap height, missing or wrong items in a pack, label quality, label skew, allergen label presence, date and lot code reading, multi-code reading and barcode verification. Which of these is worth automating depends on what a failure costs and how stable the pack is.

How fast can a vision system inspect packs?

It depends on the camera, the job and the lighting, so we do not quote a figure. Work it out: divide 60,000 by products per minute to get the interval in milliseconds, then check that exposure, processing, the PLC handshake and the reject all fit inside it with margin.

References and further reading

  1. Cognex Packaging Inspection Applications Guide · Cognex (copy hosted by an exhibition organiser)Cognex's list of packaging applications and the tools it names for each.
  2. Sunrise 2027 · GS1 USThe retail 2D transition, with its phased approach.
  3. GS1 Sunrise 2027 explained: requirements, timeline and preparation · KeyenceStates that Sunrise 2027 is not a legal requirement but a retailer-driven initiative.
  4. Setting up for Sunrise 2027 · NACSThe retailer view, October 2026.
  5. Machine Vision on Packaging Lines · Association for Advancing Automation (A3)
  6. Resolution (application note) · Edmund Optics

← Applications

Have a project that needs technical ownership?

Send us the situation. If it is not something we should take on, we will say so.

The Plant-Side Brief

The weekly brief for the people who own a plant’s control systems.

One email every Wednesday for engineering and operations leaders responsible for controls, SCADA, MES and OT networks. Skim the top in two minutes; read the Deep Dive when you have fifteen.

  • One modernization problem, worked through to cost, risk and a schedule you can defend. The Deep Dive.
  • End-of-support dates before they reach your plant Windows, servers, controllers and HMI software. Lifecycle Watch.
  • A checklist your engineers can run that week not a framework to admire. Field Kit.
  • Every number sourced, no vendor agenda we are paid by plants, never by vendors.