PXI Addressing Using Marvin Test Solutions and VISA based Drivers

Knowledge Base Article # Q200117

Read Prior Article Read Next Article
Summary Explains how to address or initialize PXI instruments using physical address or alias with NI-VISA based DLLs drivers or with Marvin Test Solutions HW based drivers.
Login to rate article
To initialize a VISA based PXI drivers, you call viOpen(.., resource, …_) function passing resource string as an address that can be one of the following:
  • Canonical resource name – “PXI::15::INSTR” PXI bus 0 device 15,  or using slot numbers “PXI::CHASSIS1::SLOT3::INSTR” –In this case, when you move the board to another slot in the chassis you need to specify different string and change the application.
  • Alias Name– “DMM1” –  DMM1 need to be defined in the VISA resource manager (usually NI-MAX) Alias Editor and assigned to physical PXI address – In this case, when you move the board to another slot in the chassis you need to open the VISA resource manager and change the alias to point to the new slot – no change to the application is required.
Marvin Test Solutions drivers for PXI instruments are supplied with HW - Geotest Hardware Access Driver. These drivers works in two modes, using VISA or using HW:
  • Using VISA – Using the Geotest driver GxxxInitializeVisa( … ,sResource, …) function - Allow you to initialize using resource string or alias as in VISA : “PXI::15::INSTR” or “DMM1”) – Using an alias will allow moving of the card without changing the address (you need to change using the VISA resource manager Alias Editor).
  • Using HW – the Geotest driver GxxxxInitialize(.., nSlot, …)  function –  You can specify the nSlot parameter in two ways: logical number (legacy slot, for example 3) or physical slot number: chassis*256+slot  - 0x103 for chassis 1 slot 3. If you use the logical slot number (3) when you move the board from slot 3 to 4 – You can reassign 4 to 3 logical number using the Marvin Test Solutions PCI/PXI Explorer applet and the app will work with no changes. HW also support alias name, you can set alias name using PXI Explorer and use a HW function to convert the “DMM1” alias as entered in PXI Explorer applet to nSlot to allow using names instead of addresses.
The following are the HW v3.2 functions used  to map between alias and physical PXI/PCI address as defined in hw.h:

// returns the VISA resource for the specified alias
INT  HwPciGetAliasVisaResource(PCSTR pszAlias, PSTR pszResource);

// returns the chassis slot for the specified alias (Chassis*256+Slot)
INT  HwPciGetAliasChassisSlot(PCSTR pszAlias);                  

// returns the legacy slot for the specified alias
INT  HwPciGetAliasLegacySlot(PCSTR pszAlias);                    

In ATEasy, you configure PXI driver address from the driver shortcut property page. Newer ATEasy drivers (for example GX2200.drv) supports the same type of initialization of the instrument: using VISA or using HW. If you intend to use VISA, set the VISAResource driver parameter to a resource string or alias. If you intend to use HW, set the Slot parameter to legacy or slot number (you can also call the HwPciGetAliasChassisSlot if you intend to use alias).  

  • Marvin Test Solutions drivers that were release with HW v1.x or v2.x do not support VISA
  • Alias mapping is provided with HW 3.2 and above
Article Date 9/24/2008 , 5/6/2016
Keywords ATEasy, VISA, HW, DLL, PXI address

Login to rate article

Read Prior Article Read Next Article