Code readingApplication note

Barcode verification for pallet to trailer confirmation on vehicles

Barcode verification for pallet to trailer moves: scan at pick and at the door, match in the PLC, and stop wrong-trailer loads before they roll.

LumaSpec Vision11 min read Share on LinkedIn

On this page 10 sections
  1. 01How the two-scan match gates a move
  2. 02Take the scans into the PLC, not the HMI
  3. 03Where the two read points go
  4. 04Worked example: a 0.495 mm pallet label at 600 mm with an 8 mm, 5 MP reader
  5. 05The match logic and the commit interlock
  6. 06Which reader goes at which point
  7. 07Checks before you order
  8. 08When two scans per move is the wrong shape
  9. 09Spec it from your dock layout
  10. 10Questions

A pallet loaded into the wrong trailer is discovered at the receiving dock, hours later and hundreds of kilometers away. The fix is procedural, not exotic: one scan at the pick, one scan at the trailer door, and a controller that confirms the two IDs match before the forks lift or the load rolls. What follows is that workflow for an electric forklift with a PLC and a wireless link: where each read point goes, how to size the optics from the label you actually print, which data path avoids the HMI focus trap, and the interlock logic that turns a mismatch into a stopped load. The worked example uses a 0.495 mm GS1-128 pallet label and a 5 MP Ethernet reader, so you can substitute your own numbers and re-run the same three lines of arithmetic.

How the two-scan match gates a move

The controller runs the move; the driver executes it. The warehouse system hands the PLC a move list: door D-12 takes the pallets whose SSCC labels end 4319 and 4320, door D-14 takes 4402. The SSCC is the 18-digit serial shipping code on the pallet label, so each pallet and each door carries a unique, machine-readable identity. Two reads then gate every move, one at the pick and one at the door, and each read is a single event: decode, compare, accept or reject. The physical commit only follows a pass.

This is the same discipline as barcode verification before picking with multiple robots, moved from the robot cell to the dock: check the ID before the actuator moves. Ethernet code readers decode in tens of milliseconds, so the checks add no waiting of their own.

Take the scans into the PLC, not the HMI

Where the decode lands decides whether the workflow survives its first shift. The common trap is a panel that ingests barcodes through a text-entry object: that object must hold focus, so a scan fired while any other screen element is active is dropped without a trace. A driver should not touch the screen between two scans, which makes focus management a design flaw here rather than an operator habit. That is why the barcode scanner input methods to a PLC: serial, USB and Ethernet question comes before any hardware choice.

Three paths put the decode straight into the controller:

USB into a panel as an HID keyboard is the wedge path, and the focus catch returns with it. If a legacy panel forces that route, barcode scanner to a PLC tag: keyboard wedge scripting shows how to drive focus programmatically, and barcode scanner to an HMI serial port: framing data without headers shows the serial alternative that sidesteps focus entirely. Take TCP or EtherNet/IP on the truck, serial where the network is unreliable, and treat the HMI as a display only.

Where the two read points go

The door read is a fixed geometry, so build it as one. Print one label per door, SSCC-style code plus door ID at roughly 150 x 100 mm, centered about 2 m above the floor where nothing stacks against it. Mount the reader on the cage front at eye height, aimed square at the label, and paint a stop mark on the dock so the truck halts with the label about 600 mm from the lens. Fixed industrial code readers carry their own LED illumination, so the read does not depend on dock lighting.

For that job a compact fixed reader with a 12 mm focal length, 1.3 MP resolution, Fast Ethernet and an M12 mount puts a narrow field over one label:

Fixed code readersHikrobot MV-ID3013PM-12M-WBN 12mm focal length 1.3 MP Compact Industrial Code ReaderMV-ID3013PM-12M-WBN
Interface
Fast Ethernet
Resolution
Up to 3 MP
Shutter
Global
Lens mount
M12
$1,979.00View part

The pick point has two workable shapes. A short-range reader bracketed to the carriage guard reads the pallet label as the forks slide in, with no operator action at all:

Fixed code readersCompact fixed industrial barcode reader, 1.2 MP, USB 2.0, 60-120 mm reading distance (LS-CRD-0047)LS-CRD-0047
Resolution
Up to 3 MP
Shutter
Global
Interface
USB
$559.00View part

Mount it so the label passes 80-100 mm from the window, mid-band of the range with margin on both sides, on a bracket that shrugs off fork-entry shock. If labels sit inconsistently or shrink wrap hides them, the fallback is a handheld scan at the pick face, spending 3-4 s of operator time only where the fixed geometry cannot reach.

Worked example: a 0.495 mm pallet label at 600 mm with an 8 mm, 5 MP reader

