From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, 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: 

stepper/encoder question

We're going to do some closed-loop stepper control with the NI 7334
motion controller. What happens when the quadrature encoder has a
different number of counts per turn than the stepper? I can see two
issues:

1. the axis is "under encoded". It takes more than one motor step to
produce a change in the encoder reading
2. "over encoded": one step of the motor causes more than one count of
encoding, so that some encoder values are in effect not achievable.

How does the 7334 handle this? Say I tell it to go to position 10000,
but due to over-encoding, it will either see 9998 at one stepper
position, or 10002 at the next? Will it dither back and forth?

Say it takes 10 motor steps to induce a single count in encoded
position. Will the 7334 stop
at the first correct reading? Will there
be hysteresis, stopping at a different place if coming from the other
direction?

Since it's probably hard always to match encoders to steppers, my guess
is that the rule of thumb is to overencode, and that the 7334 knows how
to manage this. Is this right?

--
Jeffrey W Percival, Senior Scientist and Associate Director
Space Astronomy Laboratory, University of Wisconsin - Madison
1150 University Ave, Madison, WI 53706 USA
608-262-8686 (fax 608-263-0361) jwp@sal.wisc.edu
http://www.sal.wisc.edu/~jwp
0 Kudos
Message 1 of 3
(2,491 Views)
Jeffrey,

Wonderful quest/answer.

I am not on a LV machine right now but I believe there is a parameter that specifies "close enough".

Make sure the motor can give the action (i.e. repeatability) you need and over-encode. I believe part of repeatability spec's is hysteresis.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(2,491 Views)
It is very typical for a quadrature encoder to have a higher resolution than a stepper motor (otherwise, you aren't taking full advantage of your stepper's positioning control). The "under encoded" and "over encoded" cases are handled as described below:

In the Measurement & Automation Explorer (MAX), we can configure the FlexMotion controllers (PCI 7334, 7344). One of settings will be counts (encoder) per revloution and another stepper steps per revolution. With these two parameters, the software knows the ratio between the two and can determine the "closest" target position. This target position calculation is indeterminate of direction. Make sure that the two parameters that you have in MAX are correct or you will notice that your motor is always slightly o
ff.

Also, your final position will only be as accurate as your stepper motor can be that is why most amplifiers implement microsteppeing. This effectively adds steps between each full step of the stepper and increases the resolution of your stepper. Hope this helps.

Jack Arnold
Application Engineer
National Instruments
0 Kudos
Message 3 of 3
(2,491 Views)