0 Members and 2 Guests are viewing this topic.
Apart from certain MOSTEK EEPROMs (used in some HP and Tek products like the HP 3456A) that had manufacturing defects, EEPROMs generally seem to last a very long time. I'm sure there is a small chance for them to fail, but it's not like EEPROMs in instruments from the late eighties are failing in droves.
# Python 2.7 code to get readings from Keithley 196 multimeter via GPIB# Assumes meter is already set up to correct mode, eg. from front panel# Dec. 17 2012 J.Bealefrom __future__ import print_function # to use print without newlinefrom serial import *import time,datetimecmd = "?\r" # GPIB command to Keithley 196 must end with carriage returneol_str = "\n" # end of line string in file outputbuffer ='' # serial input bufferoutbuf = '' # file output bufferser=Serial(17,460800,8,'N',1,timeout=1) # GPIB-USB board on COM18, with 460800 bps, 8-N-1f = open('K196-log.csv', 'w')print ("Keithley 196 log v0.1 Dec.17 2012 JPB")f.write ("date_time,volts\n")f.write ("# Keithley 196 log v0.1 Dec.17 2012 JPB\n")while True: ser.read(255) # clear out existing buffer & throw it away ser.write(cmd) # send query to instrument buf = ser.readline() # string terminated with '\n' buffer = buf.split()[0] # get rid of the \r\n characters at the end outbuf = str(datetime.datetime.now()) + ',' + buffer print (outbuf) f.write (outbuf) f.write (eol_str) time.sleep(9) # from 'time' to wait this many seconds f.close # close log fileser.close() # close serial port when done. If we ever are...
date_time,volts # Keithley 196 log v0.1 Dec.17 2012 JPB 2012-12-17 13:25:18.006000,+10.00400E+0 2012-12-17 13:25:28.115000,+10.00401E+0 2012-12-17 13:25:38.147000,+10.00400E+0 2012-12-17 13:25:48.225000,+10.00400E+0 2012-12-17 13:25:58.256000,+10.00400E+0 2012-12-17 13:26:08.365000,+10.00401E+0 2012-12-17 13:26:18.396000,+10.00400E+0