04-11-2006 01:00 PM
04-12-2006 12:52 AM
Which NI hardware are you using?
From your VI, it looks like you are using Digital outputs on it to run the stepper motor.
and can u eloberate more on how you plan to control the stepper motor? if you can draw a signal pattern that you want to source from the DAQ card,it would be easier to suggest
04-12-2006 02:46 AM
The hardware we are using is a PCI-6251 break-out box.
We plan on sending a step function with a 5V amplitude to act as the clock for the stepper motor. The actual signal pattern would be a square wave, alternating between 0V and 5V.
To control the stepper motor all we have to do is have the step function acting as a clock and define the direction we want to move in.
We know that 50000 steps is equal to a movement of 10mm in about 27 seconds. Therefore if we wanted to input in terms of distance and velocity would select 10mm and 0.37mm/s respectively, and I believe that conversion can be made with just a few formulas.
Since we want more than one velocity option we want to put a delay in the step (either in a peak or valley, either should affect the motor controller the same way). As it is currently programmed the delay is in both the peak and valley, effectively doubling the stated delay. Yet, the delay doesn't change the time linearly. For the same distance, a 1ms delay has a run time of 82s, a 3ms delay 94s, and a 4ms delay 139s (these numbers may not be exact, I'm writing from memory, but they are representative of the behavior observed).
That's probably more information than you wanted, but I hope that it is helpful and if you need to know anything else let me know. Thank you for your help.
and can u eloberate more on how you plan to control the stepper motor? if you can draw a signal pattern that you want to source from the DAQ card,it would be easier to suggest
04-12-2006 06:54 AM
There's a LOT of info here on the forums about generating clock signals for steppers. A bit of determined searching/exploring could unearth a wealth of information, and perhaps exactly what you're looking for.
Meanwhile, here are some brief thoughts. (Sorry I can't look at the vi you attached -- my LV PC is far from my network connection.)
1. If the entire 50000 step move will be at a constant velocity, the simplest method is to use a counter to generate a finite pulsetrain. Most steppers I've been around would need to be microstepped in order to do a dead start/stop at close to 2 kHz. Do you have a microstepping drive?
2. If you need to change the step rate on-the-fly while also controlling the total # of steps, it is considerably more difficult to use a counter. But as long as you know the entire velocity profile before the move begins, then the correlated (hardware-timed) digital output is probably the best way to define such a variable-freq finite pulse train.
3. In a pinch, you may be able to use an analog output signal to define the pulse train.
4. All of the methods above are hardware-timed, producing much more consistent behavior than the software-timed method you described.
-Kevin P.
04-13-2006 10:48 PM
Plus, your hardware has a feature called as co-related DIO.
Read about this feature and also look at example codes in support section
Using this feature to generate the stepl/pulses should be the best option for your application.
Any doubts, do get back
regards
Dev