Data Logger for Legacy HP Instruments - Page 1
Forum section: electronics / general

author: Bud
author_rank: Super Contributor
timestamp: February 17, 2017, 08:55:33 am
content: This thread is for a MS Excel macro application that logs data from a few legacy HP instruments that I have. Published hoping someone else might find it useful. This work is a fork from the other threadhttps://www.eevblog.com/forum/metrology/3458a-logging-via-excel-macro/which was for HP 3458A voltmeter. An early version of this work was published there but I decided to create a separate thread to not confuse the readers. Bits of code and charting was used from that other thread. However I do not have a 3458A, so I reworked the code to control my other HP legacy instruments:HP 3456A digital voltmeterHP 5334A universal counterI am also planning to add HP 8753C VNA. While there may be not much to "log" from a VNA, the application can be used to grab screenshots and download/plot measured S-parameters data, as well as manage test setups and calibration standards.The application uses VISA COM I/O libraries and a GPIB controller to talk to the HP instruments. My setup specifically is based on Win7 64, Keysight IO Libraries and a Agilent clone USB to GPIB adapter, also known as Beiming adapter, apparently named after the guy who created it. I do not have a National Instrument GPIB adapter to try but since the code is using VISA Instrumentation COM interface it should be transparent to the application and may work with other adapters, be it NI or Keysight.The application requires two things: VISA libraries must be installed - can be downloaded from NI/Agilent, and MS Excel. My version of the MS Office is 2010, Keysight IO Libraries v17.3. The workbook includes separate worksheets for each instrument. Logging can be performed separately or simultaneously for all instruments (still started individually from each device's worksheet). Attached are the sreenshots for currently implemented instruments.In terms of maintaining the macro and fixing bugs - I made no promises, as I am busy at my full time work, and I am not a programmer. But I will look into what I can do.Use at your own risk. Caveat Emptor.PS: The Excel book is attached split to two files because of this forum's attachment size limit. I used the program called 7-Zip,http://www.7-zip.org/download.html,use it to reconstruct the archive, though WinZip should also be able to do it.Before extracting rename the files: remove the last .zip extension. I had to add it because otherwise the forum engine rejected to accept the files.Update Feb 19, 2017: Updated 3456A sheet with NPLC and added Math box. The Math box only does Thermistor math currently, which can be selected when Function is set to 2-Wire or 4-Wire Ohm (obviously you need a physical thermistor for it). Updated files attached.

author: enut11
author_rank: Super Contributor
timestamp: February 17, 2017, 10:32:35 am
content: Hi BudI am using your modified version of the HP3456A XL logger that I downloaded from the '3458A' post and it works well. Have you made any changes to this version since?My 3456A has been running hot logging data from my LM399 home made voltage Refs. Thanks for the excellent implementation.Would it be possible to add NPLC selection to the sheet?enut11

author: KE5FX
author_rank: Super Contributor
timestamp: February 17, 2017, 10:44:55 am
content: Quote from: Bud on February 17, 2017, 08:55:33 amNo Excel needed, justNI488.2 support.

author: enut11
author_rank: Super Contributor
timestamp: February 17, 2017, 11:24:41 am
content: @BudQuote"PS: The Excel book is attached split to two files because of this forum's attachment size limit. I used the program called 7-Zip,http://www.7-zip.org/download.html,use it to reconstruct the archive, though WinZip should also be able to do it. Before extracting rename the files: remove the last .zip extension. I had to add it because otherwise the forum engine rejected to accept the files."QuoteBrilliant! I downloaded the 2 Zip files to my PC, installed 7-Zip and reconstructed the XLSM spreadsheet. This is an improved logger for legacy HP instruments using a USB-GPIB interface.A particularly nice feature in this new version is the instrument photo 'digital display' is active and updates with the data stream! Well done @Bud.enut11

author: Bud
author_rank: Super Contributor
timestamp: February 17, 2017, 02:35:05 pm
content: Quote from: KE5FX on February 17, 2017, 10:44:55 amYes, but it just nice to have all of it in a single Excel macro file. Also gives the user a possibility to massage the data the way they want right in the spreadsheet without switching to the other application.

author: Bud
author_rank: Super Contributor
timestamp: February 17, 2017, 02:44:50 pm
content: Quote from: enut11 on February 17, 2017, 11:24:41 amThanks enut11. Please keep an eye on it though, because the digital display data a is not a direct read but a derivation from it in an attempt to match what is seen on the physical display. In case of a discrepancy refer to the column with the string data because that is what is actually received.eDIT: I will add NPLC parameter to 3456A

author: enut11
author_rank: Super Contributor
timestamp: February 18, 2017, 09:18:29 pm
content: Hi BudAnother bit of useful information for me is to include a running AVERAGE VALUE for the logged data. Thankfully Excel ignores blank cells so the AVERAGE is always correct no matter how many samples are taken.I put mine at the top of the VALUE column but it could also sit with the MIN, MAX numbers over the Graph.enut11

author: Bud
author_rank: Super Contributor
timestamp: February 19, 2017, 07:44:18 am
content: I have posted updated files.QuoteCan this be achieved with the device's Statistic function?

author: enut11
author_rank: Super Contributor
timestamp: February 19, 2017, 09:30:29 am
content: Quote from: Bud on February 19, 2017, 07:44:18 amPerhaps, but only for its internal memory log which I believe is quite limited.enut11PS. Where are the new files?

author: Bud
author_rank: Super Contributor
timestamp: February 19, 2017, 03:18:31 pm
content: The new files attached in the original post replacing the old ones.

author: enut11
author_rank: Super Contributor
timestamp: February 20, 2017, 12:16:32 am
content: Quote from: Bud on February 19, 2017, 03:18:31 pmOK, thanks.Well, you have done it again Bud. Very useful upgrades to the legacy HP instrument XL data logger.What's new that I have discovered:1) 'Monitor' switch is handy. I use it before 'Start' to suppress data logging while I set things up. Or, use it during logging to pause/restart.2) NPLC is now selectable via drop-down. Also warns you if there is a conflict with 'Sample Time'.3) Separate drop-down for volts and ohms is also clearer and easier to set up.enut11

author: Bud
author_rank: Super Contributor
timestamp: February 20, 2017, 05:13:44 am
content: Thanks enut11. Monitor mode is meant for just updating the digital display without logging the data stream. Can be useful for watching the display (monitoring the measure) on the side while doing something else on the computer, hence the "monitor" name. Or as you said, when playing with settings.Also in running mode you can change Range setting on the fly, can be handy too.Next addition i think could be a generic command interface to write/read the device.

author: Bud
author_rank: Super Contributor
timestamp: February 20, 2017, 03:15:54 pm
content: I noticed that my Agilent clone/Beiming GPIB adapter does not re-initialize properly when the computer wakes from hibernation. It still can read the device but is unable to write to it and that may cause confusions. The adapter has to be re-connected. Be aware of this bug in the clone adapter.

author: denimdragon
author_rank: Regular Contributor
timestamp: February 14, 2019, 07:16:49 pm
content: How would I mod this to work with the 3457A? Also, I wonder if it would be possible to get it to add the "7th" digit into the equation

author: Vertamps
author_rank: Contributor
timestamp: February 09, 2025, 06:01:52 am
content: Hello, i seem to be having issues with the unzipped excel sheet. Im thinking the files may be corrupt or i just cannot combine them correctly. I get an excel sheet but its missing stuff and excel says something about unreadable content. Do you have a direct link to the excel sheet or can you please email me it?: Vertamps@gmail.com