Case Packer PLC Control: How Case Packers Work and Are Programmed
How a case packer works and how a PLC controls it — case packer types, the pack sequence, product collation, case erecting and sealing, and reject handling.
What Is a Case Packer?
A case packer is a secondary packaging machine that groups individual primary packages — bottles, cartons, pouches, trays, or cans — into a prescribed count and loads them into a corrugated shipping case. The packed case is then sealed and discharged to a downstream palletizer or conveyor. Case packers sit at the transition between the production line and the supply chain, and the PLC controlling them must bridge high-speed primary packaging rates with the slower, heavier mechanics of corrugated case handling.
From the PLC's perspective a case packer is a sequencer that repeatedly cycles through five phases: accumulate product, erect a case, load the product group, seal the case, and discharge. Every sensor interlock, servo axis, and pneumatic actuator in the machine exists to execute one of those five phases reliably at the rated throughput — typically 10 to 30 cases per minute for mid-range industrial machines.
Case packer programming draws on skills from across the packaging machine PLC programming discipline: high-speed counting, servo motion coordination, pneumatic sequence control, reject handling, and end-of-line integration. This guide walks through each element from the PLC's point of view so you can read, write, and troubleshoot case packer programs with confidence.
Types of Case Packers
Understanding the machine type is the prerequisite to understanding the program, because the loading mechanism determines nearly everything about the sequence logic and the I/O map.
Top-Load Case Packers
Products are lowered vertically into an open-top case. The case travels on a conveyor below a loading station where a servo-driven pusher, a pick-and-place gantry, or a delta robot deposits the product group from above. Top-load machines handle bottles, jars, stand-up pouches, and any product that is stable when placed upright.
PLC considerations: The loading axis requires position control rather than simple on/off output. A servo or stepper axis lowers the gripper, releases the product group, and returns to home before the next group arrives. Grip-confirm sensors (vacuum or force) must be checked before the load descent begins. The case must be confirmed present and fully erected before the load cycle triggers.
Side-Load (Wrap-Around) Case Packers
A flat corrugated blank is wrapped around the product group from the side and below, then glued and folded to form the finished case simultaneously. Side-load and wrap-around machines are common for beverage cans and bottles because the case itself provides structural support during formation.
PLC considerations: The blank magazine feed and blank pick cycle must keep pace with product collation. Glue gun output is activated at precise positions in the folding sequence — timing is usually done by a cam profile or encoder-gated output rather than a fixed timer, because glue placement must track machine position rather than elapsed time. A glue-present sensor confirms each gun fires before the fold closes.
Drop-Load Case Packers
A fully erected open-top case is held beneath a product accumulation lane. When the count is complete, a gate or trapdoor opens and the product group drops by gravity into the case. Drop-load machines are high-speed and mechanically simple but are limited to products that tolerate the drop impact — typically cans and bottles with adequate structural integrity.
PLC considerations: Drop timing is critical. The gate solenoid must open only after the case-present sensor and the case-open sensor both confirm the case is correctly positioned and unobstructed. A miss-drop sensor detects whether products landed correctly; a failed drop must stop the machine before the case sealer closes on misaligned product.
Robotic Case Packers
A robot — typically a delta, SCARA, or articulated arm — picks individual products or pre-formed groups and places them into cases in configurable orientations and layer patterns. Robotic packers offer the highest flexibility for mixed SKU, variable count, and complex layer patterns.
PLC considerations: The PLC acts as the sequence coordinator while the robot controller handles motion planning. Communication between PLC and robot is typically handled over EtherNet/IP or PROFINET using a handshake: the PLC sends a pick-ready signal and target position or recipe number; the robot executes the pick-and-place cycle and returns a cycle-complete signal. The PLC must not advance the case until the robot confirms clear.
The Packing Sequence
A case packer's PLC program is fundamentally a state machine. Each state corresponds to a phase of the pack cycle, with transition conditions guarded by sensor confirmations and interlock checks.
Phase 1 — Product Infeed
Products arrive from upstream — a labeling machine, a filler, or a primary wrapper — on an infeed conveyor. The PLC monitors infeed conveyor speed and product spacing to ensure the accumulation zone receives a continuous, evenly-spaced stream. A product-present sensor at the accumulation entry point starts the counting process.
The infeed speed is typically controlled by a variable-frequency drive (VFD) receiving a speed reference from the PLC. The PLC adjusts infeed speed to pace the product flow to the case packer's cycle rate, preventing both starvation and product back-pressure that can cause misfeeds.
Phase 2 — Product Collation and Grouping
Collation is the process of gathering individual products into the exact count and arrangement required for one case load. This is the most mechanically varied phase across machine types, and the counting logic here is where most case packer PLC programs spend their complexity budget.
See the Product Collation and Counting section below for the full PLC treatment.
Phase 3 — Case Erection
A flat corrugated blank is pulled from the magazine, opened into a box shape, and the bottom flaps are folded and sealed before loading begins. Case erection must complete before the product group is ready to load — the sequence must not advance to the load phase until the case-present-and-erected interlock is satisfied.
See Case Erecting and Sealing for details.
Phase 4 — Product Load
The collated product group is transferred into the erected case. The specific mechanism — servo gantry, pusher plate, drop gate, or robot arm — determines the load sequence, but all load sequences share the same interlock requirements:
- Case confirmed present and correctly positioned
- Case confirmed fully open (no collapsed flap in the load path)
- No product in the load zone from the previous cycle
- Robot or servo axis confirmed at home before cycle start
The load sequence executes, and a load-complete condition (encoder position, force threshold, or vision confirmation depending on machine type) must be satisfied before the case advances to sealing.
Phase 5 — Case Seal and Discharge
Top flaps are folded and sealed with hot melt glue or pressure-sensitive tape. The sealed case is then discharged to the downstream conveyor. A case-weight check scale or vision system may inspect the sealed case before discharge; a case that fails weight or vision inspection is diverted to a reject lane rather than continuing to the palletizer.
Product Collation and Counting
Count Logic
The core of collation is a PLC counter driven by a product-detect sensor. For standard applications, a simple CTU (Count Up) instruction increments on each product rising edge, and when the accumulated value reaches the preset (the pack count), the PLC triggers the load sequence and resets the counter.
// Pseudocode — adapt to your PLC's instruction set
IF ProductSensor.RE THEN // Rising edge on product-detect sensor
ProductCounter := ProductCounter + 1;
END_IF;
IF ProductCounter >= PackCount THEN
CollationComplete := TRUE;
ProductCounter := 0; // Reset after triggering load
END_IF;
This works reliably at low to moderate speeds. At higher speeds — more than 300 products per minute — debounce filtering and high-speed counter inputs become essential. Most PLCs provide dedicated high-speed counter (HSC) hardware that operates independently of the scan cycle, preventing missed counts when product pulses are shorter than the PLC scan time.
For a deep dive into counter instruction types and HSC configuration, see the PLC counter programming guide.
Collation Patterns
Many case packer applications require products to be arranged in a specific row-and-column pattern rather than just reaching a total count. A 4x3 arrangement (four rows, three columns) requires the PLC to track both a row counter and a column counter, and to coordinate a lane-select actuator or conveyor diverter that routes products into the correct lane position.
| Count structure | Typical products | Control approach |
|---|---|---|
| Single-lane count | Cans, bottles (single row) | One HSC, one gate output |
| Multi-lane row/column | Cartons, pouches | Lane-select solenoids + row and column counters |
| Layer pattern (robotic) | Mixed SKU, irregular shapes | Recipe-driven robot path, PLC tracks layer number |
Missing Product Detection
A gap in the infeed stream before the count is complete must be detected and handled. A product-gap timer starts when the first product in a group is detected. If the timer expires before the next product arrives, the PLC raises a "product starvation" alarm and stops the case erection cycle for that group — erecting an empty or underfull case is typically worse than pausing the line.
Product Reject Passthrough
Products rejected upstream (by a checkweigher, metal detector, or vision system) must be excluded from the pack count. The reject system sends a "bad product" signal to the case packer PLC that inhibits the counter for that specific product. The rejected product continues on the infeed conveyor but is deflected out of the collation zone by a diverter actuator before reaching the accumulation lane.
The diverter must actuate fast enough that the rejected product does not trigger the product-detect sensor. The delay between the upstream reject signal and the diverter actuating is calculated from the conveyor speed and the distance between the reject detector and the diverter, and is implemented in the PLC as a position-tracked delay using encoder counts rather than a fixed timer — allowing the reject tracking to remain accurate if conveyor speed changes.
Case Erecting and Sealing
Magazine and Blank Handling
Case blanks are stored in a gravity or servo-fed magazine. A vacuum pick head — driven by a servo or pneumatic actuator — extracts one blank per cycle, opens it into a rectangular tube using a folding plate or suction cups, and transfers it to the erection station. The PLC must:
- Confirm blank-present in the magazine before commanding a pick (a magazine-low sensor warns the operator before the magazine empties)
- Detect a double-pick (two blanks extracted together) using a blank-thickness sensor or gap sensor before the blank reaches the erection station
- Confirm the blank has opened fully before bottom-flap folding begins — a partially opened blank that enters the gluing station will cause a jam
Bottom Flap Folding and Gluing
At the erection station, minor flaps are folded first, then major flaps are folded over them and glued. Glue guns are solenoid-controlled and heated to a setpoint managed by a PLC PID loop (or by the glue unit's own controller, with a ready-status signal returned to the PLC).
The glue output activation is typically gated on machine position rather than time. The PLC reads an encoder or resolver on the main machine shaft and activates the glue gun output between two position setpoints — this ensures glue is applied at the same physical location on the flap regardless of machine speed variations.
A glue-applied confirmation check (either a photosensor detecting glue presence or a flow sensor on the glue gun) should be included in the sequence. A missed glue bead means a case with no bottom seal — a serious quality escape that allows product to fall through during handling.
Case Present and Position Interlocks
Before the load cycle can execute, the PLC must confirm:
- Case present — a photoelectric or inductive sensor confirms a case is at the load station
- Case correctly positioned — a mechanical stop or servo-positioned stop is in the correct location; an encoder position check confirms the case conveyor has indexed the correct amount
- Case fully open — top flaps are confirmed clear of the load path, typically with photoelectric sensors at the case opening
- Previous load cleared — a sensor inside the case (or at the case exit) confirms no residual product from a previous cycle
Any of these interlocks failing causes the PLC to hold the load sequence and raise a specific fault. Generic "case packer fault" alarms that do not identify which interlock failed are the leading cause of extended downtime on case packer lines — each interlock should have its own fault message in the HMI alarm list.
Top Seal
After loading, the case is conveyed to the top-seal station. Top minor flaps are folded in, then top major flaps are folded down and either glued (hot melt) or taped (pressure-sensitive). Tape machines use a tape head that is servo-positioned against the case top and uses a pressure roller to apply tape as the case passes beneath. Glue machines use the same encoder-gated glue activation pattern as the bottom seal.
A case height sensor before the top seal station detects under-filled or over-filled cases. An under-filled case (missing product) has a lower height and triggers a case reject divert before sealing — sealing an empty case wastes tape or glue and sends a defective unit downstream.
Sensors and Interlocks
The following table summarizes the key sensors in a typical top-load case packer and their PLC function.
| Sensor | Location | PLC function |
|---|---|---|
| Product-detect photoelectric | Infeed accumulation entry | Increment product counter |
| Product-gap timer | PLC — timer on counter input | Starvation alarm if gap exceeds setpoint |
| Blank-present sensor | Magazine | Magazine-empty warning; inhibit pick |
| Blank-open confirmation | Erection station | Gate bottom-flap fold sequence |
| Glue-flow sensor | Bottom glue gun | Confirm glue applied; case reject if miss |
| Case-present sensor | Load station | Enable load sequence |
| Case-open sensor | Load station top | Confirm flaps clear of load path |
| Load-complete sensor | Inside case or at gantry | Confirm product seated before case advance |
| Case-height sensor | Before top seal | Reject under-filled cases |
| Sealed-case weight check | After seal station | Final quality gate before discharge |
| Case discharge sensor | Exit conveyor | Confirm case cleared before next cycle |
Safety interlocks — guarding, E-stop, and light curtains — should be wired into the machine's safety relay or safety PLC circuit and are separate from the process interlocks listed above. Process interlocks cause controlled stops with fault messages; safety interlocks cause immediate power removal from all moving axes.
Reject Handling
A complete case packer reject strategy handles three distinct reject conditions.
Individual product rejects: Handled upstream of collation as described in the counting section. The PLC excludes the product from the count and diverts it out of the accumulation lane.
Underfill (short count): If the accumulation lane releases a group before the preset count is reached — which can happen after a jam clear — the PLC must track that the group is short. When the short group reaches the load station, the PLC loads it into a designated reject case or diverts the group out before the case is erected, depending on machine configuration. The case packer must not load a short count into a good case that will pass downstream undetected.
Sealed case rejects: Cases that fail the post-seal weight check or vision inspection are diverted by a powered divert arm or pusher on the discharge conveyor before they reach the palletizer. The PLC uses the same encoder-based tracking delay used for individual product rejects to accurately divert the specific case that failed — first-in-first-out tracking through the seal station ensures the divert fires on the correct case even when multiple cases are in the seal station simultaneously.
All reject events should be counted and logged on the HMI with a timestamp. A reject-rate trend that increases over a shift is a leading indicator of a sensor drift, product dimension change, or mechanical wear condition that should be investigated before it becomes a line stop.
Changeover
Recipe-driven changeover is a standard expectation on modern case packers serving multiple SKUs. A recipe record typically contains:
- Pack count (products per case)
- Collation pattern (rows × columns)
- Case blank size code (selects magazine position on multi-magazine machines)
- Servo axis positions (gantry height, case stop position, flap fold positions)
- Glue gun timing windows (encoder start and end positions for each gun)
- Case height reject threshold
- Infeed speed setpoint
The operator selects the recipe from the HMI, and the PLC downloads all parameters simultaneously. Servo axes move to their new positions under controlled motion rather than manual jog; the PLC confirms each axis reaches its target position within a tolerance window before declaring changeover complete.
Changeover validation — a short trial run followed by a manual case inspection before releasing to full production — should be proceduralized and the "changeover validated" step recorded in the HMI batch log. Skipping validation after a recipe change is one of the most common root causes of short-count cases reaching the palletizer undetected.
The PLC View: Coordination with End-of-Line Equipment
The case packer does not operate in isolation. Its PLC must coordinate with adjacent equipment on both sides.
Upstream: Primary Packaging Rate Management
The case packer signals its own run/starve state to upstream equipment via a conveyor interlock or a PLC-to-PLC communication message. When the case packer is in a case-erection fault and the infeed accumulation lane is full, the case packer must signal the upstream primary packager to pause or reduce rate — otherwise product jams the infeed and compounds the original fault.
This upstream coordination is typically implemented as a discrete run-permit output from the case packer PLC to the upstream conveyor drive enable. For lines using material handling PLC programming architectures, this signal may be part of a broader zone-control framework that manages flow across the entire line.
Downstream: Palletizer Handshake
The case packer's discharge conveyor feeds directly into a palletizer infeed. The palletizer has its own accumulation capacity, and when that buffer fills, it sends a back-pressure signal to the case packer requesting a rate reduction or hold. The case packer PLC responds by holding case erection at the end of the current cycle rather than mid-cycle — interrupting a cycle mid-way is more difficult to recover cleanly than completing the current pack and then pausing.
The handshake between case packer and palletizer typically includes:
| Signal direction | Signal | Meaning |
|---|---|---|
| Case packer → Palletizer | Case discharge ready | A case is about to enter the palletizer infeed |
| Palletizer → Case packer | Infeed accept | Palletizer buffer has space; discharge is permitted |
| Palletizer → Case packer | Infeed hold | Palletizer buffer full; hold discharge |
| Palletizer → Case packer | Palletizer fault | Major fault; case packer should stop and alarm |
These signals are commonly implemented as discrete I/O on shorter conveyor runs or as producer/consumer tags over EtherNet/IP on longer or more complex lines.
Frequently Asked Questions
How does a case packer work?
A case packer groups a preset count of primary packages into a collation, erects a corrugated case, loads the collation into the case, seals the case, and discharges it to a downstream conveyor or palletizer. The PLC sequences these five phases continuously, using sensors to confirm each phase completes before advancing to the next.
What is the difference between a top-load and a wrap-around case packer?
A top-load case packer erects a pre-formed case and loads products vertically from above. A wrap-around (side-load) case packer wraps a flat corrugated blank around the product group from the side and bottom, forming the case as part of the packing cycle. Wrap-around machines are compact and handle bottles and cans efficiently; top-load machines are more flexible for products that must remain upright during loading.
How does a PLC count products into a case?
The PLC uses a high-speed counter input connected to a product-detect sensor at the accumulation lane entry. Each product triggers a rising edge on the sensor; the counter increments. When the count reaches the recipe preset, the PLC triggers the load sequence and resets the counter. For patterns (rows and columns), nested counters track both the row position and the overall group count simultaneously.
Case packer programming combines the counting and tracking fundamentals from PLC counter programming, the end-of-line coordination skills from palletizer programming, and the broader packaging context covered in the packaging machine PLC programming guide. Mastering the collation logic, case-present interlocks, and upstream/downstream handshakes gives you a complete picture of how a case packer PLC program is structured — and the diagnostic framework to resolve the faults that matter most to production.


