Structure of a MOVE Function
The basic structure of a movement function is as follows:
<Move function>(<movement type>, <target position>, <speed to target>)
where:
-
Move function is one of:
MoveImmed: aborts any movement profile in progress and moves to the new target position.
MoveQueue: blends a movement profile onto the end of a profile in progress to reach the new target position.
-
movement type is one of:
ABS_MOVE: Absolute movement (requires the axis to be referenced). .
The target position is taken as an absolute position value referenced from the source position. The movement takes the shortest route (take care if modulos are activated).
ABS_MOVE_POS: Absolute movement in the positive direction for axes with modulos activated or co-ordinated axes.
ABS_MOVE_NEG: Absolute movement in the negative direction for axes with modulos activated or co-ordinated axes.
ABS_MOVE_NO_ROLLOVER: Absolute movement for independant axes, configured with modulo. A value superior to the configured modulo can be reached.
INCR_MOVE: Incremental move. The target position is taken as an incremental value referenced from the current position (for a MoveImmed) or from the last blended target position (MoveQueue).
CONT_MOVE: Continuous move. The target position indicates the direction of a continuous motion profile that moves to the software limits.
-
target position is a real number which specifies the target position in the default position units of the axis.
-
speed to target is a real number which specifies the approach speed in the default velocity units of the axis.
The MOVE function initiates movement. The movement function will return to the application before the movement profile is complete. The application program uses the axis status bits (
%I) to determine the movement profile status. (See the
SERCOS language objects).
ABS_MOVE functions that specify a target position that is beyond the maximum or minimum position for the movement axis generate a MovementError since the movement axis cannot reach the target. INCR_MOVE move functions that generate a target beyond the limits do not generate a MovementError since the calculation of the target point may be delayed due to the movement queuing mechanism. Such INCR_MOVE movements are converted into a target position to reach the limit and will generate an AXIS_SUMMARY_FAULT when the limit is reached. Approach speeds that are greater than the maximum speed limit for a movement axis are converted into approach speeds at the speed limit.
The IN_POSITION and AXIS_AT_TARGET bits are set to 0 at the start of a movement. The RAMPING bit is set when the movement axis is commanded to accelerate or decelerate. The STEADY bit is set to 1 when the movement axis is commanded to move at a constant speed. STOPPING is set to 1 at the start of the deceleration to the target position. IN_POSITION is set to 1 when the actual position and the target position are within the in-position band after STOPPING has been set to 1. PROFILE_END is set to 1 when the controller commands the servo to remain at the target position. AXIS_AT_TARGET is set when the actual position and the target position are within the in-position band after PROFILE_END is set to 1. STOPPING will be set to 0 when the axis has reached the PROFILE_END and is IN_POSITION.