MPI 04.00 Reference >> mpiMotor

mpiMotorConfigGet

Declaration

int32_t mpiMotorConfigGet(MPIMotor        motor,
                       MPIMotorConfig  *config);

 

Required Header: stdmpi.h

Change History: Modified in 04.00.

Description

mpiMotorConfigGet gets a Motor's (motor) configuration and writes it into the structure pointed to by config.

motor A handle to an Motor object.
*config A pointer to the MPIMotorConfig structure.
Return Values
MPIMessageOK
MPIMotorMessageDEMAND_MODE_NOT_SET
MPIMotorMessageDEMAND_MODE_UNSUPPORTED

Sample Code

MPIMotorConfig motorConfig;
mpiMotorConfigGet(motor, &motorConfig);
motorConfig.demandMode = MPIMotorDemandModeTORQUE;
mpiMotorConfigSet(motor, &motorConfig);

See Also

MPIMotorConfig | mpiMotorConfigSet