AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

How-to

Stepper Label Registration: Edge Home Plus Dynamic Move

Servo and stepper motion Published 10 min read By AutomateDirectUSA engineering team

Short answer

Register every label with an edge-search home move that the motion module runs against the gap sensor, then feed the label length with a separate dynamic position move whose pulse count lives in a PLC register the HMI edits. Teach the count by jogging between like label edges, and keep the taught pitch (face plus gap) separate from the fixed sensor-to-dispense offset.

On this page
  1. Why does one fixed pulse count only serve one label size?
  2. What two moves does a stepper label applicator need?
  3. How do I set up the edge-search home move on the gap sensor?
  4. How do I make the feed distance editable from the HMI?
  5. How do I teach the pulse count for a new label?
  6. How many pulses does one label feed need?
  7. How do I sequence the two moves so they run every cycle?
  8. What should you test before running production labels?
  9. Which setup is right for your applicator?
  10. Questions asked

Registering a label on a stepper-driven applicator takes two moves, not one fixed profile: an edge-search home move that the motion module runs against the gap sensor, then a dynamic position move whose pulse count is read from a PLC register the HMI can edit. Split it that way and the module's profiles never change when the label size does — the operator changes a number. Teach the count by jogging the web, store it under a part number, and keep the taught pitch (label face plus the roll's gap) separate from the sensor-to-dispense offset. Below are the two-move architecture, the profile setup, the pulse-count arithmetic with example hardware, the handshake that repeats every cycle, and the decision for one-size and multi-size machines.

Why does one fixed pulse count only serve one label size? #

A count baked into a fixed motion profile positions one label size perfectly and nothing else: the whole feed distance lives in the module's configuration where the HMI cannot reach it, so splitting registration from feed length frees the distance to change.

A fixed count cannot correct a slipping roll or a stretching liner either, because open-loop pulses accumulate whatever error the web adds. The profile shape is right; only its cargo is wrong. Keep the two-stage pattern — run at one frequency until the sensor event, then continue at a count. Profile lists carry names in that shape, for example run to a limit at one frequency, then continue to a count at a second; take the exact name from your own module's list and move the distance out of the profile into data.

What two moves does a stepper label applicator need? #

It needs an edge-search home move that finds the label edge on the gap sensor, followed immediately by a dynamic position move whose distance comes from a PLC register; the first move re-registers every cycle, the second carries the changeable length.

Move Job Distance comes from Changes per label size
Edge-search home Finds the same physical edge on the gap sensor The sensor event itself No
Dynamic position move Feeds the web to the dispensing position A PLC register the HMI writes Yes, one taught count

Let the motion module own the edge detection. Its homing function watches the sensor in hardware, so the stop position does not depend on where the ladder scan happens to be; a gap edge sampled through an ordinary discrete input lands wherever scan time puts it, a different error every cycle. The split is standard practice, not a trick: CiA 402, the drive profile behind EtherCAT servo and stepper drives, defines homing methods that reference the axis position to a sensor event — the networked version of the same edge-search move.

How do I set up the edge-search home move on the gap sensor? #

Wire the gap sensor to an input owned by the motion module rather than an ordinary discrete input card, configure a run-to-limit-then-count home profile, and trigger it on the sensor's edge instead of its level so bounce or noise cannot double-register.

Configure the search in two stages: a fast frequency that eats most of the pitch, then a slow approach slow enough that the motor stops inside the gap width once the edge arrives. Commit the home move to stopping at the edge. Any fixed offset belongs in the dynamic move, so exactly one number per label size exists and nothing hides inside the module. Before each home, clear or disable any preset the previous move left behind — on some counter-module generations the homing routine runs as a profile of its own, and a leftover preset makes it misbehave.

Size the search window beyond one full label pitch, measured from the start of the search. No edge inside the window means a missing label or an end-of-roll condition: stop the cycle, latch the alarm, and hold the label air valve inhibited until the fault is cleared. Keep the pinch rollers guarded during teach and test runs, and let that fault inhibit the air blast before anyone has a reason to reach toward the dispense plate. Keep the search frequency below the stepper drive's documented pulse input limit; microstepping multiplies the pulse demand for the same speed, the trap described in Stepper Drive Pulse Frequency Limit vs Microstep Demand.

How do I make the feed distance editable from the HMI? #

Configure one dynamic position profile whose target count is fetched from a PLC data register at run time, then point an HMI numeric field at that register; the operator changes label size by typing a number and the module's profile never changes.

