Given an instrument, how do you find or create an ATEasy® driver for it? In this article we will cover the ways to find/create an ATEasy instrument driver.
The following diagrams present a quick guide for finding or creating an instrument driver. Follow the steps from top to bottom.
- If the driver exists in the ATEasy Drivers folder or user forums - use it. Otherwise, look for a function panel (.fp file) driver using ATEasy Insert Function Panel driver command. The function panels that are imported conform to the Plug and Play Instrument standard or IVI-C standards .
Once you download it, it can can be automatically converted to an ATEasy driver using the ATEasy command: Insert, Import Function Panel. The import command creates a full driver including libraries (DLL function declarations), wrapper procedures to provide exception and error handling and handle hiding, and the driver commands used by the application to access and interface with the driver.
Function Panel drivers are also called VXI Plug and Play drivers; see https://ivifoundation.org/VXIPlug_Play/default.aspx for a description of these drivers. There are thousands of these around, including all of the NI LabWindows/CVI drivers. Here are some examples of websites from the instrument manufacturers or companies that publish these drivers that you can use:
- If none of the drivers described in step 1 is available, create a driver from scratch. Three methods to create a driver can be used as shown in the diagram.
For the first method, if the instrument manufacturer published a library in one of these formats: Dynamic Link Library, ActiveX or .Net assembly, we insert the library under the driver Libraries sub-module. If you are inserting a DLL you will need to define the DLL functions or if you have C .h header file, you can import it. Next, you create ATEasy procedures to hide handles, provide error handling and offer easier initialization. Once the wrapper procedures are written, you can create commands and attach the procedure to these commands. The commands will serve as the main method for using your driver.
If the instruments use a standard interface (i.e. GPIB, COM, VXI or USB, TCP/IP/LXI), we create an IO Table to send or receive data from the instruments or we use the ATEasy internal library to communicate with the instruments. ATEasy offers a rich set of functions to communicate with these standard busses.
The third method will use the ATEasy internal library to write the procedures and the driver commands used to interface with the driver.
|