MPI 04.00 Reference >> mpiMotor

mpiMotorAmpEnableGet

Declaration

int32_t mpiMotorAmpEnableGet(MPIMotor  motor,
                          MPI_BOOL  *ampEnable) 

 

Required Header: stdmpi.h

Change History: Modified in 03.03.00.

Description

mpiMotorAmpEnableGet gets the state of the amp enable output for a Motor (motor) and writes it in the location pointed to by ampEnable. Note that the actual state of amp enable output also depends upon the actual wiring and the polarity chosen in the instance of the MPIMotorConfig structure.

If "ampEnable" is
Then
FALSE (0) the amp is disabled
TRUE (1) the amp is enabled
motor A handle to a motor object
*ampEnable A pointer to the ampEnable state (Enabled = TRUE or Disabled = FALSE)
Return Values
MPIMessageOK

Sample Code

int32_t enable;
returnValue = mpiMotorAmpEnableGet(motor, &enable);
msgCHECK(returnValue);
printf("Motor enable = %d", enable);

See Also

MPIMotorConfig | mpiMotorAmpEnableSet