Programming the NI SwitchBlock in NI-SWITCH and NI-DAQmx

Publish Date: Sep 07, 2011 | 0 Ratings | 0.00 out of 5 | Print

Overview

The NI SwitchBlock is a new type of switch designed for large matrix test systems. It includes internal column expansion features to create matrices with more than 8,800 crosspoints in a single PXI chassis. To improve long-term system reliability, the NI SwitchBlock is shipped with the new NI Switch Health Center, which contains an integrated relay test, relay count tracking, and report generation tool. NI Switch Executive intelligent route management software enables large matrix application programming and includes a configuration wizard that accelerates development with the NI SwitchBlock.

Although National Instruments recommends using NI Switch Executive to program the NI SwitchBlock, it is also possible to program the NI SwitchBlock using the NI-SWITCH and NI-DAQmx driver APIs. This Developer Zone tutorial explains how to program the NI SwitchBlock with the NI-SWITCH and NI-DAQmx driver APIs.

Table of Contents

  1. The NI SwitchBlock Carrier and the Analog Bus:
  2. System Configuration Options for the NI SwitchBlock 
  3. Routing Signals Within One NI SwitchBlock Device:
  4. Routing Signals Between Multiple NI SwitchBlock Devices:
  5. Sharing Analog Bus Lines Between NI SwitchBlock Devices of Different Types
  6. Important links for getting started with NI SwitchBlock:

 

1. The NI SwitchBlock Carrier and the Analog Bus:

All NI SwitchBlock systems contain at least two components: one NI SwitchBlock carrier and one or more NI SwitchBlock relay cards.  Each relay card contains a single switch matrix of rows and columns. If there are multiple relay cards in one NI SwitchBlock carrier, individual matrices can be column expanded using the analog bus lines to create large matrices. 

The backplane of the NI SwitchBlock carrier features 16 analog bus lines that can be used to route signals between relay cards. Analog bus relays are located between the rows of the relay cards and their respective analog bus line on the backplane of the NI SwitchBlock carrier. The Following figure represents an NI SwitchBlock carrier with two relay cards.

Figure 1. NI SwitchBlock Carrier and Relay Cards.


The NI SwitchBlock carrier has analog bus expansion connectors on the left and right sides that, can join with the NI 2806 Expansion Bridge to enable analog bus sharing between multiple NI SwitchBlock carriers in a PXI chassis The NI 2806 Expansion Bridge can be used to expand the analog bus to up to four NI SwitchBlock carriers in a single 18-slot NI PXI chassis, holding a total of 24 NI SwitchBlock relay cards. The following figure represents an NI SwitchBlock carrier with NI 2806 Expansion Bridge. You can route a signal between NI SwitchBlock carriers using the NI 2806 Expansion Bridge, shown in the figure on the left. You must remove the analog bus cover before inserting the expansion bridge, as shown in the figure on the right.

Figure 2. NI 2806 Expansion Bridge

 

Back to Top

2. System Configuration Options for the NI SwitchBlock 

There are several different configuration options for NI SwitchBlock, which are divided into two categories: one NI SwitchBlock device, or multiple NI SwitchBlock devices. The following section explains the two categories. Refer to later sections of this document for more information on using NI-DAQmx and NI-SWITCH for specific applications.

One NI SwitchBlock Device 

This method is used to route signals within a single NI SwitchBlock relay card in an NI SwitchBlock carrier, or between multiple NI SwitchBlock relay cards within the same NI SwitchBlock carrier that have been combined into a single NI SwitchBlock device.

The following figure shows multiple relay cards in one NI SwitchBlock carrier that have been combined into a single NI SwitchBlock device.

Figure 3. One NI SwitchBlock Device in an NI SwitchBlock Carrier.

 

Multiple NI SwitchBlock Devices 

This method is used to route signals between multiple  NI SwitchBlock devices within the same NI SwitchBlock carrier, or between multiple NI SwitchBlock devices within multiple NI SwitchBlock carriers that are connected using the NI 2806 Expansion Bridge.

Figure 4 shows multiple relay cards in one NI SwitchBlock carrier that are combined into multiple NI SwitchBlock devices.  Figure 5 shows multiple relay cards in multiple NI SwitchBlock carriers combined using the NI 2806 Expansion Bridge. These two configurations are equivalent within software.

