AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Troubleshooting

Why a timer-driven stepper pulse train delivers the wrong step count

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

Short answer

The count that decides this fault is the pulses your drive accepts at its pulse input, not the ladder counter's value. A timer-and-counter generator usually fails because the counter increments on a different event than the single edge the drive counts as one step, or the pulse rung fires one extra scan after target. Compare commanded steps, PLC counter, input transitions and shaft motion, in that order.

On this page
  1. Compare four counts in this order
  2. Why the ladder counter counts a different event
  3. The extra pulse that escapes after target
  4. Worked example: from command setpoint to shaft angle
  5. Symptom patterns and the confirming check
  6. Verify the waveform the drive receives
  7. When every count matches but the shaft is short
  8. The decision for each case
  9. Questions asked

The number that decides this fault is the pulse count your drive accepts at its pulse input, not the step counter inside your ladder. A timer-and-counter pulse generator fails in one of two places: the counter increments on a different event than the single edge the drive counts as one step, so the move stops at half the commanded travel, or the pulse rung stays live for one extra scan after target and the drive accepts one more edge. Both faults leave the ladder counter reading exactly on target, which is why a first look at the PLC clears them. Put four numbers side by side — commanded steps, the ladder counter's value, transitions at the drive's pulse input, and the shaft position that results — and the broken link identifies itself.

Compare four counts in this order #

Run one small test move and read the same move at four points, in this order. Each adjacent pair that disagrees names the broken stage.

  1. Commanded steps — the setpoint behind the move, the number you entered or sent. It is the reference; nothing downstream repairs it.
  2. The ladder counter at end of move — go online and read it after the move finishes. If this value alone is wrong, the fault is inside the ladder logic and no wiring or drive test will fix it.
  3. Transitions at the drive's pulse input — count edges with a high-speed counter input, or capture width and spacing on an oscilloscope. This is the only number the drive can act on.
  4. Shaft position — mark the coupling, run the move, measure the rotation.

Commanded against ladder counter: the logic is miscounting its own event. Ladder counter against input transitions: the pulses are not leaving the PLC whole, or not shaped so the drive accepts them. Input transitions against shaft position: the pulses-per-revolution conversion no longer matches the drive's setting, or the motor is losing synchronism. Keep hands and tooling out of the motion envelope during any count test, and follow the machine's lockout procedure before changing wiring or probing the pulse line.

Why the ladder counter counts a different event #

A step-and-direction input acts on one edge of each pulse, and the drive's datasheet names that edge. The ladder has more candidate events than that: the timer-done bit, the output coil going true, the coil going false, or both transitions of the coil. Count the wrong one and the counter still reaches target while the drive has accepted only part of the command.

The common version is a self-resetting timer that toggles the pulse output, so one output pulse consumes two timer expirations — one to set the output, one to clear it. A step counter fed from the timer-done bit increments twice per pulse and halts the move at half the pulses. A counter triggered on both transitions of the output coil does the same. The counter reads its target perfectly while the shaft travels half the distance.

A counter fed from the output coil through a plain contact, rather than an edge instruction, can also update once per scan while the coil is true — it repeats while the output sits high and drifts with scan time.

Rate and total are separate quantities. The timer preset sets width and spacing, therefore speed. Only the termination event sets how many pulses the move contains, so shortening the timer changes how fast the move goes wrong, not whether it does.

The extra pulse that escapes after target #

When the step counter reaches target, the rung that stops generation does not act until the program scans it — often the next scan — and a timer that expires inside that gap completes one more toggle. The output delivers one more rising edge, the drive accepts a step the command never asked for, and every move lands one step long.

Gate both the timer rung and the output rung with the counter-done contact so no new half-cycle can start once the target is reached, and reset the timer and the counter in the same scan the move ends. Idle the pulse output at the level the drive ignores — rest low if the drive counts rising edges — so the next move begins with a clean single edge. The direction line has its own requirement: it must sit stable around the accepted edge for the setup and hold times in the drive datasheet.

Worked example: from command setpoint to shaft angle #

Constructed example, not a measurement; the inputs are chosen so the arithmetic is easy to check.

  • Commanded move: 1,000 steps.
  • The ladder toggles the pulse output with a self-resetting timer and feeds the step counter from the timer-done bit, so one pulse consumes two counter increments.
  • When the counter reads its target, pulses issued: 1,000 ÷ 2 = 500.
  • Transitions at the drive input: 500 rising and 500 falling, 1,000 in total, where a true 1,000-step command shows 2,000.
  • Steps the drive accepts, one per rising edge: 500.
  • Drive set to 8 microsteps per full step, on a hybrid stepper of the common 200-full-step type: 200 × 8 = 1,600 pulses per shaft revolution.
  • Angles: commanded 1,000 ÷ 1,600 = 0.625 rev, or 225°; delivered 500 ÷ 1,600 = 0.3125 rev, or 112.5°, and 112.7° once the escape pulse is added — a single pulse is worth 0.225° at this resolution.

The ladder counter reads its target and looks right; the input shows half the commanded edges; the shaft stops at half the commanded angle. Counter on target, input at half, shaft at half is the counting-event signature, and the fix lives in the ladder: increment the step counter once per completed pulse or once per accepted edge, and gate the rungs at target.

Symptom patterns and the confirming check #

Match what your test move shows to a row, then run that row's confirming check before changing anything.

