Sunday, August 21, 2011











7470.EXE is a Win32-based emulator for the HP 7470A plotter. It will acquire an HP-GL/2 plot and render it in a window. The plot can then be printed, viewed as an overlay with other plots, or saved in several different graphics file formats as well as its original HP-GL/2 format.

With the help of 7470.EXE, you can capture screenshots from GPIB-based test equipment such as digital oscilloscopes, spectrum analyzers, logic analyzers, and more. 7470.EXE can even recognize certain instrument models and and request plots from them without user access to their front-panel controls.

7470.EXE is part of the KE5FX GPIB Toolkit. The latest version of the Toolkit is downloadable here.

Running 7470

Depending on the options you selected during installation, you can run 7470.EXE from the Start menu, by clicking on its desktop shortcut, or by using its Quick Launch icon on the taskbar. You can also run 7470.EXE from a DOS-box command line or Windows Start->Run... command, optionally specifying a GPIB address from which to acquire host-requested plots (see below), or the names of one or more existing HP-GL/2 data files. Use quotes around filenames that contain spaces - for example,

      7470 "IMD test.plt"            ... Display "IMD test.plt" by itself

7470 before.plt after.plt ... Overlay before.plt and after.plt
7470 (no command-line options) ... Display all plots in the current directory

You can acquire your own HP-GL/2 .PLT files via the options on the Acquire menu, if your PC has a National Instruments-compatible GPIB interface or a Prologix GPIB-USB/GPIB-LAN adapter. It's important to understand that there are two ways to do this in 7470.EXE. Unlike other plotter emulators, 7470.EXE supports both host-requested and device-initiated plotting operations.

Host-Requested Plots

A few instruments, currently limited to the following models, support "host-requested" plotting in 7470.EXE.

  • Tektronix 490P/2750P-series spectrum analyzers (including 492P and 496P)
  • Tektronix 2710-series spectrum analyzers
  • Tektronix 2782/2784 spectrum analyzers
  • HP 3561A dynamic signal analyzers
  • HP 3585A/B spectrum analyzers (see notes below)
  • HP 8566A/8567A/8568A spectrum analyzers (see notes below)
  • HP 8566B/8567B/8568B spectrum analyzers
  • HP 8560A/B/E and 8590-series portable spectrum analyzers
  • HP 54100- and 54200-series digital oscilloscopes
  • Tektronix 2430A, 2432/2432A, and 2440/2440A digital oscilloscopes
  • Tektronix SCD-series transient digitizers (ROM version 1.5 or later)
If your instrument appears in this list, then you can use the Acquire menu to ask it to send an HP-GL/2 plot to 7470.EXE without the need for any interaction with the instrument's front-panel controls. Given a sufficiently-long GPIB cable, you don't even need to be in the same room as the instrument. This mode of operation is also handy for another reason: as 7470.EXE communicates with the instrument to request the plot, it can also turn on graticule illumination, enable the desired display elements, select appropriate pen colors, and execute other plotter-setup tasks that the user would otherwise need to perform manually.

Normally, you'll issue host-initiated plot requests by selecting one of the "Request plot from supported device at address n" options on the Acquire menu. Instrument shortcut entries (see below) can also be selected. Note that earlier Prologix adapters, and those with their DIP switches set to Device mode, can't support host-requested plots at all.

Most instruments that support host-requested plots may be addressed directly on the 7470.EXE command line, just like a .PLT filename:

	7470 3

The above example is suitable for inclusion in a Windows desktop shortcut. When clicked, the shortcut will launch 7470.EXE, which will then immediately request a plot from the supported instrument at GPIB address 3. This feature allows you to capture screenshots with a single mouse click on the host PC.

Host-Requested Plots via Instrument Menu Shortcuts

Beginning with the 1.80 release of 7470.EXE, you can also add strings of the form

	instrument_0         Tektronix 2430A at GPIB address 4\tF2

to the 7470.INI file in the 7470.EXE program directory. The file contains several entries that illustrate how this is done. (See below for more information on 7470.INI.) If any of these entries are present (and not commented out with a leading semicolon), the Acquire menu will include a list of the instrument name/address specification strings and allow you to select one with the mouse, or, alternatively, by pressing a function key.

Important note for HP 8566A-8568A, HP 3585A/B, and HP 8510-series users

Some instruments can't be automatically identified and addressed by 7470.EXE, and many also don't support HP-GL/2 plotting at all. Fortunately, 7470.EXE can still work with a few specific models that are incompatible with other plotters and emulators.

HP 8566A, HP 8567A, and HP 8568A spectrum analyzers

In order to tell 7470.EXE to access one of these instruments, at least one instrument menu shortcut must contain the string "8566A", "8567A", or "8568A". When a shortcut key corresponding to an HP 8566A-8568A spectrum analyzer is pressed, 7470.EXE will request raw annotation, state, and trace data from the analyzer and generate its own HP-GL/2 .PLT file image based on it. This HP-GL/2 image may then be saved, rendered, and printed just like any other .PLT file. A typical menu shortcut for an HP 8566A-8568A spectrum analyzer looks like this:

	instrument_0         HP 8566A / 8567A / 8568A (via HP-GL/2 emulation) at GPIB address 18\tF8

The HP-GL/2 synthesis process for the HP 8566A-8568A analyzers takes place in less than a second, including the data acquisition itself. It's actually a great way to access the later HP 8566B-8568B models as well; not only are 7470.EXE's synthesized HP-GL/2 plots much faster to acquire, but certain features such as markers look much better than they do in the B-series analyzers' own plots. Note, however, that a few display features such as the 'C' trace and hardware diagnostic/error messages will not appear in a synthesized plot.

HP 3585A/B spectrum analyzers

In order to tell 7470.EXE to access one of these instruments, at least one instrument menu shortcut must contain the string "3585". When a shortcut key corresponding to an HP 3585A/B spectrum analyzer is pressed, an HP-GL/2 plot will be synthesized from raw instrument data, as with the HP 8566A-8568A support process described above. A typical menu shortcut for an HP 3585A/B spectrum analyzer looks like this:

	instrument_0         HP 3585A/B (via HP-GL/2 emulation) at GPIB address 11\tF3

HP 8510-series vector network analyzers

In order to tell 7470.EXE to access one of these instruments, at least one instrument menu shortcut must contain the string "8510". When a shortcut key corresponding to an HP 8510-series VNA is pressed, a conventional HP-GL/2 plot will be fetched and rendered. A typical menu shortcut for an HP 8510-series vector network analyzer looks like this:

	instrument_0         HP 8510 series at GPIB address 16\tF9

Again, the normal host- or device-initiated plot menu options will not work with these instruments.

Beginning in version 1.92, a few instrument-menu shortcuts are included by default in 7470.INI. If your 8566A-8568A analyzer's GPIB address is 18, you don't have to modify 7470.INI at all -- just hit F8! Likewise, F9 will acquire a plot from an 8510-series network analyzer by default.

Device-Initiated Plots

If your instrument doesn't appear in the list above, that means it isn't directly supported by 7470.EXE, and won't work with the Acquire->Request functions, instrument menu shortcuts, or the command-line GPIB address feature. However, chances are good that you can still obtain plots from it by activating its front-panel "Plot" button while 7470.EXE is in the "Wait for device-initiated plot" mode. This mode may be selected from the Acquire menu, or by pressing the lower-case 'w' key.

GPIB Instrument and Interface Configuration Notes

Host-requested plotting requires 7470.EXE to carry on a two-way GPIB conversation with the instrument, so you'll need to configure your instrument for Talk/Listen mode (as opposed to Talk-Only or System Controller mode) for use with this feature. This typically involves changing a system-level menu option or DIP switch. All National Instruments GPIB adapters support host-requested plotting, but only versions 3.1 and later of the Prologix GPIB-USB adapter can provide the necessary GPIB controller functionality. All Prologix GPIB-LAN adapter versions are compatible. (For more information on the Prologix adapters, you can contact Prologix here.)

Device-initiated plotting usually requires the instrument to be configured for Talk-Only mode. When their front-panel PLOT buttons are pressed, some instruments, such as the HP analyzers, expect the plotter to be addressable at a specific GPIB address, usually 5. The emulated plotter address is normally controlled by 7470.EXE's GPIB menu, unless an older Prologix adapter with DIP switches is in use. Certain instruments expect to be the only addressable device on the bus when their PLOT buttons are pressed, requiring selection of the "Listen only" option in 7470.EXE's GPIB menu.

