Design Con 2015

VISA tunnels down to the kernel

-April 01, 2011

Read Andy Purcell's paper:
Translation DLL connects instruments to VISA
The VISA (Virtual Instrument Software Architecture) programmming interface has, over the years, streamlined instrument programming. It has provided a means for instrument drivers to pass commands and retrive data through GPIB, VXI, Ethernet, and RS-232 interfaces. Modular PXIe and AXIe instruments can also use VISA.

VISA typically uses programmed I/O to retrieve data from an instrument for processing and analysis. That method of data transfer consumes significant CPU resources. A faster method is to use DMA (direct-memory access), but that requires access to the Windows kernel, which isn't built into VISA. A translation DLL can bridge the gap between VISA and the Windows kernel. The figure shows that the translation DLL and its API (application-programming interface) fits between the VISA layer in the user space and the kernel driver below.

VISA transaction DLL

A translation DLL forms a bridge between the VISA software layer and a kernel driver.
Courtesy of Agilent Technologies.


Andy Purcell, a software engineer at Agilent Technologies, has written a paper that explains how the translation DLL works. In his paper "Translation DLL connects instruments to VISA," Purcell explains how to use the translation DLL with modular instruments such as PXIe and AXIe instruments. The translation DLL can send DMA requests directly to a kernel driver, which can more rapidly respond to interrupts than can VISA or the instrument driver above it.

In addition to using a translation DLL, VISA can, through memory mapping, write data directly to or read data directly from an instrument's I/O registers. That process, which skips any kernel drivers, also increases measurement throughput. Purcell's paper provides sample code that uses the viMapAddress() call to map an PXIe or AXIe instrument's registers to user memory.

Loading comments...

Write a Comment

To comment please Log In

DesignCon App