mpiControlDigitalIn

Declaration

int32_t  mpiControlDigitalIn(MPIControl     control,
int32_t bitStart,
int32_t bitCount,
uint32_t *state);

Required Header: stdmpi.h
Change History: Added in the 03.03.00

Description

mpiControlDigitalIn reads the current input state of one or more controller inputs.

control a handle to the Control object
bitStart the first controller input bit that will be returned by the function.
bitCount the number of controller bits that will be returned by the function.
*state the address of the current state of the inputs that is returned.
Return Values
MPIMessageOK

Sample Code

The following code shows how to get the state of controller input 1.

uint32_t input1;
mpiControlDigitalIn(control, 1, 1, &input1);

See Also

Controller I/O | mpiControlDigitalOutSet | mpiControlDigitalOutGet