As you can imagine, experimentation is sometimes needed to find the right combination of device and host settings that will allow 7470.EXE to work with a particular instrument. Some notes on specific instruments appear below.

  • Tektronix 490P and 2750P spectrum analyzers
    • Device-initiated plots: Must be set to Talk-Only mode via DIP switch in rear. This may cause problems if other devices are on the GPIB bus. 7470 GPIB setting must be "No assigned plotter address (listen only)." Plot with front-panel PLOT button (typically Blue Shift-PLOT).
    • Host-requested plots (recommended): Both Talk-Only and Listen-Only switches should be off (0). LF-or-EOI switch does not matter for use with 7470.EXE, but should be set to on (1) for use with SSM.EXE and PN.EXE utilities.
    • DIP switches on these instruments are extremely prone to age-related failures. Verbum sat sapienti est.
  • Tektronix 2782 and 2784 spectrum analyzers
    • Device-initiated plots: GPIB board must be connected to dedicated plotter output port on rear panel. 7470 GPIB setting must be configured to listen on address 5. (Note that the analyzer cannot be controlled via this port, so many GPIB Toolkit users will want to use host-requested plots instead. These work by synthesizing an HP-GL/2 plot from raw instrument data obtained from the GPIB control port.)
    • Host-requested plots: This feature uses the HP-GL/2 synthesis code developed for the HP 8566A-8568A analyzers. In the current implementation, markers and traces other than NORMAL and A will not be visible in plots requested from a 2782/2784.
  • Tektronix 2430A / 2432 / 2440 DSOs
    • Device-initiated plots: DSO must be set to "Plotter" device mode. 7470 GPIB setting must be "No assigned plotter address (listen only)."
    • Host-requested plots (recommended): DSO must be set to T/L device mode. 7470 GPIB setting does not matter.
    • 7470.EXE will NOT work with the earlier 2430 model, since it does not support GPIB plotting at all.
  • Tektronix SCD-series transient waveform digitizers
    • Device-initiated plots: Issued automatically after triggered acquisition is complete
    • Host-requested plots: Available on ROM versions 1.5 and later; earlier versions must use device-initiated plotting
  • HP 8566B, 8567B, and 8568B spectrum analyzers
    • Device-initiated plots: 7470 must be configured via the GPIB menu to listen at address 5.
    • Press "Lower Left" button on front panel for device-initiated plotting.
    • Host-requested plots are also possible with these analyzers. For faster plotting, though, try the 8566A/8567A/8568A-series menu shortcut (F8) technique described above!
    • Other HP 8560- and 8590-series spectrum analyzers are reported as working like HP 8566B. Host-requested plots may work on these; if not, device-initiated plots should be possible.
  • HP 8566A, 8567A, and 8568A spectrum analyzers
    • These do not support HP-GL/2 plots at all, either device-initiated or host-requested. See notes above on how to work around this limitation.
  • Other instruments known to be compatible with 7470.EXE for device-initiated plotting
    • Tektronix TDS694C and related oscilloscopes
    • Tektronix TDS784D and related oscilloscopes
    • Tektronix 370A curve tracer
    • Tektronix SCD series transient digitizers
      Pre-V1.5 instruments do a screen dump immediately after acquisition
    • Advantest R3762AH vector network analyzer
    • Advantest R3361A spectrum analyzer
    • Advantest R4131B spectrum analyzer
    • Advantest R3261C spectrum analyzer
    • Advantest R9211E FFT analyzer
    • LeCroy 9354AM DSO
    • Giga-Tronics 8003 scalar network analyzer
    • Gould 4072 DSO
      7470 GPIB setting must be "No assigned plotter address (listen only)"
    • HP 3040A cable analyzer
    • HP 54201A DSO
    • HP 54502A DSO
      7470 GPIB setting must be "No assigned plotter address (listen only)"
    • HP 54110D DSO
      7470 GPIB setting must be "No assigned plotter address (listen only)
      DSO must be in talk-only mode
      For maximum text legibility, switch 7470.EXE to 1024x768 mode (Display->1024x768, or hit the '0' key)
    • HP 853A/8559A spectrum analyzer
      7470 GPIB setting must be "No assigned plotter address (listen only)"
    • HP 8510B vector network analyzer
    • HP 8752C vector network analyzer
    • HP 8756A scalar network analyzer
    • HP 8757A scalar network analyzer
      For device-initiated plotting with the 8756 and 8757 network analyzers, the GPIB adapter must be connected to the System Interface port, not the main HP-IB port. If using a Prologix adapter, make sure the firmware is up to date. It may be necessary to disconnect any floppy drives or other peripherals controlled by the analyzer in order to obtain plots.
    • HP 8753A vector network analyzer
    • HP 3562A dynamic signal analyzer
    • HP 5372A frequency/time interval analyzer
    • HP 8569B / 8570A spectrum analyzer
      7470 GPIB setting must be "No assigned plotter address (listen only)"
    • HP 4194A / 4195A network/spectrum analyzer
      7470 GPIB setting must be "No assigned plotter address (listen only)"
      Use Copy->HP_IBDefine->Talk Only, then set Plot_mode and do Copy Start
    • HP 3577A network analyzer
      7470 GPIB setting be "No assigned plotter address (listen only)"
      HP 3577A must be set to Talk-Only mode
    • HP 3588A / 3589A spectrum analyzer
      7470 GPIB setting must match specified plotter address
      Set System Controller mode in analyzer's HP-IB menu
    • Marconi 6500/6311 scalar network analyzer
      7470 must be connected to private bus, addressable at 5, before powering up the analyzer
    • Rohde & Schwarz FSA spectrum analyzer
    • Rohde & Schwarz UPL audio analyzer
    • Wiltron 562 network analyzer
Keep in mind that some instruments need to be set to Talk-Only mode to support device-initiated plots. However, some of those instruments, when set to Talk-Only mode, may prevent other instruments on the GPIB bus from communicating with 7470.EXE (or anything else). Users of multiple GPIB instruments may need to experiment to find a configuration that allows all of the instruments to work properly with each other.

Also, if you have more than two or three powered-down instruments on the GPIB bus, keep in mind that they'll load the bus, possibly preventing successful communication with the instrument(s) that are turned on. When attempting to use 7470.EXE with a new instrument for the first time, it's best to use a simple direct connection between the instrument and the host PC's GPIB adapter.

I'm always interested in hearing from users of other instruments so they may be added to the list above. Please feel free to contact me at jmiles@pop.net with any bug reports or success stories.


Menu Commands and Keyboard Shortcuts

     Key               Menu Command                                 Remarks



l File->Load HP-GL/2 data Retrieves a saved HP-GL/2 file (.PLT, .HPG, .PGL, .HGL) for viewing

s File->Save image or HP-GL/2 data Saves the currently-browsed plot as an HP-GL/2 file. Also can be
used to save the current window contents (which may consist of
several overlaid HP-GL/2 files) as a .GIF, .BMP, .TGA,
or .PCX image file

p File->Print image Sends the current window contents to the default Windows printer

Home File->Close all visible plots Stop displaying/browing any currently-loaded plots. This command
does not delete any files; it simply removes them from
7470.EXE's current display list.

Delete File->Close current plot Stop displaying/browsing the currently-visible plot. This command
does not delete the file; it simply removes it from
7470.EXE's current display list.

Ctrl-Delete File->Delete current plot file Same as File->Close current plot, except that it deletes the
HP-GL/2 file being viewed

Esc File->Quit

Space or F5 View->Refresh current display Reloads the currently-visible HP-GL/2 file. If the file was
acquired as a host-requested plot in the current 7470.EXE session,
it will be re-acquired.

b View->Browse sources one at a time Allows you to use the +/- keys to move through the list of
viewable plots, displaying them one at a time

o View->Overlay all sources Renders the graphical (i.e., non-text) portions of all loaded
or acquired HP-GL/2 plots atop each other. In Overlay mode,
the +/- keys are used to determine which plot contributes
text labels to the display.

The three traces in the example image at the top of this page
were displayed with the View->Overlay command prior to being saved
as a .GIF file. (Use caution when closing or deleting a file in
Overlay mode. The visible text labels are the only way to tell
which file will be closed or deleted!)

+ View->Next source Navigates the list of visible HP-GL/2 plots. Specific behavior is
- View->Previous source determined by the choice of Browse/Overlay mode (above).

5 Display->512 x 384 Adjusts the size of 7470.EXE's window. Some crowded plots look much
Display->640 x 400 better at higher resolutions, but 7470.EXE will render an undersampled
6 Display->640 x 480 image if you you select a window size that's too large for the current
8 Display->800 x 600 Windows desktop. You can change the default window size in the 7470.INI
0 Display->1024 x 768 file (below.)

i Display->Alternate colors Useful for certain instruments such as the HP 8566/8568 analyzers
whose graticule and trace colors appear inverted in 7470.EXE.
(This option was added prior to the pen_colors array in 7470.INI,
which can be a better place to address color-rendering problems.)

c Caption->Edit caption text Allows you to enter text which can subsequently be placed at any
desired location by left-clicking on the currently-viewed plot.
Supported only in Browse mode.

e Caption->Erase most-recently-added caption ...
Removes the most-recently-added user caption from the plot. Supported
only in Browse mode.

w Acquire->Wait for device-initiated plot Enters a mode in which 7470.EXE waits for, and renders, HP-GL/2
data that arrives after pressing the front-panel PLOT button on an
instrument. You can press any key to exit this mode and restore
normal 7470.EXE operation.

W Acquire->Wait for device-initiated plot, Same as above, except that each incoming plot is sent to the
then print default Windows printer. If you set the auto_print_mode field in
7470.INI to '1', 7470.EXE will enter this mode on startup, acting
as an unattended HP-GL/2 print server.

Acquire->Beep when plot received If this option is selected, 7470.EXE will attempts to play the
.wav file specified by the beep_wav_filename field in 7470.INI
as soon as each incoming device-initiated plot has been received
The default setting is based on the beep_when_plot_received field.

Acquire->Request plot from supported When one of these options is selected, 7470.EXE will attempt to
device at GPIB address N(1-30) identify the instrument at the specified address and initiate a
host-requested plotting operation. This may entail sending
commands to the instrument to turn on its graticule display,
select HP-GL printing, and perform other setup tasks. Undefined
results may occur if the instrument does not appear in the list
under "Host-Requested Plots" above.

GPIB->No assigned plotter address During device-initiated plots, some instruments may need to
(listen-only) communicate with the (emulated) plotter, expecting to find it at a
specific GPIB address. Others may expect the plotter to be
GPIB->Plotter addressable at N(0-30) entirely transparent to the GPIB bus. This menu allows you to
specify the plotter's address, or to assign it no address at all.

When an older Prologix GPIB-USB adapter is in use, this functionality
is provided by its DIP switch, and the GPIB menu will have no
effect.


Mouse Controls

Left-click anywhere within a displayed plot in Browse mode to add the current caption text (Caption->Edit caption text...) to the plot at that location.

The modified HP-GL/2 file will be saved automatically after any user captions are added or removed.


7470.INI

The directory containing 7470.EXE should also contain a file called 7470.INI, which provides some configuration defaults that you can change if desired.

Most users won't need to edit this file. To configure the GPIB Toolkit for use with Prologix GPIB adapters, you'll need to edit CONNECT.INI instead, or run the Prologix GPIB Configurator utility (see below).

Here is an example of a 7470.INI file with comments explaining each line:

;

;Initial X/Y resolution
;

res_x 640
res_y 480

;
;If your plots appear clipped improperly, you can change the default
;renderer margins here. (These default-margin settings will be overridden
;by any HP-GL/2 'IP' opcodes present in the file.)
;

x_margin 16
y_margin 16

;
;Set to '1' to display graphs in an alternate color set.
;Useful for the HP 8566B analyzer, possibly others
;
;'0' causes 7470 to use the default pen colors specified below
;

color_scheme 0

;
;Specify a higher value (in milliseconds) if 7470.EXE times
;out during device-initiated plotting
;

async_timeout 3500

;
;Options below are used to determine how the plotter responds to various
;output queries. No effect unless a valid GPIB board address is specified.
;Lines in this group may be commented out if necessary to suppress replies
;to a given query
;

