MPI 04.00 Reference >> mpiMotion

mpiMotionCancelMove

Declaration

typedef enum MPIMotionCancelMoveAttrMask {
	MPIMotionCancelMoveAttrMaskNONE         = 0,
	MPIMotionCancelMoveAttrMaskMOVE_ID      = 1,
   MPIMotionCancelMoveAttrMaskLAST_MOVE_ID = 2,

} MPIMotionCancelMoveAttrMask;

typedef struct MPIMotionCancelMoveAttributes {
	int32_t	moveId;
} MPIMotionCancelMoveAttributes;

MPI_DECL1 MPI_RESULT MPI_DECL2
mpiMotionCancelMove(MPIMotion motion,
			MPIMotionCancelMoveAttrMask,
			MPIMotionCancalMoveAttributes);

 

Description

mpiMotionCancelMove has the ability to be able to cancel an appended move.  If the move can not be successfully canceled (perhaps, because the move has already begun), an error code should be returned.

A new method has been added to the Motion Supervisor object, called mpiMotionCancelMove, to accommodate this functionality.  It takes  as arguments a mask and attributes.

If the last move needs to be canceled, the mask is set to MPIMotionCancelMoveAttrMaskLAST_MOVE_ID and a NULL pointer for attributes is passed in. 

If a specific move referenced by a MoveID needs to be canceled, both the mask (set to MPIMotionCancelMoveAttrMaskMOVE_ID ) and the attributes pointer are passed in.

If the motion cannot be canceled, an error, MPIMotionMessageCANCELATION_FAILED is returned.

Notes:

  1. A MoveID of 0 is considered a “Default” Move Id. i.e. when a MoveID is not specified, MPI uses 0. To cancel a move, a moveID must be non-zero.
  2. All moves concatenated (with START or APPEND) to a canceled move are also canceled.
  3. If a “held” move is canceled, a MOTION_DONE event will be generated for the move (this is because the move has already been started).