03-26-2007 08:16 PM
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?
03-28-2007 05:00 PM
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.
Regards,
Luke H
03-31-2007 09:16 PM
04-02-2007 05:01 PM - edited 04-02-2007 05:01 PM
Baho,
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:Message Edited by Luke H on 04-02-2007 05:05 PM