Keysight PNA Series COM/DCOM VEE Programming Examples


For those just starting out in COM, make sure you read the "Getting started with VB and COM/DCOM" document. It contains critical information on setting up your PC to communicate with the PNA. While this was written for VB, much of it also applies to VEE. This document is in .rtf format which can be opened by Word, WordPad, TextPad and many other applications.

COM / DCOM Programming Examples in VEE

  • Basic Instrument Control   This example shows basic instrument control and is great for those just starting out with PNA control. Windows and traces are controlled, the PNA stimulus settings are changed and all four S paramenters are measured. The user can enter desired marker frequencies which will then be used to read out the current marker amplitude values. With a one line change (documented in the code) this program can be changed from using 2 traces in one window to one trace in two windows. When run, try entering different frequencies into the marker entry area, the click on the Update button. Both forward and reverse measurements can be made. The program assumes the use of a 177MHz bandpass filter.

  • Reading and Charting Trace Data   This example demonstrates one method of reading trace data from the PNA. The data read can be from any of the 4 S-parameters. The data type measured can be log, phase, raw, memory, or sdata (real & imag.) If sdata or raw is chosen, the program displays two charts with the upper chart being the real data.

  • Saving and Recalling Cal Sets   This example shows how to properly save and recall cal sets. Improper programming of this can easily result in overwriting an existing cal, which results in invalid measurements. Also shows how to programatically do a full 2-port cal as well as a response cal. User is instructed to make 3 cals, presumably using different external conditions (e.g. use different attenuators.) User can then recall these cals in any order.

  • Determining End of Averaging   This very simple example shows how to detect the end of averaging.

  • Using Events with PNA   This simple example shows how to detect the end of sweep using COM Events. This frees up the CPU for other processing while waiting for a sweep to complete. A ReadMe file is included.

Last Updated: Feb 24, 2004