MPI 04.00 Reference >> mpiMotor
mpiMotorStatus
Declaration: mpiMotorStatus
MPI_RESULT mpiMotorStatus(MPIMotor motor, MPIMotorStatus *status);
Required Header: motor.h
Change History: Changed in 04.00.
Description
mpiMotorStatus reads a Motor’s status from the controller and writes it into the structure pointed to by status.
| motor | A handle to the Motor object. |
|---|---|
| *status | A pointer to a MPIMotorStatus structure. |
| Return Values | |
|---|---|
| MPIMessageOK | |
| MPIMessageARG_INVALID | |
Sample Code
/* Check motion status for any error conditions */
returnValue =
mpiMotorStatus(motor,
&status);
msgCHECK(returnValue);
printf("Motor Status: faultMask 0x%x feedbackMask 0x%x eventMask 0x%x\n",
status.faultMask,
status.feedbackMask,
status.eventMask);