OE_reply 0
OH_reply 0,0,10000,7500
OI_reply 7470A
OP_reply 0,0,10000,7500
OO_reply 0,1,0,0,0,0,0,0
OF_reply 40,40

;
;Set to '0' to suppress replies to OS (Output Status) command
;

process_OS 1

;
;Set to '1' to autodetect pen-storage commands in device-initiated plots,
;avoiding the need to wait for the async_timeout interval to expire at the
;end of each plot. Set to '0' if plots appear to be terminated prematurely
;

SP0_detect 1

;
;Plots with fewer bytes than this are assumed to be preambles for multistage
;operations (e.g., device-initiated plots from the HP 8756A) rather than
;complete, standalone plots
;

min_plot_bytes 128

;
;Sets the default plotter address in the GPIB menu. Use -1 for
;listen-only mode
;

default_board_addr 5

;
;For diagnostic/optimization purposes
;

async_xfer_size 100
async_GPIB_timeout_ms 1000
serial_read_timeout 500
release_sys_control 0
ignore_write_aborts 1
min_plot_bytes 128

;
;Caption text applied when left-clicking on plot
;(leading spaces ignored)
;
;If this field is blank, the user will be prompted to enter the
;caption text
;

caption_text

;
;Set to '1' to execute a 'W' (Acquire->Wait for device-initiated plot, then print)
;function automatically when 7470.EXE starts. Helpful if you want to make an
;unattended PC act as a dedicated HP-GL/2 print server
;

auto_print_mode 0

;
;Uncomment this line (remove the leading semicolon) to force
;7470.EXE to exit immediately after acquiring a plot and saving it.
;Normally, this line should be left commented out to run 7470 in its
;'interactive' mode. Note that if any command-line parameters are
;supplied when launching 7470, the auto_save_filename option is ignored
;

;auto_save_filename c:\my documents\automatic capture.gif

;
;Set beep_when_plot_received to '1' to play a sound after each new
;device-initiated plot has been received
;
;Sound may optionally be specified as a .wav filename. If beep_wav_filename
;is commented out, a default system alert sound will be played
;

beep_when_plot_received 0
beep_wav_filename c:\program files\ke5fx\gpib\beep.wav

;
;Enable to write incoming/outgoing GPIB traffic to a file during
;reception of device-initiated plots
;

;traffic_diag_filename c:\traffic.txt

