07-21-2026 11:25 AM
Hello,
I am trying to output a 5V square wave using the Analog Output channels to drive a TB6600 stepper motor driver pulse signal. I've checked with an oscilloscope, but this is not outputting a square wave at all. Could you help me figure out what's wrong?
I am using an NI sbRIO 9628 FPGA board.
07-21-2026 09:17 PM
Does the NI sbRIO 9628 FPGA board have a DIO port? You describe wanting to output either +5V or 0V, which can be realized by driving a DIO port with a Boolean T (+5V) or F (0V). You can realize this with an FPGA by "obvious code", having a Boolean (on a Shift Register) that in one frame, is wired to the DIO with a Timed Wait (for the time you want the voltage on or off), inverting the Boolean signal before sending it to an (almost) identical frame with either the same or different Timed Wait, and again inverting it before exiting. There are several ways you can turn this "Pulse Generator" on and off with a "Run Pulser" Boolean (for example, run or don't run the two-state Pulse Generator).
If the hardware has a function that does exactly what you want (i.e. generate 0 or +5 V), you don't need to do extra work to simulate this output.
Bob Schor
Bob Schor
07-22-2026 01:52 AM - edited 07-22-2026 01:53 AM
Hi dhanes,
@dhanes wrote:
I am trying to output a 5V square wave using the Analog Output channels to drive a TB6600 stepper motor driver pulse signal.
I am using an NI sbRIO 9628 FPGA board.
The sbRIO offers several DIO pins, which are described as "5V tolerant": you would need an additional amplifier to convert the 3.3V high level to your needed 5V level.
DIO signals typically are easier to handle in code - and many motor drivers also can handle 3.3V digital signals ("LVTTL")…
@dhanes wrote:
I've checked with an oscilloscope, but this is not outputting a square wave at all.
The AO of the sbRIO9628 supports a ±10V range: what does your scope show "at all"?