![]() | Download Help (Windows Only) |
ViStatus niSwitch_Connect (ViSession vi, ViConstString channel1, ViConstString channel2);
Creates a path between channel1 and channel2. NI-SWITCH calculates and uses the shortest path between the two channels. Refer to Immediate Operations for information about channel usage types.
If a path is not available, the function returns one of the following errors:
![]() |
Note Paths are bidirectional. For example, if a path exists between channels CH1 and CH2, then the path also exists between channels CH2 and CH1. |
Name | Type | Description |
---|---|---|
vi | ViSession | A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls. |
channel1 | ViConstString | Input one of the channel names of the desired path. Pass the other channel name as channel2. Refer to Devices for valid channel names for the switch module. Examples of valid channel names: ch0, com0, ab0, r1, c2, cjtemp |
channel2 | ViConstString | Input one of the channel names of the desired path. Pass the other channel name as channel1. Refer to Devices for valid channel names for the switch module. Examples of valid channel names: ch0, com0, ab0, r1, c2, cjtemp |
Helpful
Not Helpful