niSwitch Connect Channels (Single) VI
- Updated2025-10-06
- 3 minute(s) read
Creates a path between channel 1 and channel 2. NI-SWITCH calculates and uses the shortest path between the two channels. Refer to Setting Source and Configuration Channels for information about channel usage types.

Inputs/Outputs
instrument handle
—
instrument handle identifies a particular NI-SWITCH session established with the niSwitch Initialize With Topology VI, the niSwitch Initialize With Options VI, or the niSwitch Initialize VI.
channel 1
—
channel 1 specifies one of the channel names of the desired path. Pass the other channel name as channel 2. Refer to Devices for valid channel names for the switch module. Examples of valid channel names are ch0, com0, ab0, r1, c2, and cjtemp.
channel 2
—
channel 2 specifies one of the channel names of the desired path. Pass the other channel name as channel 1. Refer to Devices for valid channel names for the switch module. Examples of valid channel names are ch0, com0, ab0, r1, c2, and cjtemp
error in (no error)
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
instrument handle out
—
instrument handle out identifies a particular NI-SWITCH session established with the niSwitch Initialize With Topology VI, the niSwitch Initialize With Options VI, or the niSwitch Initialize VI and used for all subsequent NI-SWITCH calls.
error out
—
error out contains error information. This output provides standard error out functionality. |
Details
If a path is unavailable between the two channels, NI-SWITCH returns the following errors:
| Error | Description |
|---|---|
| Explicit Connection Exists | The channels have already been explicitly connected by calling either this VI or the niSwitch Set Path VI. |
| Is Configuration Channel | One of the channels is a configuration channel. Error elaboration contains information about which of the two channels is a configuration channel. |
| Attempt To Connect Sources | Both channels are connected to a source. Error elaboration contains information about the sources connected to channel 1 and channel 2. |
| Cannot Connect To Itself | Channel 1 and channel 2 are identical. |
| Path Not Found | No paths between channel 1 and channel 2 are available. |
| Resource In Use | Channel 1 and/or channel 2 is in use. This error often occurs when one of the channels is set as a configuration channel and is in use or if one of the channels is a common multiplexer channel in use. |
instrument handle
—
channel 1
—
error in (no error)
—
instrument handle out
—
error out
—