Community Documents

cancel
Showing results for 
Search instead for 
Did you mean: 

Optimize NI SwitchBlock Analog Bus Relay Life

Overview

The attached VI outlines code optimization techniques that extend the useful life of relays on your SwitchBlock module.

Description

The code has 5 subsections that demonstrate code optimizations to extend the life of your SwitchBlock relays when routing numerous signals through the same analog bus relay.  Normal routing techniques close/open analog bus relay(s) with each Switch Executive connect/disconnect call, but the code demonstrates how to eliminate some unnecessary bus relays.


  1. The first subsection contains code that will cycle the analog bus relays more than necessary because the analog bus relays are disconnected along with each route disconnect.
    realy1.png
  2. The second subsection performs the same action as the above code, but is better adapted for numerous sequential measurements.  This code still cycles the analog bus relays the same number of times as the code above, but is conceptually important for the recommended code.relay2.png
  3. The third subsection prevents unnecessary analog bus relay cycling because the analog bus relays don't disconnect with each route disconnect.relay3.png
  4. The fourth subsection is better adapted for numerous sequential measurements. It prevents unnecessary analog bus relay cycling, but note that it disconnects all connections not specifically defined in 'Connect'.
    really 4.png
  5. The  fifth subsection prevents unnecessary analog bus relay cycling. It only disconnects connections it creates, instead of disconnecting all existing connections. It is very useful when performing a set of sequential measurements as a subsection of an overall test architecture.relay5.png

Steps to Implement or Execute Code

This code is not executable as a whole, because it is intended for conceptual understanding. However, the individual subsections are executable if SwitchExecutive is properly setup.

  1. Select a subsection of code and place it in a new vi.
  2. Create a virtual device in Measurement and Automation Explorer.
  3. Replace the Virtual Device Name input of the ni Open Session.vi to match the name of the virtual device in Measurement and Automation Explorer.
  4. Configure Route Groups in NI Switch Executive.
  5. Replace "A," "B," etc with the names of your route groups.
  6. Run.

Requirements to Run

Software

  1. NI Switch Executive
  2. NI-Switch
  3. LabVIEW

Hardware

NI SwitchBlock

-John Sullivan
Problem Solver
Contributors