Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
4 ratings:
 4.75 out of 5     Rate this Document

Following Error in a Motion Control System

Primary Software: Driver Software>>NI-Motion/FlexMotion
Primary Software Version: 7.6
Primary Software Fixed Version: N/A
Secondary Software: Utility Software>>FlexMotion Servotune, Utility Software>>Measurement & Automation Explorer
Hardware: Motion Control>>Controllers

Problem:
What is following error, and how does it affect my motion application?

Solution:
What is following error?
NI 73xx motion controllers contain an on-board PID control loop that allows them to use position and velocity feedback to adjust their command signal. This feedback, read from either analog voltage or pulse-train encoder signals, indicates the actual position/velocity of the motor. The controller compares its commanded signal to the feedback signal to verify that the motor is following the command. The difference between these values is called the following error.

Why does my application report that the following error limit has been exceeded when I command a move?
There is an adjustable limit to the allowed following error during a move. When the limit is exceeded, an error condition is created that reports a fault on this limit. A following error condition can be caused by any combination of mechanical defects, improper inputs/outputs, and control loop flaws. Although following error conditions can be difficult to debug, the most common causes are listed below.
  • Cause 1: Encoder input resolution is set incorrectly
    To increase feedback accuracy, NI motion controllers read every edge of an encoder feedback signal. With a quadrature encoder, this results in four edges (rising and falling on lines A and B) for every quadrature pulse of the encoder. Thus, if your quadrature encoder is rated at 2000 quadrature pulses per revolution, the controller will actually read 8000 edges per revolution – and each of these is considered a count.

    When setting the Encoder Counts Per Revolution input in Measurement and Automation Explorer (MAX), it is common to mistake this value for the encoder's physical resolution. Instead, this setting needs to hold the corresponding number of counts read by the controller, which is four times that resolution.

  • Cause 2: Command/Feedback wires reversed
    When a command is issued in the positive direction, does the feedback signal return a positive movement? If the feedback signal indicates negative movement, either the polarity of the analog output to the motor or the phase (A, B) of the encoder has been switched. Verify the proper wiring connections to remedy this situation.

    If the polarity of your encoder is reversed, you can also switch the polarity in MAX. To change the polarity of your encoders, select the axis on which the problem is occurring and find the encoder entry. On the encoder tab change the polarity of either A or B, but not both and the index if it is being used.

  • Cause 3: Improperly tuned PID loop in a servomotor system
    Because NI servomotor controllers are designed for use in varied applications, the PID control loop must be configured for use in each specific situation. Properly tuning the loop (setting the Kp, Kd, Ki, etc. parameters) in MAX is necessary to ensure that the motor will respond as expected. If the system responds to a command by vibrating or moving erratically, the control loop may be out of tune. Considerations for tuning your motion system can be found in Understanding Servo Tune.

  • Cause 4: Commanding a move that is too fast
    A very high-velocity move requires a responsive motion system. If high-velocity or high-acceleration commands regularly result in following error conditions, the motor/stage setup may be incapable of reaching the target velocity or acceleration. (Causes vary widely, and could include excess friction, misaligned mechanical parts, or insufficient motor torque.) It may be necessary to adjust the mechanical setup or command a lower velocity/acceleration.

How do I change the maximum allowed following error?
Under Trajectory Settings in MAX, the following error can be set for each axis. Also, when commanding moves using the 1-D Interactive or 2-D Interactive screens in MAX, navigate to the Advanced tab. In the Advanced Trajectory Parameters group, adjust the value labeled Following Error.

When using the FlexMotion API for LabVIEW, use the Load Following Error.flx VI to set the number of counts allowed.

When programming in C or Visual Basic, use the flex_load_follow_err function.

Related Links:
Developer Zone Tutorial: Understanding Servo Tune
KnowledgeBase 491HBUP9: Closed Loop Stepper Movement is Inaccurate
KnowledgeBase 320HJPOV: Motor Spins at Full Torque Until it Trips a Following Error on the 734x or 735x

Attachments:





Report Date: 10/17/2005
Last Updated: 05/12/2008
Document ID: 3QGEF7D3

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit