Example Code

NI SwitchBlock: DAQmx Example for Multiple Device Explicit Path Connections

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Modular Instrumentation

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview
This VI will make an explicit path connection from one column to another in multiple NI SwitchBlock devices using NI-DAQmx.

 
Description 

  1. Resets a switch device and sets its topology to the one you specify in Topology Name.
  2. Creates an array of row names and an array of analog bus names for your specific device.
  3. Allows the sharing of your analog bus over multiple devices.
  4. Makes multiple connections from one column to another as specified in the connection list on the front panel, and waits for the switch to finish closing.
  5. Handles any errors that have occurred.

 

 

Requirements

Software

    1. LabVIEW 2012 (or compatible)
    2. NI-DAQmx 9.3.5

Hardware

    1. NI SwitchBlock Module


Steps to Implement or Execute Code

  1.  Select your NI SwitchBlock device name, and ‘Configured Topology’
  2. Select the list of connections that you would want to make in the Connection List
  3. Repeat this for both your NI SwitchBlock devices
  4. Run the VI and the connections will be made as specified in your list of connections

 

 

Additional Information or References

VI Snippet

1111.png

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Frank,
National Instruments
Software Group Manager

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.