MPI 04.00 Reference >> mpiMotor
mpiMotorDedicatedIn
Declaration
int32_t mpiMotorDedicatedIn(MPIMotor motor,
int32_t startBit,
int32_t bitCount,
uint32_t *state);
Required Header: stdmpi.h
Change History: Added in 03.02.00. mpiMotorDedicatedIn replaced mpiMotorIoGet.
Description
mpiMotorDedicatedIn function reads the current state of one or more dedicated input bits.
Note: mpiMotorDedicatedIn replaced mpiMotorIoGet in the MPI library.
motor | a handle to the Motor object |
---|---|
startBit | the first dedicated in bit that will be returned by the function. |
bitCount | the number of dedicated in bits that will be returned by the function. |
*state | the address of the current state of the inputs that is returned. |
Return Values |
---|
MPIMessageOK |
SampleCode
Example – Read the dedicated Home input. int32_t state; mpiMotorDedicatedIn(motor, MPIMotorDedicatedInHOME, 1, &state);