Showing results for 
Search instead for 
Did you mean: 

Control stepper motor



I need to drive a steppermotor (with a stepper driver). For this I'm using a cDAQ-9714 and a NI-9472. The speed of the stepper motor has to follow the profile on the figure below:


How could I do this?

I have tried something but I'm not able to control the number of steps with is (because I use continuous samples).



0 Kudos
Message 1 of 4

What DAQ hardware do you have for this?  In a previous thread a couple months back, I didn't think your hardware would support what you're trying to do.  Did I get that wrong?  Or have you upgraded your cDAQ chassis?  One way or the other, is your hardware in fact capable of buffered counter pulse train output? 



-Kevin P

0 Kudos
Message 2 of 4



I'm using the cDAQ-9714 chassis. I'm able to accelerate but, I can't stop after N-samples.



0 Kudos
Message 3 of 4

Have you confirmed that your hardware will generate the buffered frequencies you calculate?  Have you tried Finite Sampling instead of Continuous?


Note: you should write the buffer of freq/duty cycles before calling DAQmx Start.  The query of "Is Task Done?" is mainly for Finite Sampling tasks -- a Continuous task should *never* be done.  The trajectory you made is linear by index, but is by *no* means linear by time.



-Kevin P

Message 4 of 4