MPI 04.00 Reference >> mpiMotor
mpiMotorDedicatedIn
Declaration
long mpiMotorDedicatedIn(MPIMotor motor,
long startBit,
long bitCount,
unsigned long *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.
long state;
mpiMotorDedicatedIn(motor,
MPIMotorDedicatedInHOME,
1,
&state);
