mpiSqNodeDigitalInPtr
Declaration
long mpiSqNodeDigitalInPtr(MPISqNode sqNode, long bit, long *mask,
long **ptr);
Required Header: stdmpi.h
Change History: Added in 03.04.00.
Description
mpiSqNodeDigitalInPtr gets a controller memory pointer and mask of a digital input (bit on the SynqNet node sqNode) and writes them to the locations pointed to by ptr and mask. The memory pointer and mask obtained by this function can be used when setting up the data recorder or user limits.
sqNode | a handle to a SynqNet node object. |
---|---|
bit | an index to a node's digital input bit. |
*mask | a pointer to a bitwise mask that corresponds to the specified bit. |
**ptr | a pointer to a controller address that contains the digital input bit. |
Return Values |
---|
MPIMessageOK |
MPIMessageaARG_INVALID |
Sample Code
The sample code below shows how to set up the data recorder to record bit 5 on node 1.
long mask; long * pointer; mpiSqNodeDigitalInPtr( sqNode1, 5, &mask, &pointer );
void * points[MPIRecorderADDRESS_COUNT_MAX]; points[0] = pointer; long pointCount = 1; mpiRecorderRecordConfig(recorder, MPIRecorderRecordTypePOINT, pointCount, points );
See Also
mpiSqNodeDigitalOutPtr | mpiSqNodeAnalogInPtr | mpiSqNodeAnalogOutPtr | MPIMotorLimitConfig | mpiRecorderRecordConfig