HP 3456A gpib comand fun - Page 1
Forum section: electronics / testgear

author: kj7e
author_rank: Frequent Contributor
timestamp: May 03, 2018, 05:10:34 am
content: Okay, just found my new favorite thing for the evening. Playing with gpib commands for the first time really, found the cheat sheet for the 3456A and it works. Going to write a script to do some logging with it tomorrow. Just cause this is fun.https://youtu.be/qZDShxF3dwM

author: kj7e
author_rank: Frequent Contributor
timestamp: May 04, 2018, 01:30:49 am
content: Okay, first script, resets the meter and reads the output as fast as it can send it.https://youtu.be/HWX6oFdah5sNot the exact code I show in the video, only doing a reset 'H' below, resets to the default 10NPLC, DCV, Auto range, Auto Zero;Code:import visarm = visa.ResourceManager()dvm = rm.open_resource('GPIB0::22::INSTR')dvm.write('H')try:while True:print(dvm.read('V'))except KeyboardInterrupt:print('Manual break by user')

author: TiN
author_rank: Super Contributor
timestamp: May 04, 2018, 04:32:23 am
content: FinallyDat Keithley 2030 is just made obsolete.After spending some time with GPIB, you will find using buttons on meter somewhat non-convenient.

author: kj7e
author_rank: Frequent Contributor
timestamp: May 04, 2018, 04:43:01 am
content: Been off work the last two weeks recovering (4 cracked ribs, broken clavicle and a few other issues), still cant sit in a chair very long, cant type much yet without getting really sore. So just board and having fun trying to stay entertained. Love playing with the old 3456A, what a great toy. Now I have it reading back data I can log it and do anything I want with it. Ill work on the Keithley and other gear later, still being a kid with the old HP.Need to figure out how to make impressive plots like you do.

author: kj7e
author_rank: Frequent Contributor
timestamp: May 06, 2018, 11:08:31 pm
content: Final part3, dynamic reading update while the script is running, log formatting and making a simple plot. Don't think I'm going to do much more with the 3456A, this was just a starter exercise, started playing with Python and TSP commands on the DMM7510 last night.https://youtu.be/ASu6DuDdVmACode:# Stewart Labs HP 3456A PyVisa logging script# Loggingimport logginglogging.basicConfig(level=logging.INFO,format='%(asctime)s.%(msecs)03d , %(message)s',datefmt='%Y/%m/%d %H:%M:%S',filename='3456A_test_log.txt')# Visaimport visarm = visa.ResourceManager()dvm = rm.open_resource('GPIB0::22::INSTR')#del dvm.timeout# Instrument Configdvm.write('H6STG')# Clear Screenimport osos.system('cls')print('***Logging started - CTL+C to STOP\nSee 3456A_test_log.txt for data\n\nCurrent reading')count = 1# Query Looptry:while True:mes = dvm.query('V')red = mes.strip('\n')logging.info(red)print("#", count, "=", red, end='', flush=True)count += 1except KeyboardInterrupt:print('*** Manual break by user***\nClosing log & reseting DMV\n')dvm.write('H6STG')

author: denimdragon
author_rank: Regular Contributor
timestamp: July 11, 2018, 04:22:28 am
content: Quote from: kj7e on May 06, 2018, 11:08:31 pmAwesome scriptI have a 3456A and I'm working on using it for data logging. I'll have to give this a try, but I'm using Prologix GPIB-Ethernet Controller. I'll see what I can pull off with this. Thanks!

author: bitseeker
author_rank: Super Contributor
timestamp: July 12, 2018, 12:51:54 am
content: kj7e, nice job with the scripting. I'll have to try some Python with my gear, too. Most of the logging I've done so far has been with BenchView. Note that "DMV" in your manual break message is probably intended to be "DVM." (Although, it would be nice to be able to initiate a break in the lines at DMV via GPIB.)denimdragon, for the Prologix interfaces, you can also check outEZGPIB.

author: GregDunn
author_rank: Frequent Contributor
timestamp: July 12, 2018, 03:03:15 am
content: When I worked for the gummint, I was in charge of our microwave test lab and took the opportunity to order every piece of HPIB gear that even sounded like it was useful.We controlled everything from a 9825A computer; it ran microwave sweeps using an 8620 generator, captured miscellaneous data with the 3456, plotted everything with an HP pen plotter, dumped test logs to one of their thermal printers.... the lot. We even pressed some of the gear into use at our antenna test range. Having a programmable DVM made so many things fast and easy. It got to the point that all you had to do was connect the DUT and press "start".

author: K5HJ
author_rank: Regular Contributor
timestamp: July 19, 2018, 05:18:19 am
content: Damon,I've been using my 3456 and GPIB with a Python script to log temperature and voltage of some voltage references I built.These old boat anchors are still quite useful and affordable.I don't think your dvm.query('V') does anything different from a normal read.The 'V' sent to the 3456 is ignored.The Varience register you mention is a statistic register an is read using 'REV'.If you attempt to read it without doing a statistic run, it will return an overload condition.Have fun.Randy