MPI 04.00 Reference >> mpiMotor
mpiMotorAmpEnableSet
Declaration
long mpiMotorAmpEnableSet(MPIMotor motor, MPI_BOOL ampEnable)
Required Header: stdmpi.h
Change History: Modified in the 03.03.00
Description
mpiMotorAmpEnableSet sets the state of the amp enable output for a Motor (motor) to ampEnable.
If "ampEnable" is |
Then |
---|---|
FALSE (0) | the amp will be disabled |
TRUE (1) | the amp will be 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
/* Turn motor off */ returnValue = mpiMotorAmpEnableSet(motor, 0); msgCHECK(returnValue); /* Turn motor on */ returnValue = mpiMotorAmpEnableSet(motor, 1); msgCHECK(returnValue);