;
;Optional list of instrument/address pairs for the Acquire menu
;
;Entries should have the form 'instrument_n xxxx at GPIB address ',
;where n is an arbitrary value or name and xxxx is the name of the
;instrument at the specified address. Optionally, the entry value may end
;in a '\tFn' substring to assign a keyboard shortcut to the instrument.
;(Don't use F1 or F5 -- they are reserved by 7470 for other functions.)
;
;If any entries are present, then they will be added to the Acquire menu.
;This feature is valid ONLY for those instruments for which 7470
;supports host-requested plots!
;

instrument_0 Tektronix 2430A / 2432A / 2440A at GPIB address 4\tF2
instrument_1 HP 3585A/B (via HP-GL/2 emulation) at GPIB address 11\tF3
instrument_2 Tektronix 49x at GPIB address 3\tF4
instrument_3 HP 8566B / 8567B / 8568B at GPIB address 18\tF6
instrument_4 HP 8566A / 8567A / 8568A (via HP-GL/2 emulation) at GPIB address 18\tF8
instrument_5 HP 8510 series at GPIB address 16\tF9

;
;Pen RGB color array
;

pen_0 255,255,255 `White
pen_1 0,0,0 `Black
pen_2 0,0,255 `Blue
pen_3 0,192,0 `Green
pen_4 128,128,0 `Dark yellow
pen_5 255,0,0 `Red
pen_6 255,0,255 `Magenta
pen_7 0,255,255 `Cyan


CONNECT.INI

The program directory should also contain a file called CONNECT.INI, which tells the GPIB Toolkit how to take advantage of various GPIB connectivity options. These include direct RS-232 or TCP/IP links, as well as the Prologix GPIB-USB and GPIB-LAN adapters.

If you have a Prologix adapter, you can review the comments in CONNECT.INI to learn how to configure 7470 and the other GPIB Toolkit applications to use it, or you can simply select your adapter in the Prologix configurator application (PROLOGIX.EXE) and press "Update CONNECT.INI" to automate the configuration process.

If the COM port specification in CONNECT.INI is commented out with a leading semicolon -- or if CONNECT.INI is missing entirely -- all GPIB Toolkit applications will attempt to communicate with the GPIB0 device via the National Instruments NI488.2 programming interface instead. This is the default behavior.

Note that some versions of Windows hide .INI file suffixes by default. In Windows 2000 and XP, for instance, CONNECT.INI may appear simply as "CONNECT," with the type "Configuration Settings." To turn off this behavior, go to the Tools->Folder Options->View tab in any Explorer window and deselect the "Hide file extensions for known file types" option.


Release Notes

Release 0.91 of 31-Oct-01

  • Some formatting improvements and assorted updates, but still an alpha release!
Release 0.92 of 22-Jan-02
  • Takes multiple files or GPIB addresses to plot, overlay-style
  • Runs at 800x600 by default
  • Lets you print the current plot on any Windows-compatible printer by hitting 'p' (inkjets are great for this!)
  • This release also includes source for my GPIBLIB wrapper for National Instruments NI488 drivers.
Release 0.93 of 28-Jan-02
  • Wildcards can now be used on the command line (e.g., 7470 ..\myfiles\*.plt)
  • If wildcards are used, all matching files will be displayed one at a time. Use the + and - keys to navigate the file list. You may also run 7470 by itself to display all .PLT, .HPG, .HGL, and .PGL files in the current directory.
  • Hit 's' to save the current plot as a 16-bit .TGA file. Many photo editors, including Microsoft's, will allow you to manipulate these files and convert them to other common formats such as .GIF, .BMP, or .JPG.
Release 0.94 of 03-Feb-03
  • Made some improvements to the GPIBLIB wrapper to support instruments like the HP5345 and HP5370 counters that use terminator characters to delimit transmitted strings.
  • Added example "get current frequency" programs for these counters in their respective subdirectories.
  • Sending a GPIB device-clear message is now optional behavior for GPIB_startup(), and disabled by default. This change was needed to avoid resetting the HP5370B counter during GPIB handshaking. It doesn't seem to have affected any other instruments.
Release 1.00 of 15-Apr-03
  • Beta release of the new and improved 7470.EXE: near-complete rewrite.
  • All commands accessible via Windows menu
  • Saves .GIF, .BMP, and .PCX files directly from program
  • New "wait for plot" feature should (theoretically) support any instrument in talk-only mode
  • Many UI improvements including resolution switching and overlay/browse modes
Release 1.50 of 19-Jul-04
  • Many improvements, including more supported instruments, better HP-GL rendering fidelity, 7470.INI setup options, and more
Release 1.60 of 9-Oct-04
  • Added response options for several plotter output-status queries, necessary to support HP 8752C VNA and many other instruments
  • Added auto_save_filename, other options to 7470.INI
  • Default suffix for saved files is now .PLT, not .GIF
  • Revised handling of UC (User Character) opcodes
Release 1.70 of 22-Mar-05
  • Reduced buffer size used by GPIB_read() from 64K to 4K. This function can no longer be used to acquire a large block of data such as an entire plot.
Release 1.80 of 13-Dec-05
  • 7470.EXE is now installed with the larger KE5FX GPIB Toolkit package
  • Improved character-positioning code in renderer
  • Added support for host-requested plotting from Tektronix 2710-series spectrum analyzers
  • Significant GPIBLIB rework to add support for Prologix GPIB-USB adapter
  • Added instrument name/address/function-key feature to 7470.INI
  • Added user-configurable RGB pen colors to 7470.INI
  • Fixed a bug that could cause blank pages to be printed on a LaserJet
  • Added HTML user guide
Release 1.81 of 28-Dec-05
  • Windows desktop no longer used as the working directory when running from a desktop icon
  • Renderer now supports device-initiated plots from HP 3562A dynamic signal analyzer
    • HP-GL/2 OF and OO commands supported
    • SC command supports parameter-free form
Release 1.82 of 3-Jan-06
  • HP 8566A/8567A/8568A spectrum analyzers supported (via NI GPIB interfaces only)
    • Host-based HP-GL/2 synthesis used to create .PLT image from raw analyzer data
    • GPIBLIB updated to inhibit EOI assertion at end of host-transmitted strings
  • Renderer now supports device-initiated plots from Advantest R3361A spectrum analyzer
    • Selected pen restored to its equivalent physical position after an SC command
    • Parameter-free SC command uses reasonable (nonzero) defaults
Release 1.83 of 10-Mar-06
  • Tektronix SCD-series transient digitizers supported
Release 1.84 of 25-Mar-06
  • HP 5372A time-interval analyzer supported
Release 1.85 of 18-Apr-06
  • Extensive changes made to simplify the code that handles generating and refreshing temporary .PLT files. (Most users will not notice any operational differences.)
  • Added support for software-based GPIB address-selection feature in new Prologix adapter firmware
    • Moved controller_mode, device_addressable, and host_addressable fields from 7470.INI to CONNECT.INI. These options now apply to all applications in the GPIB Toolkit, not just 7470.EXE. If you want to keep your existing 7470.INI file when upgrading, you'll need to move these three options to CONNECT.INI yourself.
    • Added reset_to_local field to CONNECT.INI. This affects Prologix adapters only; see CONNECT.INI for more information
    • HP 8568A rev-B spectrum analyzer successfully tested with new software-addressable Prologix adapter
Release 1.86 of 19-May-06
  • HP 3588A spectrum analyzer supported
    • Negative ASCII characters rendered as spaces
  • Rohde & Schwarz FSA spectrum analyzer supported
Release 1.87 of 26-May-06
  • Fix potential bug with device-initiated plots on the HP 8566B-8568B analyzers using Prologix adapters
    • GPIB library ignores device_addressable and reset_to_local fields in CONNECT.INI if controller_mode is 0
Release 1.88 of 25-Jun-06
  • Don't check iberr after ibrd() or ibwrt() unless ibsta has ERR bit set (attempt to improve compatibility with NI GPIB-232CT-A)
Release 1.89 of 6-Jul-06
  • Always reset devices to local control at shutdown time when using NI-compatible GPIB interfaces
Release 1.90 of 1-Oct-06
  • Serial ports beyond COM9 are now supported. Thanks to Bill Tracey, KD5TFD, for this patch!
Release 1.91 of 9-Nov-06
  • Added min_plot_bytes field to 7470.INI to allow small (preamble) data blocks from instruments such as the HP 8756A network analyzer to be disregarded
  • Increased X and Y screenspace margins from 4 to 8 pixels to reduce text-clipping problems on some instruments (e.g., HP 54502A)
  • Fixed a bug that caused occasional failures to accept device-initiated plots from HP 8566B-8568B analyzers via Prologix GPIB adapters
Release 1.92 of 15-Jan-07
  • Saved .PLT files are now zero-terminated to prevent a possible buffer-overflow condition in the renderer
  • Some tweaks for HP 54110D DSO support
  • F2, F4, and F8 instrument shortcuts enabled by default in 7470.INI, for demonstration purposes
Release 1.93 of 22-Jan-07
  • Fixed a bug introduced in 1.92 that could cause text-rendering problems on certain HP 8566B-8568B plots
  • Improved color fidelity in .GIF and .PCX files, particularly when saved at higher display resolutions
Release 1.94 of 5-Feb-07
  • Enabled EOS termination in device-initiated plot mode on NI cards. This shouldn't cause problems for anyone but if it does, please let me know.
Release 1.95 of 6-Feb-07
  • Changed 7470.INI file entry async_GPIB_timeout to async_GPIB_timeout_ms. All applications that call GPIB_connect() now specify their timeout parameters directly in milliseconds, rather than using the GPTIMEOUT type. As with the 1.94 update above, this change should not affect most users of the GPIB Toolkit
Release 1.96 of 8-Feb-07
  • 7470.exe no longer enables board-level EOS termination during device-initiated plots, due to problems reported with certain instruments (e.g., Wiltron 562). (Board-level EOS checks were originally added for the benefit of the listen.exe command-line utility, but they're not useful in 7470.exe.)
Release 1.97 of 4-Mar-07
  • The use of instrument-menu shortcuts in the 7470.INI file no longer disables the "Request plot from supported device at address xx" options in the Acquire menu
Release 1.98 of 20-Mar-07
  • Added basic support for host-requested plots from the Tektronix 2782/2784 spectrum analyzers (see notes above)
  • Display-line support added in synthesized HP-GL/2 plots for the HP 8566A-8568A analyzers
Release 1.990 of 28-May-07
  • Added support for host-requested plots from HP 54200-series DSOs (tested with HP 54201A)
Release 1.991 of 04-Nov-07
  • Added support for host-requested plots from HP 8510-series vector network analyzers (see notes above)
  • Added support for host-requested plots from HP 3585A/B spectrum analyzers (see notes above)
  • Added x_margin and y_margin entries to 7470.INI to allow the default plot margins to be changed
  • New code to center file dialogs within the main window
  • Prompt before overwriting existing files with the Save command
Release 1.992 of 06-Nov-07
  • Added Caption menu to allow user labels to be added to plots
  • Viewing a plot from a Tektronix 278x analyzer no longer toggles the alternate-color state for all other loaded plots
Release 1.993 of 07-Nov-07
  • Added workaround for a firmware bug in certain HP 8590-series spectrum analyzers that could cause vertically-compressed rendering in 7470.exe and PrintCapture
Release 1.994 of 16-Jan-08
  • Added support for host-requested plots from HP 3561A dynamic signal analyzer
Release 1.995 of 05-Apr-08
  • Extensive revisions to HP-GL renderer made to accommodate Advantest R9211E and other devices that use multiple plotting windows
    • Improved rendering of HP 54502A plots
    • When rendering .PLT files acquired from earlier versions of 7470.EXE, it may be necessary to increase the x_margin and y_margin values in 7470.INI to avoid clipping problems
    • Removed Display->Aspect correction menu options, which are no longer needed
    • The last version of the GPIB Toolkit with the original HP-GL renderer can be downloaded at http://www.ke5fx.com/gpib/setup148.exe
  • The Acquire and GPIB menus now work exactly the same way with Prologix and National Instruments adapters
    • Removed controller_mode, device_addressable, and host_addressable fields from CONNECT.INI, replacing them with is_Prologix
    • If is_Prologix is nonzero, the Prologix adapter is assumed to be capable of software-based mode and address configuration
    • Users of other interfaces, as well as early Prologix adapters that don't support programmable addressing, will need to edit CONNECT.INI manually to set is_Prologix to 0
  • Captions from all loaded files are visible in Overlay mode
Release 1.996 of 7-May-08
  • Added Acquire->Beep when plot received option (and corresponding 7470.INI field)
  • Waiting for device-initiated plots is now interruptable with left click anywhere onscreen
  • User captions in Overlay mode are now keyed to the assigned pen color for that trace
Release 1.997 of 14-Jul-08
  • Renamed SERIAL.INI to CONNECT.INI, and added TCP/IP support
  • Fixed a bug that could cause failures with GPIB addresses specified on the 7470.exe command line
  • Added File->Close all visible plots option (keyboard shortcut: Home)
  • Added support for host-requested plots from HP 8753-series network analyzers
  • Added two instrument shortcuts to 7470.INI (HP 8753 series at address 16, and HP 54201A at address 5)
  • Acquisition from HP 54201A no longer selects the alternate pen color set automatically
  • Plots requested from 8510-series analyzers are resized to occupy the entire page
  • Acquired .PLT files are no longer saved in the Program Files subtree
Release 1.998 of 25-Jul-08
  • HP 8753 series analyzers no longer report "Addressed to talk with nothing to say" when transmitting host-requested plots
Release 1.9981 of 5-Nov-08
  • Added traffic_diag_filename field to 7470.INI to help troubleshoot device-initiated plotting
  • Increased size of temporary memory buffer used to receive incoming plots to 4 MB
  • Text-layout improvements in 3585A/8566A/8568A plots
Release 1.9982 of 23-Dec-08
  • Host-requested plots are now supported for Tektronix 492P and 496P analyzers. Displays in zero-span mode and LIN mode are not plotted
  • Host-requested plots are now supported for HP 70000-series analyzers (logarithmic display modes only, markers unsupported)
Release 1.9983 of 8-Apr-09
  • Added support for host-requested plots from HP 54100-series DSOs (tested with HP 54111D)
  • Added a workaround for truncated PA commands from the Tektronix 370 curve tracer
  • Captions may now be created and erased in the currently-selected plot in Overlay mode
  • Text from erased captions becomes the default text for subsequent captions, making it easy to reposition captions with the e key and left mouse button
Release 1.9984 of 5-Oct-10
  • Fixed bug affecting XT and YT tick mark placement (Tek 2430A/2432A/2440 graticules)
Release 1.9985 of 9-Jun-11
  • Plots from HP 8753 series analyzers should now be requested with the F9 shortcut (Acquire->HP 8510 or 8753 series). The previous shortcut, F11, was yielding incomplete or misaligned plots on some instruments.
  • HP-GL label text in Browse mode is now rendered in the selected pen color, rather than black. As before, user captions are rendered in black in Browse mode, and all text drawn in Overlay mode is based on the order in which each plot was loaded or acquired.
  • Bumped the default x_margin and y_margin values in 7470.INI from 16 to 24 pixels to avoid excessive clipping on some plots


Acknowledgements and Additional Notes

My graphics library (WinVFX) doesn't support scalable/rotatable vector fonts. Consequently, text elements in plots will not appear exactly as they do when rendered by a LaserJet or HP-GL/2 plotter.

Thanks to Harrison Hooker, W8YMO for supplying information on the obsolete HP7470A command set.

Thanks to Vladan Temer of Sonoma Instrument Co. for supplying additional 7470A documentation and providing extensive assistance with support for various HP instruments in the 1.60 release.

Thanks to Dr. Alfredo Rosati, I5UXJ for his contribution of the Tektronix 2782/2784 and HP 8510 support code, and to Ron Kittel, K8AQC, and Grant Hodgman, G8UBN for their extensive help with development and testing on the HP 3585A.

HP 54200-series DSO support provided by Abdul Nizar of Prologix.

If you find that 7470.EXE doesn't meet your needs, an excellent commercial alternative is PrintCapture. See the PrintCapture site for more information. Two more-expensive commercial packages from Aphena, which I haven't personally evaluated, are Plottergeist and SoftPlot. A good third-party renderer for HPGL files obtained from 7470.EXE is ViewCompanion.



Released into the public domain 24-Jan-01 by John Miles, KE5FX.
Please contact jmiles@pop.net with feedback and enhancements!

Source code compilable with the free Microsoft Visual Studio Express package
No warranties, expressed or implied, are offered with this program.
Use at your own risk!

source:



Welcome to the KE5FX GPIB Toolkit!


The KE5FX GPIB Toolkit is a collection of free Windows utilities that will help you make and record research-quality measurements with GPIB-based electronic test equipment.

This is version 1.86 of the Toolkit, released July 2, 2011. The latest release is always available for downloading here. For troubleshooting help and additional application notes, check the FAQ.

The GPIB Toolkit is provided with full C++ source code for public- and private-sector, educational and Amateur Radio / hobbyist use. Comments and feedback are always welcome.

John Miles, KE5FX
jmiles@pop.net



7470

7470.EXE is a Win32-based emulator for the HP 7470A plotter. See its User Guide for more information.



PN

PN.EXE is an automated phase-noise measurement utility for HP, Tektronix, and Advantest spectrum analyzers. See its User Guide for more information.



SSM

SSM.EXE is a spectrum surveillance monitor application for HP, Tektronix, and Advantest spectrum analyzers. See its User Guide for more information.


PROLOGIX CONFIGURATOR

PROLOGIX.EXE is a configuration utility for Prologix GPIB-USB adapters (version 3 or later) and Prologix GPIB-LAN adapters.

All of the GPIB Toolkit applications support both Prologix and National Instruments GPIB adapters. When using a Prologix adapter, it's necessary to edit the C:\Program Files\KE5FX\GPIB\CONNECT.INI file to tell the GPIB Toolkit where to find the Prologix adapter's virtual serial port or network address.

This task is easy to accomplish with PROLOGIX.EXE. Simply run the program, select the Prologix adapter in the device list, and press the Update CONNECT.INI button. (Be sure to exit from PROLOGIX.EXE before attempting to run any other GPIB Toolkit application.)

Beginning with the V1.50 release of the GPIB Toolkit, it is no longer necessary to select Device or Controller mode in PROLOGIX.EXE unless you wish to use the optional Terminal or Advanced Settings controls. Each Toolkit application will configure the Prologix adapter's mode and address settings as needed.


           Usage examples:


prologix Run with no command-line options for normal enumeration of all
Prologix GPIB-USB, GPIB-LAN, and National Instruments adapters

prologix -noni Don't attempt to enumerate National Instruments adapters (useful if
error messages are reported after a partial NI488.2 driver uninstallation)

prologix -nonet Don't issue UDP broadcasts to detect Prologix GPIB-LAN adapters




SATRACE

SATRACE.EXE can be thought of as a console-oriented version of SSM. It requests one or more traces from any spectrum analyzer supported by SSM, and writes them to stdout as lists of comma-separated frequency/amplitude pairs.

Like SSM, SATRACE is a read-only GPIB application; it does not alter any spectrum analyzer control settings except for sweep synchronization (and span-width display modes where necessary). Its command-line parameters are also very similar to those supported by SSM.

           Usage: satrace 
[...]

Examples using GPIB address 18:

satrace 18 Auto-identify analyzer at GPIB address 18 and acquire
a single trace from it

satrace 18 -856xa Special option required for use with HP8566A-HP8568A

satrace 18 -8569b Special option required for use with HP8569B/8570A

satrace 18 -358xa Special option required for use with HP3588A/3589A

satrace 18 -3585 Special option required for use with HP3585A/B

satrace 18 -r3261 Special option required for use with Advantest
R3261/R3361/R3265/R3271-series analyzers

satrace 18 -advantest Special option required for use with supported
Advantest R3100/R3200/R3400-series analyzers

satrace 18 -scpi Special option required for use with Agilent E4400-
series, R&S FSEA/B/M/K, R&S FSIQ, or Anritsu MS8604A

satrace 18 -f Favor acquisition speed over resolution or other
parameters (if supported)

satrace 18 -t Disable GPIB timeout checking during long sweeps

satrace 18 -ao:-7 Add -7 dBm to all reported amplitude values

satrace 18 -fo:150000000 Add 150 MHz to all reported frequency values

satrace 18 -reps:15 Acquire 15 successive traces (0 = run until keypress)

satrace 18 -header Display time/datestamp and available analyzer control
settings

satrace 18 -lf Separate frequency/amplitude pairs with linefeeds
rather than commas

satrace 18 -spline:800 Resample trace using cubic spline reconstruction to
generate (e.g.) 800 points, regardless of the
analyzer's trace array width

satrace 18 -point:128 Resample trace using point-sampled values

satrace 18 -min:128 Resample trace using minimum bucket values when more
source points than requested are available
(otherwise use spline)

satrace 18 -max:128 Resample trace using maximum bucket values when more
source points than requested are available
(otherwise use spline)

satrace 18 -avg:128 Resample trace using averaged bucket values when more
source points than requested are available
(otherwise use spline)

satrace 18 -connect:"xxx"
Specify GPIB command string to be issued when
initially connecting to instrument

satrace 18 -disconnect:"xxx"
Specify GPIB command string to be issued when
disconnecting prior to program termination

satrace 18 -856xa -f Example using multiple options
In most cases, SATRACE's output will be "piped" to another file or application. For example, the command
           c:\program files\ke5fx\gpib>satrace 18 -reps:100 -point:500 >temp.txt

will read 100 successive traces from the analyzer at GPIB address 18, point-sample them to generate 500 (Hz,dBm) value pairs for each trace, and write the resulting comma-separated value lists to the file temp.txt.

For more details on trace resampling, see the FAQ ("How do the trace-resampling options in SATRACE and SSM work?").

Release 1.01 of 25-Jul-08

  • Tektronix 49x/275x analyzers now use low-resolution mode by default to avoid checksum errors
Release 1.02 of 08-Sep-08
  • Added support for MAX SPAN traces from Tektronix 49x/275x and 271x analyzers
Release 1.03 of 20-Oct-08
  • Added support for the Advantest R3132 family of spectrum analyzers, including the R3132, R3162, R3172, and R3182 models
  • Fixed bug that could cause assertion failures on Agilent E4400-series instruments
Release 1.04 of 08-Apr-09
  • Added support for the Advantest R3261/R3361/R3265/R3271-family of spectrum analyzers
Release 1.05 of 30-May-11
  • Added support for the Agilent E4406A Vector Signal Analyzer


SGENTEST

SGENTEST.EXE tests HP signal generators (8656A/B, 8757A-D, 8642B/M, 8662A/8663A and others) by programming randomly-chosen frequency and amplitude settings. Output signals are then verified by an HP 8566A/B, 8568A/B, or 8560A/E-series spectrum analyzer.

Usage: sgentest   [ ...]


Available options (with default values):

-fmax:1.2E9 .... Maximum test frequency = 1200 MHz
-fmin:10E3 .... Minimum test frequency = 10 kHz
-amin:-90 .... Minimum test power = -90 dBm
-amax:10 .... Maximum test power = 10 dBm
-ftol:200 .... Frequency tolerance = +/- 200 Hz
-atol:2 .... Amplitude tolerance = +/- 2 dBm
-wait:0.25 .... Wait 250 milliseconds after programming generator
-8662 .... Option to check for HP 8662A/8663A hardware errors

Notes:

- Minimum test power must be sufficient to yield good amplitude measurements
- Numeric arguments are reals, and may use scientific notation

Example to test HP 8663A at address 19 using a spectrum analyzer at address 18:

sgentest 18 19 -fmax:2559E6 -amax:19 -8662



Miscellaneous Win32 Console Applications

By default, the following utilities are installed with the rest of the GPIB Toolkit executables in the C:\Program Files\KE5FX\GPIB directory. In most cases you can obtain usage notes by running each program with no command-line arguments.

PARSE.EXE is a simple command-line utility that allows you to inspect HP-GL files by dumping their instructions to stdout.

QUERY.EXE is a standalone GPIB query utility intended for diagnostic purposes and batch/shortcut files.

TALK.EXE is a standalone GPIB command-transmission utility intended for diagnostic purposes and batch/shortcut files.

LISTEN.EXE is a standalone GPIB data-reception utility for ASCII traffic, intended for diagnostic purposes and batch/shortcut files.

BINQUERY.EXE is a standalone GPIB query utility intended for diagnostic purposes and batch/shortcut files. It illustrates how to retrieve arbitrarily-large binary data blocks from GPIB instrumentation.

5345A.EXE and 5370.EXE are two example programs that show how to communicate via GPIB with the HP 5345A and HP 5370A/B frequency counters, respectively. They are meant to be modified and recompiled as needed.

DTS2070.EXE demonstrates capture of timing data from a Wavecrest DTS2070 timing analyzer. Like the HP counter utilities it is meant to be modified as needed.

DSO6000.EXE retrieves voltage data from a trace captured on an Agilent DSO/MSO6000A-series oscilloscope. If an output filename is supplied on the command line, the data will be written as a series of double-precision binary values; otherwise, the voltage values will be printed to stdout. DSO6000.EXE assumes that a SINGLE sweep has run to completion, and that the oscilloscope is in STOP mode (STOP/RUN button illuminated red.) It was tested on an MSO6054A, and may or may not be compatible with other Agilent models such as the DSO/MSO5000A series.

CAL_TEK490.EXE contains various calibration aids from the Tektronix 492P service manual. Run the program for a menu of available calibration routines.

ECHOCLIENT.EXE and ECHOSERVER.EXE are intended for troubleshooting and benchmarking TCP/IP connections. These utilities communicate over port 4242. (Note that benchmark results obtained from these programs are normally limited by the GPIB Toolkit's network layer, rather than by the connection itself.)

PRINTHPG.EXE sends a plotter data file (.PLT, .HPG, etc.) to the default DOS printer (PRN device). This printer should be an HP LaserJet or compatible model that supports legacy HP-GL commands. Other printers can be used by 7470.EXE, but the bitmaps printed by 7470.EXE will lack the resolution and fidelity obtainable by sending the plotter file directly to a genuine HP-GL-compatible printer.

If you have a LaserJet and want the best-quality black-and-white output possible, PRINTHPG.EXE is the way to go. Note that even LaserJets don't support some HP-GL features, like UC (User Character) opcodes! If your instrument relies on these, you'll need to use 7470.EXE to render its plots and print them as fixed-resolution bitmaps.


Example Batch Files for Instrument Control

By default, the following batch files are installed with the rest of the GPIB Toolkit executables in the C:\Program Files\KE5FX\GPIB directory. They may be inspected and modified with any word processor or text editor capable of working with plaintext ASCII files.

WIFI_HP8566.BAT uses TALK.EXE to program an HP 8566B spectrum analyzer at GPIB address 18 for 2350-2550 MHz sweeps at 5 dB/division, selecting a -35 dBm reference level and 0 dB of RF attenuation. It then launches SSM.EXE with max-accumulation and WiFi band boundaries enabled.

WIFI_TEK490.BAT uses TALK.EXE to program a Tektronix 492P/494P/494AP/497P analyzer at GPIB address 3 in a similar fashion. The analyzer's CRT readout is turned off to prevent burn-in.

WIFI_E4406A.BAT programs an Agilent E4406A Vector Signal Analyzer at GPIB address 18 to display the middle 10 MHz of WiFi channel 1 (2412 MHz). It then launches SSM.EXE with max-accumulation and WiFi band boundaries enabled.

R3267.BAT uses BINQUERY.EXE to request (.BMP) images from an Advantest R3264, R3267, or R3273 spectrum analyzer at GPIB address 7.

IMD_8566B_8568B.BAT uses TALK.EXE to transmit the downloadable program (DLP) T_HIRDIMOD to the nonvolatile user RAM on an HP 8566B or 8568B spectrum analyzer. This program performs basic third-order intermodulation distortion measurements on signals between 10 MHz and 500 MHz, and also calculates IP3. See HP product note 8566B/8568B-1 for more information.

ESM.BAT uses TALK.EXE to control a Rohde & Schwarz ESM-500A receiver. Run the batch file without any arguments to see a brief usage guide.


Example HP-GL/2 (.PLT) and Phase Noise Plot (.PNP) Files

The C:\Program Files\KE5FX\GPIB directory also contains three subdirectories, Composite noise baseline plots, Sample HPGL files, and Time interval plots. These subdirectories contain a variety of .PNP and .PLT files that can be loaded and displayed by PN and 7470, respectively.


Released into the public domain 16-Dec-05 by John Miles, KE5FX. Please contact jmiles@pop.net with feedback and enhancements!

Some DSPLIB components used by the GPIB Toolkit are subject to open-source license agreements; see the current DSPLIB distribution for details.

Source code compilable with the free Microsoft Visual Studio Express package
No warranties, expressed or implied, are offered with these programs.
Use at your own risk!


source: http://www.thegleam.com/ke5fx/gpib/readme.htm














FAQ and Troubleshooting Hints


Q. Where can the current version of the GPIB Toolkit be downloaded?

A. http://www.ke5fx.com/gpib/setup.exe will always point to the latest version.

I'd recommend against mirroring this file, since bug fixes and enhancements are made on a regular basis. Please link to this copy instead, using the ke5fx.com address rather than the redirected link where the setup file is currently hosted.

Q. What are all these .PLT, .SSM, and .PNP files for? I just want to save screenshots!

A. .PLT, .SSM, and .PNP files are the "native" formats used by 7470.EXE, SSM.EXE, and PN.EXE, respectively. While all three of these programs can save screenshots to .GIF, .PCX, .BMP, and .TGA files, you are almost always better off saving most of your acquisition data in the application's native format, and 'rendering' screen captures only when needed for publication.

Why? The answer depends on the application. 7470.EXE allows you to load multiple HP-GL/2 (.PLT) files at once and overlay them for easy visual comparison with each other, rendering them at any of several screen resolutions. None of these features are possible if you saved only .GIF, .BMP, .TGA, or .PCX image files for your previous measurements, because 7470.EXE can't read those formats.

The same is true of PN.EXE. Phase-noise plot files (.PNP) contain much more data than is visible in a given screenshot. If you don't keep copies of your original .PNP files, you won't be able to overlay multiple noise plots, choose different legend fields, or render your plots at different resolutions. Likewise, .SSM files allow you to scroll through hours' or days' worth of real-time trace data, much more than a single screen capture can represent.

So you should always save "native" files for measurements you want to keep. You can turn them into screenshots anytime!

Q. Can any of the Toolkit applications save screen images to .JPG files?

A. No. .JPG files use lossy compression techniques that have been optimized for photographic subjects. They're not appropriate for saving high-contrast vector images, graticule plots, or any other form of line art.

.GIF files will make your PN and 7470 screen captures look better, and they'll often be smaller as well. The .GIF format can also be used to store SSM screenshots, but .BMPs are preferable due to the larger color space needed to represent a saved SSM display.

Q. Where do 7470, PN, and SSM save the files they acquire?

A. Newly-acquired .PLT, .PNP, and .SSM files are saved in the so-called "current working directory" effective at the time the program was started. If the current working directory is found to be the Windows desktop or any directory in the Program Files tree, the current user's My Documents folder is used instead.

In practice this means that quite a few temporary files are likely to accumulate in your My Documents folder. You can force the programs to save their files to any desired directory -- except for those within the Program Files tree -- by right-clicking on their shortcuts and changing the Start in: field.

Because the GPIB Toolkit programs can reuse or otherwise overwrite their own temporary files, it's always a good idea to save your own copies of any files you want to keep.

Q. What GPIB adapters are recommended for use with the toolkit?

A. Currently, only National Instruments and Prologix adapters are guaranteed to work correctly. There are quite a few National Instruments-compatible adapters on the market, but in my experience they aren't always as compatible with the NI 488.2 programming standard as their manufacturers claim.

I use a National Instruments PCI-GPIB adapter with my desktop system, and a Prologix adapter with my laptop. The PCI-GPIB offers the best overall performance in realtime applications such as SSM.EXE, and its price on eBay is typically about the same as a new Prologix board (US $125-$150), making it a good choice if you don't need portability. Of course, a separate GPIB cable is also required if you purchase a PCI-GPIB or similar adapter.

National Instruments also sells PCMCIA and USB adapters. They work well, but they're much more expensive than the Prologix solution, even on the used/surplus market.

Most users should avoid older National Instruments products such as the GPIB-232CT-A and PC II/IIa. These do not support modern (NT-based) versions of Windows, and even if they plug into your current PC, they probably won't work with your next one. Likewise, National Instruments' GPIB-ENET adapter is somewhat awkward to configure under Windows XP or later versions of Windows (see below).

Q. Where can I find drivers for my GPIB adapter?

A. The NI488.2 driver package may be downloaded directly from National Instruments. This package is free, although website registration is required. It includes the drivers for most of their GPIB adapters including their USB products, PCI-GPIB, and GPIB-ENET.

The Prologix GPIB-USB adapter requires the installation of drivers from the FTDI site. These VCP ("virtual COM port") drivers enable communication with the Prologix adapter by simulating a standard RS-232 serial port.

Prologix GPIB-LAN adapters don't require any drivers at all -- you just need to edit CONNECT.INI to supply the adapter's IP address and port. This process is handled automatically by the PROLOGIX.EXE configuration program.

Q. How can I use a National Instruments GPIB-ENET adapter under Windows XP or Vista?

A. The NI488.2 driver package does not support IP address configuration of the GPIB-ENET adapter under any version of Windows later than Windows 2000. W2HX reports a workaround:

1) Turn off GPIB-ENET
2) Set all dip switches to "off"
3) Install RARPD from http://www.panix.com/~perin/rarpd.zip
4) Edit RARPD.TBL to include MAC of your ENET and the desired IP (for example 00.80.2F.FF.xx.xx.xx.xx 192.168.1.10)
5) Run rarpd.exe
6) Turn on GPIB-ENET
7) After some blinking, the Ready light should become stable; the IP address is now assigned
8) Turn off GPIB-ENET
9) Set dip switch 6 to ON, which causes the stored IP address to be used
10) Turn GPIB-ENET on
11) Install NI488.2 software distribution from National Instruments website (OS-dependent)
It isn't known if this procedure will work under Windows Vista.

