NI-DAQmx: Find DAQ Device Resource Programmatically
Overview
This VI takes a device type input (ex. PCI-6251, USB-6008, etc.) and returns the resource name specified in Measurement and Automation
Description
This example shows you how to programmatically find a DAQ device in your computer and return the corresponding resource name. This is useful if you are deploying an application where the DAQ resource name is unknown and there are multiple devices used in the computer.
Instructions for Running
Input the DAQ device required for the program (ex. NI 9225, PCI-6251, SCXI-1520, etc.). If the device is not located in the computer, a "Device is not present in the system" error will occur. The Device names are not case sensitive.
Block Diagram Steps
- Set the device type you want to use in your program (Ex. PCI-6251, NI 9225)
- This creates an array of the devices name set in MAX
- This returns the product type for the specified Device Name
- If the device is found, the case structure will output the resource name. If the device is not located in the computer, the device will return an error "Device is not present in the system"
- Place this reference into your DAQmx functions
Requirements
Filename: find_daq.vi
Software Requirements
Application Software: LabVIEW Professional Development System 8.0
Language(s): LabVIEW
Hardware Requirements
Hardware Group: CompactDAQ, Multifunction DAQ (MIO), Digital I/O (DIO), SCXI, Portable DAQ
Reader Comments | Submit a comment »
Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
