Close
0%
0%

HP545xx Data Acquisition Software

A software tool to use an HP545xx Digital Scope for Data Acquisition

Similar projects worth following
I am working on a project that needs access to multiple channels of digitized analog data, with sample rates starting at 1MS/S and going up from there. Thinking about a digital storage scope, it is a fast data acquisition system with a display screen and a front panel interface. It just needs a way to get the data out to a computer. The HP545xx family of scopes have serial and GPIB interfaces built in. They also have a command set capable of retrieving the sample data and good documentation. This is a Linux based software tool that allows downloading the sample data from an HP545xx family scope and a little bit of remote control. It uses the Linux-GPIB library to drive the GPIB hardware interface. It has been built and used under 64 bit Linux and 32 bit linux. I have worked with the HP54540C and HP54542A model scopes using this software. The HP54520 and HP54522 scopes should also work with some editing, but have not been tested.

The HP5454xx family of digital storage scopes are pretty capable tools, with the high end of the family offering 4 channels with 2GS/S sample rate and 500MHz bandwidth. Their memory depth could be better, but the 32K samples per channel is definitely adequate for what I need.

Looking through the programmers manual for the 545xx scopes, all of the front panel controls can be accessed through the external interface. There are also a few functions that are only accessible through the external interface. Writing a complete interface package for this scope would be a very large task. I am not interested in developing a fully automated test system with the scope, just getting the sample data from the scope with a few minimal functions to ease the acquisition process.

A few years ago, I wrote a tool ( #HP5454x Screen Capture  ) that connects to the serial port on the scope and emulates an HP Laserjet printer enough to capture a PCL file which can be converted to other formats readily. As a result, the scope serial port is in use. This leaves the GPIB interface as the choice for controlling the scope. One added advantage of using the GPIB interface is that I can start the print download on the scope without getting up and walking across the room to push the "PRINT" button on the scope.

When the GPIB interface is in use to control the scope, the front panel is disabled.  It is frustrating to have to go through the two button sequence on the front panel to put the scope in local mode every time you want to change the configuration from the front panel. This program is designed to execute one or two commands and then turn the control back to the front panel. This method works well for the way I use the scope. Sitting in front of the scope, manually set the scope up and get it to capture the image as I want it. The PC is on another desk, so I can move to the PC and run multiple scan and capture steps to get the data that I want.

Commands supported by this tool are:
     RUN
     STOP
     MODE AUTO/TRIG/SINGLE
     FMT_WORD
     FMT_BYTE
     GET_DATA outfilename.csv
     WAIT_MS delay_MS
     FREE_BUS
     PRINT_START
     GET_ERRORS
     GET_IDN
     COUPLING 1/2/3/4 DC/DC50/AC
     SetSerial 0123456789

RUN Start the scope acquisition in whatever MODE it is set to. I normally use MODE SINGLE for acquisition. In MODE SINGLE, the scope captures one full set of data and goes back to STOP.

STOP Don't acquire any more data. This is basically an idle mode.

MODE This is the "TRIGGER MODE" and "RUN MODE" controls for the scope. AUTO just loops continuously, acquiring data and refreshing the screen as fast as it can. TRIG is the triggered sweep mode and the scope will sit in the run state waiting for the trigger condition to be satisfied and then it will acquire new data and go back to waiting for the next trigger event. SINGLE is like the TRIG mode, in that it will wait for a trigger condition before acquiring a set of data and then go to stop mode when it is complete. Either TRIG or SINGLE will give the most stable and predictable image on the screen and in the captured data. The SINGLE mode has the advantage that if you want to print a copy of the screen in addition to downloading the data, both will have the same information.

FMT_BYTE and FMT_WORD Selects the format for the data transfer from the scope. BYTE mode is slightly faster, but WORD mode data looks a lot better. In BYTE mode, there are 7 bits of data and the sign. In WORD mode, there are 14 bits of data and the sign. FMT_BYTE or FMT_WORD must be issued before the data to download is captured. Once an acquisition run is done, you cannot change the output format without corrupting the data.

GET_DATA Requests sample...

Read more »

HP54542_ctl_06_20_2022.tgz

Source Code for the HP54542_ctl program.

x-compressed-tar - 36.25 kB - 06/25/2022 at 23:30

Download

  • Examples of why to use FMT_WORD instead of Default FMT_BYTE

    Bharbour07/15/2022 at 16:41 0 comments

    The HP54542 defaults to using BYTE format for transferring data. Unless you are transferring crazy numbers of data sets or need them really fast, using the WORD format results in much cleaner data. Here are two plots of similar events, one captured as BYTE data and the second captured as WORD data.

    A small signal with a DC offset captured as BYTE data
    A small signal with a DC offset captured as BYTE data
    A Similar Small Signal with a DC Offset, captured as WORD data.
    A similar small signal with a DC sffset, captured as WORD data.

  • For 54520 or 54522 users

    Bharbour07/05/2022 at 22:33 0 comments

    I went through the code and added some ifdefs to make it more likely to operate with these scopes but I have no way to test it. If you want a copy of this modified code, either PM me or put a message in this project. Thanks.

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates