Appendix
Getting HP/Agilent BASIC for Windows to Work from within the PNA
Getting BASIC for Windows to run properly on the PNA can be a bit difficult. While the installation of the product usually goes well, addressing both the PNA and devices connected to the GPIB is not intuitive. This document shows step-by-step instructions for doing this. The use of HP/Agilent BASIC for Windows version 7 or higher is assumed. An Internet LAN connection is also assumed.
- Obtain the Agilent IO library version J.02.00 or newer. It can be obtained at the following site:
The product number is E2094J and is about 7MB in size - Install the IO library onto the PNA (assuming it is newer than what is currently installed.)
- If BASIC for Windows is not already installed on the PNA, do it now.
- Click on Start, Programs, Agilent IO Libraries, IO Config. Notice that the internal PNA Instrument will have already been assigned a SICL Interface name of hpib7.
- Double-click on SICLon NI GPIB. The GPIB Interface Configuration screen will be shown (unless it has already been configured). Accept all defaults. Note that the SICL Interface name will be gpib1. Click OK to exit this screen and the next.
- If the PNA Application is not running, start it now. Once it starts, click on System, Configure, SICL/GPIB. Click on System Controller to make this active, then click on SICL Enabled. Click on OK to exit this screen.
Note that once SICL Enabled has been selected, it cannot be unselected. These settings will revert to an un-enabled status if the PNA application is shut down for any reason and will have to be re-enabled! - Using Windows Explorer, browse to the directory containing HP BASIC for Windows (typically C:\Program Files\HP BASIC for Windows.) Locate the file HPIBS.DW6. Right-click on this and select Copy, then right-click again and select Paste. This will copy the file and name the copy "Copy of HPIBS.DW6." Right-click on this file name and select Rename, then rename this copied file to HPIBS2.DW6. Close Explorer
- Run the HP BASIC for Windows application. After it starts, select Edit, then press Enter. This will display the code for the Autost (Auto Start) program.
- Scroll down to the GPIB drivers section. On HPBW version 7, this was around line 350; yours may vary! Look for the line containing LOAD BIN "HPIBS". Change this line to:
350 LOAD BIN "HPIBS;DEV hpib7 ISC 7 TIMEOUT 10" - Insert another line just below the above line. Add the following code:
351 LOAD BIN "HPIBS2;DEV gpib1 ISC 8 TIMEOUT 10" - Click on File, Save. Then, re-run HP Basic For Windows.
At this point, you should be able to write to the internal PNA device as follows:
100 OUTPUT 716; "SYST:PRES;*OPC?"
110 ENTER 716; opc
To write to a device at address 03 that is attached to the PNA's GPIB connector, use:
150 OUTPUT 803; "*idn?"
160 ENTER 803; id$
In the above example, all communication with the network analyzer must be done at address 716, and all communication with external GPIB devices must be done using Interface Select Code 8 (i.e. addresses 800 through 831).
If you still can't talk to any GPIB device, check the status of the National AT-GPIB/TNT card in Windows Device Manager, and reinstall if necessary. Note that the GPIB card is not a plug and play device. This means the IO address, DMA and IRQ must be set precisely.
The IO address range is 02C0-02DF
The Interrupt Request is 09
The DMA channel is 05
If all else fails, contact Agilent support for help.
Getting HP/Agilent VEE to Work (via COM) from within the PNA
Getting VEE for Windows to run internally on the PNA can be a bit difficult. While the installation of the product usually goes well, addressing both the PNA and devices connected to the GPIB is not intuitive. This document shows step-by-step instructions for doing this. The use of VEE version 6 or higher is assumed. In this example a COM interface is configured for communication to the PNA, while SCPI is used for GPIB communications.
- If VEE is not already installed on the PNA, do it now.
- If the PNA Application is not running, start it now. Once it starts, click on System, Configure, SICL/GPIB. Click on the System Controller checkbox to make this active. Click on OK to exit this screen. For now, you may want to minimize the PNA application by selecting View, Title Bars, then minimizing the application.
- Run the Agilent VEE application (Start, Programs, Agilent VEE Pro 6.0.) After it starts, select Device, ActiveX Automation References. The registered automation services will be displayed, the Agilent PNA will NOT be shown.
- Select Browse. Then, change the "Files of type" pull-down menu to read "All Files." Browse to the directory C:\Program Files\Agilent\Network Analyzer. Highlight the file 835x.exe and select Open. The window will close and the Agilent PNA Series 1.0 Type Library will now appear and will be checked. Select OK.
- The Classes and members of the PNA Type Library can now be seen by selecting Device, Function & Object Browser. You are now ready to start programming the PNA via COM.
- Instruments connected to the PNA's GPIB port must addressed via GPIB commands to device 14. In other words, a power meter at address 13 must be addressed as 1413. If this is not set up properly, run the Agilent IO configuration program. Note that the same GPIB interface may appear twice, one being at device 8 and the other at device 14. Use device 14.
If all else fails, contact Agilent support for help.