AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Troubleshooting

Why a Closed Loop Stepper Will Not Move Above 200 kHz

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

Short answer

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.

On this page
  1. The drive's ceiling, and why an over-fast kernel gives silence
  2. Bench checklist from dead axis to clean motion
  3. The encoder belongs to the drive, not the controller
  4. Worked example: scaling and speed ceiling for the bench axis
  5. Questions asked

A closed-loop stepper axis that sits dead at an over-fast kernel setting is almost certainly being overdriven on its step input. The manual for the HBS57 closed-loop drive documents a maximum pulse input frequency of 200 kHz (its Pulse Input Frequency specification, page 2), and a kernel at double that rate makes each high and low state about 1.25 µs, narrower than the input can reliably latch. Drop the kernel to half the ceiling, 100 kHz, scale the axis 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. Those three corrections took the documented bench axis from erratic twitching to clean motion.

The drive's ceiling, and why an over-fast kernel gives silence #

The first number to pull is the drive's, not the controller's. The HBS57 manual lists its Pulse Input Frequency at the maximum quoted above. That limit is specific to that drive: other makes list their own ceilings, so read the input specification of the exact drive before committing to a kernel setting. What the number means in timing terms is arithmetic on the period, 1 ÷ frequency:

Kernel setting Cycle period Each state at 50% duty
Double the limit 2.5 µs 1.25 µs
The limit itself 5 µs 2.5 µs
Half the limit 10 µs 5 µs

The state intervals assume an ideal 50% duty pulse train; they are calculated, not measured widths. A drive's pulse input has minimum high and low times set by its optocouplers and receiver circuit, given in the drive's input timing table. Pulses below those minimums are not registered at all, so an over-fast train looks like no command, which is why the symptom is silence rather than sluggish motion.

Kernel frequency is a time base, not a speed. Pulse edges are placed on kernel ticks, so even a slow jog issued at the doubled kernel can carry the narrow 1.25 µs intervals; the pulses do not get longer just because the commanded feed is low. The commanded pulse rate is a separate quantity: feed rate × steps per mm. The decision follows directly: run the kernel at half the ceiling, which gives 5 µs per state and margin. The limit itself is the documented maximum, the edge rather than a working point; if an application needs it, measure the high and low durations at the drive terminals against the input timing table first.

Bench checklist from dead axis to clean motion #

Work the list in order of cost, changing one thing at a time:

  1. Kernel above the drive's ceiling. Symptom: nothing at the doubled setting, activity at 25 kHz and 50 kHz. Fix: set the kernel to half the ceiling and restart the controller software so the time base actually changes. Confirm: a slow jog produces clean, repeatable motion.
  2. Scaling computed from the wrong resolution. Symptom: the axis moves but the distance is wrong, 10× short if you used the motor's 200 full steps per revolution, 2× short if you used the encoder's 1000-line count instead of the drive's 2000 pulses/rev setting. Fix: steps per mm = command pulses per revolution ÷ travel per revolution. Confirm: a command of one screw lead turns the screw exactly one revolution.
  3. Encoder channel polarity at the drive. Symptom: erratic humming or lurching, or a drive fault, with the pulse train known good. Fix: compare the motor's connection diagram against the terminal markings; in the documented case the diagram mapped yellow to EA- and green to EA+. Correct the pair with the drive powered off and its supply discharged. Confirm: stable motion in both directions with no fault indication.
  4. Step and direction differential pairs. Symptom: still no motion, or motion in the wrong direction, after the first three pass. Fix: verify each pair lands on the intended drive input with matching polarity, following the breakout board's differential wiring recommendation. Confirm: a scope at the drive terminals shows valid levels and widths.

Wire colours are per motor: confirm against the diagram of the exact motor, never by colour convention. Once the axis runs clean, tuning the position loop gains is the next step, covered in tuning a pulse-and-direction stepper in closed loop.

The encoder belongs to the drive, not the controller #

With a step-and-direction interface, the controller emits pulses and never sees the encoder; the drive closes its own position loop using the motor's encoder. That architecture question, whether an encoder makes a stepper motor closed loop, matters here because it tells you where a feedback fault shows up. Reversed A-channel wiring does not stop the drive receiving commands; it makes the drive's measured position disagree with the commanded position, so the loop fights itself. That is why the documented axis still misbehaved at kernel settings well below the ceiling after the kernel fault was removed, and why correcting the EA+/EA- pair finished the repair.

If the application needs the controller itself to close the loop on measured axis position, a linear scale rather than the motor encoder, that is a different architecture, and tuning a closed-loop stepper with linear scale feedback covers it.

Worked example: scaling and speed ceiling for the bench axis #

Inputs, each with its source:

  • Command resolution: 2000 pulses/rev, from the drive's resolution selector; read the actual switch setting, not the motor nameplate.
  • Travel per revolution: the screw lead, from the screw specification; confirm this is lead (travel per turn), since a multi-start screw's lead differs from its pitch.
  • Drive pulse input ceiling: 200,000 pulses/s, the manual's Pulse Input Frequency.
  • Kernel setting after the fix: 100,000 pulses/s.

