Route Specification Strings
- Updated2025-03-28
- 2 minute(s) read
Route Specification Strings
When you instruct TestStand to connect or disconnect routes defined in an NI Switch Executive virtual device, you must specify a route specification string. The syntax of a route specification string consists of a series of routes that ampersands (&) delimit. NI Switch Executive ignores white space characters between tokens in a route specification string.
The syntax for a route specification string is as follows:
routeOrGroup { & routeOrGroup } { & routeOrGroup } . . .
Where routeOrGroup is one of the following:
- Route name
- Route group name
- Fully-specified path—Enclosed in square brackets and consisting of a series of channels that "->" delimits. The following shows the format of a fully-specified path:
[ channel {-> channel } {-> channel} . . . ]
A channel must be one of the following:
- Channel alias name
- Unique name—A combination of the IVI device logical name and IVI channel name that a "/" delimiter separates
- IVI channel name
Channels on either end of a bracketed, fully specified path must not be a Configuration or a Hardwired channel. Only one end channel can be a Source channel. The inner channels in a route specification string must be either a Configuration or Hardwired channel. The following are examples of route specification strings:
[SampleMatrix1/c0->SampleMatrix1/r1->SampleMatrix1/c4]
[Scope->R3->SampleMatrix1/c6]
ArbToInput & ScopeToOutput
PowerDevice & [Scope->R3->UUT_Out]
To specify a route specification string in an expression, the expression must return a valid route specification string when TestStand evaluates the expression. The following are examples of expressions that return valid route specification strings:
"PowerDevice & [Scope->R3->UUT_Out]"
Locals.MyRouteGroupName + "& ScopeToOutput"
- You can use NI Switch Executive to find an available path at run time by slightly modifying the syntax. Remove the square brackets and replace them with the two endpoints of the route that a -> delimits.
- Any channel, other than an endpoint, within a route specification string must be reserved for routing or directly hardwired to one of the endpoint channels. Channels, other than endpoints, must not be configuration channels.
- When connecting a route, the list of channels may only include a single source channel either explicitly or implicitly by means of a previous connection. Attempts to connect two sources together will result in an error.
- You can use the SwitchFindRoute expression function to dynamically determine a physical route path at run time.