MPI 04.00 Reference >> mpiMotion
Required Header: stdmpi.h
mpiMotionAction performs the specified action on the Motion object (motion).
|motion||a handle to the Motion object.|
|action||an enumerated value representing the action to be performed. Both the MPIAction and MPIAction enumerations are valid for the action argument.|
The mpiMotionAction(…) requires axes mapped to the Motion Supervisor, except for the actions MPIActionRESET and MPIActionMAP. If there are no axes mapped to the Motion Supervisor, mpiMotionAction(…) will return MPIMotionMessageNO_AXES_MAPPED. The MPIActionRESET and MPIActionMAP actions will automatically map the axes associated with the motion object.
If "action" is
|MPIActionABORT or MPIActionE_STOP or MPIActionE_STOP_ABORT||the Motion will perform an emergency stop and/or abort on all axes, and then change to the error state (MPIStateSTOPPING_ERROR to MPIStateERROR). Before starting another Motion, you must first make a call to mpiMotionAction(motion, MPIActionRESET). See MPIState.|
|MPIActionABORT||MotionAction will disable the PID control (or other algorithm), set the DAC output to the offset value, and disable the amp enable outputs. After the abort completes, the Motion will be set to the MPIStateERROR state. See MPIState.|
|MPIActionE_STOP||MotionAction will decelerate the axis (or axes) to a stop in the time specified by the "eStop" time. After the Motion stops, the Motion will be set to the MPIStateERROR state. See MPIState.|
|MPIActionE_STOP_ABORT||MotionAction will decelerate the axis (or axes) to a stop in the time specified by the "eStop" time. Next, MotionAction will generate an MPIActionABORT. After the abort completes, the Motion is set to the ERROR state. The E_STOP_ABORT first performs an E_STOP, and then performs an ABORT. The E_STOP decelerates the axis to a stop, then the ABORT disables PID control and disables the amp enable output.|
|MPIActionRESET||If the motion supervisor (motion) is in the error state (MPIStateERROR), the motion supervisor will attempt to clear the error and change to the idle state (MPIStateIDLE), so that motion supervisor can be restarted. If the cause of the error is not removed before resetting the motion supervisor, the fault will not clear when you call mpiMotionAction(...). If the error state was caused by an Abort action, then the command position of the associated axes will be set equal to the actual position during the Reset. See MPIState.|
|MPIActionRESUME||If the Motion is in the idle state (MPIStateIDLE), it will change to the moving state (MPIStateMOVING), and the Motion will resume if it was stopped by a prior call to mpiMotionAction(motion, MPIActionSTOP). See MPIState.|
|MPIActionSTOP||If the Motion is in the moving state (MPIStateMOVING), a STOP action will decelerate the axis (or axes) to a stop in the time specified by the "stop" time configuration. The motion state will transition to MPIStateSTOPPING during the deceleration and then to MPIStateSTOPPED after the motion completes. See MPIState.|
|MPIActionMAP||MotionAction will write the axis mapping relationship of the motion supervisor to the controller. This mapping is written automatically when mpiMotionStart(...) is called.|
/* Try to clear fault for a motion supervisor */ returnValue = mpiMotionAction(motion, MPIActionRESET); msgCHECK(returnValue);