09-30-2015 10:25 AM
Hello everyone,
I am trying to generate pulses for moving a stepper motor through digital ouput (create channel). Up to now i used counter output to generate pulses but because my DAQ device has only four counters (CTR) and my project needs to move more than four stepper motors, i need to generate pulses through digital output. I created a VI which works fine, but the way i created it , the velocity of the stepper motor is defined through the high and the low time pulse duration. When i define (0,001 sec/1msec) high- low pulse duration or greater than 1ms it works fine. When i reduce the high - low duration (e.g. 0,0001sec/0,1msec) to make the stepper motor goes faster, the velocity remains the same as it was with 0,001/1msec. I dont know the reason why in this level of time bigger than this threshold, my stepper motor does not goes faster. Is there any other way with digital ouptut to do it??
Thank you in advance.
I attach my VI.
10-01-2015 11:26 AM
I Chris,
When you use the counter of your card the generation will be Hardware Timed which gives you access to the minimum timing for generation.
When you implement the timing control on your LabVIEW code, that task is software timed. I suppose that you are running this code on a Windows machine. The internal clock is 1 ms so you won’t be able to go faster than that.
The other option will be generating a Hardware Time Digital Output task (without using the counters) but you will have to provide in advance a big enough array of data.
Regards,
AGJ,
NI
10-01-2015 12:04 PM
Depending on your DIO device, you may be able to run it faster than 500 Hz (a transition every 0.001 second) -- the "native speed" of the device (unclocked) might be faster. For example, I just plugged in a USB-6009 (a very inexpensive multi-function I/O product from NI) and ran the following test --
As you can see, it toggles a single digital line as fast as the DAQ function will run. If it ran at 1KHz, the Delta-t would be 1.000, but instead it takes from 0.55 to 0.59 seconds (the timing is variable, depending on what Windows is doing). I suspect a "better" DIO component would be considerably faster, but also unclocked.
Check your DAQ device -- see if it is possible to drive the DIO with a clock signal. If so, you can use your Counter/Timer to make the clock and use an "inverting loop" such as I've used here to make a digital pulse train at half the Counter's clock frequency.
Bob Schor
10-04-2015 06:34 PM