Connection and Disconnection List Syntax
- Updated2025-11-20
- 2 minute(s) read
You can use connection lists and disconnection lists with niSwitch Connect Channels (Multiple) and niSwitch Disconnect Channels (Multiple) to create strings of one or more switching operation. For lists with multiple operations, commas separate each operation. NI-SWITCH validates the connection and disconnection lists, and aborts execution of the list if errors are returned.
Switching operations can connect and disconnect channels in one of two ways. Refer to the following table to determine the switching operation.
| Switching Operations | Syntax | Description |
|---|---|---|
| Specify Endpoints | channel1 -> channel2 | NI-SWITCH searches for an available path between endpoints to connect or disconnect. The two specified channels must be on the same device, and an available path must exist between them. |
| Specify Explicit Path | [channel1 -> channel2 -> channel3] | You define the endpoints and any intermediate channels of the path.* |
Connection and Disconnection List Examples
Example 1
If you want to create a connection or disconnection list with switching operations that specify endpoints and explicit paths, separate the switching operations with commas.
Syntax: Operation1, Operation2, Operation3
Example: c0 -> r0, [c1 -> r2 -> c5], r0 -> c4
Example 2
If a path exists between channel0, com0, and AB0, you can connect channel0 to AB0 by setting the channel type of com0 as a configuration channel.
Syntax: channel1 -> channel2
Example: channel0 -> AB0
Example 3
If you want to connect column 1 and column 5 of a matrix, and use row 2 to complete the connection, you must set the channel type of row 2 to a configuration channel before the connection is made.
Syntax: [channel1 -> channel2 -> channel3]
Example: [c1 -> r2 -> c5]
Related Information:
- Scan Lists
- Setting Source and Configuration Channels