Showing results for 
Search instead for 
Did you mean: 


Question 1:

I am trying to use an NI controller to drive a stepper motor with a potentiometer feedback. I can get the feedback to work in MAX. I then wrote a sample motion code in NI Motion. Here I found no options for the feedback to select. I used the auto-code function to create a Labview ".vi" file. When the code was generated, I saw no way to hook up feedback control there either. How do I close the loop on a motion device in Labview with the auto-coded sub-vi's? Is there some other way to control motion that looks more like a typical feedback system other than the autocode?

Question 2:

I have a noisy analog signal that I would like to filter and use in a Labview program. When I use the filter blocks and display it to a graph, it filters the data for a portion of time, discretely jumps back to zero and starts filtering again. The data looks good, but it has all of these discontinuities where the graph gets zero-ed out over and over again. How do I overcome this? Also, I have heard that there is some lag in the data when you filter it. Does this mean the signal can not be used for feedback control?

0 Kudos
Message 1 of 4

Hello Baho,

What motion card are you using?  When you say "auto-code," are you referring to NI-Motion Assistant.? If you have everything configured properly in MAX, then your LabVIEW code should work fine.  LabVIEW code will use the settings you have configured in MAX for feedback and everything.  Basically, you do not have to keep track of the feedback in software.  The feedback loop, or in the case of a stepper motor - the pull in moves, runs on the motion card rather than in software.

On your second question, this does not sound like normal behavior.  Could you please post a small bit of LabVIEW code on this thread that demonstrates the issue?

In the future, you will probably find a better response to your questions by posting to more product-specific boards.  For example, Question 1 would have probably fit best in the Motion Control and Motor Drives board, and Question 2 would have fit better on the Multifunction DAQ board.

Luke H

0 Kudos
Message 2 of 4
Thank you for the help. I am using a PCI-7332 2-Axis Controller hooked
up to a MID-7602 2-Axis Amplifier. We are using it to drive a linear
stepper motor with a potentiometer specially rigged to go underwater. I
have everything configured in MAX to work as it should and ran some
tests to verify. The auto-code I am referring to is the
NI-Motion-Assistant, and it gave me a very simple graphical code to use
in Labview. However, I wanted to adjust the gains on the feedback loop
to improve performance. I never found any gains to adjust. Am I to take
that as meaning that they can not be altered? If that is the case, what
sort of controller does it use, and what are the performance
characteristics of it if it is all hard-coded? Is there another way to
program a feedback loop in Labview where I can adjust the gains?

Thanks for the help!

0 Kudos
Message 3 of 4


The PCI-7332 is a stepper motor only controller.  Stepper motors do not have any sort of PID feedback loop.  Instead, stepper motors use something known as “pull in moves.”  Essentially what happens is the controller gets a command for a position.  It then sends the appropriate number of pulses to the drive for it to move that distance.  After the move is complete, the motion controller will use the position feedback to determine whether or not is has successfully moved to the appropriate position.  If not, it will try several times to “pull in” to the appropriate position.  The number of pull-in moves is settable in Measurement and Automation Explorer (MAX), as shown in this screenshot:

When you speak of feedback loop settings, I am assuming that you are interested in controlling acceleration and deceleration parameters as your controller attempts to reach a setpoint.  These settings can be adjusted in the Trajectory Settings as shown in the screenshot below:

After you change any settings in MAX, you will need to click Save and Initialize to see the effects.  

Luke H

Message Edited by Luke H on 04-02-2007 05:05 PM

Download All
0 Kudos
Message 4 of 4