DAQmxSwitchGetMultiRelayPos

NI-DAQmx C Functions

DAQmxSwitchGetMultiRelayPos

int32 DAQmxSwitchGetMultiRelayPos (const char relayList[], uInt32 relayPos[], uInt32 relayPosArraySize, uInt32 *numRelayPosRead);

Purpose

Returns the current position of a set of relays.

Parameters

Input
Name Type Description
relayList const char [] The set of relays you want to query.
relayPosArraySize uInt32 The size of relayPos. If you pass 0, this function returns the number of samples needed to allocate.
Output
Name Type Description
relayPos uInt32 [] The position of each specified relay. The order of this array corresponds to the order of relayList. If you pass NULL, this function returns the number of samples needed to allocate.
Value Description
DAQmx_Val_Open Relay is open.
DAQmx_Val_Closed Relay is closed.
numRelayPosRead uInt32 * The number of relay positions read by the function.

Return Value

Name Type Description
status int32 The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A negative value indicates an error.
For this function, if you pass NULL for the buffer or 0 for the buffer size, this function returns the number of samples needed to allocate.
For example,
malloc (n*sizeof(uInt32));