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: 

Stepper motor control

Hey all,

 

Currently designing a small project that utilizes stepper motors. I have encountered a small problem however, in the attached program you will see that I have it set up so that each coil of the stepper motor is powered accordingly and steps without problem. But this is only true if it steps in increments of 4, I understand this is because I have a decimal sequence of (5,9,10,6) which powers each coil as required. So if i for say input 12 steps it will run smoothly because it has gone through the full cycle. However when i input for example 3 steps it will always revert back to the start of the sequence. I.e it will step with 5,9,10 and stop there as it is 3 steps but when restarted instead of resuming from it last position it will restart at 5.

 

How would I over come this? My guess would be to implement a tracking system so the stepper motor knows where it stopped and continue on. I would like my stepper motor to move in steps of 1, pause momentarily and restart.

 

Any help would be appreciated as i am quite a beginner in regards to labview

0 Kudos
Message 1 of 2
(2,204 Views)

How are you running this code? If you want it to run continuously and take different values for your steps and pick up where it left off I would suggest you take a look at using a state machine. There are many examples of how to create a state machine including ones that ship with LabVIEW. Simply running this VI each time you want to do something will not work. You are in fact starting the program from scratch each time you run it.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 2
(2,182 Views)