Importing non-standard Function Panel (.fp) drivers into ATEasy

Knowledge Base Article # Q200202

Read Prior Article Read Next Article
Summary Procedures for importing non-standard FP drivers in ATEasy
Login to rate article


ATEasy allow you to use VXI Plug&Play drivers (sometimes refer to as  IVI-C driver) created by instrument vendors. These instrument drivers support various interface types such as GPIB, VXI , Serial, PXI, USB, LXI or PCI based board and more. The function panel driver (FP) has a .fp file extension and can be imported to ATEasy using the Insert, Import FP File (*.fp) command. Once the driver is imported you will need to save it to ATEasy driver (.drv or .drt file). The process of importing the FP driver is described in the ATEasy on-line help (see "Using VXI Plug&Play Function Panel Drivers" topic).

You can obtain and download a Function Panel driver from the instrument manufacturer web site. Most vendors also register their driver at the IVI Foundation web site IVI Foundation website under the Driver Registry section. Some vendor such as Agilent or National Instruments carry also third party instruments drivers.

Driver Prerequistes:

The IVI-C driver specification describe a standard for Initialize, and error handling functions which must exist in the FP driver. The ATEasy Import command will search for these functions and generate special ATEasy code to intialize and handle errors in the imported driver. The following functions are searched by the Import command:

  • Initialize function should have the following format:
PREFIX_init(sResourceName, bIDQuery, bResetDevice, m_session)
  • Error Message function should have the following format:
PREFIX_error_message(m_session, lStatusCode, psMessage)

The prefix begins with a two-character vendor code, followed by characters that uniquely identify the instrument driver. The following is an example of the Initialize function for the Pickering System 40 PXI cards:
pipx40_init(sResourceName, bIDQuery, bResetDevice, m_session)

Importing Non-Standard FP Drivers

The ATEasy Import Wizard will search the FP driver for the required Initialize and Error Message functions. If these functions do not exist in the FP driver, ATEasy will display messages listing the missing function(s) and ask the driver developer to select the appropiate function from the displayed FP function list (see example below).

Figure 1: "Unable to find Standard Function" message from the ATEasy Import Wizard

If the appropiate function does not exist in the displayed listing, ATEasy will create a function wrapper with no source code so the developer can include the source code at a later time manually. The following are examples of the Initialize and CheckError functions after the ATEasy Import process, showing the required FP driver functions implementation:

Procedure Initialize(sResourceName, bIDQuery, bResetDevice) : Void
! Create the following variables
!    sResourceName: [Val] ViRsrc
!    bIDQuery: [Val] ViBoolean = 0  !Specifies if the card is to be queried
!            to confirm it's ID when it is opened. This action is implicit in the
!            driver's operation so the value of this control is ignored.
!    bResetDevice: [Val] ViBoolean = 0 ! Specifies if the card is to be reset
!            when it is opened. This action is obligatory for all cards so the
!            value of this control is ignored.

    if ArgMissing(sResourceName)
       if sResourceName=""
          error -1001, "Unable to initialize.\nDriver Shortcut parameters must "                "be configured from its Misc property page"

    if ArgMissing(bIDQuery)

    if ArgMissing(bResetDevice)
    ! Required FP driver function is highlighted below
    CheckError(pipx40_init(sResourceName, bIDQuery, bResetDevice, m_session) )

Procedure CheckError(iStatus) : Void
!   Create the following variables:
!       iStatus: Val ViStatus
!       sError: String: 1024
    if iStatus <> VI_SUCCESS then
       ! Required FP driver function is highlighted below
       pipx40_error_message(m_session, iStatus, sError)
       error iStatus, sError ! generate exception

Article Date 7/8/2010
Keywords ATEasy, FP, function panel, driver, import, VXI Plug&Play, IVI-C, FP

Login to rate article

Read Prior Article Read Next Article