Table of Contents
Instrument USB Interfaces
- The USB test and measurement specifications
provide the information necessary to communicate with compliant instruments.
The GPIB over USB specifications
are commonly used. Perusing these documents, one can readily understand why a dynamic library between Python and
libusb or a substantial Python module would be so useful. Once you understand how to achieve communication over USB,
then you can send commands and receive data according to the syntax for a particular instrument.
- For Linux, the open source usbtmc driver can be downloaded from Agilent.
Read the USBTMC Kernel Driver Documentation.
Source code for the latest version of the Linux kernel is available here.
The usbtmc driver also can be found as part of a LabView installation.
Viewing USB Device Parameters
- Use control panel -> system -> hardware -> device manager to get some information about USB controllers and
connected devices.
- Unzip and execute usbview, a utility from M$ to see
some detailed information about the USB configuration for the scope.
- Unzip and execute SniffUSB to see the transactions with
USB devices on your machine. The documentation is
helpful. Hit the view log button to see some USB transactions. Be thankful than you do not have
to deal with communications at this level.
Recognizing VISA Compatible Instruments
- The program find visa devices uses PyVisa
to find compatible instruments on the USB, the GPIB bus, com ports and lpt ports.
Virtual Instrument Software Architecture
- The Virtual Instrument Software Architecture (VISA) is a specification created by the
VXIplug&play Systems Alliance, which has since been absorbed into the
Interchangeable Virtual Instrument Foundation. Relevant documentation:
VISA library,
VISA for textual languages,
VISA for the NI G language,
VISA for the Component Object Model,
VISA shared components,
VISA for PXI Specification
- NI seems to be the maintainer of the VISA libraries:
NI-VISA 5.0 Linux version in an iso file,
NI-VISA run-time engine 5.0.
- National Instruments provides the
NI-VISA programming reference for LabView.
- For Python programs, PyVisa can be used with XP to communicate with this oscilloscope via USB. As the
documentation shows, this is accomplished using visa32.dll on Windows platforms, the
VISA compatible DLL.
- The ctypes module of Python offers another way to talk to a VISA-compatible device through visa32.dll. This
sample program queries a TDS1012B oscilloscope.
Instrument Command Syntax
|
Site Navigation
Services
OSU Links
|