Immediate Operations
- Updated2025-11-20
- 2 minute(s) read
The following VIs perform immediate operations:
- niSwitch Connect Channels (Single)
- niSwitch Connect Channels (Multiple)
- niSwitch Disconnect Channels (Single)
- niSwitch Disconnect Channels (Multiple)
- niSwitch Disconnect All Channels
- niSwitch Relay Control
The following functions perform immediate operations:
- niSwitch_Connect
- niSwitch_ConnectMultiple
- niSwitch_Disconnect
- niSwitch_DisconnectMultiple
- niSwitch_DisconnectAll
- niSwitch_RelayControl
When you use the immediate functions, NI-SWITCH determines if the path is valid and actuates the appropriate relays to make connecting and disconnecting channels easy for you.
Connecting Channels
To connect channels, complete the following steps:
- Run the niSwitch Connect Channels (Single) VI or the niSwitch_Connect function.
- Set Channel 1 to one endpoint of the path you want to create.
- Set Channel 2 to the other endpoint of the path you want to create.
Connecting Multiple Channels
To connect multiple channels, complete the following steps:
- Run the niSwitch Connect Channels (Multiple) VI or the niSwitch_ConnectMultiple function.
- Set the connection list to the paths you want to create. Use Connection and Disconnection List Syntax for valid connection list syntax and examples.
- Separate multiple operations with commas.
Disconnecting Channels
To disconnect channels, complete the following steps:
- Run the niSwitch Disconnect Channels (Single) VI or the niSwitch_Disconnect function.
- Set Channel 1 to one endpoint of the path you want to break.
- Set Channel 2 to the other endpoint of the path you want to break.
Disconnecting Multiple Channels
To disconnect multiple channels, complete the following steps:
- Run the niSwitch Disconnect Channels (Multiple) VI or the niSwitch_DisconnectMultiple function.
- Set the disconnection list to the paths you want to break. Use Connection and Disconnection List Syntax for valid disconnection list syntax and examples.
- Separate multiple operations with commas.
Disconnecting All Channels
To disconnect all channels, run the niSwitch Disconnect All Channels VI or the niSwitch_DisconnectAll function.
Individual Relay Control
To control individual relays, complete the following steps:
- Run the niSwitch Relay Control VI or the niSwitch_RelayControl function.
- Set Relay Name to the name of the relay you want to control. Refer to the hardware diagram of the switch for valid relay names.
- Set Relay Action to Open or Close.
- Run the niSwitch Close VI or the niSwitch_close function to end the session.