Three inputs set the whole calculation:

  • Label: GS1-128 SSCC at the 0.495 mm (19.5 mil) X-dimension GS1 recommends as the floor for general-distribution scanning. Pallet labels print at or above it, so this is the small end of the real range.
  • Reader: a 5 MP fixed code reader, 2560 pixels wide, 8 mm lens, 1/1.7-inch sensor.
  • Working distance: 600 mm from lens to label, the stop gap set by the cage mount above.

The reader carrying those numbers decodes at 60 codes/s over Fast Ethernet, with a 2560 x 2048 sensor and an 8 mm lens:

Fixed code readers2560 x 2048 fixed code reader, 30 fps, 60 codes/s, 8 mm lens (LS-CRD-0028)LS-CRD-0028
Interface
Fast Ethernet
Resolution
5 MP
Sensor format
1/1.7"
Shutter
Global
$920.00View part

Field of view at the label scales linearly with distance. A 1/1.7-inch format sensor has an active width of about 7.4 mm, the standard size for the format, which puts every number on the table:

FOV = WD x sensor width / focal length scale = FOV / pixels across the sensor pixels per module = module width / scale
How sensor width, working distance and field of view set the focal length Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.CameraField of view (FOV)Working distance (WD)≈ fsensor width slensm = s / FOVf = WD × m / (1 + m)
How sensor width, working distance and field of view set the focal length. Rays from the edges of the sensor pass through the lens and spread to the edges of the field of view. The ratio of sensor width to field of view is the magnification m.

At the 600 mm stop:

  • FOV = 600 mm x 7.4 mm / 8 mm = 555 mm
  • scale = 555 mm / 2560 px = 0.217 mm per pixel
  • pixels per module = 0.495 mm / 0.217 mm = 2.3 px per module

The rule the decision hangs on: a module needs at least 2 pixels for a reliable decode, and 3 or more before worn prints still read. At 600 mm this label sits at 2.3 px per module, above the decode floor but short of the comfort floor. The margin lives or dies with the stop, so move it. At a 400 mm stop the same reader delivers a 370 mm FOV, 0.145 mm per pixel and 3.4 px per module; at 300 mm it reaches 4.6. Fix the stop mark at 400 mm and the workflow keeps print-wear margin for the life of the label stock. Where the dock truly cannot give 400 mm, this same arithmetic tells you the pixel count to shop for instead of hoping.

Lens focal length, field of view and working distance
Units
Solve for
Focal length
– mm
Field of view
– mm
Working distance
– mm
Magnification
– x
Angle of view
– °
Pixel on the part
– mm

Thin-lens model: m = sensor width / field of view, f = WD × m / (1 + m). Accurate to a few percent above about 150 mm; check the lens's minimum object distance.

Find lenses with this focal length Open the full calculator

These reads happen with the truck stopped, which keeps exposure out of the problem. If you also want decodes while creeping toward the door, motion sets the exposure budget instead, and high speed barcode verification: size the strobe pulse works that arithmetic for moving targets.

The match logic and the commit interlock

The PLC needs six registers and one rule. It holds REQ_PALLET (the SSCC assigned to this move), REQ_DOOR (the door that pallet is assigned to), GOT_PALLET and GOT_DOOR from the two readers; comparisons set PICK_OK and DOOR_OK. The commit bit, the one that allows the lift at the pick and the put-down at the door, is PICK_OK AND DOOR_OK, with two more terms in the AND: comms healthy, and the match not expired. Expire a match after 60-90 s, so a scan at door D-12 cannot authorize a put-down at D-14 minutes later.

Gate every accepted decode on the reader's confidence score. Barcode read confidence: how to judge whether a decode is trustworthy explains what the score reflects. Set the floor in bench testing so a smudged label cannot inject a wrong SSCC into a comparison, and treat a below-floor read as a no-read rather than a mismatch, so the operator rescans instead of raising an exception.

If the PLC commands each capture, prove the handshake before go-live: a capture command that dies silently looks identical to a missing label, and barcode scanner serial trigger: fix silent host commands walks that diagnosis. The compare-and-commit pattern is the one used to check a scanned ID against an expected part in barcode to part verification for similar assemblies, scaled from a component to a pallet. When the pick runs on a lift table rather than the forks, the same interlock applies, and PLC pallet lift design: position sensing and barcode integration walks a barcode read into a lift's position logic.

Which reader goes at which point

Both read points are solved problems; the choice is interface and range. The fixed code readers and handheld code readers pages sort by exactly the filters that matter here, and the fit per point looks like this:

Read point Pick Why it fits
Door label, cage-mounted Compact fixed reader, 12 mm focal length, Fast Ethernet (MV-ID3013PM-12M-WBN) Narrow field over one label, hands on the wheel
Pick, label passes the carriage Short-range 1.2 MP reader, 60-120 mm reading distance (LS-CRD-0047) Fixed window, zero operator action
One reader for both points 5 MP Ethernet reader, 2560 x 2048 (LS-CRD-0028) Pixel density absorbs position scatter
Exceptions and yard trailers Wireless handheld, 1.0 MP, Ethernet (LS-HCR-0002) Rides the truck, no cable to the cage
Manual entry at a terminal Wired handheld, 1.0 MP, USB 2.0 (LS-HCR-0001) Simplest input at the dock office

