MPIAxisMessage
Definition
|
typedef enum {
MPIAxisMessageAXIS_INVALID, MPIAxisMessageCOMMAND_NOT_SET,
MPIAxisMessageNOT_MAPPED_TO_MS,
}MPIAxisMessage;
|
Description
MPIAxisMessage is an enumeration of Axis error messages that can be returned by the MPI library.
MPIAxisMessageAXIS_INVALID |
|
The axis number is out of range. This message code is returned by mpiAxisCreate(...) if the axis number is less than zero or greater than or equal to MEIXmpMAX_Axes. |
MPIAxisMessageCOMMAND_NOT_SET |
|
The axis command position did not get set. This message code is returned by mpiAxisCommandPositionSet(...) if the controller's command position does not match the specified value. Internally, the mpiAxisCommandPositionSet(...) method requests the controller to change the command position, waits for the controller to process the request, and reads back the controller's command position. There are several cases where the controller will calculate a new command position to replace the requested command position. For example, if motion is in progress, stopped, or if the amp enable is disabled (when the motor's disableAction is configured for command equals actual), the controller will calculate a new command position every sample. To prevent this problem, set the command position when the motion is in an IDLE state and the motor's disableAction is configured for no action.
mpiAxisCommandPositionSet(...) Error Check
The mpiAxisCommandPositionSet(...) error check has been extended. If the controller is updating the axis's command position when mpiAxisCommandPositionSet(...) is called, MPIAxisMessageCOMMAND_NOT_SET will be returned. mpiAxisCommandPositionSet(...) checks for the following conditions:
- Axis is in a STOPPING, STOPPED, or MOVING state.
- Any motor associated with the axis has the disableAction configuration set to MEIMotorDisableActionCMD_EQ_ACT and the motor's Amp Enable is disabled.
- If the command position read from the controller does not match the requested position.
|
MPIAxisMessageNOT_MAPPED_TO_MS |
|
An axis is not mapped to the motion supervisor. This message code is returned by mpiMotionDelete(...), mpiMotionAxisListGet(...), or mpiMotionAxisRemove(...) when an axis is associated with a motion object, but not mapped to a motion supervisor. To correct this problem, map the axes to the motion supervisor in the controller by calling: mpiMotionAction(...) with MEIActionMAP or MPIActionRESET, mpiMotionStart(...), mpiMotionModify(...), or mpiMotionEventNotifySet(...). |
See Also
|