Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Jun 9, 2008


Feedback


Yes No

Related Categories

Technology

Related Links - Developer Zone

Related Links - Products and Services

Overview: USB For Measurement And Automation

104 ratings | 3.58 out of 5
Read in | Print

Overview

Initially the Universal Serial Bus (USB) was designed to connect peripheral devices, such as keyboards and mice, to PCs. However, USB has proven useful for many other applications, including measurement and automation. Recent USB developments increased data rate from 12 Mbps to 480 Mbps, as outlined in the USB 2.0 Specification section of this document.

The USB host automatically detects when a new device has been added, queries for device identification, and appropriately configures the drivers. Due to the bus topology, up to 127 devices can run concurrently on one port. By adding hubs, more ports can be added to a USB host, creating connections for more peripherals.


USB, the PC, and Measurement and Automation

USB delivers an inexpensive, easy-to-use connection between data acquisition devices/instruments and PCs. Manufactured PCs are currently equipped with USB ports; therefore it is not necessary to purchase a dedicated controller to interface to a USB-based data acquisition device or instrument. USB provides an alternative to traditional computer bus technologies such as PCI, PXI or FireWire by featuring plug-and-play functionality; built-in operating system configuration; and multi-drop cabling, which allows you to connect multiple devices from the same port. Because USB features are an excellent fit for measurement and automation applications, USB usage in measurement and automation is on the rise.

How is USB a Good Fit for Computer-Based Measurement and Automation?


USB is easier to use than some of the traditional internal PC buses, such as PCI and ISA. The devices that use USB are hot-pluggable, eliminating the need to shut down the PC to add or remove a device. A USB bus also has automatic device detection; once you plug in your device, the operating system software should detect, install, and configure the device automatically.

High-speed data and control applications benefit from the ability of a USB to deliver data through either isochronous or asynchronous data transfers. With isochronous transfers, USB guarantees bandwidth with time-based delivery of data packets. Isochronous transport guarantees that a transmission is completed within a given amount of time, but it does not guarantee that the transmission is received error-free. The USB protocol guarantees devices that have requested isochronous bandwidth a predetermined number of data packets in each frame. Data-intensive applications often demand isochronous bandwidth.

Measurement and control systems commonly require the ability to respond to events. USB allows any device to generate an asynchronous event. Asynchronous transport guarantees accurate delivery, and devices with urgent messages can be given priority over all other devices. Applications for asynchronous transport include delivering control messages and changing device parameters.

The USB 2.0 specification divides USB devices into three categories based on transfer rates:

  • Low-speed devices, such as keyboards and mice, operate at 1.5 Mb/s
  • Full-speed devices operate at 12 Mb/s
  • The new Hi-Speed class of devices delivers throughput of 480 Mb/s - 40 times faster than the USB 1.1 standard


The primary differences between USB 1.1 and 2.0 specifications that impact test and measurement devices are the addition of lower-latency 480 Mb/s (Hi-Speed) transfers and improved host software specifications. USB 1.1 compliant devices will not become obsolete because all USB 1.1 devices are compatible with the USB 2.0 standard (they are classified as full- or low-speed devices). All National Instruments USB products are USB 2.0 compatible, and many take advantage of the fast transfer rates of Hi-Speed USB. For more information on new and upcoming USB technologies, refer to the USB Implementors Forum link below.

See Also:
The Impact of New Bus Technologies
USB Implementors Forum

How Can I Use USB in My Measurement System?


End users benefit from USB performance and ease of use
National Instruments has recently released several new data acquisition (DAQ) devices to simplify hardware installation and setup:

  • High performance USB DAQ -- DAQ devices with up to 16-bit accuracy and sampling rates up to 800 kS/s
  • USB DAQ for sensors and high voltages - Measurement devices with built-in or modular signal conditioning for sensors such as thermocouples, RTDs, and more. These devices also inlcude modules for measuring high voltage signals up to 60 V. Some devices offer isolation as well.
  • Low cost USB DAQ -- Affordable DAQ devices with basic functionality and up to 14-bit accuracy and sampling rates up to 48 kS/s


National Instruments offers several other types of USB-based devices; including a 15 MHz digital oscilloscope (NI 5102 for USB), data loggers (NI 4350 for USB), and digital I/O devices (DAQPad-6507/8). Serial or GPIB to USB converters for instrument connectivity are also available from National Instruments. The USB-232 and USB-485 devices offer up to four serial ports per USB connection. The GPIB to USB converter, GPIB-USB-HS, allows you to control up to 14 programmable GPIB instruments through a PC USB port. You do not need to modify your existing GPIB code to use the GPIB-USB-HS.
The GPIB-USB-HS uses the industry standard NI-488.2 application programming interface, which automatically converts USB to GPIB.

OEM customers benefit from a USB hardware/software complete tool chain for data acquisition
OEM USB DAQ devices allow customers to fully focus on their system design by providing DAQ hardware, USB software, and DAQ software driver. This allows customers to speed time-to-market by leveraging USB connectivity to PC. Customers no longer need to design a computer backplane in order to take advantage of DAQ devices since USB DAQ devices are external to the PC. In addition, this allow some customers to quickly add USB connectivity to their system by using some of the I/Os to control their system.

See Also:
NI USB DAQ devices for OEM customers


Related Links:
Products & Services: USB Data Acquisition
A Technical Overview of USB Communication

104 ratings | 3.58 out of 5
Read in | Print

Reader Comments | Submit a comment »

Needs links to guidance on use with LabVIEW!
This document is a good start, but most people searching for USB will be interested in simple examples of how to implement basic USB communications with LabVIEW. Please add to this, or link to other resources LV and USB related?
- Tim Jones, Hamilton Sundstrand. tim.jones@hs.utc.com - Jan 14, 2004

LabVIEW 7 Express supports USB 2.0
LabVIEW now supports communication with USB devices with the release of LabVIEW 7 Express. This support is provided through the NI-VISA I/O software which is installed with LabVIEW. It can communicate with USB- based instruments that support the USBTMC protocol ("GPIB-style communication over USB") or any generic USB device through a low-level socket-like communication.
- Eric Reffett, National Instruments. eric.reffett@ni.com - May 30, 2003

Great - but can LabView talk to USB?
Its good to see that NI are producing USB linked DAQ cards etc - but will LabVIew be able to address USB based devices (not just the ones you sell)? We have hardware that connects to the PC via a USB port which I would love to control by LV, but was under the impression that this was not possible. Is this still the case and will remain so?
- Apr 24, 2003

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial 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 content with each new revision of related products and drivers. THIS TUTORIAL 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/).