In-Position Band Functions
The in-position band functions are GetInPositionBand and SetInPositionBand (see Axis Position Adjustment). In-position band is the tolerance around a target position used to determine the IN_POSITION and AXIS_AT_TARGET states. If the absolute difference between the actual position and the target position is less than the in-position band, the module word reports IN_POSITION and AXIS_AT_TARGET values as follows:
-
The IN_POSITION bit is set after the axis has stopped (STOPPING status bit) at a target position and if the axis position is in the in-position band of the target position. It is not set to 1 if the position goes outside of the in-position band, or at the start of the next movement. It is not set to 1 during a Hold or FastStop, but is set when Halt has finished, aborting the movement profile. IN_POSITION is set to 0 while deactivated, and is set when re-activated.
-
AXIS_AT_TARGET is set after the axis has arrived at the end of a movement profile (PROFILE_END status bit) at a target position and the axis position is within the in-position band of the target position. It is not set to 1 if the position goes outside of the in-position band, or at the start of the next movement. It is not set if a Halt, FastStop, disable drive, or fault interrupts a movement profile before the axis stops at the target position, even if the axis position ends up within the in-position band of the target. Deactivating and re-activating the drive does not modify the state of the AXIS_AT_TARGET bit. This bit is not set to 1 if AXIS_POS_LIMIT or AXIS_NEG_LIMIT are set. AXIS_AT_TARGET is the same as IN_POSITION, except that:
-
it is not changed when the drive is deactivated.
-
it is set to 0 at the end of a halt and is also not changed after re-activating the drive,
-
it is set to 0 if the axis is at a limit,
-
it is checked after PROFILE_END is set while IN_POSITION is checked after STOPPING is set to 1.
The AXIS_AT_TARGET bit may not be set to 1 following the normal movement functions, such as Halt. Wait for PROFILE_END and IN_POSITION to be set, and then check for AXIS_AT_TARGET as a separate instruction.