Example Code

Get Resource Name from USB-5681 Serial Number

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

  • RF|Wireless

    Software

  • LabVIEW

    Driver

  • NI RF Device Drivers

Code and Documents

Attachment

Overview

Programmatic recognition of USB Power Meters.

  

Description

This example uses the System Configuration API to look for devices present on the system and compare them to a known serial number. In this case, that device is a USB-5681 Power Meter. If the device is not found, it displays a message to the user that no devices were present in the system with that serial number. If the device does exist, the resource name for that device is used to open a session to that device.

 

This example is useful if your system has more than one power meter, otherwise it is optional in case your applications requires it. 

 

Steps to Implement or Execute Code

1. Ensure the Power Meter is connected to the computer.

2. Run the VI.

 

Requirements

Software

1. LabVIEW 2015 (or compatible)
2. NI 568x Driver

3. NI System Configuration

 

Hardware

1. NI Power Meter

 

Additional Information or References

Snippet.png


 

 

Robert B
RF Product Support Engineer
National Instruments

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