These example programs are mostly written for VISA commands which will work for both NI and HP/Agilent GPIB interface
cards. Click on the title to download the zipped package.
GPIB/SCPI Programming Examples for the PNA
- Neapolitan - 3 Flavors of GPIB   This example shows basic instrument control
using NI commands, SICL commands, and VISA commands. It is an excellent beginning program for those just starting out in
GPIB programming on the PNA since it demonstrates the same basic programming and data acquisition techniques using all 3
interface methods. A readMe.txt file is included with more information.
- Example of 1-Channel, 1-Window, 2-Traces/Window and 1-Channel,
2-Windows, 1-Trace/Window   These two examples show basic Window and Trace manipulations. Data is read from
both traces regardless of trace/window setup. A good program to show these differences and shows how to extract data from
the desired trace. A readMe.txt file is included which also includes important timeout information.
- Simulated Cal   This example shows how to upload, download, and apply error
terms to a measurement. For clarity, this is done only for a response cal, but the technique is the same for full two
port calibrations. Error terms are read from the PNA, and a dummy cal is uploaded to the PNA. The error terms are also
graphed so that the results can be seen. A ReadMe.txt file is included with more information. Due to recent changes,
this will only work on Rev 2.62 and above.
- PNA CalSet Modificationl   This example is similar to the Simulated Cal
above, but uses the latest firmware methods. It requires rev 6.xx firmware or above. This is written in VB.NET! This
shows how to upload, download, and apply error terms to a measurement. Error terms are read from the PNA, and a dummy
cal is uploaded to the PNA.
- Manipulating Complex Data   This example is similar to the "Simulated
Cal" program above but is simplified to show one method of uploading and downloading complex data to/from the PNA. Data
is transferred in ASCII mode. Trace data is read from the PNA, then modified (divided by 2, with slope added) and
finally placed back into the PNA.
- Performing a TRL Cal   This example shows how to perform a TRL cal using
two line standards. This is written in RMB (the old HP BASIC) and is heavily commented so as to be easily understood.
This can be used as a basis for other programming languages. This is just a text file, so it is easily viewed.
- Enhanced Response Cal using ECal   This example shows how to use an
ECal module to perform a Cal. In this case, an Enhanced Response Cal is performed, but other types of cals could just
as easily be specified.
- Real32 Transfer and Conversion   This VB6 VISA example shows how to transfer
formatted trace data in REAL32 format using GPIB, convert it to usable numbers, and then display it. Real32 is the
absolute fastest way to transfer trace data, but the resulting data could be difficult to manipulate without the proper
conversion mechanism. This example show one such mechanism. The zip file includes a readme file with more information.
Last Updated: 23 Nov 2011