From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

NI SwitchBlock: DAQmx Example for Multiple Device Endpoint 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 code uses NI-DAQmx to make an endpoint connection from one column to another in multiple NI SwitchBlock devices.

 
Description 

The example VI performs the following steps:

  1. Resets both switch devices and sets their 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. Reserves all of the rows for routing in preparation to connect over these rows on your NI SwitchBlock device
  4. Allows the sharing of your analog bus over multiple devices
  5. Makes a connection from one column to another and waits for the switch to finish closing
  6. Handles errors

.

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. Download and unzip the NI-DAQmx 2 Device Endpoints.zip file
  1. For each device configure the following in the front panel:
  • Select your NI SwitchBlock device name
  • Select 'Configured Topology' for the Topology Name
  • Select your column to connect
  • Select your analog bus to use in this connection. The same analog bus should be selected for both.
  1. Run the VI. The connections between the two devices will be made.

 

Additional Information or References

VI Snippet

11111.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.