The HP3325B is an early 1990's product. Frequency accuracy is excellent. It will generate Sine, Square, Triangle and Ramp waveforms. Depending on the options installed and the configuration, it will generate output frequencies between 1 uHz and 20 MHz with variable output voltage and offset. The instrument uses R2D2 language GPIB but direct readbacks with a ? following the command name work. This tool will convert the R2D2 into human readable language. Sending commands and reading configuration are straight forward. Communication with the HP3325B can be via RS232 or GPIB. This tool only supports GPIB.

There are a lot of commands and modes that need to be tracked on this instrument. Critical instrument configuration is read when the program starts up and is stored in a structure that is passed into the command parser for error checking. Some of the configuration stuff is too messy to check, so all of the instrument commands are followed by a status read to verify that the instrument accepted the command and parameters.

All of the GPIB specific commands listed in the programming section of the manual are supported. Commands can be supplied to the tool on the shell command line, from a script file, or from an internal shell-like mode. Arbitrary delays between commands can be set. There are a few "macro" commands that use multiple low level commands to deal with some of the complex operations related to frequency sweeps. With those few exceptions, each of the commands here generate one GPIB command.

This tool reuses the architecture of the project #HP34401A Meter Command Line Control Software Tool . Both tools share a lot of their source code. GPIB interface tasks are handled by the linux-gpib library that is available via Source Forge and other places. Linux-gpib supports many different interface boards and dongles. Development was done under Fedora 40 and tested on several other Fedora versions. You must install the linux-gpib package before building this tool.

Both the linux-gpib library and the National Instruments NI488-2 libraries are compatible with each other with minor exceptions. It is possible to build this package to run under Windows using the NI488-2 library. More information on this is at the bottom of the "Details" section.

In order to build this project on a Linux machine, you must already have the linux-gpib package installed. There is a .h file needed at compile time and a library that is needed at link time for this package to compile successfully. Create a working directory to build the tool in and copy the .tgz file into it. Un-tar the file and type make:

> mkdir HP3325B_ctl

> cd HP3325B_ctl

> cp wherever/HP3325B_ctl_xx_xx_xxxx.tgz  .

> tar -xzvf HP3325B_ctl_xx_xx_xxxx.tgz

> make

and the software should build with no errors or warning messages. Finally, copy or link the executable program to a convenient directory in your executable path like ~/bin. There should be no need to do any of these tasks as root unless you want to put the executable in a directory off the /usr tree.

The default address for the HP3325B (currently 17) is stored in the file HP3325B.h. If your instrument is not configured for that GPIB address, you can edit the file and re-compile or you can use the -d command line option with the correct address.

Typing ./HP3325B_ctl    with no parameters will give you a command listing. Arguments shown in square brackets [ ] are optional. Most of the commands getting a numeric argument need a unit value too. These are shown in the list below.

Usage: HP3325B_ctl [-d dev_addr] CMD1 [arg1] [CMD2]...

where CMDn [argn] is one of: 

  • HELP                                    cmd_name 
  • READ_CMDFILE                  cmdfilename
  • INTERACTIVE       ...
Read more »