From RSI - Robotic Systems Integration - SynqNet Systems

Contents

Axis Settling - Criteria, Interrupts and Status Bits

XMP

There are five types of generated interrupts related to motion: MOTION_DONE, MOTION_AT_VELOCITY, and IN_COARSE_POSITION, AT_TARGET, and SETTLED. Motion completion for a position move is indicated by a MOTION_DONE event, while motion completion for a velocity move is indicated by an MOTION_AT_VELOCITY event.

For both position moves and velocity moves, the firmware uses a settling time window to determine when to generate a motion completed event (to indicate that motion has finished on an axis).

For position moves, the firmware uses the settling time window to determine when an axis has reached the final target location and is stable.

For velocity moves, the firmware uses the settling time window to determine when an axis has reached the final velocity. This works because during ringing, the velocity is highest when the position error is lowest. (Velocity and position error are inversely-related.)

For Position Moves

A MOTION_DONE interrupt is generated by a position move only after both the position and velocity criteria have been met for the period specified by the settling time. To determine if motion has completed, position moves use both position and velocity criteria.

A MOTION_DONE interrupt is also generated by a velocity move only if the target velocity is zero and the velocity criteria have been met for the period specified by the settling time.

The default (factory) value for VelocityTolerance is 20,000,000 counts/sec. We included the ability to additionally use the velocity criteria for position moves because some users prefer to decide that an axis is "settled" only after the position error and actual velocity are both low enough.

For Velocity Moves

An MOTION_AT_VELOCITY interrupt is generated for a velocity move only after the velocity criteria has been met for the period specified by the settling time. To determine if motion has completed, velocity moves use only the velocity criteria (they don't use the position criteria).

Note that the motion completed interrupt generated this time is an MOTION_AT_VELOCITY interrupt rather than a MOTION_DONE interrupt. For velocity moves, MOTION_DONE interrupt will only occur after commanding a Stop() or if the target command velocity is zero.

Be aware that setting VelocityTolerance to 0 does not disable the velocity criteria. For high resolution encoders, setting VelocityTolerance to 0 makes it very difficult to meet the criteria of 0 counts of motion for settlingTime seconds.

Setting Time Parameters

Four Settling Time Parameters

XMP

For position moves, the generation of MOTION_DONE interrupts depends on three parameters:

          SettlingTime 
          PositionToleranceFine 
          VelocityTolerance 

MOTION_DONE interrupts are only generated when command = target or after STOP, ESTOP or ABORT events.

For velocity moves, the generation of AT_VELOCITY interrupts depends on two parameters:

          SettlingTime 
          VelocityTolerance 
  • The SettlingTime parameter specifies the amount of time (seconds) that a motion must be within the PositionToleranceFine band, in order for the motion to be considered complete (finished).
  • The PositionToleranceFine parameter is a tolerance (encoder counts), where we know a motion is complete if the motion settles within this tolerance.
  • The VelocityTolerance parameter specifies a band around the target velocity for velocity moves.
  • The PositionToleranceCoarse parameter, specifies a band around the final position.


Interrupts and Status Bits

IN_COARSE_POSITION

IN_COURSE_POSITION is TRUE whenever the absolute distance to the target (measured from the actual position to the final position) is less than or equal to the coarse position tolerance. If the target position is changed by commanding new motion on the fly, IN_COURSE_POSITION may be set and cleared more than once (causing multiple interrupts) during a single move.


AT_TARGET

AT_TARGET is TRUE whenever the command position is equal to to the target (final) position. If the target position is changed by commanding new motion on the fly, AT_TARGET may be set and cleared more than once (causing multiple interrupts) during a single move.

AT_TARGET is always FALSE for velocity moves (or moves using the FINAL_VEL attribute where the final velocity is non-zero).


IN_FINE_POSITION

After AT_TARGET, the evaluation of the settling criteria begins. When the settling criteria has been satisfied, IN_FINE_POSITION is TRUE.

The settling criteria are:

   *The absolute value of the position error is less than or equal to the fine position tolerance. 
   *The absolute value of the velocity is less than or equal to the velocity tolerance. 
   *Both of the above criteria has been satisfied for the settling time. Whenever either criteria 1 or 2 is not satisfied, SETTLED is cleared and the settling timer is reset. 

MOTION_DONE

MOTION_DONE will be true when all the settling criteria have been met, or the Axis goes to a STOPPED or ERROR state.

AT_VELOCITY

The velocity settling criteria are continuously evaluated during the constant velocity portion of the motion, for Velocity moves ONLY. Once the criteria has been satisfied, the MOTION_AT_VELOCITY bit is set to TRUE. MOTION_AT_VELOCITY is FALSE during any non-constant velocity portions of the motion.

The velocity settling criteria are:

 The absolute value of the velocity error is less than or equal to the velocity tolerance. 

Criteria 1 has been satisfied for the settling time. Whenever Criteria 1 is not satisfied, MOTION_AT_VELOCITY is set to FALSE and the settling timer is reset.

References: support.motioneng.com