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 increase speed of stepper motor

I have written a program to move stepper motor to clockwise and anticlockwise direction. I wanted to increase the speed of stepper motor which I'm unable to do. Please help me with this. I am attaching the VI.

0 Kudos
Message 1 of 9
(2,839 Views)

Hi canzie,

 

I wanted to increase the speed of stepper motor which I'm unable to do.

Maybe using a lower value for the wait function inside your FOR loops may help?

 

- Why do you need to cases for "clockwise" and "anticlockwise"? They only differ in just one bit! (Yes, just one boolean value…)

- Why don't you use AutoCleanup?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(2,837 Views)

I'd say the normal solution is to use the Counter out and simpy set a frequency, then it's very easy to change speed. With your current solution you'll need to change the Wait(s).

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 9
(2,834 Views)

Will you please elaborate it 

0 Kudos
Message 4 of 9
(2,826 Views)

As reference.
Counter.png

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 9
(2,819 Views)

But I am using LINX in that there is no such option of counter frequency.

0 Kudos
Message 6 of 9
(2,798 Views)

@canzie07 wrote:

But I am using LINX in that there is no such option of counter frequency.


Then you basically have to change the case to this. Remove the for loop and have it perform the case every X ms.

LinxBlink.png

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 9
(2,787 Views)

Sorry I didn't understand.

0 Kudos
Message 8 of 9
(2,778 Views)

Instead of having a For loop run 100 times, remove the for loop and let the whole program and Case run again and again, and switch the LED each time. The previous picture is the removed for loop with a feedback node for switching.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 9 of 9
(2,768 Views)