AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Explainer

Why a DAQ Card Cannot Generate Stepper Step Pulses

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

Short answer

A software-timed DAQ output cannot produce the fast, even step pulses a stepper driver needs. Its edge timing follows operating-system scheduling, not a clock. Generate steps from a motion controller or counter-output device and keep the DAQ on supervisory and measurement duties.

On this page
  1. Why is software timing not good enough for a step input?
  2. How fast does a step output actually need to be?
  3. What is the calculated pulses-per-millimeter scale for the retract?
  4. Which device should generate the pulses, and what does the DAQ do instead?
  5. How should the touch-probe trigger be captured?
  6. What does the sequence look like once the hardware is right?
  7. What is the decision for this machine?
  8. Questions asked

A software-timed DAQ output cannot drive the step input of a stepper driver on a machine that must move repeatably. The National Instruments USB-6009, for example, updates its outputs under software control, with a documented maximum update rate of 150 Hz on its analog outputs and no hardware-timed pulse generation on its digital lines. A TB6600 driver, by contrast, specifies a minimum step pulse width of about 2.2 microseconds on the TB6600HG, and it counts every rising edge as one step. If the edge spacing wobbles with operating-system scheduling, the motor loses steps, stalls, or parks at an unknown position. Generate the pulses from hardware that owns a clock: a motion controller, a stepper controller with a pulse generator, or a counter/timer output on a device that supports hardware-timed pulse output. Keep the DAQ for what it does well: reading the probe trigger, recording coordinates, and supervising the sequence. The sections below show the arithmetic and where each piece belongs.

Why is software timing not good enough for a step input? #

A step input is a frequency reference: every edge advances the motor by one microstep, so edge-to-edge spacing is the speed command. Software timing makes that spacing the sum of loop overhead, driver calls, and scheduler delay, which can vary by milliseconds between iterations.

When a LabVIEW loop toggles a digital line, the interval between edges is whatever the operating system gives the loop next. On a desktop Windows session a loop iteration can take anywhere from tens of microseconds to several milliseconds depending on what else runs. A stepper driver cannot tell the difference between a deliberate slow pulse and a scheduling hiccup: a long gap just becomes a momentary speed drop, and a missed edge becomes a lost step. On a coordinate measuring machine a lost step means the recorded position is wrong by a fixed count for the rest of the sequence.

The USB-6009 makes this worse by design, not by accident. Its documentation states that all analog output updates are software-timed, with a maximum update rate of 150 Hz, and its digital lines are software-timed as well; the device has a counter input but no counter output that could emit a pulse train. Installing DAQmx gives you programmatic access to those same software-timed lines; it does not add hardware-timing hardware that the board lacks.

How fast does a step output actually need to be? #

The driver wants each pulse to be at least about 2.2 microseconds wide and wants usable axis speeds of thousands of steps each second. Compare that with what a software loop delivers and the gap is three orders of magnitude, not a tuning problem.

The 2.2 microsecond figure comes from the Toshiba TB6600HG datasheet; check the datasheet of the exact driver part on your bench, because board-level implementations differ. On the fast side, a 200-step motor with 8 microsteps needs 1,600 edges per motor revolution. Turn that motor at a modest 120 rpm and the step frequency is:

120 rpm × 1/60 min/s × 1600 pulses/rev = 3200 pulses/s

So a useful measuring approach runs the step line at around 3.2 kHz, with edges a few hundred microseconds apart at most, and a fast approach runs it higher still. A software loop that jitters by a millisecond is trying to hold a period fifty to a hundred times smaller than its own uncertainty. No amount of loop tightening closes that gap; only a hardware clock can.

What is the calculated pulses-per-millimeter scale for the retract? #

For an example machine with a 200-step motor, 8 microsteps selected on the driver, and a 5 mm lead screw directly coupled, the scale is 320 pulses per mm of travel. The 3 mm retract is then 960 pulses, rounded to a whole pulse count.

The arithmetic:

  • Pulses per revolution = 200 full steps/rev × 8 microsteps = 1600 pulses/rev
  • Pulses per mm = 1600 pulses/rev ÷ 5 mm/rev = 320 pulses/mm
  • Retract count = 3 mm × 320 pulses/mm = 960 pulses

If a gearbox or belt sits between motor and screw, multiply by motor revolutions per screw revolution. Round the retract command to an integer pulse count and recompute the physical distance it produces (960 pulses ÷ 320 pulses/mm = 3.000 mm here). Whatever your inputs are, confirm the scale by commanding a move and measuring actual displacement with a dial indicator or scale, rather than trusting the calculation alone.

Which device should generate the pulses, and what does the DAQ do instead? #

Generate step and direction from a device with its own pulse engine: a dedicated motion controller, a stepper controller with a built-in pulse generator, or a DAQ or timing device whose counter output is hardware-timed. The DAQ then handles supervision and measurement only.

What to require of the pulse source:

  • Programmable pulse frequency with a controlled acceleration ramp, so the fast approach does not start above the motor's pull-in speed
  • A position-latch or trigger input that captures axis position at the probe event in hardware, without waiting for a software poll
  • Bounded moves, so the controller stops on a travel limit even if the probe never triggers
  • Direction and enable outputs that meet the driver's input electrical requirements