Observed pattern Where the fault lives Confirming check
Ladder counter ends off target by itself Ladder logic: the counter's trigger event, enable or reset Toggle the output once by forcing and watch whether the counter moves once or twice
Counter on target, move short, often exactly half The counter counts a different event than the drive's accepted edge Count rising edges at the pulse input; a correct move shows one edge per commanded step
Every move ends one step long Generation keeps running one extra scan after target Set a small target and count edges; this fault repeats as target plus one, every time
Edges go missing as the rate rises Output capability, or pulses outside the drive's width and spacing limits Capture width and spacing at the failing rate and set them against the drive datasheet
All counts agree, shaft still short Rescaled pulses per revolution, or lost synchronism Recompute the conversion from the drive's current setting and rerun the move slower

Verify the waveform the drive receives #

The standard your pulse train has to meet is the drive's own input specification, and every number in it comes from that drive's documentation: which edge counts, minimum pulse width, minimum spacing — normally stated as a maximum pulse rate, 300 kHz for one NEMA 23 driver family as a documented example — and the direction line's setup and hold times around the active edge. The electrical side belongs to the same check: the PLC output's on-state voltage, off-state leakage and polarity must satisfy the drive input, and a two-wire pulse-and-direction board inserts its own input stage into that chain.

Measure rather than infer. A high-speed counter input tells you how many edges arrive; an oscilloscope shows width, spacing and level. A multimeter cannot count: on a toggling output it reads a DC average between the low and high levels — why a stepper pulse output reads about 12 VDC on a meter shows what that looks like — so a plausible meter reading proves toggling, not count.

An ordinary discrete output carries its own timing limits on top of the timer's, set out in stepper pulse timing from a PLC discrete output module. If a shortened timer preset starts making pulses narrower or closer together than the drive accepts, the drive drops edges and the shaft falls behind while the ladder counter still reads true.

When every count matches but the shaft is short #

Recompute the drive side first: pulses per revolution follow the microstep setting now on the drive, and a setting changed after the pulse math was written rescales every move the machine makes. With the conversion confirmed, a shortfall that grows with speed or load is lost synchronism — acceleration the rotor cannot follow, drive current set low for the load, a binding axis or a wiring fault — and a stepper motor losing steps after a stall covers what a stall does to the motor and whether it survives one.

The decision for each case #

  • Ladder counter ends off target on its own — fix the counting event, the enable and the reset logic in the ladder; the drive and wiring are not involved.
  • Counter on target, input transitions low or malformed — repair the output path: electrical compatibility first, then width and spacing against the drive datasheet.
  • Transitions correct, shaft short — rescale for the drive's current microstep setting; if the shortfall grows with rate, treat it as lost synchronism and bring speed, acceleration and drive current back to datasheet values.
  • Every move one step long — gate the timer and output rungs with the counter-done contact and reset both in the end-of-move scan.
  • All four checkpoints agree — the generator is counting correctly. Raise the rate in steps and re-verify the count at each step; if the machine needs rates a toggled discrete output cannot sustain, that is a capacity decision rather than a counting fix, and why a PLC digital output cannot make a stepper pulse train sets that ceiling out.

Questions asked

Does the direction line need its own checks even when the count is right?

Yes. A step-and-direction drive specifies a setup time before the active edge and a hold time after it, during which the direction line must stay stable. If direction changes inside that window, the drive can take the step as the wrong direction or reject the edge, and that reads as a count or position error. Change direction only while pulses are stopped, or verify the interface against those two times with an oscilloscope.

Why does the same pulse count turn the shaft a different angle after I changed the drive's microstep switch?

Pulses per revolution scale with that switch. A 200-full-step hybrid motor needs 1,600 pulses per revolution at 8 microsteps per full step, and a 256-microstep setting takes the same motor up to 51,200 discrete positions per revolution. The same commanded pulse count therefore stops the shaft at a different angle. Recompute every commanded move from the setting now on the drive.

Can I confirm the pulses with a multimeter?

Only that toggling is happening. On a pulse train a meter reads a DC average between the output's low and high levels, so a common result is roughly half the on-state voltage — about 12 VDC on a 24 V output — and it says nothing about how many edges the drive accepted. Count edges with a high-speed counter input, or measure width and spacing with an oscilloscope.

Is a timer-and-counter pulse generator acceptable for production, once the counting is fixed?

For slow, single-axis index moves it can be. Its ceiling is timing resolution: with a 10 ms timer preset a complete pulse takes 20 ms, so the drive sees about 50 pulses per second — fine for a slow indexer, not for a machine axis or coordinated motion. Past that ceiling you want a dedicated pulse output or a motion controller rather than a shorter timer.

Keep reading

  • Troubleshooting

    Why a Closed Loop Stepper Will Not Move Above 200 kHz

    The axis sits dead because the kernel exceeds the drive's documented step input limit, making each high or low state narrower than the input can latch. Set the kernel to half the ceiling, derive steps per mm from the drive's command resolution divided by the screw's travel per revolution, and verify the encoder A-channel polarity at the drive terminals.

    Servo and stepper motion

  • Explainer

    Why a stepper pulse output reads about 12 VDC on a meter

    A DC meter on a running pulse output reads the time-average of a 0 V to 24 V square wave, so at about 50% duty it shows near 12 V while the direction pin holds a true 24 VDC. The drive's 21.6 VDC minimum applies to each pulse's high level, verified with a scope, a frequency meter or the drive stepping correctly, not to the averaged reading.

    Servo and stepper motion

  • Comparison

    A step and direction servo drive versus an open-loop stepper

    A step and direction servo drive takes the same pulse train as an open-loop stepper drive but closes the position loop inside the drive on the motor's encoder counts, so lost steps become a following-error fault instead of silent drift. The deciding arithmetic is the pulse budget: steps per inch times feed gives the steps per second your controller must supply, and a high-count encoder can exhaust that budget before the motor runs out of torque.

    Servo and stepper motion