Download Magellan® Motion Processor User`s Guide
Transcript
8 Motion Monitoring and Related Processing 8.5 Motion Complete Indicator In many cases, it may be advantageous to have the motion processor signal that a given motion profile is complete. This functionality is available in the motion complete indicator. The motion complete indicator appears in bit 0 of the Event Status register. Like all bits in the Event Status register, the motion complete bit is set by the motion processor and cleared by the host. When a motion is complete, the motion processor sets the motion complete bit to on. The host can examine this bit by polling the Event Status register, or the host can program an automatic follow-on function using a breakpoint, a host interrupt, or an AxisOut signal. In either case, once the host has recognized that the motion has been completed, the host should clear the motion complete bit. This action will enable the bit to indicate the end of motion for the next move. Motion complete can indicate the end of the trajectory motion in one of two ways. The first is commanded: the motion complete indicator is set based on the profile generator registers only. The other method is actual: the motion complete indicator is based on the actual encoder. The host instruction SetMotionCompleteMode determines which condition controls the indicator. When set to commanded, the motion is considered complete when both trajectory generator registers for commanded velocity and acceleration become zero (0). This normally happens at the end of a move when the destination position has been reached. It may also happen as the result of a stop command (SetStopMode command), a change of velocity to zero (0), or when a limit switch event occurs, or after a motion error occurs. When set to actual, the motion is considered complete when all of the following actions have occurred: The profile generator (commanded) motion is complete. The difference between the actual position and the commanded position is less than or equal to the value of the settle window. The settle window is set using the command SetSettleWindow. This same value may be read back using the command GetSettleWindow. See Section 8.7, “Settle Window,” for more information on the settled window. The two previous conditions have been met continuously for the last N cycles, where N is the programmed settle time. The settle time is set using the command SetSettleTime. This same value may be read back using the command GetSettleTime. At the end of the trajectory profile, the cycle timer for the actual-based motion complete mechanism is cleared, so there will always be at least an N cycle delay (where N is the settle time) between the profile generator being completed point-to-point, and the motion complete bit being set. The motion complete bit functions in the S-curve point-topoint trapezoidal point-to-point, and velocity contouring profile modes only. It does not function when the profile mode is set to electronic gearing. Appropriate software methods should be used with the actual motion complete mode, because it is possible that the motion complete bit will never be set if the servo is not tracking well enough to stay within the programmed position error window for the specified settle time. 62 Magellan Motion Processor User’s Guide