Wiring details for the driver side — optically isolated inputs, sink or source logic, and current limits — are covered in the article on what a stepper driver control connector needs from a PC; match your pulse source's output circuit to those requirements before applying motor power.

The DAQ keeps a legitimate and useful role in this architecture: read the probe state, record the coordinates latched at the second touch, run the state machine that commands each move, and report faults. None of that needs deterministic edge timing; all of it benefits from the DAQ's analog inputs and easy host connectivity.

How should the touch-probe trigger be captured? #

Capture the probe trigger with a hardware latch or position-capture input on the motion controller, not by polling a digital line from LabVIEW. A polled input can miss a short trigger pulse entirely, and even a caught one arrives milliseconds late.

With motion disabled, test the probe first: read its output specification to learn whether it holds a contact state or emits a momentary pulse, and confirm polarity and voltage compatibility with the capture input. Then verify on the machine that a real probe touch registers even while the host application is busy. This matters because the two-touch sequence depends on it — the first contact must stop the fast approach and start the retract, and the second contact must freeze the recorded coordinate. A hardware capture ties the stored position to the trigger instant itself, so software delay afterward does not corrupt the measurement.

Respect stopping distance when the fast approach runs. For constant deceleration, the ideal travel after commanding a stop is d = v²/(2a). As a worked example: at v = 20 mm/s and a = 200 mm/s², d = (20 mm/s)² ÷ (2 × 200 mm/s²) = 400 ÷ 400 = 2 mm. Add the distance covered during detection and command delays, and confirm by triggering the probe manually during a conservative test move that the remaining travel fits the probe's overtravel rating.

What does the sequence look like once the hardware is right? #

Run an explicit state machine whose transitions depend on confirmed motion-complete and probe-event signals, never on timed delays. The two-touch pattern is the same whether the controller is a dedicated motion board or a counter-output DAQ with latch support.

The states, in order: verify the axis is referenced and the probe is clear; make the bounded fast approach and stop on the captured first trigger; command the retract using the pulse count from your scale (960 pulses in the example above), starting consistently from either the trigger coordinate or the stopped position — declare which one and use it everywhere; make the slow approach and latch the position at the second trigger; store the recorded coordinate and move clear. Require probe release before rearming the second approach, so a maintained contact is not mistaken for a fresh touch. Check each command's completion status before issuing the next. Do not connect motor windings to the DAQ under any arrangement: the driver supplies winding current, the control hardware supplies logic signals only.

For the scaling numbers and pulse counts behind these moves, the article on servo pulse scaling calculation works the same conversion from steps per revolution to commanded distance in detail.

What is the decision for this machine? #

Do not program step generation on the USB-6009 or any software-timed DAQ output. Buy or designate a hardware pulse source — a motion controller or a hardware-timed counter output — and wire its step and direction lines to the TB6600 inputs; relegate the DAQ to probe reading, coordinate recording, and sequence supervision.

The reasoning in one line: the driver needs edges about 2.2 microseconds wide at several kilohertz, the software-timed output tops out at 150 Hz with millisecond jitter, and no software fix changes hardware that lacks a clock. Keep the two-touch fast-approach, 3 mm retract, slow-approach sequence exactly as planned, but issue it to the pulse source and let the probe trigger latch position in hardware. Verify your own pulses-per-millimeter scale with an independent displacement measurement before the first approach on a real specimen.

Questions asked

Can I toggle a DAQ digital line fast enough to spin a stepper motor for a bench test?

Yes, for a slow demonstration. Tightening a loop around a software-timed output may turn a lightly loaded motor at low speed, which is useful to prove wiring and direction. It is not a basis for a measurement sequence, because every edge interval depends on operating-system scheduling and will not stay even as speed or load changes.

What hardware should generate the step pulses instead?

Any device that produces pulses from its own clock: a dedicated motion controller, a stepper controller with an internal pulse generator, or a DAQ or timing device whose counter/timer output is hardware-timed. Pick one that can also latch the touch-probe trigger so position capture does not wait for a software poll.

What does the 150 Hz update rate mean for an attempt to step from a DAQ analog output?

It caps the software-timed output at 150 updates each second, so at most 150 edges per second. A practical driver wants at least a few thousand steps each second for usable speed, so the DAQ output is hundreds of times short of what the axis needs before timing quality is even considered.

Keep reading

  • Explainer

    Why an A/D card cannot control a stepper motor directly

    No. An A/D card measures signals and cannot supply winding current or place step edges in time. A stepper needs a hardware-timed pulse train into a stepper drive, from a counter/timer output, a PLC pulse output, a motion board or an integrated drive, with Windows software only supervising.

    Servo and stepper motion

  • Explainer

    When a Step and Direction Servo Drive Is Closed Loop

    A step and direction servo drive is closed loop because the drive itself reads the motor encoder and corrects position with its internal PID loop, thousands of times a second; the step pulses are only a position command. Feed encoder pulses to the controller as well only when its logic must know actual position, and only after the encoder, drive and controller documentation agree on signal format, levels and loading.

    Servo and stepper motion

  • Explainer

    Why a Stepper Controller Cannot Drive a Servo Motor

    No, not directly. A stepper controller sequences phase currents open loop, while a servo drive commutates against encoder or resolver feedback; the only bridge is a servo drive that documents a step/direction input. A servo motor that hums without moving has only proven it was energized, not that the command or the loop is compatible.

    Servo and stepper motion