Handhelds earn their slot on exception duty: the re-scan after a no-read, a pallet the wrap ate, a yard trailer without a door label. Two formats cover it, wireless over the site network and wired USB at a fixed terminal:

Handheld code readersHandheld industrial barcode reader, 1.0 MP (LS-HCR-0002)LS-HCR-0002
Resolution
Up to 3 MP
Shutter
Global
$539.00View part
Handheld code readersHandheld industrial barcode reader, 1.0 MP, USB 2.0 (LS-HCR-0001)LS-HCR-0001
Resolution
Up to 3 MP
Shutter
Global
$539.00View part

A two-reader truck, fixed at the door and short-range or fixed at the carriage, keeps every routine scan hands-free. The handheld is the third input, not a replacement for either.

Checks before you order

  1. Re-run the arithmetic with your own label. Read the X-dimension off a live pallet label, measure your real stop distance, and compute pixels per module. The 2 px floor and the 3 px comfort line settle the mount before anything is bought.
  2. Bench-read a worn label at the planned distance. Fresh print passes at 2.3 px per module; a scuffed one may not. One afternoon of bench testing settles it.
  3. Grade incoming labels. Supplier print quality varies more than reader sensitivity does; barcode reader verification for label inspection covers judging a label before blaming the reader.
  4. Fire 100 triggered scans and count decodes. A silent drop in the handshake shows up as missing decodes, not as error messages.
  5. Roam-test the wireless path. Drive a loaded truck past every dock door and watch the 2 s comms watchdog clear the commit bits; the match must fail safe, never go stale.
  6. Audit label placement across suppliers. The carriage window reads what passes it, so a supplier that labels the wrong face breaks the geometry, not the code.

When two scans per move is the wrong shape

Conveyor-fed docks do not need a forklift stop at all: a fixed reader at each door threshold scans every label that crosses it, and the same PLC logic matches without a driver in the loop. Sites where shrink wrap swallows labels or orientation is chaos sometimes pair RFID with the barcode reads, so the pallet announces itself hands-off and the barcode stays as confirmation. The two-scan workflow survives both; only the pick read changes how it arrives.

And if the operation is one door, one pallet type and a handful of moves a day, a prompted single scan is enough. Build the interlock when a misload costs more than the hardware, which at receiving-dock volumes it almost always does.

Spec it from your dock layout

Measure the stop distance, read the X-dimension off a live label, and re-run the three lines above; the mount decision falls out in a minute. Then send the dock layout, a sample label and the target scan points through the quote request and we will match a reader to each point and confirm the interface your PLC speaks. The camera finder filters fixed readers by interface, resolution and mount if you want to shortlist first.

Build the whole station

The configurator matches a camera, lens, light, light controller and cables to each other, step by step, and lists only parts that fit what you already picked.

Start with the camera

The code-reading topic page collects the rest of the integration guides, from serial framing to confidence scoring.

Questions

Do I need two readers on the forklift, or can one reader do both scans?

One cage-mounted reader can do both only if the operator can square it to the pallet label at the pick face, which costs a repositioning step on every move. Most installations fit two fixed readers, one per point, so routine scans stay hands-free. If the truck also works yard trailers without door labels, add a wireless handheld as the third input rather than re-aiming anything.

What happens on a mismatch or a failed scan?

The PLC holds the commit bit low, sounds the buzzer and the panel shows which side failed, pallet or door. The operator rescans; a second failure raises an exception that goes back to the office with the scan log. Overrides exist for genuinely damaged labels, but they must be logged and permission-gated in the PLC, never a free button on the screen.

Does the same set-up work for unloading trailers?

Yes, with the sequence reversed. The door scan comes first and tells the PLC which trailer is being claimed; each pallet scan is then checked against that trailer's expected manifest and the count decrements. A pallet that is not on the manifest raises the mismatch at the trailer mouth, which is exactly where you want to catch it, before it travels into the warehouse.

What data should each verification event send to the warehouse system?

Four fields cover the audit trail: the pallet SSCC, the door or trailer ID, a timestamp, and the match result with the reader's confidence value. Send one record per move, keyed so a rescan updates the record instead of duplicating it. With that trail, a misload shows up as a missing event minutes later instead of a customer complaint days later.

How much time does the verification add to each move?

Budget three to five seconds per scan point for aiming, the decode and the confirmation banner. The door stop replaces the pause a driver already takes before backing in, and a carriage-mounted pick reader rides the fork entry, so a routine move grows by seconds, not by a new stop. The cost only appears on exceptions, where a rescan or handheld read adds ten to twenty seconds.