Labeling Machine PLC Control: How Labelers Work and Are Programmed
How a labeling machine works and how a PLC controls it — labeler types, the label-apply sequence, registration sensors, encoder tracking, and reject handling.
A labeling machine places a pre-printed or on-demand-printed label on a product at high speed and with repeatable accuracy. From a control standpoint that sounds simple — but the PLC managing a labeler must solve a real-time synchronization problem: it has to know exactly where a product is on a moving conveyor, predict when it will reach the apply station, command the label dispenser to start feeding at precisely the right moment, confirm the label was applied, and divert the product if anything went wrong — all within fractions of a second and without stopping the line.
This guide covers how a labeling machine works mechanically, the PLC logic that drives it, and the key programming patterns — product-detect timing, encoder-based speed following, label-gap registration, and reject handling — that separate a robust labeling installation from one that jams or mislabels at speed.
What a Labeling Machine Is
A labeling machine is a packaging line machine that applies one or more labels to a product container or package. It sits inline on a conveyor, accepts products at the infeed, applies a label at a fixed station, and discharges labeled products to the next process.
From a PLC programming perspective, a labeling machine has four logical subsystems:
| Subsystem | What the PLC controls |
|---|---|
| Product transport | Infeed conveyor, timing screw or belt, outfeed conveyor |
| Label dispensing | Dispense motor/servo, rewind motor, peel plate |
| Application mechanism | Tamp pad, blow-on air, wipe-on roller, or applicator arm |
| Verification and reject | Camera or barcode reader, reject pusher, diverter gate |
Everything hangs on product tracking — the PLC must know the product position at all times from the moment the product-detect sensor fires to the moment the labeled container exits the verification zone.
Types of Labeling Machines
Pressure-Sensitive (Self-Adhesive) Labelers
The most common type on general packaging lines. Labels are supplied on a continuous liner roll. A stepper motor or servo-driven dispense shaft peels the label off the liner at a peel plate and presents it to a tamp pad, blow-on nozzle, or wipe-on roller that transfers it to the product.
PLC tasks: Drive the dispense shaft at a speed proportional to the line speed signal from the encoder; detect the label gap with the label-gap sensor to establish individual label boundaries; trigger the application mechanism at the calculated apply moment.
Print-and-Apply Labelers
A thermal transfer or direct-thermal print engine sits upstream of the apply station. The PLC (or a dedicated print-apply controller coordinated by the PLC) prints variable data — batch code, best-before date, serialized barcode — on each label on demand before it is applied.
PLC tasks: Signal the print engine with product data before the label is needed; synchronize print completion with the dispensing cycle so there is always a ready label at the peel plate; handle print-error faults without stopping the line unnecessarily.
Wrap-Around Labelers
A front-back or full-wrap label is dispensed and the product is rolled or spun across it so the label adheres around the circumference. Common on round containers (bottles, cans, jars).
PLC tasks: Control a separate product-rotation drive (star wheel or belt) synchronized with label feed so the wrap rate matches the product diameter; monitor label tension to prevent tearing.
Sleeve Labelers
Heat-shrink or roll-fed sleeves are cut to length and placed over the product, then shrunk in a steam or hot-air tunnel. Often a separate machine from the main labeler.
PLC tasks: Control sleeve cut length via encoder, synchronize cut knife with product pitch, control tunnel temperature profile via PID loops.
The Label-Application Sequence
Understanding the exact sequence is essential before writing a single rung of ladder logic. The steps below describe a pressure-sensitive blow-on labeler — the most common type — but the pattern applies broadly.
Step 1 — Product Detect
A photoelectric or inductive sensor at the infeed detects the leading edge of the product. The PLC latches the detect event and starts an internal product tracking register, often called a "product pipeline" or "position FIFO."
The tracking register holds the product's position in line-encoder counts from the detect point to the apply station. It is incremented by the line encoder on every scan.
Step 2 — Calculate Apply Trigger Point
The PLC knows two fixed distances:
- Detect-to-apply distance — the physical distance from the product-detect sensor to the center of the apply station, expressed in encoder counts.
- Label pre-feed distance — how many counts early the dispense must start so the label arrives at the peel plate exactly as the product arrives at the apply station (accounts for mechanical lag).
ApplyTriggerCounts = DetectToApplyDistance - LabelPreFeedDistance
When the product tracking register reaches ApplyTriggerCounts, the PLC triggers label dispensing.
Step 3 — Dispense and Apply
The dispense shaft motor accelerates to a speed proportional to line speed (read from the encoder). The label-gap sensor watches the liner and signals when the label gap has passed — meaning one complete label has been fed.
At the apply moment the tamp pad fires (pneumatic cylinder) or the blow-on solenoid opens. The label transfers to the product surface.
Step 4 — Dispense Inhibit
After one label has dispensed, the PLC holds the dispense motor until the next product arrives at the pre-feed trigger point. This prevents feeding a second label into mid-air.
Step 5 — Verification
A fixed-mount barcode reader or vision camera, located downstream of the apply station, scans the label. The PLC matches the read result against:
- Expected barcode value (for serialized labels), or
- A "label present" pass/fail signal (for non-variable labels)
The product tracking register carries a quality flag for each product position. If verification fails, the flag is set.
Step 6 — Reject
When a flagged product reaches the reject station (another fixed, encoder-tracked distance downstream), the PLC fires a pusher, diverter gate, or air blast to remove it from the line.
Registration and Product-Detect Sensors
Product-Detect Sensor
Typically a through-beam or retroreflective photoelectric sensor with a fast response time. For irregular products (bottles, pouches) an adjustable background-suppression sensor avoids false triggers from the container base or cap.
Key configuration for the PLC program:
- Use the leading-edge interrupt (rising edge of sensor output) as the detect event — trailing-edge detects are less consistent across container sizes.
- Filter mechanical bounce with a short ON-delay (typically 1–5 ms) to reject vibration spikes without masking real product edges.
- On high-speed lines (>120 products/min), use a high-speed input card or dedicated interrupt input so the detect event is not delayed by PLC scan time.
Label-Gap Sensor
A fiber-optic sensor aimed at the label liner detects the change in reflectivity between the label stock and the transparent liner gap. Its signal marks individual label boundaries.
The PLC uses the label-gap rising edge to:
- Reset the label-feed counter (confirms one label dispensed)
- Measure actual label pitch (for tension control)
- Halt the dispense motor after one label cycle
Registration error detection: If the measured label pitch deviates from the nominal pitch by more than a programmable tolerance, the PLC raises a LABEL_REGISTRATION_FAULT alarm and halts dispensing before a crooked or partial label is applied.
Encoder and Line-Speed Tracking
Why Encoder Tracking Matters
If the labeler dispenses at a fixed speed and the line speed varies, the label will be stretched (if the line is faster than dispense) or bunched (if the line is slower). Both result in misapplication.
The correct approach is to drive the dispense shaft at a speed slaved to the conveyor encoder — a technique called electronic gearing or cam following.
Encoder Wiring and Scaling
A quadrature incremental encoder is mounted on the main line conveyor drive shaft or on a dedicated measuring wheel in contact with the product path. The PLC's high-speed counter input captures encoder pulses.
Scaling:
LineSpeedMPM = (EncoderPulsesPerScan × ScanTimeSeconds × 60) / PulsesPerMeter
The dispense servo reference speed is derived directly from this scaled value:
DispenseSpeedSetpoint = LineSpeedMPM × (LabelPitch / ProductPitch)
Where LabelPitch is the center-to-center label length on the liner and ProductPitch is the center-to-center product spacing on the conveyor.
Product FIFO Tracking
Each time a product is detected, the PLC pushes an entry into a FIFO array. Each entry holds:
- The encoder count at the moment of detection
- The quality flag (PASS / FAIL / PENDING)
- Any variable data for the print engine
On each PLC scan, the tracking position of every entry is updated:
Entry[n].CurrentPosition = Entry[n].DetectCount + (CurrentEncoderCount - Entry[n].DetectCount)
(Simplified — in practice the current encoder count minus the detect count gives the distance traveled since detection.)
When an entry's CurrentPosition reaches the apply trigger distance, the PLC dispatches the dispense command for that specific product. This architecture handles gap variations between products naturally — each product carries its own position state.
For a broader look at how this type of position-tracking logic applies to conveyors and sorting systems, see the guide on conveyor belt PLC programming and the companion article on material handling PLC programming.
Reject and Verification Handling
Verification Station
The verification sensor (barcode reader or vision camera) sits at a fixed, known encoder-count distance downstream of the apply station. When the sensor fires, the PLC looks up which product FIFO entry corresponds to the current tracking position and updates its quality flag.
For a barcode reader, the PLC compares the decoded string to the expected value. A no-read or mismatch sets FAIL.
For a vision system, a digital pass/fail output from the camera controller is wired to the PLC. The PLC latches this signal synchronized to the product tracking position.
Reject Pusher Logic
The reject pusher (pneumatic cylinder or servo-driven diverter) sits at another fixed encoder-count distance downstream. The PLC monitors FIFO entries:
IF Entry[n].QualityFlag = FAIL
AND Entry[n].CurrentPosition >= RejectStationDistance
AND Entry[n].CurrentPosition < (RejectStationDistance + RejectWindowCounts)
THEN
RejectPusher.Output = TRUE
The reject window — the span of encoder counts during which the pusher must be active — is calculated from the product length plus mechanical response time of the pusher cylinder.
After the window closes, RejectPusher.Output = FALSE and the entry is removed from the FIFO.
No-Read Handling
A no-read occurs when the barcode reader cannot decode the label. Possible causes:
- Label applied crooked (leading to label registration fault upstream)
- Print engine fault (on print-and-apply machines)
- Label wrinkled or partial
Best practice: treat all no-reads as FAIL and reject the product. Accumulate a no-read counter separately from a mismatch counter so the operator can distinguish print quality problems from application problems.
For a broader treatment of reject logic and how it integrates into complete packaging line control, the packaging machine PLC programming guide covers filling, labeling, and downstream machines together.
Safety Considerations
E-Stop and Safe Torque Off
A labeling machine has nip points at the label roll drive and rewind, pinch points at the tamp pad, and fast-moving pneumatic actuators. The safety design must address:
- Emergency stop category: Typically Category 1 (controlled stop, then power removal) for servo-driven dispense axes; Category 0 for pneumatics.
- Safe Torque Off (STO): Servo drives used for dispense and rewind must support STO, wired through the safety relay or safety PLC. STO prevents the drive from generating torque without mechanical braking delay.
- Guard interlocking: Access doors to the label roll compartment and apply station should be interlocked with safety-rated switches (Type 4 where practical). The PLC safety zone should prevent dispense and apply actuation when a guard is open.
Pneumatic Safety
Tamp pads and air-blast nozzles operate at line air pressure. On E-stop the air supply to actuators should be exhausted via a safety valve — not just de-energized — to prevent slow-leak actuation while maintenance personnel are inside the machine.
Label Waste and Jam Detection
- Monitor the rewind tension (via an analog load cell or dancer arm potentiometer). Excessive tension indicates a jam; low tension indicates a liner break.
- Monitor the dispense motor current or servo torque. A sustained overload indicates the label roll is empty or the liner has jammed at the peel plate.
Both conditions should raise a fault and halt the dispense axis without triggering E-stop — they are recoverable faults, not safety events.
Frequently Asked Questions
How does a labeling machine work?
A labeling machine feeds a roll of self-adhesive labels over a peel plate, where the label separates from the liner and is applied to a passing product by a tamp pad, roller, or air blast. A product-detect sensor tells the PLC when a product is approaching, and the PLC triggers the dispense mechanism so the label arrives at the apply station at exactly the same moment as the product.
What is print-and-apply labeling?
Print-and-apply labeling combines a thermal transfer or direct-thermal printer with an applicator in a single unit. The PLC (or a print-apply controller) sends variable data — serialized barcodes, batch codes, best-before dates — to the printer just before each label is needed. The printed label is then applied to the product in the same cycle. Print-and-apply is standard wherever each label must carry unique data, such as in pharmaceutical serialization and logistics carton labeling.
How does a PLC sync a labeler to line speed?
The PLC reads a quadrature encoder mounted on the conveyor drive. It scales the encoder pulse count per scan to a line speed value, then uses that value as the speed reference for the dispense servo or stepper motor. This electronic gearing means the dispense speed rises and falls in proportion to the conveyor speed, keeping the label-to-product timing constant even through acceleration and deceleration phases of the line.
Related Guides
Labeling is one station in a complete packaging line. The same position-tracking and encoder-following patterns appear in adjacent machines:
- Filling machine — product filling before labeling, with volumetric or mass-flow control
- Palletizer — end-of-line layer formation and stacking after labeling and case packing
- Packaging machine PLC programming guide — full-line overview including wrapping, cartoning, and downstream integration
- Material handling PLC programming — diverters, accumulators, and sorters that feed and discharge labeling machines


