Immediate Operations

NI Switches

Immediate Operations

The following VIs perform immediate operations:

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:

  1. Run the niSwitch Connect Channels VI or the niSwitch_Connect function.
  2. Set Channel 1 to one endpoint of the path you want to create.
  3. Set Channel 2 to the other endpoint of the path you want to create.

Disconnecting Channels

To disconnect channels, complete the following steps:

  1. Run the niSwitch Disconnect Channels VI or the niSwitch_Disconnect function.
  2. Set Channel 1 to one endpoint of the path you want to break.
  3. 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:

  1. Run the niSwitch Relay Control VI or the niSwitch_RelayControl function.
  2. 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.
  3. Set Relay Action to Open or Close.
  4. Run the niSwitch Close VI or the niSwitch_close function to end the session.