Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #499406
| Newsgroups | sci.electronics.design |
|---|---|
| Subject | Re: 5.5 digit meters |
| References | <p81d9b$943$1@dont-email.me> <YwHqC.14424$TP2.7154@fx01.am4> <b2d2oe-cq5.ln1@coop.radagast.org> <epErC.23659$Il7.1933@fx46.am4> |
| From | dplatt@coop.radagast.org (Dave Platt) |
| Message-ID | <fcf6oe-ini.ln1@coop.radagast.org> (permalink) |
| Date | 2018-03-19 21:30 -0700 |
In article <epErC.23659$Il7.1933@fx46.am4>,
Chris Jones <lugnut808@spam.yahoo.com> wrote:
>> http://www.eevblog.com/forum/repair/hp-3478a-how-to-readwrite-cal-sram/
>>
>Excellent.
Here's a bit of simple Python code I wrote to retrieve the cal data
and store it. This uses a Python VXI11 library, which is speaking to
an ICS8065 VXI11-to-GPIB gateway which then accesses the 3278A,
import vxi11
import signal
import sys
print("list_devices: ", vxi11.list_devices())
print("list_resources: ",vxi11.list_resources())
print "Opening instrument"
instr = vxi11.Instrument("ics8065", "gpib0,23")
print "Got instrument ", instr
interrupted = 0
def signal_handler(signal, frame):
print('You pressed Ctrl+C!')
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
print("Reset instrument to H0 home state")
instr.write("H0");
calibration = bytearray()
print("Fetching calibration array")
for offset in range(256):
command = bytearray(b'W')
command.append(offset)
response = instr.ask_raw(command)
calibration.append(response)
with open("calibration.dat", "wb") as outfile:
outfile.write(calibration)
and here's the corresponding restore-the-calibration routine, which I
have not actually executed with the CAL switch enabled.
import vxi11
import signal
import sys
print("list_devices: ", vxi11.list_devices())
print("list_resources: ",vxi11.list_resources())
print "Opening instrument"
instr = vxi11.Instrument("ics8065", "gpib0,23")
print "Got instrument ", instr
interrupted = 0
def signal_handler(signal, frame):
print('You pressed Ctrl+C!')
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
print("Reset instrument to H0 home state")
instr.write("H0");
calibration = bytearray()
print("Loading calibration array")
with open("calibration.dat", "rb") as infile:
calibration = infile.read()
if len(calibration) != 256:
print("Calibration data isn't exactly 256 bytes!")
abort
# Warning - the following will overwrite the instrument's
# calibration array if the CAL switch is enabled. To allow
# this, uncomment the write_raw line.
for offset in range(256):
command = bytearray(b'X')
command.append(offset)
command.append(calibration[offset])
# instr.write_raw(command)
Back to sci.electronics.design | Previous | Next — Previous in thread | Find similar | Unroll thread
5.5 digit meters "Tom Del Rosso" <fizzbintuesday@that-google-mail-domain.com> - 2018-03-10 14:50 -0500
Re: 5.5 digit meters Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2018-03-10 13:58 -0700
Re: 5.5 digit meters dplatt@coop.radagast.org (Dave Platt) - 2018-03-10 19:33 -0800
Re: 5.5 digit meters pcdhobbs@gmail.com - 2018-03-11 06:59 -0700
Re: 5.5 digit meters "Tom Del Rosso" <fizzbintuesday@that-google-mail-domain.com> - 2018-03-11 17:11 -0400
Re: 5.5 digit meters John Larkin <jjlarkin@highlandtechnology.com> - 2018-03-10 16:49 -0800
Re: 5.5 digit meters Martin Riddle <martin_ridd@verizon.net> - 2018-03-10 20:23 -0500
Re: 5.5 digit meters Lasse Langwadt Christensen <langwadt@fonz.dk> - 2018-03-10 17:54 -0800
Re: 5.5 digit meters "Tom Del Rosso" <fizzbintuesday@that-google-mail-domain.com> - 2018-03-11 13:57 -0400
Re: 5.5 digit meters dplatt@coop.radagast.org (Dave Platt) - 2018-03-15 14:16 -0700
Re: 5.5 digit meters Chris Jones <lugnut808@spam.yahoo.com> - 2018-03-16 11:28 +1100
Re: 5.5 digit meters dplatt@coop.radagast.org (Dave Platt) - 2018-03-15 18:27 -0700
Re: 5.5 digit meters Chris Jones <lugnut808@spam.yahoo.com> - 2018-03-16 15:14 +1100
Re: 5.5 digit meters dplatt@coop.radagast.org (Dave Platt) - 2018-03-18 08:26 -0700
Re: 5.5 digit meters Chris Jones <lugnut808@spam.yahoo.com> - 2018-03-19 12:30 +1100
Re: 5.5 digit meters dplatt@coop.radagast.org (Dave Platt) - 2018-03-19 21:30 -0700
csiph-web