From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Accelerate a Microstep Controller

Hi All,

 

This is my first post since all my other questions have already been answered in the forums by this community (pretty cool).

 

But yeah, I am currently using a PCI-6280 M-series DAQ board, and I have a stepper motor microstep driver (RMA Technologies R208).  The initial programming of the driver seems pretty simple, there's a line for direction, resolution, disable, and step, and I only have to output a 0 or 5V to the lines to set up the driver, which means moving the motor. 

 

Currently, I have a vi which calculates how many steps and and length of the waveform I need for the distance and speed I want the motor to turn at.  The waveform is then put into an array and then outputed through a DIO into the "step" input of the driver which makes the motor move a step for each pulse. 

 

However, the question I have is, is there a better way to do this where I can also control the acceleration and deceleration of the motor since I want to minimize the jerk at the start-up and stop since I need smooth linear movement.

 

Thanks for the thoughts,

 

Lester  

0 Kudos
Message 1 of 4
(2,371 Views)

Hey Lester,

 

Sounds like you’re doing some cool stuff! I am not completely sure I understand how you are generating the waveform, but I think I have a grasp on what you want to do. If you can alter the waveform generated that is passed to the stepper motor, it will accelerate or decelerate based on the waveform and its pulses.

 

If you go to Tools à Find Examples then go to Hardware Input and Output à DAQmx à Generating Digital Pulses then open up the “Gen Dig Pulse Train-Finite.vi” it will show you how to create a waveform of digital pulses. You could use something like this to pass to the stepper motor. To make it accelerate or decelerate, you would simply change the frequency that it outputs at while keeping the other parameters the same.

 

Hope this gives you some ideas!

 

Joe S

Applications Engineer

National Instruments

0 Kudos
Message 2 of 4
(2,307 Views)

Hey Joe,

 

Thanks for the reply, this does look like a promising solution.  However, I would need to change the frequency of the pulse train fairly accurately, and it looks as if I can only do this for the counter via software-timing.  And a separate question I have is I see that in a previous forum post, it seems that for finite generation, it also takes up the other counter on my board.  I was wondering if this is true, and if there is a way around it, since I only have 2 counters on this board and I probably need both of them.  

 

I actually have a second board, the PCI-6601, if I do finite generation on that, would it still take up one of the other counters?

 

Thanks,

 

Lester 

0 Kudos
Message 3 of 4
(2,291 Views)

Hey Lester,

 

Depending on your application, you could possibly use a continuous pulse generation instead of the finite one. According to the other post and documentation it is only the finite generation that requires the use of the second counter.  However, it would make sense that you could set up your second card to use for the pulse generation and pass that to your other DAQ card if you did need to use the finite generation. To achieve accuracy in adjusting the frequencies, you could modify the pulse generation VI to help with this. You could pass it an array of frequencies you want it to cycle through and have it iterate over the array instead of having to manually do it. 

 

Hope this helps!

 

Joe S

Applications Engineer

National Instruments

0 Kudos
Message 4 of 4
(2,279 Views)