Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 68979

Stepper Motor and LabVIEW - Loop

$
0
0

Hi guys, 

I am trying to control a Stepper Motor using a NI 6008. I've done a little research and I know that there are some problems using the 6008 with a stepper motor, but for my project it should work just fine.

 

What I need:

A VI that will control a stepper motor and rotate the motor to the angle typed. The motor has an increment of 7.5 degrees. I construct a VI that will rotate the motor to the desired angle everytime I press the button "GO". But It only works for the first time that I press "GO".

 

The problem:

After the first iteration, if I press "GO" again, it won't apply voltage to the next pin, because it restarts the loop. And that causes the motor to go crazy.

 

The solution: (that I am not sure how to implement)

Make the motor go back to the initial position when I press the button "RESET". In the case, everytime I want to change the angle, I just have to press "RESET" and then "GO", and the motor would go to the desired position. Or even better: when I press the "GO" button the motor would automatically go back to the initial position, and then go to the desired position.

BTW: I would like to go back to the initial position without having to do a 360 loop. I know how to do that.

 

The VI that I created is attached to this message.

Please HELP.

Thanks.


Viewing all articles
Browse latest Browse all 68979

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>