Rule in words: steps per mm equals command pulses per revolution divided by travel per revolution, and the maximum axis speed a given pulse rate supports equals that rate divided by steps per mm.

Arithmetic:

  • Steps per mm = 2000 pulses/rev ÷ 5 mm/rev = 400 pulses/mm.
  • Speed at the drive ceiling = 200,000 pulses/s ÷ 400 pulses/mm = 500 mm/s.
  • Speed at the halved kernel = 100,000 pulses/s ÷ 400 pulses/mm = 250 mm/s.
  • Cross-check: one lead × 400 pulses/mm = 2000 pulses, exactly one motor revolution.

Decision: enter 400 as steps per mm and run the kernel at half the ceiling, capping commanded speed at 250 mm/s. Between 250 and 500 mm/s you are on the drive's documented edge, so measure pulse timing before using it. Above 500 mm/s this drive's input cannot accept the train at any kernel setting; the fix is a coarser command resolution if the drive offers one (halving pulses per rev doubles the speed a kernel commands, at the cost of command granularity) or a drive with a higher documented input frequency. This is a calculated example for these inputs, not a measured result.

Questions asked

Does a higher kernel frequency make the axis faster?

Not by itself. The kernel sets the maximum pulse rate the controller can generate; the actual rate is feed rate multiplied by steps per mm. On a 400 pulses/mm axis, a kernel at half the drive's ceiling caps speed at 250 mm/s, and the drive's own ceiling caps it at 500 mm/s. Raising the kernel past the drive's input limit buys speed the drive cannot accept, so the ceiling to respect is the drive's documented one, not the controller's.

Should steps per mm use the motor's 1.8-degree step angle or the encoder count?

Neither. Use the drive's command resolution, the pulses per revolution the drive is set to accept (2000 in this case), divided by travel per revolution, giving 400 pulses/mm. The 1.8-degree angle means 200 full steps per revolution, a motor property. The 1000-line encoder is feedback inside the drive and, decoded on both edges of both channels, becomes 4000 counts per revolution. Those are three different quantities, and only the command resolution belongs in the controller.

The motor twitches erratically at low kernel settings even after lowering the kernel. What next?

Check the encoder channel wiring at the drive. If the A-channel pair is reversed, the drive's measured direction disagrees with the commanded one and the loop fights itself: humming, lurching, or a fault while valid pulses arrive. Compare the motor's connection diagram to the terminal markings, in the documented case yellow mapped to EA- and green to EA+, and correct the pair with the drive powered off. Stable motion in both directions confirms the fix.

Is it acceptable to run the kernel exactly at the drive's ceiling?

The ceiling is a documented maximum, which means the edge, not a comfortable working point: at 50 percent duty each state is only 2.5 µs. The margin comes from halving the kernel, which doubles every interval to 5 µs. Run the lower setting unless you have measured pulse widths at the drive terminals against the minimum high and low times in the drive's input timing table and confirmed the drive follows every commanded move at full speed.

How do I verify the scaling without cutting a part?

Command a move equal to one screw lead and watch for exactly one motor revolution: at 400 pulses/mm that is 2000 pulses, one turn of a 2000 pulses/rev drive and one lead of travel. Then command 100 mm and measure. Anything other than 100 mm points at travel per revolution, since a multi-start screw's lead differs from its pitch, or at a ratio between motor and screw.

Keep reading

  • How-to

    Driving Step and Direction Inputs From a Controller Velocity Output

    A step drive counts edges, so the velocity number must become a timed train: pulses per second equal steps per degree times degrees per second, the demand's sign drives the direction pin, and the drive's documented minimum pulse width and maximum input frequency decide whether the generator can deliver it. Command travel as target minus start position, never by integrating velocity.

    Servo and stepper motion

  • Troubleshooting

    Why an EtherCAT CSP Stepper Axis Enables but Does Not Move

    Holding torque on Servo On proves only that the power stage energizes the windings. In cyclic synchronous position mode the axis moves only when the drive accepts each new 0x607A target and no internal limit refuses it, so check Statusword bit 11 first, then the drive's speed, current and software position limits, then the position unit scaling between controller and drive.

    Servo and stepper motion

  • How-to

    Tuning a Pulse-and-Direction Stepper in Closed Loop

    Tune a pulse-and-direction stepper in closed loop with ramped trajectories and a small step amplitude, not the textbook half-revolution position step. The first-cycle demand is gain × step size, not the average over the step time, so a 5000-count step stalls while 2100 counts at Ixx30 = 35 moves. Raise Ixx30 only until rise time stops improving, and leave Ixx68 at 0 or 1.

    Servo and stepper motion

Sending serial move commands to a stepper driver