Setting Source and Configuration Channels
You can use NI-SWITCH to set the channel type. Set a channel as a source channel to provide additional software protection against unintentional damage to your system. Set a channel as a configuration channel to complete connections supported by the architecture of the switch, but unsupported in software.
Note The source channel type provides additional software protection when you use the niSwitch Connect Channels VI or the niSwitch_Connect function, the niSwitch Disconnect Channels VI or the niSwitch_Disconnect function, or scanning VIs/functions, but it does not provide additional protection when you manipulate relays directly using the niSwitch Relay Control VI or the niSwitch_RelayControl function. Thus, NI does not recommend combining these types of VI/function calls. |
To edit a channel type, use the niSwitch Property Node or one of the niSwitch_SetAttribute functions.
The following figure represents a source channel (ab0) and a configuration channel (ch0) in the niSwitch Property Node.
Source Channels
Set a source channel to indicate to the driver that a signal source is connected to the channel. NI-SWITCH does not allow two user-defined source channels to be directly or indirectly connected.
Note Switch modules with form C relays have a physical connection that always exists between the common (COM) and normally open (NO) or normally closed (NC) channel. NI-SWITCH may not reflect that connection in all cases, and hazardous or undesired connections can be created. For example, if you make a call to connect a COM channel to either an NO or NC channel, NI-SWITCH verifies that there are no source conflicts. However, operations such as the niSwitch Disconnect Channels VI or the niSwitch_Disconnect function or the niSwitch Disconnect All Channels VI or the niSwitch_DisconnectAll function may create connections that are not reflected in the software. |
Configuration Channels
Set a configuration channel to allow NI-SWITCH to use the channel for internal path creation. Creating a column-to-column connection will fail in a matrix if a row channel is not set as a configuration channel.
Note Configuration channels may also be referred to as "reserved for routing" in other switch APIs. |
Creating a Route
Refer the matrix in the following figure, and complete the following steps to create a route connecting C0 and C2.
- Create a path between C0 and C2—Use the niSwitch Property Node or the appropriate niSwitch_SetAttribute function to set r0 as the configuration channel.
- Create a route—Run the niSwitch Connect Channels VI or the niSwitch_Connect function with channel 1 and channel 2 set to c0 and c2, respectively.
- Repeat steps 1 and 2 for rows r1 and r2 as configuration channels.
The following figures represent the routes you can create using R0, R1, and R2 as configuration channels, respectively.