Q. I'm getting a GPIB error message as soon as I try to connect to an instrument. What's wrong?

A. The GPIB Toolkit application is probably trying to talk to a National Instruments board that isn't there. If you're using a Prologix adapter, have you edited the CONNECT.INI file in your installation directory to tell the GPIB Toolkit where to find its virtual COM port? (Most users can simply run the PROLOGIX.EXE configuration program and select the Update CONNECT.INI button after selecting their adapter's COM port from the list. Be sure to exit from PROLOGIX.EXE before trying to run any other GPIB Toolkit applications.)

This error condition may also mean that you're trying to use an adapter that is not National Instruments-compatible. Only genuine National Instruments and Prologix GPIB adapters are supported.

Q. I'm getting the same error message when I try to use my National Instruments GPIB-ENET adapter.

A. The GPIB-ENET's device identifier defaults to GPIB1 in many installations. Edit the interface_settings line in the CONNECT.INI file in your installation directory to reflect the correct device identifier.

Q. What other issues can occur when connecting to GPIB equipment?

A. If you're using a Prologix adapter, make sure it's mated securely with the GPIB connector on the target instrument. The overhang on the newer adapters' metal enclosures can make it difficult to tell if the connectors are seated properly.

Always use the thumbscrews when installing GPIB hardware, and keep other equipment off the bus until you've established communication with the target instrument. Powered-off devices can load down the bus in some cases.

Check the application's user guide for instrument-specific notes that you may have overlooked. For example, the Tektronix 490/2750-series analyzers must have their LF-OR-EOI switches set to '1' for use with the GPIB Toolkit applications.

Finally, use care when toggling DIP switches in older instruments that use them for talk/listen and address configuration. You may need to use an ohmmeter to verify switch settings once all other problems have been ruled out.

Q. PROLOGIX.EXE is reporting the error, "This application has failed to start because NiSpyLog.dll was not found."

A. NISPYLOG.DLL file is a National Instruments file. In addition to enumerating Prologix GPIB-USB and GPIB-LAN adapters, PROLOGIX.EXE will also detect National Instruments adapters, making them available for selection. Error messages such as this one ordinarily mean that the drivers for a previously-installed National Instruments GPIB adapter have not been completely removed.

If it's not practical to uninstall or reinstall the National Instruments driver files completely, you can run PROLOGIX.EXE with the -noni command-line option to avoid attempting to access them.

Q. Should I configure my Prologix adapter for Device mode, or Controller mode?

A. Your adapter will need to be in Controller mode to run all of the GPIB Toolkit applications, except when you're receiving device-initiated plots in 7470.EXE. In that mode, the application is acting like a GPIB "device," capable only of receiving and responding to traffic originating from an external instrument or controller.

SSM, PN, and the console applications rely on being able to initiate communication with the instrument, so they require the Prologix board to be set to Controller mode.

Beginning with version 1.50 of the GPIB Toolkit, it's no longer necessary to use PROLOGIX.EXE or another terminal program to switch your Prologix adapter between Device and Controller mode. Each Toolkit application will configure the Prologix adapter's mode and address settings as necessary. If you're using a different serial interface, or an older Prologix board that's not software-configurable, you'll need to set the CONNECT.INI is_Prologix field to 0. This will prevent the Toolkit applications from issuing configuration commands to the board.

Device/controller mode selection is always performed automatically by the application when using an NI488.2-compatible board.

Q. I have an HP or Agilent GPIB adapter. Can I use it with the GPIB Toolkit?

A. Some Agilent adapters claim to support NI488.2 compatibility, but I don't have any direct experience with the compatibility layer, and I've received mixed reports on it. Try searching for "NI488.2" at http://www.agilent.com for further details.

One user has indicated that the Agilent 82357A adapter works well with PN and SSM, and can also acquire host-requested plots with 7470, throuh the NI488.2 compatibility layer provided by the Agilent E2094Q I/O Libraries Suite 15.0 package. Device-initiated plotting did not appear to work properly with the 82357A in this case, and the Agilent 82350 adapter was not usable at all.

Carlo Canziani of Agilent Technologies Italia S.p.A. reports:

I'm pleased to inform you that I tested your SW with Agilent interfaces GPIB/USB 82357B and LAN/GPIB E5810A. Agilent libraries allow usage in NI-488.2 compatibility mode so can replace the NI interface without modifying (the GPIB Toolkit). Agilent Libraries can be downloaded from www.agilent.com/find/iolib.

Rick Griffiths has compiled a handy checklist (100 KB .PDF) of the exact steps needed to configure the Agilent I/O libraries for use with the GPIB Toolkit.

Q. Can I use an ICS GPIB adapter with the Toolkit?

A. SSM.EXE seems to work pretty well with the original ICS USB-to-GPIB adapters, but I've encountered lockup problems (including driver-level crashes) in PN.EXE, and I haven't been able to get the newer 488-USB2 adapter working reliably at all. Make sure you've downloaded the latest drivers from ICS before attempting to use the GPIB Toolkit with one of these adapters. Also, ensure that your ICS adapter's GPIB identifier matches the interface_settings line in CONNECT.INI. By default, the Toolkit expects NI488.2-compatible adapters to be configured as GPIB0.

To request plots from instruments for use with 7470.EXE, it may be necessary to use the command-line QUERY.EXE utility. As an example, the following lines may be included in a batch file to acquire and render a plot from an HP 8566B or HP 8568B spectrum analyzer:

   query 18 "PLOT 250,250,10000,10000;" >test.plt

7470 test.plt

This technique can come in handy with other GPIB interfaces that aren't quite 100% compatible with 7470.EXE.

Q. What other GPIB adapters have been tested with GPIB Toolkit applications?

A. The Alciom smart488 is an economical USB interface that's similar in some ways to the Prologix adapter. It has been used to obtain device-initiated plots in 7470.EXE from the HP 8569B and other instruments.

This board also offers some basic GPIB controller capabilities; if you edit the CONNECT.INI file in your installation directory to set is_Prologix to 0, you may be able to use it with the other GPIB Toolkit applications. Some experimentation will likely be necessary.

Q. My instrument has an RS-232 serial port rather than a GPIB port. Can I use the Toolkit with it?

A. In many cases, yes. The same code that supports virtual COM ports associated with Prologix adapters can also be used to establish a direct serial connection. In addition to configuring your serial interface hardware appropriately, you will also need to edit the CONNECT.INI file in your installation directory to set the is_Prologix field to 0. This will keep the GPIB Toolkit applications from trying to configure the GPIB adapter.

Q. How can I use a Prologix GPIB-LAN or other TCP/IP-compatible GPIB adapter that's located on a different subnet?

A. The PROLOGIX.EXE utility will enumerate any GPIB-LAN adapters on the local subnet. All you need to do to use the GPIB Toolkit with a local GPIB-LAN adapter is to highlight it in PROLOGIX.EXE's list and select Update CONNECT.INI. However, PROLOGIX.EXE cannot locate GPIB-LAN adapters located at arbitrary corners of your corporate WAN or the Internet at large, and it does not work with non-Prologix TCP/IP adapters at all. In these cases, you will need to edit the CONNECT.INI file in the Toolkit's installation directory, placing the adapter's IP address or DNS name in the interface_settings field.

If the address does not specify a port number (e.g., ke5fx.dyndns.org:1234), the GPIB Toolkit utilities will try to connect to port 1234 by default. This port number is used by the Prologix GPIB-LAN adapter.

As with non-Prologix serial interfaces, be sure to set the is_Prologix field to 0 if your TCP/IP interface is not a Prologix GPIB-LAN adapter. Otherwise, Prologix-specific configuration commands transmitted by the GPIB Toolkit will be received by the connected instrument(s), causing errors or other undefined behavior.

Q. My Prologix adapter isn't working with my HP 8568A spectrum analyzer. What's wrong?

A. Lockups can happen when these analyzers are addressed to talk by the Prologix adapter following a ++loc (Return to Local) command or other Prologix-specific ++ commands used by the GPIB Toolkit. As a workaround, you can edit the CONNECT.INI file in your installation directory and set the reset_to_local field to 0. You may also need to avoid using the LCL button if resetting the analyzer manually causes similar problems.

National Instruments adapters are not vulnerable to this problem with the HP 8566A-8568A analyzers, and it does not occur at all with 'B'-suffix instruments.

Q. I'm able to request plots from my HP network analyzer (or other instrument) with my Prologix adapter, but the instrument reports "Caution: Addressed to talk with nothing to say" as soon as I request the plot.

A. This problem is related to the HP 8566A-8568A issue above. Upon sending a ++loc command to reset the instrument to local operation after the initial commands are transmitted by 7470, the Prologix board is addressing the instrument to talk. You may be able to prevent this behavior by setting the reset_to_local line in CONNECT.INI to 0.

Q. How can I recompile the GPIB Toolkit applications?

A. Download and install the free Microsoft Visual Studio Express package and the Platform SDK. Follow all directions carefully to configure the MSVC command-line tools. (No IDE project files are supplied, although you can create your own if desired.)

You should then be able to run the m.bat file in the Toolkit's installation directory to recompile and link the executables.

Q. Does the GPIB Toolkit support Windows Vista and Windows 7?

A. At least one Prologix user has reported success in running both the GUI and console applications under Vista SP1, while users of pre-SP1 systems have not been as fortunate. All other Windows versions, from Windows 98 to Windows XP SP2, are fully compatible, except that TI.EXE requires Windows 2000 or later.

Important note: Under Vista (and possibly Windows 7 as well), you must run all of the GPIB Toolkit applications with the Administrator and XP compatibility options checked. Otherwise, the copy of CONNECT.INI that's written by PROLOGIX.EXE when you select Update CONNECT.INI may not be visible to the other applications, resulting in an error message.

Q. When I try to browse the readme or user guide .HTM files, Internet Explorer 7 warns me about "scripts or ActiveX controls that could access my computer." What does that mean?

A. It means that at least one or two undocumented vulnerabilities apparently remain in Microsoft's employee drug-testing policy. Rest assured, there are no scripts or ActiveX controls in any of the GPIB Toolkit's HTML help files.

I do not recommend using IE7 under any conditions; check out Firefox instead. This behavior also appears to have been corrected in IE8.

Q. I'm able to transmit plots to 7470.EXE, but I'm getting an error when I try to render them.

A. This problem is especially common with HP 8560-series portables. Make sure you've configured your analyzer to generate HP-GL/2 plots, and not Epson, PCL, or other formats. 7470.EXE can only work with HP-GL/2 data. Also make sure the analyzer is in Talk/Listen mode (if you're requesting plots via the host PC) or Talk-Only mode (if you're using its front-panel PLOT button).

If you're sure that you've received a valid .PLT file from a given instrument but you're still getting a rendering error, please send me the .PLT file for inspection!

Q. How do the trace-resampling options in SATRACE.EXE and SSM work?

A. The key points are:

  • When the trace is oversampled (i.e., when the number of source points is less than the number of requested points, such that each source point can contribute to one or more destination points), the only valid options are replication of trace amplitude values with the -points:xxx option or spline interpolation with -spline:xxx. The -min:xxx, -max:xxx, and -avg:xxx options are treated equivalently to -spline:xxx. (These command-line options are equivalent to SSM's Points menu selections.)
  • When the trace is undersampled, meaning that at least some output points cover more than one source point, you can use -min:xxx, -max:xxx, and -avg:xxx to control how source "bins" are combined into output points. These are analogous to the positive-peak, negative-peak, and average detection options supported by the firmware in typical analyzers. You can also let the spline resampler decimate the source trace for you, which has the effect of averaging amplitudes across neighboring bins. Or you can just let the -point:xxx option arbitrarily pick one amplitude value from each bin, starting at the first point in the source trace.
  • In all of these cases, the frequency values are linearly interpolated the same way. In the undersampling cases with SATRACE, frequency values always correspond to bin centers, while in the oversampling cases, the frequency is lerped across replicated points from the source trace. (SSM's frequency interpolation always begins at the left edge of the trace.)
  • In no case are the amplitude values corrected for the analyzer's resolution bandwidth or changes in the number of points per span; they are merely interpolated, decimated, or selected from the source trace depending on the option selected.
Q. My HP 8560A/B/E- or 8590-series traces look strange in SSM.

A. In both SSM and SATRACE, some resampling operations can look better than others, or yield more-accurate results. SSM trace records are 640 points wide by default, unless the Points menu or -n: command-line option has been used. Consequently, if you are acquiring data from an HP 8560A/B/E-series portable spectrum analyzer, SSM has to resample the 601-point traces to 640 destination points. In such a case, the analyzer's default ("rosenfell") video detector output can yield gaps or nulls at 16-pixel intervals due to aliasing effects. This is not usually harmful when observing CW signals, but if your observed traces contain significant amounts of noise, it's a good idea to select sample or peak detection on the analyzer to avoid these artifacts.

For similar reasons, the spline resampler is not the best choice when viewing or acquiring traces containing frequency combs or other signals that yield fast impulse-type video responses. Its low-pass filtering effect can artificially reduce the amplitude of comb signals, just as the analyzer's own video detector would if averaging mode were selected.

In general, the resampling mode that yields the highest amplitude CW signals without introducing objectionable visual artifacts is the right one to use.

Q. Can I use PN.EXE to observe and record discrete spurs?

A. PN.EXE is not especially useful for observing spurs. Trace->Enable spur reduction can detect and remove spurs above a certain amplitude from the PN.EXE graph, but the program doesn't display them separately, or list them with their correct (unnormalized) amplitudes the way other PN packages can.

In particular, spurs are not likely to be visible on the graph at wideband offsets. During noise acquisition, the trace data is point-sampled by both the spectrum analyzer and PN.EXE. Within each decade, typically 500 to 1000 data points end up being displayed using 100 to 200 pixel columns at most. For exampe, a spur in the 100 kHz-1 MHz decade may not occupy more than one point in the acquired data, assuming the analyzer sees it at all. The odds that it will be visible on the final PN trace are low.

As a result, both 7470.EXE and SSM.EXE are better suited to observation and recording of spurs.

Q. Why doesn't PN.EXE support my particular spectrum analyzer model?

A. To measure phase noise at the offsets we're usually concerned about (1 kHz - 100 kHz from the carrier), the spectrum analyzer needs to be accurately tunable at a corresponding degree of precision. In practice, that means the analyzer needs to use synthesized tuning. Many older analyzers don't.

In addition, PN.EXE has to take control of the spectrum analyzer via GPIB, and it can't do that with analyzers that are controlled only via physical switches on their front panel. Some of these analyzers allow you to read their front-panel configuration via GPIB, but unless these settings can be programmed remotely, PN.EXE can't work with them.

In other cases, it's simply a matter of not having access to the analyzer in question. I've focused on Tektronix and HP equipment because that's what I own, but there are numerous other manufacturers (Advantest, R&S, Anritsu, IFR...) that have also produced some excellent gear. If your analyzer model isn't supported by the GPIB Toolkit applications, consider submitting a patch!

Q. Is it possible to use PN.EXE to determine the RF noise floor of the spectrum analyzer by making a measurement with no carrier present?

A. Yes. PN.EXE doesn't really measure "phase noise," rather, it measures whatever combination of CW power and AM/PM noise contributes to the observed trace amplitude. So in the absence of any signal to measure, it will show the RF noise floor, which should be -174 dBm + 10*log(RBW) + whatever the analyzer's front-end noise figure is.

PN.EXE takes the 10*log(RBW) term out of the equation when it does its dBc/Hz normalization, so you don't have to worry about that. However, it also subtracts out the reference level, so you would normally need to tell it to use 0 dBm as the carrier amplitude.

With most analyzers, though, the RF noise floor is so much lower than the PN floor that the existing carrier-clipping options aren't adequate to get the noise floor out of the bottom division of the graticule. So you will want to specify a smaller carrier amplitude and compensate for it in the "Noise Response" field of the acquisition dialog.

With an HP 8566B, for instance, specifying a carrier amplitude of -60 dBm, a noise response of -58 dBm, and checking the "Force 0 dB RF attenuation" box yields a good view of the RF noise floor near -150 dBc/Hz (really dBm/Hz) at 100 MHz. This corresponds to a front-end noise figure of 24 dB. (Don't forget to add the analyzer's actual RF attenuation, if any, to the measured noise figure.)

Finally, the analyzer input should be terminated in 50 ohms when this measurement is performed. In most cases, though, the analyzer's noise figure will be so high (30 dB or more) that the presence or absence of a resistive termination won't make much difference.

Q. How can I use a bandpass or notch filter to improve phase-noise measurement range with PN.EXE? How do the carrier amplitude and "Noise Response" fields interact?

A. In principle, the measurement should be set up as if the filter weren't there at all. In order to obtain dBc readings, the program subtracts the carrier amplitude that you specify from the trace dBm values that it reads from the spectrum analyzer, so it still needs to know the equivalent carrier amplitude. The noise at the filter output is still relative to the carrier, after all, even though the carrier is suppressed by the filter.

In practice, the main reason for using a carrier-suppression filter is so that you can use an external amplifier to raise the remaining LO noise to a level that's observable on your spectrum analyzer. You will need to compensate for that gain, one way or the other.

For example, let's say you want to know the phase noise contribution from your LO at a channel spacing of 10 kHz. Your LO signal is at +10 dBm, and you expect that the noise floor might be as low as -140 dBc/Hz. Your analyzer's PN floor is -100 dBc/Hz. You have a crystal bandpass filter available at a frequency within the LO's tuning range, with a flat 2-kHz passband and 3 dB of insertion loss.

What you should do is tune the LO under test to be 10 kHz below the center of the crystal filter's passband. Enter the LO's actual frequency and amplitude into the acquisition dialog, then adjust the Noise Response field to take out the sum of the post-filter amplifier's gain and the filter's insertion loss.

In other words, if you're using a +50 dB gain stage, it will effectively add +47 dB to the portion of the sideband noise spectrum that makes it through the filter. Subtract that from the default Noise Response field value for your analyzer model. The acquisition dialogs for most HP analyzers use a default noise response field of 2.0 dB, so if you were using one of those analyzers in this example, you'd change the dialog's Noise Response value from +2 to -45.

Now you should be able to make the measurement as you would without the filter, with valid dBc/Hz values appearing on the resulting graph. Your effective phase noise floor in this case is now -147 dBc/Hz assuming no degradation from other elements like your post-filter amplifier.

(Why not just add +47 dB to the carrier amplitude and leave the noise response field alone? Because the analyzer may not be able to set its reference level that high, and if it does, it'll use so much RF attenuation that the front-end noise floor may dominate the measurement. Even if you use 40 dB of carrier clipping on a hypothetical +57 dBm carrier, that still corresponds to a reference level of +17 dBm.)

Q. How can I make indirect (mixer-assisted) phase noise measurements with PN.EXE?

A. Indirect phase-noise measurement involves the use of at least one external mixing stage prior to the spectrum analyzer. The mixer and its associated LO can allow you to measure phase noise on carriers outside the analyzer's own range. With a suitable filter and amplifier, it's possible to measure phase-noise levels far below what the analyzer alone can manage.

Indirect phase-noise measurement is more complex than simply connecting the device to your analyzer and running PN.EXE. It introduces additional error sources, and requires several components in addition to your PC and spectrum analyzer:

  • A reference signal generator with similar frequency coverage to the device under test (DUT). Ideally the reference's noise specifications will be better than the DUT's, unless you're using two identical DUTs to measure their residual noise.
  • A mixer. This is typically an off-the-shelf DBM whose RF and LO ports are rated for the anticipated carrier-frequency range, and whose IF port response extends all the way down to DC.
  • Optionally, a highpass or bandpass filter with relatively-steep skirts
  • Optionally, a basic PLL capable of maintaining quadrature lock between the reference signal generator and the DUT by applying a tuning voltage to one source or the other
Numerous references are available to help you understand both direct and indirect phase-noise measurements in detail. These include: The basic idea is to use your signal generator and mixer to downconvert the phase-noise spectrum from the DUT to a lower frequency where it can be measured easily. There are two ways to accomplish this.

IF downconversion is just what it sounds like -- an additional conversion stage appearing prior to the rest of the spectrum analyzer's signal chain. The signal generator and DUT are separated in frequency by the desired IF. This IF appears at the output of the DBM, where it can be filtered to keep unwanted high-level mixing products out of the spectrum analyzer's front end. As long as the reference signal generator is cleaner than the analyzer's own LO, the external mixer will behave exactly like the others in the analyzer. It will not alter the amplitude of the IF noise spectrum relative to the carrier level, only its frequency.

It's possible to use a post-mixer filter to shave off the carrier itself, allowing the the noise spectrum to be amplified to improve the effective measurement floor. This process, in which an appropriate IF filter is chosen to place the carrier outside the passband, is described in the previous FAQ entry. Obviously the minimum usable measurement offset will be limited by the shape factor of the filter: how well does it suppress the carrier while leaving the desired part of the noise spectrum untouched? Generally speaking, it's better to downconvert all the way to DC if you intend to suppress the carrier in your measurement.

Downconversion to baseband involves tuning the signal generator to the DUT's exact frequency and phase-locking it there, resulting in a 0-Hz (DC) intermediate frequency. The spectrum analyzer's frequency response must cover the minimum offset of interest in this case. For example, if you wish to observe phase noise at offsets down to 100 Hz, you'll need to use an analyzer whose specifications are valid down to at least 100 Hz.

The phase-locking requirement arises from the need to maintain quadrature, meaning 90-degree phase separation between the reference and DUT signals. This is necessary in baseband conversions because the mixer's DC sensitivity to phase differences is greatest when its LO and RF port signals are at quadrature. Integrated phase-noise test sets such as the HP 11729B/C and 3047A/3048A include assorted PLL options to maintain quadrature without affecting the noise level at the offsets of interest, but a homebrew approach is also workable. See Wenzel's noise-measurement adapter for some ideas. (Note that a simple RC differentiator is enough to suppress the carrier when the noise spectrum is downconverted to baseband.)

Regardless of the downconversion technique used, PN.EXE expects you to enter the IF and LO frequencies in the External Conversion fields of the standard acquisition dialog box. These fields should be left blank (not set to 0) when making a direct measurement without a mixer. When making a quadrature-locked measurement at baseband, enter 0 for the IF, and use the common reference/DUT frequency for the LO.

One important issue when performing an indirect noise measurement is how to account for any changes in amplitude the noise spectrum may undergo relative to the carrier. PN.EXE's acquisition dialog already contains a Noise Response field intended to supply a 'calibration' factor for the measurement. Usually this field is used to impose a ~2-dB penalty on measured dBc/Hz values to compensate for the noise-equivalent bandwidth of the analyzer's RBW filters and its detector's response to Gaussian noise. But effects arising from external mixing, filtering, and amplification can also be included in this figure.

As noted earlier, simply adding another IF conversion to the signal path does not alter the noise amplitude relative to the carrier, but this is not true when downconverting to baseband. With the RF and LO signals in quadrature and the LO port saturated by the signal from the DUT, as is normally done, the mixer is actually acting as a phase detector. A correction factor of -6 dB must be applied under these circumstances. Given a 2-dB analyzer response, the Noise Response value for a quadrature-locked measurement would be -4 dB.

Additional post-mixer amplification is specified by subtracting its gain. For example, the HP 11729B/C test sets include a 40-dB LNA between the phase-detector mixer and the spectrum analyzer, so when using one of these sets with a typical HP analyzer, the Noise Response field should contain -44 dB.

Finally, when measuring the residual phase noise of a source by mixing it with an identical source using either IF or quadrature-locked downconversion, remember to add -3 dB to the value in the Noise Response field. If the previous (-44 dB) calculation were applied to a residual-noise test with identical source and reference generators, the Noise Response value would be -47 dB.

While the correct Noise Response value for your measurement setup needs to be calculated only once, the effective Carrier dBm value should be determined whenever your carrier frequency or amplitude changes. Refer to the description of beat-note calibration in AN 11729B-1 (above) for more on this. In a nutshell, if you temporarily detune the reference signal generator slightly and lower its amplitude by an amount equal to the post-mixer gain, you'll observe a beat note on the analyzer. The absolute amplitude of this beat note is the correct value to enter in the Carrier dBm field for your measurement. As always, Carrier Hz should contain the original carrier frequency before any conversion takes place.


Released into the public domain 16-Dec-05 by John Miles, KE5FX.
Please contact jmiles@pop.net with feedback and enhancements!

Code compilable with any version of MSVC from VS6 to VS2005.NET, including the free Microsoft Visual Studio Express package
No warranties, expressed or implied, are offered with this program.
Use at your own risk!

source: http://www.thegleam.com/ke5fx/gpib/faq.htm