Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control stepper motor by labview?

Hi. I want to control stepper motor to use linear actuator. But I can't do anything. I use myRio. And I also use motor driver m-224. my actuator is sbc-ls4075. If anybody suggest the total algoritms, I would like to follow! Thank you.

 

 

0 Kudos
Message 1 of 7
(2,626 Views)

Hi,

 

I just took a look at the sbc-ls4075 webpage.  Looks like it has a stepper motor with a driver on it.  Just use the PWM express VI for myRIO to output a pulse.  The frequency of the pulse will determine the speed of the motor.  You'll another digital output to control the direction.  Should be fun, good luck! 

 

I did a similar project with myRIO a long time ago, with some Pololu A4988 stepper motor drivers: https://www.youtube.com/watch?v=pdbDDZlHsr0.

 

Check out my similar post for more info: https://forums.ni.com/t5/Motion-Control-and-Motor-Drives/Wiring-myDAQ-with-L298N-motor-drive-to-cont... 

0 Kudos
Message 2 of 7
(2,559 Views)

Hi, 

 

It looks like sbc-ls4075 has a stepper motor driver on it.  Just use PWM express VI to output a pulse from myRIO.  The frequency of pulse will control the speed of motor.  You'll need another digital output line to control the motor direction.  Check out a similar post here: https://forums.ni.com/t5/Motion-Control-and-Motor-Drives/Wiring-myDAQ-with-L298N-motor-drive-to-cont...

 

I did a similar project with myRIO a long time ago, with some Pololu A4988 stepper motor drivers: https://www.youtube.com/watch?v=pdbDDZlHsr0.  Have fun!

0 Kudos
Message 3 of 7
(2,589 Views)

Hi, 
Thank you very much for your reply.

And I also enjoyed the video you made. You seem to be very good at this field. I want to carry out my work with you.


Is only PWM required for control? No need for PID control?

 

And in fact, my final goal is to detect the change from the tilt sensor and drive the step motor to change the length of the linear in reverse or forward direction by that dimension.

If I don't know anything during this process, can I come to ask you a question?

 

Sincerly, xoonza19.

0 Kudos
Message 4 of 7
(2,585 Views)

Thanks very much, people on this forum are usually kind to respond to questions.  But to get the best results, the questions you ask should be well-defined, and you will get well-defined answers 🙂.  So yes, PWM is to have basic control of the motor, then you can have PID with PWM to have more advanced control, such as the closed-loop tracking with the tilt sensor.  

 

If you're new to PID, here's a great tutorial: https://www.ni.com/en-us/innovations/videos/10/building-a-pid-controller-with-your-computer.html

0 Kudos
Message 5 of 7
(2,566 Views)

I really really really hate how NI breaks everyone one of the links that have ever been posted in the forums.  Its so frustratiing!

 

0 Kudos
Message 6 of 7
(827 Views)

Hi Billybaru,

 

Indeed it is frustrating.  A lot of good content from ni.com can't be found anymore.  Luckily for the PID video tutorial I mentioned, it is also here on youtube:

 

Building a PID Controller with Your Computer

https://www.youtube.com/watch?v=fkbt85mBzuM

 

BR

John

Add motion to LabVIEW in 30min or less - TENET EMotion
Finding it hard to source NI hardware? Try NI Trading Post

0 Kudos
Message 7 of 7
(732 Views)