Figure 4. Two NI SwitchBlock Devices in the same NI SwitchBlock Carrier.

 

Figure 5. Multiple NI SwitchBlock Carriers Combined using the NI 2806 Expansion Bridge. 

Note: Refer to Configuring the NI SwitchBlock in MAX for information on combining multiple NI SwitchBlock relay cards into a single NI SwitchBlock device and combining multiple NI SwitchBlock devices within a single NI SwitchBlock carrier

 

Back to Top

3. Routing Signals Within One NI SwitchBlock Device:

The following sections describe two methods for programming a single NI SwitchBlock device using NI-DAQmx and NI-SWITCH: endpoint programming and explicit path programming.

Endpoint Programming:

In endpoint programming, specify two columns to connect and NI-DAQmx and NI-SWITCH will automatically find and connect a route between the specified columns.

Endpoint programming requires that all of the rows and analog bus lines within an NI SwitchBlock device be set as Reserved for Routing. NI-DAQmx and NI-SWITCH will automatically determine the best route between the columns using any combination of the lines that have been reserved for routing.  NI-DAQmx and NI-SWITCH will return an error if no path is available or if no lines have been reserved for routing.

The numbers and names of the rows and analog bus lines that must be reserved for routing will change based on the topology of the relay cards used. For example the NI 2810 has four rows per card and uses four analog bus lines while the NI 2811 has eight rows and uses eight analog bus lines. The correct names for all of the rows and analog bus lines must be used in the NI SwitchBlock device to correctly reserve all of the necessary paths for routing.

The following examples show how to use endpoint programming to route signals within a single NI SwitchBlock device composed of six NI 2810s.  These examples can be used with any NI SwitchBlock device and contain a subVI that automatically determines the correct naming for all of the rows and analog bus lines that must be reserved.

NI-DAQmx example for Single Device Endpoint connections

NI-SWITCH example for Single Device Endpoint connections

Explicit Path Programming:

In explicit path programming, each individual signal connection made must be specified. Explicit path programming does not require any path to be reserved for routing. This method provides additional customization by allowing selection of rows and analog bus lines to be used to connect signals.

To connect two columns (cX and cY) on the same relay card you must connect the cX to row CardMrN, and then connect cY to the same row CardMrN. The following figure shows how connections are made on a single relay card with NI SwitchBlock devices.

Figure 6. Connections on a Single NI SwitchBlock Relay Card.

To connect two columns on different relay cards, connect the column cX to row CardMrN on the first relay card, row CardMrN to analog bus line abZ on the first relay card, analog bus line abZ to row CardOrP on the second relay card, and row CardOrP to column cY on the second relay card. The following figure represents how connections are made between multiple relay cards on a single NI SwitchBlock device.

Figure 7. Connections Between Two Relay Cards on a Single NI SwitchBlock Device.

The following examples show connections between multiple relay cards using six NI 2810 relay cards combined into a single NI SwitchBlock device.

NI-DAQmx example for Single Device Explicit path connections

NI-SWITCH example for Single Device Explicit path connections

 

Back to Top

4. Routing Signals Between Multiple NI SwitchBlock Devices:

The following section describes how to route signals between multiple NI SwitchBlock devices in the same carrier, or between multiple NI SwitchBlock devices in two or more NI SwitchBlock carriers. 

To share signals between multiple NI SwitchBlock carriers, install the NI 2806 Expansion Bridge card between the two NI SwitchBlock carriers. Once the NI 2806 Expansion Bridge is installed, there is no difference between multiple NI SwitchBlock devices in a single carrier and multiple NI SwitchBlock devices in multiple carriers.

Analog bus sharing must be enabled on each analog bus line used to share signals between multiple NI SwitchBlock devices. Enabling Analog Bus sharing removes the default software setting that restricts two devices from connecting to the same analog bus line simultaneously.

Note: If two NI SwitchBlock devices are connected to the same analog bus line at the same time without Analog Bus Sharing enabled, NI-DAQmx and NI-SWITCH will return an error and not connect the second NI SwitchBlock device to the analog bus.

There are two different ways to program the NI SwitchBlock devices after analog bus sharing has been enabled: endpoint programming and explicit path programming.

