DAQmxSwitchGetMultiRelayCount

NI-DAQmx C Functions

DAQmxSwitchGetMultiRelayCount

int32 DAQmxSwitchGetMultiRelayCount (const char relayList[], uInt32 count[], uInt32 countArraySize, uInt32 *numRelayCountsRead);

Purpose

Returns the number of times a set of relays have been actuated. Use this function to track relay lifetime and usage. You must set the waitForSettling parameter of Switch functions to TRUE to obtain an accurate relay count.

Parameters

Input
Name Type Description
relayList const char [] The set of relays you want to query.
countArraySize uInt32 The size of count. If you pass 0, this function returns the number of samples needed to allocate.
Output
Name Type Description
count uInt32 [] Number of times each specified relay has been actuated. The order of this array depends on the order of relayList. If you pass NULL, this function returns the number of samples needed to allocate.
numRelayCountsRead uInt32 * The number of relay counts 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));