Error Limit and Limit Switch Errors

Resolving Error Limit Errors

An error limit error occurs when the position error exceeds the error limit trigger for more than the error limit duration (in seconds). When these conditions are satisfied, the error limit action occurs. (The error limit action can be set to NONE.)

Find out what caused the error limit

  In order to resolve the error limit errors, you need to know what caused the error limit. Error limits usually fall into three catagories:
  1. Not enough power was available.
    It can be caused by an excessive acceleration, the power being turned off, the amplifier not being enabled, or other similar problems.

  2. The control system was not behaving as expected.
    If the servo system goes into oscillation, then an error limit can be tripped. Oscillations can arise in servos that are not tuned properly or from abnormal external problems.

  3. The position error limit and/or duration are not properly set.
    You will only want an error limit error when there is truly a problem. Make sure that the position error limit and duration are appropriately set to avoid false errors.

Decide on a course of action

  These actions depend on what caused the problem. Based on the causes listed above, typical solutions would be:
  1. Fix the power problem. Make an appropriate adjustment such as reduce the acceleration, turn the power on, enable the amplifier, etc.

  2. Make sure that the control system is tuned correctly.

  3. When the system is working normally, observe the position error and set an appropiate error limit and duration for your system.

Error Limit Duration

  Most systems use an error limit duration of zero. If you have a system that can suffer from periodic, short-term disturbances, which are normal and acceptable behavior, you may want to set the error limit action to slightly wider than the disturbance. This will ensure that an error limit error is not generated after each allowable disturbance.

Error Limit Actions

  It is important that correct error limit actions are chosen. Position error limit errors are serious, and require appropriate actions.
  • Abort
    This is the most common error limit action. Since almost all cases of error limits indicate that the servo is not working properly, you will want to shutdown the servo by using the Abort action.

  • E-Stop and Stop
    These actions try to slow the servo down under servo control. Since an error limit indicates that you probably do not have valid servo control, these are not recommended choices.

  • None
    This is a poor error limit action because it does nothing to stop the servo during a servo malfunction. If you are doing something where you expect the servo to have a large position error, it is much safer to set the position error limit to a value that should not be triggered.

Clearing the Error Limit

When you have eliminated the cause of the error limit problem, clear the Motion Supervisor state in Motion Console (Motion Supervisor Summary > Actions > Clear Fault) or in your application code (mpiMotionAction(motion, MPIAcionReset)).


The command position equals actual position (CMD=ACT) feature makes for a much safer situation when enabling a motor. CMD=ACT (when enabled) sets the command position equal to the actual position when the motor amplifier is disabled. This eliminates the problem where the motor is moved while disabled and the motor immediately servos to the old command position upon enabling the servo (often violently).

While CMD=ACT makes things safer, it can take some thinking to expect all its actions in your program. Here are the key things that CMD=ACT does that you should be aware of when making your program. It is mentioned here, because CMD=ACT can affect the position error dramatically.

  • CMD=ACT can be enabled or disabled. In Motion Console, you can enable or disable it at (Motor Summary > Config > Amp Disable Action). In the MPI, you can do the same thing by setting MEIMotorConfig.disableAction using mpiMotorConfigGet/Set.

When CMD=ACT is enabled:

  • When the motor amp is enabled, the actual position reflects the encoder and the command position reflects the trajectory calculator.

  • When the motor amp is disabled, the actual position reflects the encoder and the command position is set the same as the actual position every servo sample. This makes it so that when the servo is enabled, it servos to its current position, not an old position.

  • When the motor amp is disabled and a move is commanded, the command position is set by the commanded move, until the move is done. When the move is done, the commanded position is set to the actual position again. This is so that if a move is commanded while the amp is off, the position error can be triggered, causing an error. A position error should occur here because the motor is not following the commanded position because the amp is off.

CMD=ACT is for your safety and your machine's safety. We recommend that you use this feature. You should make sure that you understand how this feature works so you can make your program work with the CMD=ACT feature smoothly.

Limit Switch

A limit switch error occurs when a hardware limit switch is continuously triggered for a limit switch duration (in seconds), subject to the Direction Sensitivity described below.

Find out why the limit switch error occurred

  Most systems should not trigger the limit switch under normal operation. Here are some examples of why the limit switch might have been triggered:
  1. The system was commanded to move outside the valid travel of the mechanical system.

  2. The servo system became unstable and the stage triggered the limit switch in an uncontrolled motion.

  3. Excessive noise triggered the limit switch.

  4. The limit switches are being used instead of home switches.

Decide on a course of action

  Sample solutions to the problems stated above are shown here:
  1. Do not command the system to move somewhere it cannot physically travel.

  2. Make sure that the control system is correctly tuned.

  3. Fix the noise issue or set the duration attribute long enough to ignore the noise.

  4. Running into a limit switch is OK here. Keep the direction sensitivity info below in mind when exiting the limit switch.

Limit Switch Error Actions

  It is important that correct limit switch error actions are chosen. Limit switch limit errors can be serious, and require appropriate actions.
  • Abort
    Using an Abort action on a limit switch will simply turn off the amplifiers when the limit switch is triggered. Beware that if the stage is moving quickly, or there is little friction in the system, the stage can move for quite a while or hit hard stops after the abort has occurred.

  • E-Stop and Stop
    These actions try to slow the servo down under servo control. These are common limit switch actions. The thinking is that the stage should stop upon finding the limit switch before hitting a hard stop. A problem with this is that the stage can be moving too fast to stop before hitting the hard stop and the E-Stop action will actually result in the stage commanded to position into the hard stop. This will result in motor heating and motor failure if nothing is done to resolve the problem in a timely manner.

  • E-Stop, Abort
    This action is an improvement on E-Stop, as it aborts the axis after the E-Stop period has expired. This means that the E-Stop commands the stage to slow, as intended, then aborts the axis, turning off the amplifier. This avoids the motor heating on commanding into a hard stop as described above in E-Stop and Stop.

  • None
    This is a valid action if you have an axis that does not have hard stops. Some rotating lenses have no hard stops to worry about, for example. Do not use the None action if you have limit switches. The controller does NOT do anything upon seeing the limit switch trigger with a None action.

Direction Sensitivity

  The Pos and Neg limit inputs are direction sensitive and will behave as follows:
  • When a hardware limit switch triggers, a hardware limit switch error will occur.

  • While a hardware limit switch is triggered, the error is cleared and a motion commanded in the same direction as the limit switch (ex: a positive limit switch when commanding a positive move), a limit switch error will occur.

  • While a hardware limit switch is triggered, the error is cleared and a motion is either commanded in the opposite direction as the limit switch or not at all, a limit switch error will not occur.

Duration Attribute

The duration attribute requires that the limit switch is triggered continuously for the time specified by duration. This can be useful if you occassionally have a rougue noise spike that will give you a false trigger on the limit switch. Be careful when using the duration parameter, because it will delay the limit switch action by the amount of time specified in duration. It is usually a better solution to fix the noise condition rather than using a duration attribute.

Clearing the limit switch error

When you have eliminated the cause of the error limit problem, clear the motion supervisor state in Motion Console (Motion Supervisor Summary > Actions > Clear Fault) or in your application code (mpiMotionAction(motion, MPIAcionReset)). If you clear the error, the controller will allow motion to be commanded out of the limit switch. The conditions on when the limit switch error will be triggered again are set by the direction attribute discussed above.

See Also:


       Legal Notice  |  Tech Email  |  Feedback
Copyright ©
2001-2021 Motion Engineering