On a CTRIO-class counter module the documented instruction is Run Position Mode, written CTRUNPOS: it loads and runs one of the pulse profiles set up in the module's System Configuration. The module's canned modes — velocity, run to limit, run to position — run from the instruction without a profile table, but the outputs still need their configuration before any of them moves an axis.

Three register practices keep HMI editing safe. Keep the feed-count register retentive so sizes survive a power cycle. Keep a small table of taught counts indexed by part number and load the active register from it at changeover instead of retyping numbers. Clamp the register in the ladder with a minimum and a maximum plausible count, so a typed 5 or 50000 cannot slam the web into the dispense plate before anyone questions it.

How do I teach the pulse count for a new label? #

Add a teach mode that jogs the web from one gap edge to the next at jog speed, captures the position counter's change, and writes it into the same register the dynamic move uses, saved under a part number for later reload.

Define what the teach measures before anybody saves it. Jog between two like edges — gap start to the next gap start — and the captured delta is the label pitch: face plus liner gap, 0.250 in on a classic gap-sensed roll, so a 4.000 in face pitches at 4.250 in. Jog from the sensed edge to the exact spot where the label sits at the dispense plate and the delta is the registration offset, a machine constant that changes only when the sensor or the plate moves. Store pitch and offset in two different registers; a teach that blurs them gives a number that works by accident and fails at the next size.

The teach itself runs the module's velocity mode under the existing jog buttons while the position counter accumulates; the teach routine reads the counter at the start edge and at the end position and writes the difference to the register. If no edge arrives during a teach jog, the roll is spent — treat it like a registration fault.

How many pulses does one label feed need? #

For example inputs — a 2.000 in feed roller, a 200-step motor at 8 microsteps, a 1:1 coupling — the web costs 254.6 pulses per inch, so a 4.000 in label on a 0.250 in gap pitch needs 1082 pulses of feed.

Calculated example for those inputs, not a measured result:

  • Feed roller outside diameter 2.000 in: circumference = 3.1416 × 2.000 in = 6.2832 in of web per roller turn.
  • Motor 200 full steps per turn, microstepped 8-way, 1:1 coupling: 200 × 8 = 1600 pulses per roller turn.
  • Web cost: 1600 pulses / 6.2832 in = 254.6 pulses per inch of web.
  • Label pitch: 4.000 in face + 0.250 in gap = 4.250 in, and 4.250 × 254.6 = 1082 pulses, rounded to whole pulses.
  • Registration offset, example 1.500 in from sensor to dispense edge: 1.500 × 254.6 = 382 pulses.
  • Search window at 1.5 pitches: 1.5 × the pitch count = 1623 pulses.

What moves the number: the microstep setting scales every count directly — 8-way to 16-way doubles the pitch count to 2164 — and a reduction between motor and roller multiplies it by the ratio, so a 3:1 belt or gearbox triples the pitch count to 3246 and the web cost to about 764 pulses per inch. Rubber pinch rollers compress the liner, so measure the effective roller diameter with backing paper under the nip, or accept the small error the per-cycle edge search erases anyway.

Where the taught count goes depends on the cycle you commit to. Search every cycle and the register holds the edge-to-plate count — 382 pulses in the example — with the pitch mattering only through the search window. Feed one pitch per bag for the fastest cycle and the register holds the pitch count, 1082 pulses, with a periodic edge search trimming whatever slip accumulates. The gearbox case is worked through in Stepper Motor Running Slow With a Gearbox: Pulse Rate First.

How do I sequence the two moves so they run every cycle? #

Give every handshake bit exactly one role — request, active, complete or reset — fire the move request as a one-shot, and do not start the next cycle until the completion bit has come on and the request has been dropped again.

The classic failure: each move ran in its own stage, the dynamic move fired only on the first cycle, and bits named C0 and C2 in the example program would not toggle at the right times. Bit names carry no meaning on their own: map every point to one explicit role — request, active, complete, reset — in the module's function configuration, and write the ladder against the roles, never the names.

The operating sequence:

  1. Wire the gap sensor to a motion-module input assigned to the homing function.
  2. Configure the two-stage edge-search home profile to stop at the edge.
  3. Clear the previous move's preset before every home.
  4. Configure one dynamic position profile whose count is read from the PLC register.
  5. Fire the home move as a one-shot each cycle and start the dynamic move only on its completion.
  6. Keep the label air valve inhibited until the dynamic move completes.
  7. Alarm and abort when the home search times out; that is the missing-label and end-of-roll detection working.

Because the edge home re-registers from a fresh sensor edge every cycle, open-loop pulse error never accumulates into drift across the shift. When a pulse-command axis still lands short move after move with a clean handshake, the likely causes are ranked in Why a pulse-command servo axis loses position between moves.

What should you test before running production labels? #

Run at least ten cycles with the shortest and the longest taught label, kill the web so a gap never arrives, and confirm the sensor stops on the same physical edge every time; that proves registration, the register edit and the missing-label abort.

Work down the checks before the first production bag:

  • Mark the liner with a pen, run ten cycles, and confirm the stop lands the label edge at the plate within tolerance every time.
  • Edit the register from the HMI mid-run and confirm the very next cycle takes the new distance, not the one after.
  • Thread the web past a gap to force a missing label and confirm the window fault stops the cycle before the air valve fires.
  • Power down and up and confirm the retentive register and the part-number table come back intact.
  • Run the shortest and the longest taught sizes back to back to prove a changeover is data only.

Which setup is right for your applicator? #

One label size and no changeovers can survive a single fixed profile, but the two-move split still wins because it re-registers from a fresh sensor edge every cycle; any second size makes edge home plus a register-fed dynamic move the only sane build.

Sort it by changeover rate. One size, fixed plate, fixed sensor: the register holds the edge-to-plate count, 382 pulses in the example, with the search window sized from the pitch. Several sizes on a machine that feeds one pitch per bag: the register holds the taught pitch count, 1082 pulses at the example rate, reloaded from the part-number table at changeover. Rolls and sizes nobody predicted: the teach mode is not optional — jog, capture, save under a part number, and the next roll costs one teach cycle instead of a programming session.

Build it once and the module's profiles stay untouched for the life of the machine; every label question after that is a register question, answered from the HMI.

Questions asked

Why does the dynamic move fire only on the first machine cycle?

Almost always a handshake problem: the move request stayed asserted after the first completion, so the module never saw a new rising edge to trigger the next move. Drop or reset the request once the completion bit comes on, re-arm it before the next cycle starts, and verify each counter point's role in the module's function map rather than trusting its name.

Does changing the microstep setting invalidate a taught count?

Yes. The register holds motor pulses, and the pulses needed for one inch of web scale directly with the microstep setting: move a drive from 8-way to 16-way and every taught count doubles. Re-teach the size, or store a pulses-per-inch figure and multiply by the new setting, then verify against a marked length of backing paper before running product.

What if the labels have no gaps to sense?

The two-move split still holds; only the edge source changes. A transmission sensor that sees the label body, a print-registration mark eye, or a contrast sensor can feed the same home input. Trigger on the mark's edge, re-teach pitch between like marks, and expect slower search speeds, because weak contrast asks the slow stage to do more of the work.

How big should the missing-label search window be?

One and a half label pitches is a safe starting window, measured from the start of the home move at its search frequency. If the sensor sees no edge inside it, treat the cycle as a missing label or an end-of-roll condition: stop, latch the alarm, and keep the label air valve inhibited until the fault is cleared.

Keep reading

  • Troubleshooting

    Why a Stepper Axis Stays Blocked on a Low Limit After E-Stop

    The axis blocks on three stacked conditions: motion permission removed by the E-stop, a latched low-limit error, and a Homed status that disabling the axis erases. Recover in that order — safety reset, enable the axis, MC_Reset to acknowledge the error, then MC_Home so the axis moves away from the active limit. On a reported S7-1214C DC/DC/DC at firmware V4.2, that sequence cleared the alarm with no manual move.

    Servo and stepper motion

  • Troubleshooting

    Why a Stepper Motor Grinds After a Gantry Hard Stop

    The grinding was lost synchronism: the drive kept stepping, the blocked rotor oscillated between detents, and about five seconds of that cannot overheat a current-regulated stepper. Inspect the pinion set screw and shaft attachment before touching the motor; a full-revolution spin test with uniform detents clears it. In the case that prompted this article, a slipped pinion set screw was the whole fault.

    Servo and stepper motion

  • How-to

    Calculating Pulses per Inch for a Rack and Pinion Axis

    Pulses per inch on a rack-and-pinion axis is (pulses per motor revolution × reduction) ÷ (π × pinion pitch diameter). With 2,000 pulses per motor revolution, a 2:1 gearhead and a 24-tooth pinion on a 24-diametral-pitch rack (1.000 in pitch diameter), enter 1,273.24 pulses per inch. A 16 in command that travels 41 in needs the setting multiplied by 16 ÷ 41 = 0.39024, applied only to the pulses-per-unit value.

    Servo and stepper motion