mpiSqNodeDigitalIn

Declaration

int32_t mpiSqNodeDigitalIn(MPISqNode      node,
                        int32_t           bitStart,
                        int32_t          bitCount,
uint32_t *state );

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

Description

mpiSqNodeDigitalIn gets the current state of multiple digital inputs on the specified SynqNet node.

node a handle to a SynqNet node object.
bitStart the first bit.
bitCount the number of bits to be read.
*state a pointer to where the current state of the input bits is written to by this function.
Return Values
MPIMessageOK

Sample Code

The following MPI code will get the current state of digital inputs 3, 4, and 5 of Node 0 (in the example network these bits spread over segments 0 and 1):

int32_t x;
mpiSqNodeDigitalIn( sqNode0, 3, 3, &x );

See Also

Accessing Digital I/O | SQIO-DIN32DOUT32: Input Pinouts