Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2176

Reducing Pulse Width for Square Wave Generated with Real-Time

$
0
0

Hi All,

 

I'm using a cRIO-9056 with a NI 9403 module (digital inputs and outputs) to generate a square wave for driving a stepper motor. The stepper motor can read pulses of widths down to microseconds, but on my hardware, I seem to be limited to about a quarter of a second before the pulse becomes inconsistent.

 

I wanted to check if my method for generating the pulse in labview was optimal or if there is a better way to generate this pulse. In the attached picture, the wire coming into N holds the number of pulses we need out of the system (this relates to how far the motor needs to move). Then I have used a for loop repeating on and off outputs separated by the pulse width

 

Any help to optimize this code or insight into the problem in general would be appreciated.

 

Best,

 

Alex

 

labview_square_wave_generator.PNG


Viewing all articles
Browse latest Browse all 2176

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>