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.

Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

LINX_ARDUINO Stepper Motor Acceleration

Hello,

 

In my project I control 4 stepper motors with 4 drivers DM542T.

 

I don't have problem to control each stepper motor but I wonder if there is a way to make acceleration and deceleration ?

 

There is an easy way or I need to make a custom command to use an Arduino library like accelstepper.h ?

 

Thanks 

0 Kudos
Message 1 of 6
(2,373 Views)

Hi! Would you mind posting the VI you're using to control the motors? I'm using the same DM542T driver to control a Nema 23 with an Arduino Uno, and I'm a little lost on how to make LabVIEW communicate.

 

Thanks!

0 Kudos
Message 2 of 6
(2,158 Views)

Hey, tck1378

 

Sinc have posted this video? https://www.youtube.com/watch?v=qwvP2AzoB_M

 

he uses uln2003, which requires a much more complicated VI to make it work.

 

since you only need to provide step and dir signals, you can use his implementation considering only activating these two signals.

 

hope it helps you.

Jorge Augusto Pessatto Mondadori, PhD
Sistema Fiep
CLAD, CLD
0 Kudos
Message 3 of 6
(2,154 Views)

I did watch that video, and it was helpful logic-wise but my motor is bipolar 4-wire and this video uses unipolar 5-wire. His four controls correspond to the 4 phases in the stepper motor, whereas my wiring need to control just a step and pulse, so basically the functionality of the program is different. 

0 Kudos
Message 4 of 6
(2,149 Views)

yes, you are correct. abstract the fact that he uses a different motor, since it does not matter.

 

note that his code runs in a while loop, at the frequency of the desired step speed. Instead of using four digital write in sequence at 4 different channels, your application is much simpler: you only need to write true and false how many times your desired step quantity is needed.

Jorge Augusto Pessatto Mondadori, PhD
Sistema Fiep
CLAD, CLD
0 Kudos
Message 5 of 6
(2,147 Views)

The best way I found in my case is to use "LINX custum command" and use an arduino library to control the stepper motor (AccelStepper).

 

You have to modify the firmware of your board to include a custom command that use a function of AccelStepper.

Then you need to use "Custom Command.vi" to send the amount of step you whant to move with the custom command number.

 

The AccelStepper library works really well with a lot of functions.

Message 6 of 6
(2,126 Views)