DAQmxSwitchCloseRelays

NI-DAQmx C Functions

DAQmxSwitchCloseRelays

int32 DAQmxSwitchCloseRelays (const char relays[], bool32 waitForSettling);

Purpose

Closes the specified relays. If you set waitForSettling to TRUE, this function waits only after closing all relays. If you want to wait for settling after closing each relay, use this function multiple times to close each relay separately.

When you operate relays directly, you circumvent the protection that channel usage types offer. Avoid using this function when you use the DAQmxSwitchConnect function or the DAQmxSwitchDisconnect function. This function does not pass the changes you make to those functions.

Parameters

Input
Name Type Description
relays const char [] A set of relays to close.
waitForSettling bool32 If TRUE, this function waits for the switches to settle before returning. If FALSE, the function returns immediately after the operation.

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 positive value indicates a warning. A negative value indicates an error.