Immediate Operations
The following VIs perform immediate operations:
- niSwitch Connect Channels
- niSwitch Disconnect Channels
- niSwitch Disconnect All Channels
- niSwitch Relay Control
The following functions perform immediate operations:
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.
To determine if the path you select is valid, NI-SWITCH refers to the topology you select in the niSwitch Initialize With Topology VI or the niSwitch_InitWithTopology function. If the path is invalid for that topology, NI-SWITCH returns an error. Refer to the topology of the switch in Devices to determine valid channel names. Alternatively, you can run the niSwitch Can Connect Channels? VI or the niSwitch_CanConnect function to determine if the path is valid without physically connecting the channels. Refer to the hardware diagram of the switch module in Devices to determine valid relay names.
Note You can configure channels as source or configuration channels. |
Connecting Channels
To connect channels, complete the following steps:
- Run the niSwitch Connect Channels 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.
Disconnecting Channels
To disconnect channels, complete the following steps:
- Run the niSwitch Disconnect Channels 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 All Channels
To disconnect all channels, run the niSwitch Disconnect All Channels VI or the niSwitch_DisconnectAll function.
Individual Relay Control
Caution Controlling individual relays voids the source-channel protection provided in the predefined topologies. |
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.