Endpoint programming:

Endpoint programming is used to connect multiple NI SwitchBlock devices. To use endpoint programming, specify the two columns to connect and the analog bus line used to connect them. NI-DAQmx and NI-SWITCH will automatically find and connect a route between the columns and the analog bus specified.

Endpoint programming requires that the rows on each NI SwitchBlock device are configured as Reserved for Routing, and that Analog Bus Sharing is enabled for all of the analog bus lines on each device.

Naming of rows and analog bus lines will vary based on the topology of the relay cards used. For example, the NI 2810 has four rows per card and uses four analog bus lines while the NI 2811 has eight rows and uses eight analog bus lines. The correct names for all of the rows and analog bus lines used in an NI SwitchBlock device must be specified to reserve all of the necessary paths for routing and enable analog bus sharing.

The following examples show how to use endpoint programming to route signals between two NI SwitchBlock devices, each containing three NI 2810 relay cards. These examples can be used with any two NI SwitchBlock devices. The examples contain a subVI that automatically determines the correct naming for all of the  reserved rows and analog bus lines.

NI-DAQmx example for Multiple Device Endpoint connections

NI-SWITCH example for Multiple Device Endpoint connections

Explicit Path Programming:

In explicit path programming, each individual signal connection made must be specified. Explicit path programming does not require any path to be reserved for routing. This method provides additional customization by allowing selection of  rows and analog bus lines to be used to connect signals.

Analog bus sharing must be enabled on all analog bus lines on each NI SwitchBlock device to route signals between the devices. Enabling Analog Bus sharing removes the default software settings that restrict two devices from connecting to the same analog bus line simultaneously.

Note: If two NI SwitchBlock devices are connected to the same analog bus line at the same time without Analog Bus Sharing enabled NI-DAQmx and NI-SWITCH will return an error and not connect the second NI SwitchBlock device to the analog bus.

To connect two columns (cX and cY) on the same relay card, connect the column cX to row CardMrN, and then connect column cY to row CardMrN. 

To connect two columns on different relay cards in the same or different NI SwitchBlock devices, connect the column cX to row CardMrN on the first relay card, row CardMrN to analog bus line abZ on the first relay card, analog bus line abZ to row CardKrP on the second relay card, and row CardKrP to column cY on the second relay card.

The following examples show how to route a signal between two NI SwitchBlock devices, each containing three NI 2810 relay cards. These examples can be used with any two NI SwitchBlock devices. The examples contain a subVI that automatically determines the correct naming for all of the reserved rows and shared analog bus lines.

NI-DAQmx example for Multiple Device Explicit path connections

NI-SWITCH example for Multiple Device Explicit path connections

 

Back to Top

5. Sharing Analog Bus Lines Between NI SwitchBlock Devices of Different Types

Analog bus lines between NI SwitchBlock relay cards of different types can be shared as long as they have the same wire mode.

For example, the NI 2815 is a four row, 1-wire module that connects to analog bus lines ab0-3, and the 2816 is an eight row, 1-wire module that connects to analog bus lines ab0-7.

The first four analog bus lines (ab0-3) can be shared between the NI 2815 and NI 2816 and used to route signals between them. However, analog bus lines ab4-7 can only be shared with the NI 2816 or other 1-wire NI SwitchBlock relay cards with at least 8 rows.

NI SwitchBlock devices of different wire modes cannot share analog bus lines.  For example, the NI 2816 is an eight row, 1-wire relay card and cannot share analog bus lines with the NI 2813, a four row, 2-wire relay card.  Though both devices use eight analog bus lines, NI-DAQmx and NI-SWITCH will not allow analog bus sharing to be enabled between these devices.

Note: Different wire mode sharing can be accomplished by using lower-level relay control functions. These functions bypass all automatic software settings.

 

Back to Top

6. Important links for getting started with NI SwitchBlock:

Getting Started with the NI SwitchBlock

NI SwitchBlock Hardware Architecture

Programming the NI SwitchBlock

Connecting to the NI SwitchBlock

Watch the "Programming the NI SwitchBlock" Webcast

Back to Top

Bookmark & Share


Ratings

Rate this document

Answered Your Question?
Yes No

Submit