NI Home > Community > NI Discussion Forums
Steve J
Posts: 1
0 Kudos

Controlling a Stepper Motor with LabVIEW

Hello.  I am looking to control 2 stepper motors using a LabVIEW program.  The stepper motors are from LinEngineering and the stepper motor driver is from Peter Norberg Consulting.  I'm going to use the stepper motors to drive 2 linear actuators with a pitot tube mounted on them so I can take various measurements of air velocity at different points.  It's been awhile since I've written code in LabVIEW and I was wondering if anyone could help get me started?  I don't really care what speed the motors run at or any of that, I just need a program that can run these stepper motors.  Thanks.
Brandon M
Posts: 81

Re: Controlling a Stepper Motor with LabVIEW

Hi Steve,

What motion controller are you using?  Is it an NI board?  Do you have the NI-Motion drivers installed?  If you do, there will be examples under the Motion directory in Example Finder, such as Simple One-Axis Move.VI.

Please let me know what motion controller you have so that I may give you further assistance.
Brandon M.
Applications Engineer
National Instruments
Posts: 2
0 Kudos

Controlling two Stepper Motor with LabVIEW via DAQ PCI 6036E

I am looking to control 2 stepper motors using a LabVIEW program via DAQ PCI 6036E,so I need help how to do that?
Thank you
Trusted Enthusiast
Posts: 2,475
0 Kudos

Re: Controlling two Stepper Motor with LabVIEW via DAQ PCI 6036E

Please have a look at this thread. Using the counters of a E- or M-Series board to control a stepper motor is not recommended, as this method doesn't provide features that are typically required for a motion control application (e. g. accelerate and decelerate moves to avoid step loss, reliable limit switch and following error tracking,...)

Best regards,

Jochen Klier
National Instruments
Posts: 19
0 Kudos

Re: Controlling a Stepper Motor with LabVIEW

Steve J, Did you ever get a proper response from this posting? Did you ever get your LV program to work? I have a similar program to write in that it is also to use Peter's board.

email if you can

Posts: 24
0 Kudos

Re: Controlling a Stepper Motor with LabVIEW

[ Edited ]

Hi, I'm not sure whether this is the right place for asking this question or not and if not, then please guide me to the right place for asking such question. Thanks.

I have a stepper motor with the Vector Network Analyzer Anritsu MS4623B. I got it up and running with the LabWindows/CVI. I need to sync the motion of the stepper motor with my data acquisition. Basically, I have to acquire the data in a way that in the start the motor will come back to home position wherever it was and then I want to move it to the specific position to do the measurements (For Example, I want to measure the 40 GHz channel between 1m to 3m movement of a stepper motor on a linear positioning system (ball-screw)). I've interfaced the VNA with the PC using LabWindows/CVI and I've controlled the clockwise and anti-clockwise movements of the stepper motor using LabWindows/CVI but I'm unable to sync the system in a way that whenever I run the code, the motor will run back to the home position and then move to a specific measurement start position and move till the end position and in between do the increment and stop and acquire the data. Is there any one to help me please? It's really urgent please and I'm doing this thing first time so please guide me in a proper way. I shall really apprecaite that and will be highly obliged with you. Thanks for your time and concern.


Thanks and Regards.


Posts: 132
0 Kudos

Re: Controlling a Stepper Motor with LabVIEW

Hi AliT,


I see that you have multiple posts regarding the same issue. Please continue the discussion in your new thread here: Thanks!