Rev K of the Agilent I/O libraries

advertisement
Agilent I/O Libraries and NI Software
For a number of years, test engineers have struggled with incompatibilities between
hardware and software from different vendors. At one time, the recommended solution
was to use only one vendor’s hardware and software. It soon became evident that this was
not an acceptable solution.
With revision J of the Agilent I/O libraries, providing “tulip” drivers that could talk to
NI-GPIB and NI-VXI, this conflict was partly solved. Thus it was possible to use Agilent
VISA with the E9850A VXI embedded controller made by NI and sold by Agilent (now
obsolete – replaced by the E9851A). (Note: NI-VXI can only be configured by the
Agilent I/O config utility if you have the NI-VXI driver rev 2.5 or above, but below 3.0).
Although in most situations the improvements made by rev J were sufficient, there were
still situations that were problematic. Both Agilent and NI had devices that could only be
accessed through their respective I/O libraries. The E2050B LAN to GPIB gateway and
its software counterpart, the SICL/LAN server fell into this category. Any program that
accessed instruments through these interfaces required the use of Agilent SICL or Agilent
VISA. If the program used PnP drivers, the possibilities were even more limited since
PnP drivers require the use of VISA and cannot work with SICL alone. As long as all
other devices in the test system could be accessed through Agilent VISA, there was no
conflict. But, if the programming environment required the use of NI-VISA, it was
impossible to communicate using PnP drivers through these Agilent interfaces.
Revision K of the Agilent I/O libraries has addressed these issues and provided an
alternative: the side-by-side installation of the Agilent I/O libraries and NI-VISA.
Since only one “visa32.dll” can be registered at a time, rev K of the Agilent I/O libraries
provides a second DLL named “agvisa32.dll”. Any program linked to this DLL will have
access to Agilent’s VISA without requiring that Agilent VISA be primary. Thus, the
same PC can run some programs with NI-VISA and other programs with Agilent VISA.
PnP drivers will only work with the VISA that is primary.
Some NI interfaces can be configured in Agilent VISA (NI-GPIB and NI-VXI).
Likewise, some Agilent interfaces can be configured in NI-VISA. Interfaces that cannot
be configured in the primary VISA, can still be accessed by loading the appropriate DLL
and calling the desired functions. (LoadLibrary and GetProcAddress must be called
before the desired function can be used). In this case, the PnP drivers will not work, since
they look for the primary VISA which is loaded into memory when the computer boots
up.
The following figures show which interfaces can be accessed by the other vendor’s
VISA.
This figure shows how Agilent I/O libraries (rev J and above) relate to NI-GPIB and NIVXI interfaces. It also shows how NI-VISA (revisions 2.5 and above, but below 3.0)
relates to Agilent GPIB and Agilent VXI interfaces. The figure below shows the broken
link between Agilent VISA and NI-VXI, caused by the restructuring of NI-VISA 3.0
Both figures imply that the basic SICL functions can be used to communicate through
NI-GPIB interfaces, opening the possibility of using SICL-based programs with NIGPIB. However, not all SICL functions are guaranteed to work with NI-GPIB.
It is still not possible to access both VISAs in one program in the usual manner.
Interfaces to be accessed by the PnP drivers must be recognized by the VISA that is
primary. If Agilent VISA is primary, interfaces are configured with “I/O Config”. If NI-
2
VISA is primary, interfaces can be configured by use of MAX (Measurement &
Automation eXplorer) or NI-488.2 Getting Started Wizard.
In addition to interfaces from one vendor that can be configured in the other vendor’s
VISA, there is a standardized version of the LAN/GPIB client that allows NI software to
communicate with Agilent’s E2050B LAN/GPIB gateway or with a SICL/LAN server.
This interface is configured by default in NI-VISA as TCPIP, but can be configured to
reference a specific device by use of NI-MAX. The typical VISA name for an instrument
on this interface follows this format: “TCPIP0::156.140.152.249::gpib7,4::INSTR”. Note
that the IP address must be changed to fit the situation. The remote hostname (gpib7) and
the instrument’s GPIB address must also be set accordingly. It is only appropriate to
configure this interface in the primary VISA.
Rev L of the Agilent I/O libraries has added support for the USB port and in particular
the 82357A USB to GPIB interface. This will allow interfacing GPIB devices to most
newer computers without having to open them up to install interface cards. Support for
Windows 95 has been dropped in rev L. Therefore, if it is necessary to operate from a
Windows 95 platform, rev K of the I/O libraries would be the logical choice. Rev L has
also added support for Windows XP.
Installing Agilent VISA and NI-VISA side-by-side
A. Side-by-side installation with NI-VISA in primary position
1. Install NI-VISA first. This will register it as primary VISA and the appropriate DLL
will be loaded into memory when you boot the computer. You must install revision
2.5 or greater (less that 3.0 if you want to use NI-VXI).
2. Configure any NI interfaces that may be present in the PC by using MAX or NI-488.2
Getting Started Wizard.
3
3. Install the Agilent I/O libraries (rev K or higher). The second selection is for a sideby-side installation. See figure below.
4. Configure any Agilent interfaces you wish to access.
4
5. Configure "GPIB using NI 488.2" if you want to have SICL access to an NI-GPIB
card.
6. Configure TCPIP in MAX if you will be accessing it through visa32.dll or PnP
drivers. NOTE: This is optional, but it is a good way to check the connection.
Start MAX
a. Right click on “Devices and Interfaces”; click on “Create New.”
b. Select TCP/IP Resource.
c. Enter IP address.
d. Select VXI-11 Instrument.
e. Enter instrument address.
7. Install the passport to tulip drivers if you wish NI-VISA to access Agilent interfaces.
a. Start MAX.
b. Go to Tools/NI-VISA/Passport Editor.
c. Check box titled NiVisaTulip.dll - VISA Library Passport to Tulip.
d. Configure desired interfaces after refreshing or restarting MAX.
B. Side-by-side installation with Agilent VISA in primary position
1. When making Agilent VISA primary, NI-VISA is not needed. It is only necessary to
install NI-488 if you are using NI-GPIB cards. Likewise, you only need to install NIVXI if you are using NI’s MXI. If you have already installed NI’s VISA, it will be
overwritten by Agilent’s VISA when you choose the ‘Make Agilent VISA Primary’
option below.
5
2. Configure any NI interfaces that may be present in the PC, using NI software.
3. Install the Agilent I/O libraries (rev K or later). The second selection is for a side-byside installation. Check the box "Make Agilent VISA Primary."
4. Configure any Agilent interfaces installed in the PC, using Agilent I/O Config.
6
5. Configure NI-GPIB and NI-VXI if present in system (for example GPIB using NI
488.2).
6. Configure TCPIP0 with I/O Config, if needed.
7
7. Edit VISA configuration of TCPIP0 and add device.
NOTE: This is not a required step. However, TCPIP devices will not show up in
a viFindRsrcs() list until they have been opened once. If a device is explicitly
added, it will show up even before it is first opened.
8. Configure VISA LAN client if needed. Some software cannot access instruments
through TCPIP0 alone, but must also have a separate VISA LAN client named
GPIBn. One example of this is the 89601A software when used with the E4406A
ESA.
8
Examples Using the VXI-11 Standard
The VXI-11 standard affords a degree of cross-platform mobility that the test engineer
may find useful.
VXI-11.2 defines a LAN/GPIB interface based on the SICL/LAN
specifications.
Consequently, it can be used to talk to instruments attached to the E2050B LAN/GPIB
gateway, as well as instruments connected to a PC running SICL LAN server software, or
to instruments that have a built-in SICL LAN server.
The E4406A ESA, E8241A PSG and the E4440A PSA as well as the 54800 series
Infiniium scopes are examples of instruments that have built-in SICL LAN servers.
Here is an example VISA resource name for the e4440A
TCPIP0::156.140.152.235::gpib7,18::INSTR
The 54800 series is configured by default to use a VISA resource name like this:
TCPIP0::156.140.157.49::hpib7,7::INSTR
You will have to change the IP address for your specific situation.
If configuring the E4406A to be recognized by the E89601A software, it will probably be
necessary to make Agilent VISA primary and configure a second VISA client (in
addition to TCPIP0). This VISA client will appear as a GPIB interface, even though it is
a LAN interface and will take on a name such as GPIB1 or GPIB2.
VXI-11.3 defines a LAN socket interface.
Examples of instruments that can communicate through sockets are the E4406A and
E4440A mentioned above (port 5025). In addition, the 1670 series and 16500 series of
logic analyzers communicate through port 5025. The 16700 series of logic analyzers
communicate through the RPI (Remote Programming Interface) at port 6500.
9
The following is a C example program for communicating with the 16700B through the
RPI interface at port 6500, using SICL.
#include “sicl.h”
#include<stdio.h>
void main()
{
INST la;
char modules[200]={“ “};
la=iopen(“lan,6500[156.140.158.188]”);
iprintf(la, “clear\n”);
iprintf(la, “modules\n”);
iread(la,modules,200,0,NULL);
printf(“%s\n”,modules);
iclose(la);
//open session
//to port 6500
//clear LA
//workspace
//query LA
//modules
//read response
//display result
//close session
}
The same program could be written to use VISA socket access as follows:
#include<stdio.h>
#include "visa.h"
void main()
{
char modules[200]={" "};
ViSession sesn, la;
viOpenDefaultRM (&sesn);
//open VISA session
viOpen(sesn,"TCPIP0::156.140.158.188::6500::SOCKET",
VI_NULL, VI_NULL,&la); //open SOCKET session
viPrintf(la,"clear\n");
//clear workspace
viPrintf(la, "modules\n");
//query LA modules
viScanf(la,"%t",&modules);
//read response
printf("%s\n",modules);
//display result
viClose(la);
viClose(sesn);
//close SOCKET session
//close VISA session
}
10
Frequently Asked Questions
Which I/O drivers should I use with the ParBERT?
The I/O libraries must be configured differently for use with the 81200 and 81250,
depending on the hardware configuration and use. Here are several different scenarios:
1. 81200 with a 3-slot controller
This type of system is not open VXI. It requires the use of special VXI backplane
drivers supplied with the software. Agilent I/O libraries rev G or H must be installed
first. Do not configure interfaces at this time. Next, install the hpfvxi drivers supplied
with the 81200 software. Finally, configure the desired interfaces. Do not install NIVISA. If it is necessary to install LabVIEW, do a custom installation and uncheck NI
drivers.
2. 812x0 with a 2-slot controller
a. NI-VISA exclusively or in primary position
This may be the simplest way to configure the E985xA embedded controller.
Since the controller is made by NI, the VXI backplane requires NI drivers. The
installation of NI-VISA will allow you to configure the VXI drivers in NI-MAX.
Since the GPIB gateway requires Agilent drivers, it will not work with NI-VISA.
This configuration cannot be used in situations where the control source is a
remote PC or workstation that does not have a Windows environment.
b. NI and Agilent side-by side installation with Agilent VISA in primary position
In the E985xA embedded controller there is no possibility of running exclusively
with the Agilent I/O libraries. This is due to the fact that the VXI interface
requires NI drivers. A side-by-side installation with Agilent VISA in primary
position will work. To do this, configure the NI drivers first. Then run I/O config
and configure GPIB on NI 488.2 as well as NI-VXI. For a more detailed
description of the installation process see “How to install Agilent VISA and NIVISA side-by-side” above. If the GPIB card is configured to address 11 instead of
21 and set to “non-controller” mode, you will be able to run the GPIB gateway.
3. 812x0 with an external PC and FireWire interface
a. Agilent VISA exclusively or in primary position
If you are using Agilent interfaces exclusively, all you need is the Agilent I/O
libraries. As long as these are configured as valid VISA interfaces, most
programming environments will be able to access them (including LabVIEW).
b. NI-VISA exclusively or in primary position
If “passport to tulip” drivers are enabled, it is possible to configure most Agilent
interfaces in NI-MAX. See “Side-by-side installation with NI-VISA in primary
position” above.
NOTE: Although the 812x0 uses port 2203 for internal communications. Stable and
dependable communication must use the network client provided by the 812x0 software.
In other words, socket communications may appear to work, but sooner or later will
11
cause system failures. The firmware server requires synchronous communications, where
handshaking takes place to verify that the last command has been received and it is OK to
send the next one. Any other way of communicating with the firmware server can cause it
to crash.
Can I run SICL-based programs with NI hardware?
Since the introduction of VISA, programming based on the SICL library has gradually
been phased out in favor of the more portable VISA-based library. However, there are
still some programs that require the use of SICL.
The E4543A and E4544A software packages for the 71612C high-speed BER are
examples of this type of program. The easiest and supported solution is to use an Agilent
interface. Though not officially supported, it appears to be possible to use these programs
with a 32-bit NI-GPIB interface, provided that the Agilent I/O libraries are installed in a
side-by-side configuration and the GPIB interface is configured properly with the I/O
config program.
It may not be good enough to accept the default settings in I/O config in order to use an
NI-GPIB interface with a SICL-based program. The LU (logical unit) typically defaults
to a number above 31 when configuring an NI-GPIB card with the Agilent I/O config
program. This number will most likely have to be changed to a lower number, maybe
even the traditional 7 or 8 used for Agilent GPIB cards.
One thing to be aware of when using SICL to communicate through a NI-GPIB interface
is that not all SICL functions may be implemented in the Tulip driver. The basic SICL
functions were implemented to allow VISA access.
Why use the SICL/LAN interface instead of a socket?
Some instruments have LAN socket interfaces as well as SICL/LAN servers and GPIB
interfaces. It may not be immediately obvious which interface is best for control
purposes. The GPIB interface was designed specifically for instrument control. Part of its
implementation is the instrument status system.
The status system allows a controller to be informed of the status of an instrument or
measurement by means of the Service Request (SRQ). This is an asynchronous process
whereby a controller is informed that the event of interest has occurred, without having to
constantly poll the instrument. This offers a distinct advantage over other interfaces, such
as RS-232 and sockets. However, the GPIB interface requires a bulky cable and is limited
to a distance of 20 meters from the controller.
Three alternatives allow the same functionality without some of these limitations. The
SICL/LAN server, the E2050B LAN/GPIB converter and the 82357A USB/GPIB
12
converter allow the instrument to function as a GPIB controlled instrument.
Consequently, these interfaces are able to utilize functions of the status system, which are
inoperative with the socket interface or RS-232.
Summary
Developments in the I/O libraries over the last couple of years have added flexibility to
the instrument control arena. Incompatibilities that used to make it impossible to mix
hardware and software from different vendors are gradually being overcome. In addition,
test equipment manufacturers are providing more interfaces on their instruments. This
new paradigm allows the test engineer to choose the software and hardware that best fit
the application.
13
Download