**Note: This page includes switch code written with the switching palette of the NI-DAQmx driver. In the past, you were able to program NI switches with either the NI-DAQmx or NI-SWITCH driver. As of 2015, the NI-DAQmx switching palette is not recommended for new designs and NI strongly recommends using the NI-SWITCH driver for new designs. For more information, please review the following document: What Drivers Can I Use to Program My NI Switch Modules?
This example demonstrates how to make a series of connections on a switch module by sequentially connecting the channel in each element in Switch Channel 1 List to the channel in the corresponding element in Switch Channel 2 List.
Instructions for Running:
1. Change Switch Device and Topology Name as necessary.
2. Change each set of elements in Switch Channel 1 List and Switch Channel 2 List to the names of the channels on your switch module. If you do not intend to use all 4 connections, remove the unwanted connection by selecting Data Operations>>Delete element for Switch Channel 1 List and Switch Channel 2 List.
The Switch Channels I/O Name control lists the valid channels for the topology in which the switch module was last set. To list channels for another topology, reset the switch module to the new topology.
Block Diagram Steps:
1. Set topology.
2. Connect channel in specified element of Switch Channel 1 List to channel
in corresponding element of Switch Channel 2 List and wait for relay(s) to activate.
3. Disconnect previous connection and wait for relay(s) to activate.
4. Display errors (if any).
I/O Connections Overview:
Refer to the NI Switches Getting Started Guide and NI Switches Help for information about connecting signals to your switch module.