NI Home > Community > NI Discussion Forums

Motion Control and Motor Drives

Showing results for 
Search instead for 
Do you mean 
Posts: 1

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.
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

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,477

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

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

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.


Active Participant
Posts: 250

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!

Posts: 1

Re: Controlling a Stepper Motor with LabVIEW

 I am new to labview .......... plz tell me how to control stepper motor motion

in labview


Posts: 93

Re: Controlling a Stepper Motor with LabVIEW

Hi Sahiba,


This thread is pretty old, so I would recommend making a new thread on our motion control forum so that people in the community reply:


I would also specify what hardware you actually have (controller, drive, etc.), or if you are looking to purchase hardware; knowing whether you are using NI-Motion or NI SoftMotion would be useful information as well - and if you already have the hardware and drivers, there are a lot of good examples in the Example Finder in LabVIEW (Help>>Find Examples). What version of LabVIEW are you using? There are many different considerations when troubleshooting a motion system, so as much information as you can provide would be helpful for us to help you get started!

Rahul B.
LabVIEW Communications Product Manager
National Instruments
Posts: 8

Re: Controlling a Stepper Motor with LabVIEW

I am a graduate student in University of Peireus in Greece , my teacher want to create a project with 3 controlling stepper motors (3 axis x,y,z ) to  get airborne measurement of an air tunnel  , also he want to control the steppers motors with labview specifically with coordinates x , y , z . I have no idea about the programming for this kind , so I want your help because I am helpless in this project . If I success in this project I will get my degree.