Example Code

Programmatically Reset USB DAQ device in LabVIEW

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.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview

This example demonstrates how to programmatically reset a USB DAQ device that has been unplugged and then reconnect and continue running in LabVIEW.

 
Description

If you want to start with the device unplugged, you will need to right click the DAQ assistant and choose Generate DAQmx code. This will allow you to choose the appropriate device prior to starting the VI.


Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Run the VI with your device plugged in and working.
  2. Unplug or remove the device and you will notice that it go to the reset loop and waits for device to be reconnected.

 

Additional Information or References
VI Snippet

002.png 

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

National Instruments
Applications Engineer

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

Comments
Member
Member
on

Very elegant solution, Tahnks