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

Easy driver stepper control via digital outputs

$
0
0

Hi, I have a couple little motors that I'm driving with a Sparkfun easy driver board. The board just takes in pulses, and for each pulse it gets it steps the motor one step. Another digital pin sets the direction. I have attached the VI.

 

I have the digital PFI1 on my DAQ connected to the "pulse" terminal on the board, and it steps when you send pulses to the board. However, the DAQ seems to be operating in burst mode. If I set the frequency to 10 Hz, for instance, with a finite number of steps (say, 1000), the motor steps in little bursts rather than continuously moving. I scoped the output of the DAQ, and it does appear to be turning the square wave on and off.

 

The pulse chain is initiated by:

1. CO Pulse Freq, set to 0.5 duty cycle and the specified frequency using ctr1
2. Implicit timing with finite samples, # of pulses is the number of user provided steps

3. DAQmx Start Task

 

I enter a loop to monitor the progress, which just checks DAQmx Is Task Done every so often and updates a counter.

 

What is a better way to do this? Why is the counter operating in burst mode?

 

Thanks


Viewing all articles
Browse latest Browse all 2147

Trending Articles



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