Fluke 5700a, programming, testing, usage etc - Page 1
Forum section: electronics / general

author: aronake
author_rank: Frequent Contributor
timestamp: April 11, 2025, 09:19:27 am
content: Rather than purely focused on Fluke 57X0a programming, I will use this thread for general Fluke 5700a matters, and post some of my projects using F5700a. Everybody else is much welcome and encouraged to post own experiences using Fluke 57x0a, questions, ideas suggestions etc.--------I happened to buy a Fluke 5700a. Its from 1989 so an early edition. Its in extremely good shape, and both displays are very good, but probably a ticking bomb to self destruct with all carbon resistors, tantalum capacitors and electrolytic capacitors. I will work though board by board to have all these replaced.Its so early that it came with a "Preliminary Service Manual" and a card to fill out to request the final service manual free of charge. This offer have no expiration date, so I may do a try. The manual, and even more the service manual with all schematics is a piece of art!Now to the purpose of this thread. The 5700a/5720a is pretty easy to control over GPIB, but its quite tedious task to program calibration routines etc for different equipment. So good is that whoever have done any program share it here. Programming language, method of communicating over GPIB can be whatever, as the provided code can be ported to whoever may want to use it. I have not seem to much 5700a control programming published here.My initial plans for calibration scrips:- Keysight 34461A calibration performance check.- Fluke 8845a calibration and performance check- Keithley DMM6500 calibration and performance check. DMM6500 do not allow to enter actual resistance value for resistance calibration, so may have to do resistance separateley.- 3458a "performance check". 5700a may not really be up to the task, but will give some indication, and I can use it to relative compare the different 3458a I have- 5700A as generator of voltages for general linearity check using actual measurements from 3458a.- and lots of other ideas.There may be input signals 5700A can not generate without amplifier, and I may then have to do some workarounds for that.My programming will be done in python (which i think is a terrible programming lanauge, but is widely used with packages etc, so i will have to live with that), VXI11. Once i get my programs complete i will post them here.

author: CalibrationGuy
author_rank: Unknown
timestamp: April 11, 2025, 02:05:43 pm
content: Don't forget the venerable and widely used HP34401a, HP34970a, Keithley 2000, 2001, 2002, Keysight's 34460/65/70. This is a lot of work, but a really useful effort.A repository and volunteer gatekeeper would help greatly. I will help as time permits with code reviews and/or testing of scripts.TomG.

author: aronake
author_rank: Frequent Contributor
timestamp: April 12, 2025, 03:36:13 am
content: Quote from: CalibrationGuy on April 11, 2025, 02:05:43 pmMy ambition was intended to be a bit lower, just a thread for 5700A/5720A code sharing. But making this more structured is a good idea. So if anybody upload something, good if you write if you are OK that your code is edited and reposted, either here or say github or what may be suitable.

author: CalibrationGuy
author_rank: Unknown
timestamp: April 12, 2025, 03:47:06 am
content: +1 for Github.TomG.

author: mendip_discovery
author_rank: Super Contributor
timestamp: April 12, 2025, 08:39:39 am
content: Why not write some scripts that either work with @MiDi setup or @e61_philhttps://github.com/PhilippCo/meas_rpiandhttps://github.com/PhilippCo/testgearIIRC TiN over on xDevs has a bunch of cal scripts etc. Though I have never delved into them that deeply.From my list of many things to do, I would like to get a script for doing a regular check between multimeter and calibrator and saving it to an ongoing log/graphs etc.

author: CalibrationGuy
author_rank: Unknown
timestamp: April 12, 2025, 04:09:32 pm
content: Has anyone tried this code with a 5700a and say a 34401a?TomG.

author: D.Burnette
author_rank: Contributor
timestamp: April 15, 2025, 11:44:59 pm
content: Awesome score!Sounds like you are dancing around something similar to a MET/CAL procedure in Python, which is really neat. If I had a 57xx, I would definitely play with some PyVISA and GPIB...You might be interested in the NCSLI MII github (https://github.com/NCSLI-MII): They are defining a taxonomy for measurement automation. Could use that and XML instead of having to create your own schema for measurement points.

author: LorenzoDL
author_rank: Newbie
timestamp: April 16, 2025, 08:31:36 am
content: Great score!I was in the past few months looking around to acquire one myself but the price online is crazy.Can you share the price you paid for yours as a reference for the commercial price in the used market for a nice and functioning machine?Thank you

author: CalibrationGuy
author_rank: Unknown
timestamp: April 16, 2025, 07:58:03 pm
content: Not that the thread is about prices, but expect to pay $21,000 for a decent shape 5700a.TomG.

author: aronake
author_rank: Frequent Contributor
timestamp: April 18, 2025, 11:05:01 am
content: Quote from: LorenzoDL on April 16, 2025, 08:31:36 amI paid around 13K USD.Benefit of the unit I have: It looks pretty much like new both outside and inside. The VFD display have very limited burn in. Total runtime around 1 year. Since the unit is 36 years old, it has not seem much "on %". From the stored calibration data it was calibrated in 2019 and in 2021, so a hint that its been taken care of and had recurring calibrations. From the 2021 calibration to now, i just did a calibration with F732B, F742A-1 and SR104 straight from the national standard laboratory, the internal 6.5V has moved 0 PPM, the 13V references has moved 0.2 PPM and the 10K reference has move 0.14 PMM. So it seems extremely stable. The calibration resistors, except for the far ends (less than 100R, above 190K) have drifted less than 0.5 ppm.The negatives: It was built in 1989 or possible 1990 so a very early 5700a. I could see that they figured things out in the early production runs with some few improvements. But just speculation as from what I see the one I have is extremely stable.Straight out of calibration it measures around 0.3 PPM on 10V using a couple of 3458A (calibrated at the same time with same freshly calibrated standard) who all agree on this with +/- 0.1 PPM. I believe this is also very good. Probably a component of luck, as 0.1PPM is very low to detect even for a 3458a.So seems this was a lucky purchase. Quite much money for a toy though.... It will probably maintain value quite ok. But pretty difficult to transport in case deciding to sell it later....With only 1 year run time I am debating how to do with capacitor and carbon composition resistors. They all look good and way less runtime than capacitors are specified for. Keeping them is a risk, swapping them is also a risk. Ill probably leave them as they are for a couple of month at least.Some month ago I googled 1 day late and missed a government surplus auction where an "out of service" 5720A and 732B plus some other less exciting gear was sold for 4K USD. Grrrrr! I suspect they were not very much out of service and should be quite easily repairable, particularly the 732B.Im working in my 5700A vs 3458a python compare program now.

author: aronake
author_rank: Frequent Contributor
timestamp: April 18, 2025, 11:11:43 am
content: Here is a printout from latest version of the 5700A vs 3458a compare program.The 5700a is not capable of calibrating a 3458a on its own without characterization. But as I have 6 different 3458a, it should at least give a hint on how well the different 3458a are performing. And if the 3458a is in good agreement on something where there is a significant measurement error, then this be a hint that the 5700a is not doing so well at that output point.Starting Fluke 5700a HPAK 3458a comparatorStart time: 2025-04-18 17:23:01DCVInput= +0.1 Freq = 0 Measure= +0.1000001 Err PPM= -1.29 Range= .1 Stdev= 0.421 ActR = 0.1Input= -0.1 Freq = 0 Measure= -0.09999928 Err PPM= +7.15 Range= .1 Stdev= -0.619 ActR = -0.1Input= +1 Freq = 0 Measure= +1 Err PPM= -0.33 Range= 1.0 Stdev= 0.100 ActR = 1Input= -1 Freq = 0 Measure= -0.9999997 Err PPM= +0.34 Range= 1.0 Stdev= -0.082 ActR = -1Input= +1 Freq = 0 Measure= +1 Err PPM= -0.27 Range= 10 Stdev= 0.240 ActR = 1Input= -1 Freq = 0 Measure= -0.9999995 Err PPM= +0.50 Range= 10 Stdev= -0.253 ActR = -1Input= +10 Freq = 0 Measure= +10 Err PPM= -0.12 Range= 10 Stdev= 0.033 ActR = 10Input= -10 Freq = 0 Measure= -10 Err PPM= -0.23 Range= 10 Stdev= -0.034 ActR = -10Input= +100 Freq = 0 Measure= +100 Err PPM= -0.13 Range= 100 Stdev= 0.165 ActR = 100Input= -100 Freq = 0 Measure= -99.99996 Err PPM= +0.39 Range= 100 Stdev= -0.155 ActR = -100Input= +1 Freq = 0 Measure= +1 Err PPM= +0.02 Range= 10 Stdev= 0.248 ActR = 1Input= +2 Freq = 0 Measure= +2 Err PPM= +0.20 Range= 10 Stdev= 0.109 ActR = 2Input= +3 Freq = 0 Measure= +3.000001 Err PPM= -0.39 Range= 10 Stdev= 0.130 ActR = 3Input= +4 Freq = 0 Measure= +4.000001 Err PPM= -0.22 Range= 10 Stdev= 0.088 ActR = 4Input= +5 Freq = 0 Measure= +5.000001 Err PPM= -0.28 Range= 10 Stdev= 0.056 ActR = 5Input= +6 Freq = 0 Measure= +6.000001 Err PPM= -0.24 Range= 10 Stdev= 0.066 ActR = 6Input= +7 Freq = 0 Measure= +7.000002 Err PPM= -0.24 Range= 10 Stdev= 0.053 ActR = 7Input= +8 Freq = 0 Measure= +8.000002 Err PPM= -0.27 Range= 10 Stdev= 0.043 ActR = 8Input= +9 Freq = 0 Measure= +9.000003 Err PPM= -0.28 Range= 10 Stdev= 0.048 ActR = 9Input= +10 Freq = 0 Measure= +10 Err PPM= -0.19 Range= 10 Stdev= 0.040 ActR = 10Input= +11 Freq = 0 Measure= +11 Err PPM= -0.16 Range= 10 Stdev= 0.068 ActR = 11ResistanceInput= +1 Freq = 0 Measure= +1.000018 Err PPM= +29.46 Range= 10 Stdev= 19.441 ActR = 1.0000472Input= +10 Freq = 0 Measure= +9.999714 Err PPM= -1.11 Range= 10 Stdev= 2.372 ActR = 9.999703Input= +100 Freq = 0 Measure= +99.99408 Err PPM= +0.40 Range= 100 Stdev= 2.273 ActR = 99.99412Input= +1000 Freq = 0 Measure= +999.9419 Err PPM= +0.77 Range= 1.0E3 Stdev= 0.287 ActR = 999.9427Input= +10000 Freq = 0 Measure= +9999.366 Err PPM= +1.12 Range= 1.0E4 Stdev= 0.596 ActR = 9999.377Input= +100000 Freq = 0 Measure= +99993.66 Err PPM= +4.90 Range= 1.0E5 Stdev= 0.341 ActR = 99994.15DCIInput= +1E-07 Freq = 0 Measure= +1.002715E-07 Err PPM= -2714.58 Range= 1.0E-6 Stdev= 288.250 ActR = 1E-07Input= -1E-07 Freq = 0 Measure= -9.972756E-08 Err PPM= +2724.41 Range= 1.0E-7 Stdev= -306.881 ActR = -1E-07Input= +1E-06 Freq = 0 Measure= +1.000234E-06 Err PPM= -234.11 Range= 1.0E-5 Stdev= 43.916 ActR = 1E-06Input= -1E-06 Freq = 0 Measure= -9.997363E-07 Err PPM= +263.68 Range= 1.0E-5 Stdev= -62.031 ActR = -1E-06Input= +1E-05 Freq = 0 Measure= +1.000013E-05 Err PPM= -13.39 Range= 1.0E-5 Stdev= 3.446 ActR = 1E-05Input= -1E-05 Freq = 0 Measure= -9.999608E-06 Err PPM= +39.25 Range= 1.0E-5 Stdev= -5.250 ActR = -1E-05Input= +0.0001 Freq = 0 Measure= +9.999895E-05 Err PPM= +10.50 Range= 1.0E-4 Stdev= 1.792 ActR = 0.0001Input= +0.0001 Freq = 0 Measure= +9.999896E-05 Err PPM= +10.37 Range= 1.0E-4 Stdev= 1.701 ActR = 0.0001Input= -0.0001 Freq = 0 Measure= -9.999846E-05 Err PPM= +15.42 Range= 1.0E-4 Stdev= -1.131 ActR = -0.0001Input= +0.001 Freq = 0 Measure= +0.000999996 Err PPM= +4.00 Range= 1.0E-3 Stdev= 1.267 ActR = 0.001Input= -0.001 Freq = 0 Measure= -0.000999991 Err PPM= +8.97 Range= 1.0E-3 Stdev= -1.097 ActR = -0.001Input= +0.01 Freq = 0 Measure= +0.009999963 Err PPM= +3.67 Range= .01 Stdev= 0.900 ActR = 0.01Input= -0.01 Freq = 0 Measure= -0.009999955 Err PPM= +4.55 Range= .01 Stdev= -0.880 ActR = -0.01Input= +0.1 Freq = 0 Measure= +0.1000015 Err PPM= -15.25 Range= .1 Stdev= 2.217 ActR = 0.1Input= -0.1 Freq = 0 Measure= -0.1000016 Err PPM= -15.87 Range= .1 Stdev= -0.678 ActR = -0.1Input= +1 Freq = 0 Measure= +0.9999173 Err PPM= +82.70 Range= 1.0 Stdev= 3.675 ActR = 1Input= -1 Freq = 0 Measure= -1.000037 Err PPM= -36.60 Range= 1.0 Stdev= -2.532 ActR = -1ACV SyncInput= +1 Freq = 5E+01 Measure= +1.00001 Err PPM= -10.02 Range= 1.0 Stdev= 4.750 ActR = 1Input= +1 Freq = 1E+03 Measure= +1.000021 Err PPM= -20.76 Range= 1.0 Stdev= 3.448 ActR = 1Input= +1 Freq = 1E+04 Measure= +0.9999503 Err PPM= +49.72 Range= 1.0 Stdev= 3.379 ActR = 1Input= +1 Freq = 3E+05 Measure= +1.001562 Err PPM= -1562.09 Range= 1.0 Stdev= 8.620 ActR = 1Input= +10 Freq = 5E+01 Measure= +10.00014 Err PPM= -14.29 Range= 10 Stdev= 3.603 ActR = 10Input= +10 Freq = 1E+03 Measure= +10.00033 Err PPM= -33.29 Range= 10 Stdev= 2.647 ActR = 10Input= +10 Freq = 1E+04 Measure= +10.00009 Err PPM= -8.74 Range= 10 Stdev= 2.700 ActR = 10Input= +10 Freq = 3E+05 Measure= +9.999868 Err PPM= +13.17 Range= 10 Stdev= 9.818 ActR = 10ACV AnaInput= +1 Freq = 5E+01 Measure= +0.9999016 Err PPM= +98.36 Range= 1.0 Stdev= 4.203 ActR = 1Input= +1 Freq = 1E+03 Measure= +1.000038 Err PPM= -37.51 Range= 1.0 Stdev= 2.317 ActR = 1Input= +1 Freq = 1E+04 Measure= +0.9999715 Err PPM= +28.45 Range= 1.0 Stdev= 1.536 ActR = 1Input= +10 Freq = 5E+01 Measure= +9.999651 Err PPM= +34.86 Range= 10 Stdev= 7.092 ActR = 10Input= +10 Freq = 1E+03 Measure= +10.00052 Err PPM= -52.18 Range= 10 Stdev= 1.690 ActR = 10Input= +10 Freq = 1E+04 Measure= +10.00042 Err PPM= -42.38 Range= 10 Stdev= 1.222 ActR = 10Input= +10 Freq = 3E+05 Measure= +9.978738 Err PPM= +2126.18 Range= 10 Stdev= 0.662 ActR = 10ACV RandomInput= +1 Freq = 1E+03 Measure= +0.9998604 Err PPM= +139.59 Range= 1.0 Stdev= 426.008 ActR = 1Input= +1 Freq = 1E+04 Measure= +0.999744 Err PPM= +256.05 Range= 1.0 Stdev= 848.331 ActR = 1Input= +10 Freq = 5E+01 Measure= +9.9973 Err PPM= +269.97 Range= 10 Stdev= 555.454 ActR = 10Input= +10 Freq = 1E+03 Measure= +9.997369 Err PPM= +263.13 Range= 10 Stdev= 489.000 ActR = 10Input= +10 Freq = 1E+04 Measure= +9.998775 Err PPM= +122.51 Range= 10 Stdev= 1226.083 ActR = 10Input= +10 Freq = 3E+05 Measure= +9.998691 Err PPM= +130.89 Range= 10 Stdev= 1429.296 ActR = 10ACIInput= +0.01 Freq = 5E+01 Measure= +4.384965E-08 Err PPM= +999995.62 Range= 1.0E-4 Stdev= 49499.949 ActR = 0.01Input= +0.01 Freq = 1E+03 Measure= +0.01000109 Err PPM= -108.61 Range= .01 Stdev= 10.016 ActR = 0.01Input= +0.01 Freq = 1E+04 Measure= +0.01000461 Err PPM= -461.30 Range= .01 Stdev= 3.504 ActR = 0.01Input= +0.1 Freq = 5E+01 Measure= +0.1000076 Err PPM= -75.69 Range= .1 Stdev= 10.890 ActR = 0.1Input= +0.1 Freq = 1E+03 Measure= +0.1000173 Err PPM= -172.82 Range= .1 Stdev= 1.520 ActR = 0.1Input= +0.1 Freq = 1E+04 Measure= +0.1001535 Err PPM= -1535.20 Range= .1 Stdev= 6.225 ActR = 0.1Input= +1 Freq = 5E+01 Measure= +0.9999388 Err PPM= +61.22 Range= 1.0 Stdev= 9.825 ActR = 1Input= +1 Freq = 1E+03 Measure= +1.000198 Err PPM= -197.70 Range= 1.0 Stdev= 1.429 ActR = 1Input= +1 Freq = 1E+04 Measure= +1.012067 Err PPM= -12066.79 Range= 1.0 Stdev= 1.820 ActR = 1End Time: 2025-04-18 18:29:39Calibration completed in 66.6 minutes

author: aronake
author_rank: Frequent Contributor
timestamp: April 24, 2025, 12:43:14 am
content: Would anyone have some list of replacement components for 5700a, like capacitors and carbon composition resistors including size and lead spacing of capacitors? Maybe some cut and paste from some old order of components? The service manual is of course very helpful, but does not say size of capacitors, and does not give ideas on what resistors to use to replace carbon composition resistors.

author: Arhigos
author_rank: Regular Contributor
timestamp: April 27, 2025, 10:45:25 am
content: There is soooo many board revisions for 5700a, so even if you get someone's list of components, values and sizes it may not work for you..So the only way is to do it board by board manually(but i think, there is youtuber who did a full recap on one of those calibrators, you may ask him for his BOM)

author: aronake
author_rank: Frequent Contributor
timestamp: April 27, 2025, 01:45:54 pm
content: Quote from: Arhigos on April 27, 2025, 10:45:25 amThats a good point, but likely very much is same, and also helpful to see what resistors etc someone else have chosen to replace the carbon componstion resistors and tantalum caps.Marco Reps didnt have his list anymore unfortunateley.

author: aronake
author_rank: Frequent Contributor
timestamp: May 10, 2025, 02:45:10 pm
content: I know this is written in an absolutely hideous programming style, but here is a program to calibrate a Keysight / Agilent K34461a with a Fluke 5700a. Hard to believe I'm a computer engineer and did my masters thesis project at Sun Microsystems in Silicon Valley in the IT boom of 2000. I then got seduced by the dark side and started to do management consulting and banking.... So that my explain a bit...Use completely at own risk at lethal voltages will be in use!!Its written to use VXI11 direct to the 34461a over ethernet and via an Agilent E5810 to the 5700a.---------------------import vxi11import timeSettleTime = 10CalCode = "AT3446XA"# Instrumentsk34461a = vxi11.Instrument("192.168.0.67")F5700a = vxi11.Instrument("192.168.0.61", "gpib0,4")ErrorDetected = 0# -------------- Helper Functions ------------------def sleep_with_message(seconds, message="Waiting for settling..."):print(f"{message} ({seconds} seconds)")time.sleep(seconds)def ask_float(prompt, default):try:user_input = input(prompt)return float(user_input) * 60 if user_input else defaultexcept ValueError:return defaultdef perform_calibration(value, command, range):try:k34461a.write(f"CONF:{command} {range}")time.sleep(2)k34461a.write(f"CAL:VAL {value}")k34461a.timeout = 180Status = int(k34461a.ask("CAL?"))if Status == 0:print (" -- Success")else:print(" -- FAIL!!!")ErrorDetected = 1k34461a.write("CAL:STOR")finally:k34461a.timeout = 60def configure_and_operate(instr, output_cmds):for cmd in output_cmds:instr.write(cmd)instr.write("OPER")StartTime = time.time()while True:ISR= int(instr.ask("ISR?"))Elapsed = time.time() - StartTimeif ISR & 0x1000 or Elapsed > 5:breaktime.sleep(0.5)def output_voltage(val, freq=None):cmds = [f"OUT {val} V"]if freq is not None:cmds.append(f"OUT {freq} Hz")configure_and_operate(F5700a, cmds)def output_current(val, freq=None):cmds = [f"OUT {val} A"]if freq is not None:cmds.append(f"OUT {freq} Hz")configure_and_operate(F5700a, cmds)def CheckTerminal (TestTerm): # FRONT is should be front REAR if should be rearTerm = k34461a.ask ("ROUT:TERM?")if Term == "FRON" and TestTerm =="REAR":input("WRONG TERMINALS SELECTED! SWITH TO REAR. Then press enter.")if Term == "REAR" and TestTerm =="FRONT":input("WRONG TERMINALS SELECTED! SWITH TO FRONT. Then press enter.")# -------------- Calibration Functions ------------------def short_cal():print("Insert 4-wire short in FRONT and REAR of K34461A")print("Set K34461A switch to FRONT")sleep_with_message(ask_float("Wait time for thermal settling in minutes (default 5 min): ", 300))CheckTerminal("FRONT")print("FRONT ADC calibration" , end="")k34461a.timeout = 400Status = int(k34461a.ask("CAL:ADC?"))if Status == 0:print (" -- Success")else:print(" -- FAIL!!!")ErrorDetected = 1k34461a.write("CAL:STOR")print("FRONT Zero calibration" , end="")perform_calibration(0.0,"VOLT:DC" , 0.1)k34461a.write("CAL:STOR")input("Set K34461A switch to REAR and press Enter...")print("REAR ADC calibration" , end="")CheckTerminal("REAR")Status = int(k34461a.ask("CAL:ADC?"))if Status == 0:print (" -- Success")else:print(" -- FAIL!!!")ErrorDetected = ErrorDetected + 1k34461a.write("CAL:STOR")print("REAR Zero calibration" , end="")perform_calibration(0.0,"VOLT:DC",0.1)k34461a.write("CAL:STOR")def dcv_cal():inputs = [10, -10, 0.1, -0.1, 1, 100, 500]ranges = [10, 10, 0.1, 0.1, 1, 100, 1000]for val, rng in zip(inputs, ranges):print(f"Calibrating {val} V in range {rng}", end="")output_voltage(val)time.sleep(SettleTime)perform_calibration(val, "VOLT:DC", rng)k34461a.write("CAL:STOR")F5700a.write("STBY")def res_cal():print("Resistance Calibration")F5700a.write("EXTSENSE ON")values = [100, 1000, 10000, 100000, 1000000, 10000000]for res in values:F5700a.write(f"OUT {res} OHM")actual = float(F5700a.ask("ADJOUT?").split(","))print(f"Calibrating {res:,} Ω (actual: {actual} 4 Wire " , end="")configure_and_operate(F5700a, [f"OUT {res} OHM"])time.sleep(SettleTime)perform_calibration(actual, f"FRES" , res)# 100 MΩF5700a.write("EXTSENSE OFF")configure_and_operate(F5700a, "OUT 100000000 OHM")print(f"Calibrating 100M Ω (actual: {actual} 2 Wire " , end="")actual = float(F5700a.ask("ADJOUT?").split(","))time.sleep(SettleTime)perform_calibration(actual, "RES" ,100000000)k34461a.write("CAL:STOR")F5700a.write("STBY")def dci_cal():print("DC Current Calibration")F5700a.write("EXTSENSE OFF")F5700a.write("CUR_POST AUX")k34461a.write("CONF:CURR:DC 1")for val in [0.0001, 0.001, 0.01, 0.1, 1]:print(f"Calibrating {val} A", end="")output_current(val)time.sleep(SettleTime)perform_calibration(val, f"CURR:DC" , val)k34461a.write("CAL:STOR")F5700a.write("STBY")def acv_zero():print("AC Voltage Zero Calibration", end="")F5700a.write("OUT 0 OHM")configure_and_operate(F5700a, [])time.sleep(SettleTime)perform_calibration(0.0, "VOLT:AC", 10)k34461a.write("CAL:STOR")F5700a.write("STBY")def acv_cal():print("AC Voltage Low Frequency Gain and Flatness Calibration")F5700a.write("EXTSENSE OFF")k34461a.write("CURR:AC:BAND 3")k34461a.write("VOLT:AC:BAND 3")freqs = [10, 40]for freq in freqs:print(f"Calibrating 7V RMS at {freq} Hz ", end="")output_voltage(7, freq)time.sleep(SettleTime)perform_calibration(7, "VOLT:AC", 10)ACVolt = [0.1, 1, 10, 50]ACRange = [0.1, 1, 10, 100]ACFreq = [5000, 10000, 20000, 35000, 50000, 75000, 100000, 200000, 300000, 390000, 400000, 220, 1000]for i, val in enumerate(ACVolt):for freq in ACFreq:print(f"Calibrating {val} V RMS at {freq} Hz " , end="")output_voltage(val, freq)time.sleep(SettleTime/2)perform_calibration(val, "VOLT:AC", ACRange)print(f"Calibrating 500 V RMS at 1000Hz" , end="")output_voltage(500, 1000)time.sleep (SettleTime/2)perform_calibration(500, "VOLT:AC", 1000)k34461a.write("CAL:STOR")F5700a.write("STBY")def aci_cal():print("AC Current Calibration")F5700a.write("EXTSENSE OFF")F5700a.write("CUR_POST AUX")k34461a.write("CURR:AC:BAND 3")ACCurrent = [1, 0.1, 0.01]ACFreq = [5000, 7500, 9700, 10000, 220, 1000]for i, val in enumerate(ACCurrent):for freq in ACFreq:k34461a.write("CONF:CURR:AC 0.1")print(f"Calibrating {val} A RMS at {freq} Hz " , end="")output_current(val, freq)time.sleep(SettleTime/2)perform_calibration(val, "CURR:AC", val)for val in [0.001, 0.0001]:print(f"Calibrating {val} A RMS at 1000 Hz " , end="")output_current(val, 1000)time.sleep(SettleTime/2)perform_calibration(val, "CURR:AC" , val)k34461a.write("CAL:STOR")F5700a.write("STBY")def dc10a_cal():print("DC 10A Calibration at 2A" ,end ="")k34461a.write("CONF:CURR:DC 10")output_current(2,0)time.sleep(SettleTime/2)perform_calibration(2, "CURR:DC", 10)k34461a.write("CAL:STOR")F5700a.write("STBY")def ac10a_cal():k34461a.write("CONF:CURR:AC 10")print("AC 10A Calibration at 2A 1000Hz", end = "")output_current(2, 1000)time.sleep(SettleTime/2)perform_calibration(2, "CURR:AC", 10)k34461a.write("CAL:STOR")F5700a.write("STBY")# -------------- Main Program ------------------def main():print("Starting Keysight 34661a Calibrator")print(F5700a.ask("*IDN?"))print(k34461a.ask("*IDN?"))F5700a.write("*CLS")F5700a.write("STBY")F5700a.timeout = 30k34461a.write("*RST")k34461a.write(f"CAL:SEC:STAT OFF,{CalCode}")short_cal()input("Connect 5-wire cable between 5700A and K34461A, use 3 A connector for current, then press Enter...")sleep_with_message(ask_float("Wait time for thermal settling in minutes (default 2 min): ", 120))CheckTerminal("FRONT")acv_cal()aci_cal()acv_zero()dcv_cal()res_cal()dci_cal()input("Swap current cable to 10A connector and press Enter...")ac10a_cal()dc10a_cal()F5700a.write("STBY")if ErrorDetected == 0:print("All calibration steps sucessful!")else:print("ONE OR MORE CALIBRATION STEPS FAILED")k34461a.write("")k34461a.write("CAL:STOR")k34461a.write("CAL:SEC:STAT OFF," + CalCode)print("Cal data saved, K34661a cal locked, calibration complete")if __name__ == "__main__":main()

author: Kean
author_rank: Unknown
timestamp: May 11, 2025, 02:10:54 pm
content: Ideally you should include that all inside a forum (BBcode) "code block" to avoid it incorrectly interpreting things.You may note that at some point it interprets an array index operator on ACRange as a command to switch to italics.Even better attach it as a text file as that makes it really easy for people to save locally and without any potential for the forum changing any of the text.

author: aronake
author_rank: Frequent Contributor
timestamp: May 23, 2025, 11:02:03 am
content: Here the K34461a program posted in a better way.Code:import vxi11import timeSettleTime = 10CalCode = "AT3446XA"# Instrumentsk34461a = vxi11.Instrument("192.168.0.67")F5700a = vxi11.Instrument("192.168.0.61", "gpib0,4")ErrorDetected = 0# -------------- Helper Functions ------------------def sleep_with_message(seconds, message="Waiting for settling..."):print(f"{message} ({seconds} seconds)")time.sleep(seconds)def ask_float(prompt, default):try:user_input = input(prompt)return float(user_input) * 60 if user_input else defaultexcept ValueError:return defaultdef perform_calibration(value, command, range):try:k34461a.write(f"CONF:{command} {range}")time.sleep(2)k34461a.write(f"CAL:VAL {value}")k34461a.timeout = 180Status = int(k34461a.ask("CAL?"))if Status == 0:print (" -- Success")else:print(" -- FAIL!!!")ErrorDetected = 1k34461a.write("CAL:STOR")finally:k34461a.timeout = 60def configure_and_operate(instr, output_cmds):for cmd in output_cmds:instr.write(cmd)instr.write("OPER")StartTime = time.time()while True:ISR= int(instr.ask("ISR?"))Elapsed = time.time() - StartTimeif ISR & 0x1000 or Elapsed > 5:breaktime.sleep(0.5)def output_voltage(val, freq=None):cmds = [f"OUT {val} V"]if freq is not None:cmds.append(f"OUT {freq} Hz")configure_and_operate(F5700a, cmds)def output_current(val, freq=None):cmds = [f"OUT {val} A"]if freq is not None:cmds.append(f"OUT {freq} Hz")configure_and_operate(F5700a, cmds)def CheckTerminal (TestTerm): # FRONT is should be front REAR if should be rearTerm = k34461a.ask ("ROUT:TERM?")if Term == "FRON" and TestTerm =="REAR":input("WRONG TERMINALS SELECTED! SWITH TO REAR. Then press enter.")if Term == "REAR" and TestTerm =="FRONT":input("WRONG TERMINALS SELECTED! SWITH TO FRONT. Then press enter.")# -------------- Calibration Functions ------------------def short_cal():print("Insert 4-wire short in FRONT and REAR of K34461A")print("Set K34461A switch to FRONT")sleep_with_message(ask_float("Wait time for thermal settling in minutes (default 5 min): ", 300))CheckTerminal("FRONT")print("FRONT ADC calibration" , end="")k34461a.timeout = 400Status = int(k34461a.ask("CAL:ADC?"))if Status == 0:print (" -- Success")else:print(" -- FAIL!!!")ErrorDetected = 1k34461a.write("CAL:STOR")print("FRONT Zero calibration" , end="")perform_calibration(0.0,"VOLT:DC" , 0.1)k34461a.write("CAL:STOR")input("Set K34461A switch to REAR and press Enter...")print("REAR ADC calibration" , end="")CheckTerminal("REAR")Status = int(k34461a.ask("CAL:ADC?"))if Status == 0:print (" -- Success")else:print(" -- FAIL!!!")ErrorDetected = ErrorDetected + 1k34461a.write("CAL:STOR")print("REAR Zero calibration" , end="")perform_calibration(0.0,"VOLT:DC",0.1)k34461a.write("CAL:STOR")def dcv_cal():inputs = [10, -10, 0.1, -0.1, 1, 100, 500]ranges = [10, 10, 0.1, 0.1, 1, 100, 1000]for val, rng in zip(inputs, ranges):print(f"Calibrating {val} V in range {rng}", end="")output_voltage(val)time.sleep(SettleTime)perform_calibration(val, "VOLT:DC", rng)k34461a.write("CAL:STOR")F5700a.write("STBY")def res_cal():print("Resistance Calibration")F5700a.write("EXTSENSE ON")values = [100, 1000, 10000, 100000, 1000000, 10000000]for res in values:F5700a.write(f"OUT {res} OHM")actual = float(F5700a.ask("ADJOUT?").split(","))print(f"Calibrating {res:,} Ω (actual: {actual} 4 Wire " , end="")configure_and_operate(F5700a, [f"OUT {res} OHM"])time.sleep(SettleTime)perform_calibration(actual, f"FRES" , res)# 100 MΩF5700a.write("EXTSENSE OFF")configure_and_operate(F5700a, "OUT 100000000 OHM")print(f"Calibrating 100M Ω (actual: {actual} 2 Wire " , end="")actual = float(F5700a.ask("ADJOUT?").split(","))time.sleep(SettleTime)perform_calibration(actual, "RES" ,100000000)k34461a.write("CAL:STOR")F5700a.write("STBY")def dci_cal():print("DC Current Calibration")F5700a.write("EXTSENSE OFF")F5700a.write("CUR_POST AUX")k34461a.write("CONF:CURR:DC 1")for val in [0.0001, 0.001, 0.01, 0.1, 1]:print(f"Calibrating {val} A", end="")output_current(val)time.sleep(SettleTime)perform_calibration(val, f"CURR:DC" , val)k34461a.write("CAL:STOR")F5700a.write("STBY")def acv_zero():print("AC Voltage Zero Calibration", end="")F5700a.write("OUT 0 OHM")configure_and_operate(F5700a, [])time.sleep(SettleTime)perform_calibration(0.0, "VOLT:AC", 10)k34461a.write("CAL:STOR")F5700a.write("STBY")def acv_cal():print("AC Voltage Low Frequency Gain and Flatness Calibration")F5700a.write("EXTSENSE OFF")k34461a.write("CURR:AC:BAND 3")k34461a.write("VOLT:AC:BAND 3")freqs = [10, 40]for freq in freqs:print(f"Calibrating 7V RMS at {freq} Hz ", end="")output_voltage(7, freq)time.sleep(SettleTime)perform_calibration(7, "VOLT:AC", 10)ACVolt = [0.1, 1, 10, 50]ACRange = [0.1, 1, 10, 100]ACFreq = [5000, 10000, 20000, 35000, 50000, 75000, 100000, 200000, 300000, 390000, 400000, 220, 1000]for i, val in enumerate(ACVolt):for freq in ACFreq:print(f"Calibrating {val} V RMS at {freq} Hz " , end="")output_voltage(val, freq)time.sleep(SettleTime/2)perform_calibration(val, "VOLT:AC", ACRange)print(f"Calibrating 500 V RMS at 1000Hz" , end="")output_voltage(500, 1000)time.sleep (SettleTime/2)perform_calibration(500, "VOLT:AC", 1000)k34461a.write("CAL:STOR")F5700a.write("STBY")def aci_cal():print("AC Current Calibration")F5700a.write("EXTSENSE OFF")F5700a.write("CUR_POST AUX")k34461a.write("CURR:AC:BAND 3")ACCurrent = [1, 0.1, 0.01]ACFreq = [5000, 7500, 9700, 10000, 220, 1000]for i, val in enumerate(ACCurrent):for freq in ACFreq:k34461a.write("CONF:CURR:AC 0.1")print(f"Calibrating {val} A RMS at {freq} Hz " , end="")output_current(val, freq)time.sleep(SettleTime/2)perform_calibration(val, "CURR:AC", val)for val in [0.001, 0.0001]:print(f"Calibrating {val} A RMS at 1000 Hz " , end="")output_current(val, 1000)time.sleep(SettleTime/2)perform_calibration(val, "CURR:AC" , val)k34461a.write("CAL:STOR")F5700a.write("STBY")def dc10a_cal():print("DC 10A Calibration at 2A" ,end ="")k34461a.write("CONF:CURR:DC 10")output_current(2,0)time.sleep(SettleTime/2)perform_calibration(2, "CURR:DC", 10)k34461a.write("CAL:STOR")F5700a.write("STBY")def ac10a_cal():k34461a.write("CONF:CURR:AC 10")print("AC 10A Calibration at 2A 1000Hz", end = "")output_current(2, 1000)time.sleep(SettleTime/2)perform_calibration(2, "CURR:AC", 10)k34461a.write("CAL:STOR")F5700a.write("STBY")# -------------- Main Program ------------------def main():print("Starting Keysight 34661a Calibrator")print(F5700a.ask("*IDN?"))print(k34461a.ask("*IDN?"))F5700a.write("*CLS")F5700a.write("STBY")F5700a.timeout = 30k34461a.write("*RST")k34461a.write(f"CAL:SEC:STAT OFF,{CalCode}")short_cal()input("Connect 5-wire cable between 5700A and K34461A, use 3 A connector for current, then press Enter...")sleep_with_message(ask_float("Wait time for thermal settling in minutes (default 2 min): ", 120))CheckTerminal("FRONT")acv_cal()aci_cal()acv_zero()dcv_cal()res_cal()dci_cal()input("Swap current cable to 10A connector and press Enter...")ac10a_cal()dc10a_cal()F5700a.write("STBY")if ErrorDetected == 0:print("All calibration steps sucessful!")else:print("ONE OR MORE CALIBRATION STEPS FAILED")k34461a.write("")k34461a.write("CAL:STOR")k34461a.write("CAL:SEC:STAT OFF," + CalCode)print("Cal data saved, K34661a cal locked, calibration complete")if __name__ == "__main__":main()

author: aronake
author_rank: Frequent Contributor
timestamp: May 23, 2025, 11:45:58 am
content: Got all e-caps and replacement resistors ordered.Did some guesses on lead spacing for the e-caps based on what is common lead space and pictures floating around. Was generally lucky and pretty much all fitted. Some very small value e-caps like 2.2uf 50V, 10uf 63V (who uses this kind of e-cap values today?) showed out to be very small versions used (6mm diameter, i got bigger) so have made a re-order of these.For the bigger caps, if i would order again, i would probably chose 1 voltage size up, as that would better fill the boards, and would generally give lower dispersion factor.For the resistors, my general rule of thumb was to get metal film resistors at double power rating then the carbon composition resistors. Maybe no surprise, but doesn't properly fill up the board. So new order made with 2W metal film for any carbon composition that was use below 1W, and 3W for any old resistor 1W and higher.

author: aronake
author_rank: Frequent Contributor
timestamp: May 23, 2025, 11:50:26 am
content: There is something like 110 tantalum caps (of 16 different voltage and capacitance combinations) in a 5700a. I was a bit hesitant if I should bother to change these, but got them mapped out in the service manual and placed an order. They just arrived. So that will probably be most of the weekend to get these in place....

author: aronake
author_rank: Frequent Contributor
timestamp: May 23, 2025, 12:29:25 pm
content: When replacing e-caps and some few carbon composition resistors on the A7 board, some not too small balls of some charred material dropped on the workbench. Trying to pick them up they disintegrated into a cloud of carbon dust. The 5700a have tested to work very well and stable, so was wondering what that could have been. Looked around on the board and saw below. A tantalum cap had decided to have a BBQ party and put it self on the BBQ!So no more hesitation if its worth the effort to swap 110 tantalum caps. Yes it is! Luckily this one had failed in an open state. A short would probably have been very bad.....

author: aronake
author_rank: Frequent Contributor
timestamp: June 09, 2025, 01:57:03 pm
content: Mission complete!That was lots of tantalums, e-caps and carbon composition resistors.Whenever I see bumblebee or some orange blobs going forward I may get aggressive associating them with carbon composition resistors and tantalums!

author: aronake
author_rank: Frequent Contributor
timestamp: June 09, 2025, 02:04:05 pm
content: The tantalums was generally measuring quite well on capacitance and dissipation factor, similar to new. But leakage current was typically 10 to 100 higher than on new. Then there was the one that had turned itself into a BBQ.I think on average the carbon composition had drifter around 10% on average, with some toward 30%, and the highest one was a 4.7K that measured 8K....The E-caps generally measured quite well on both capacitance and dissipation factor.Difficult to know if the total runtime reported of around 1 year is correct, as it is being reset whenever battery is changed and need to be programmed, but considering the machine looks pretty much as new both outside and inside and how the components measure, that could be correct.

author: aronake
author_rank: Frequent Contributor
timestamp: June 09, 2025, 03:13:54 pm
content: I wonder if the tantalum went leaky over time, or how they are produced has been improved over time.

author: aronake
author_rank: Frequent Contributor
timestamp: June 11, 2025, 06:20:34 am
content: I am doing some general performance testing of the 5700a now. It is working very well and no more slight burnt electronics smell coming out of it.Generally it is also very temperature stable. What is not that temperature stable though is the the resistors in range 1M to 19M. They have quite a bit of negative TC, not too far from maximum TC boundary from the specification. I guess most 5700a run in very temperature controlled environment, but dust in air filter etc, still should give some variation in internal temperature. As some other people have pointed out, its a bit strange they did not put the calibration resistors in an oven. Reason may be that it would have given worse long term stability, or something.

author: CalibrationGuy
author_rank: Unknown
timestamp: June 11, 2025, 06:49:26 am
content: Those are probably not in their own oven because the unit is generating a lot of heat already and also, it's just one more thing that can break.TomG.

author: aronake
author_rank: Frequent Contributor
timestamp: June 14, 2025, 10:24:28 am
content: Quote from: CalibrationGuy on June 11, 2025, 06:49:26 amMy thinking then that a little more heat to remove this TC would be helpful. And with all carbon composition resistors, there are already lots of things that can break.In this article at section 11, it has been found that despite keeping the 5700a in laboratory environment at 23 C +/- 0.6 degrees just moving the 5700A from 15 cm from a wall to 60 cm from a wall had very noticeable impact on resistor values.https://www.tesinel.es/assets/fileuploads/archivos/calibrating-precision-multimeters-using-a-characterized-multifunction-calibrator-792a.pdfFluke probably have done some proper considerations though. There seem to be not many teardown pictures of 5730a. But generally quite similar to 5700a but much more surface mount components. Interesting to know if something has changed here.Also strange they did not bother to put any internal thermometers accessible with GPIB in the machines.

author: martinr33
author_rank: Frequent Contributor
timestamp: June 17, 2025, 04:29:31 am
content: You have a great find there. These are very capable and accurate units that in my experience better their specifications by a wide margin.1) If you bring your 3458A into the 90-day calibration window using the 10V and 10K, you can transfer readings to the F5700 and significantly increase the accuracy.You can also tweak each range, or maintain a calibration database for your code.2) I found it useful to occasionally run a scan from + to - 10V to check linearity. The most important area is the transition around 0V, so it is worth increasing the resolution there.3) The boards don't change that much over time, and a maintained calibrator often has updated or patched boards. Your unit is a bit older there are a few changes that you might not have (don't remember off the top of my head). However, the 5730A has essentially the same boards, with many converted to surface mount, and totally obsolete relays replaced with relays that have been out of production for only a few years.4)The big difference is the new control system and front panel. To go with that, Fluke added a new command structure that is a bit more "natural". My opinion, that does not much more than force cal labs to upgrade as new cal routines come out.

author: aronake
author_rank: Frequent Contributor
timestamp: June 20, 2025, 07:53:41 am
content: I got a thermometer and a thermistor mounted on the Ohm calibration board that measure the the temperature of the airflow over the calibration resistor networks.Not very elegant as of now, and sure if I will keep it, some precious PPMs may escape out of the shielding box or if I will do a nicer install later. But it will be useful for the time being to measure TC of the calibration resistors, and know when the 5700a is at the right temperature. I see a difference to ambient temperature of around 6 C. Its clear that they keep all the hotter stuff toward the back of the calibration. Air coming out is around 12 degrees over ambient.

author: aronake
author_rank: Frequent Contributor
timestamp: July 23, 2025, 05:26:09 pm
content: How dare e-bay sellers do like this!?I go the wideband upgrade kit with the A5 and A6 board form e-bay for 200 USD as they were not functioning. The seller confirmed that no components bad been harvested from the boards for other repairs, but one of the voltage ranges should not be working.While waiting for the boards to arrive I studied the schematics in detail. As one voltage range should not be working, the very likely fault would be one of the teledyne relays that control attenuation resistors had gone bad. Very plausible for boards made in 1988.When I got the delivery I started with plugging the boards into the 5700a to find out more exactly what was not working. To my surprise everything worked without any problem. They had stable voltage outputs over all ranges and frequencies, the boards could pass gain calibration without issues and output voltages correct.So I got the pleasure of some interesting repair stolen from me! Grrr! What a disappointment!!At least the seller also included the original cable, 50 ohm adapter and n-type to banana connector which was not mentioned on the e-bay posting or on any pictures. So I guess that is a bit of a compensationWhat is left now is swapping out 11 more tantalums and 3 carbon composition resistors. Not very intellectually stimulating compared to a repair.

author: picburner
author_rank: Frequent Contributor
timestamp: July 23, 2025, 06:32:50 pm
content: Very strange. I also purchased from that seller, and when he reports an item as not working, there's a real problem. However, if he guarantees it's working, you can be sure it's working perfectly.A while ago, I also purchased a faulty wideband option for the F5700A from him, and I had to replace the last Teledyne relay, which was completely shorted (perhaps RF power applied to the output?), and some other ICs.Now both boards work perfectly, and I've completed my calibrator without spending a fortune.

author: aronake
author_rank: Frequent Contributor
timestamp: July 24, 2025, 08:48:34 am
content: Quote from: picburner on July 23, 2025, 06:32:50 pmIt may be that the cards shaking around while being transported have "repaired" one of the relays. I could see it fail again in not too distant future.Which of your relays was toasted? K8? Which replacement did you get? My impression is that its a Teledyne 432. 432 seems to be military spec, but there is also 732 with what seems pretty much same specifications but not military. I have not found anywhere to buy a 5V 432, but have some 732D 5V on their way here, as i though i would have to replace one or many. The D version have an added coil induced voltage protection diode, which I believe would not be a problem.Good seller. I cant blame him too much for taking away the pleasure of having to repair somethingAnd I would not want to get boards with the thermal converter toast for instance. Nice of him to throw in cable, resistor and banana converter.

author: picburner
author_rank: Frequent Contributor
timestamp: July 24, 2025, 08:04:27 pm
content: Quote from: aronake on July 24, 2025, 08:48:34 amSometimes it happens...Yes, it was the K8. The original 5V DC 432 Teledyne is extremely difficult to find unless you have to sell an arm and a leg, but I found an ER432T YM4-5A with a built-in driver circuit at a reasonable price.With a few minor modifications it works as a simple DPDT relay.Of course, I had about twenty 732-1000s in the drawer, but since they run at 12V DC, they aren't suitable since the circuit requires a 5VDC relay.QuoteThis thing worried me a lot too when I bought the two boards...

author: aronake
author_rank: Frequent Contributor
timestamp: July 25, 2025, 05:59:28 am
content: Thanks! The two 732D-5 I have on the way may be useful in the future.

author: picburner
author_rank: Frequent Contributor
timestamp: July 25, 2025, 06:23:35 am
content: Luckily, the PCB layout points the diode inside the relay in the right direction! That's the first thing I checked before replacing it.The original relay is without a diode, it uses the one inserted in the driver IC.

author: aronake
author_rank: Frequent Contributor
timestamp: July 25, 2025, 03:29:51 pm
content: Quote from: picburner on July 25, 2025, 06:23:35 amthats a good thing to check. but i would think anything else would have been very strange as otherwise the diode would be conducting when trying to close the relay.Your T version hack seems more complicated though. Did you write the + pin and the transistor base pin together and that made it work?

author: picburner
author_rank: Frequent Contributor
timestamp: July 25, 2025, 06:27:10 pm
content: Nothing too complicated. I simply inserted a SMD resistor between the base of the transistor inside the relay and the "+" terminal.All of this is on the bottom of the relay; you'll barely notice the change since I'll have raised the relay by 1 millimeter from its original height.

author: aronake
author_rank: Frequent Contributor
timestamp: July 27, 2025, 06:13:49 am
content: I just had all tantalums and carbon composition resistors changed on the A5 and A6 board.Apparently the relays fitted on my A5 board is a 732-5. 8843 date code. The "newest" components i see on the boards are a bit later in 88. So boards probably from later 1988 or early 1989, so very early edition.Either there is some "insulation sheet" installed between the relay and the board, or something has happened and the relays bottom has popped off. And strange the relay is not installed straight. So either some damage, sloppy production or changed in previous repair. This is the relay that if not working, would lead to the problems described by the seller. This relay has same date code as the one on the previous picture.

author: picburner
author_rank: Frequent Contributor
timestamp: July 27, 2025, 11:56:01 am
content: It's been a while since I finished repairing the A5 board and closed the calibrator, but I seem to recall that all Teledyne relays had insulating washers.One of these, despite the insulating washer, had its body soldered to GND. I don't remember which one it was, but it wasn't the K8.

author: aronake
author_rank: Frequent Contributor
timestamp: «Reply #38 on:Todayat 06:28:23 am »
content: Here a program to calibrate Fluke 8845a with Fluke 5700a. Someone asked for 8845a calibration in another thread using some separate standards for calibrating some ranges and it may be possible to get ideas how to do that based on this code.I know the programming style is absolutely hideous, but it works.Code:import sysimport timeimport vxi11from typing import List# ConstantsSETTLE_TIME = .1SaveWhileRunning = False# Calibration values# HI volt missingfor testingDCV_VALUES = [1000,-1000,100, -100, 10, -10, 1, -1, 0.1, -0.1]RESISTANCE_VALUES = [10_000_000, 1_000_000, 100_000, 10_000, 1_000, 100]DCI_LOW_VALUES = [0.0001, -0.0001, 0.001, -0.001, 0.01, -0.01, 0.1, -0.1,0.329,-0.329]ACI_LOW_VALUES = [0.329, 0.1, 0.01]ACV_STEPS =[('ACLIN',1200,1.19),('ACLIN',1200,0.8),('ACLIN',1200,0.4),('ACLIN',1200,0.005),('GVAC',1200,0.1),('GVACS',1200,0.1),('ACPOLE',50000,0.1),('GVAC',1200,1),('GVACS',1000,1),('FVAC',10,1),('ACPOLE',50000,1),('GVAC',1200,10),('GVACS',1200,10),('ACPOLE',50000,10),('GVAC',1200,100),('GVACS',1200,100),('ACPOLE',50000,100),('GVAC',1000,750), #Should be 1200 hz, but 5700a not capable without amplfier('GVACS',1000,750), #Should be 1200 hz, but 5700a not capable without amplfier('ACPOLE',1000,329) #Should be 50KHz hz, but 5700a not capable without amplfier]'''''''# InstrumentsF5700a = vxi11.Instrument("192.168.0.61", "gpib0,4")F8845a = vxi11.Instrument("192.168.0.61", "gpib0,6")def wait_with_prompt(message: str, default_minutes: int):print(message)wait_input = input(f"How long to wait (in minutes)? Press Enter for default ({default_minutes} min): ")wait_seconds = int(wait_input) * 60 if wait_input.strip().isdigit() else default_minutes * 60print(f"Waiting {wait_seconds / 60} minutes for thermal stability...")time.sleep(wait_seconds)def initialize_devices():print("Initializing devices...")print("Asking IDN? to check connections")print(F8845a.ask("*IDN?"))F8845a.write("*RST")F8845a.write("*CLS")F8845a.write("CAL:SEC:STAT OFF, FLUKE884X")F8845a.timeout=400print(F5700a.ask("*IDN?"))F5700a.write("*CLS")F5700a.write("STBY")def TestCal():print("Tescal")CheckTerminal("FRONT")steps = [('ZVDCREF',10),('ZVDCREF',1),('ZVDCREF',0.1)]for cal_type, val in steps:perform_calibration_step(cal_type,val,False)def perform_calibration_step(cal_type: str, value, F5700aOutput: bool, settle_time=SETTLE_TIME):StartTime = time.time()print(f"{cal_type} calibration: {value}", end ="")if F5700aOutput:F5700a.write("*OPC")F5700a.write("OPER")F5700a.write("*OPC")F5700a.ask("*OPC?")time.sleep(settle_time)else:F5700a.write("STBY")time.sleep(1)F8845a.write(f"CAL:VAL {cal_type}, {value}")CalStat = int(F8845a.ask(f"CAL? ON"))EndTime = time.time()ElapsedTime = EndTime - StartTimeif CalStat ==1:input("Warning! Calibration step failed. Press Enter to continue")else:print (f" - Time to complete: {ElapsedTime:1.2f}")def OpenCal():input("Open calibration. Make sure nothing is connected front and rear and press ENTER")print("Performing Open calibration...")perform_calibration_step("ORES",100000000, False)def ShortCalFront():print("FRONT short calibration")wait_with_prompt("Set switch to FRONT. Insert 4W short in FRONT and REAR", 5)CheckTerminal("FRONT")steps = [('ZVAC',0.1),('ZVACS',0.1),('ZVAC',1),('ZVACS',1),('ZVAC',10),('ZVACS',10),('ZVAC',100),('ZVACS',100),('ZVAC',1000),('ZVACS',1000),('ZVDC',1000),('ZVDC',100),('ZVDC',10),('ZVDC',1),('ZVDC',0.1),('DFVDC50',0.1),('DFVDC50_1',0.1),('DFVDC60',0.1),('DFVDC60_1',0.1),('ZRES',10000000),('ZRES',1000000),('ZRES',100000),('ZRES',10000),('ZRES',1000),('ZRES',100),('ZVDCREF',10),('ZVDCREF',1),('ZVDCREF',0.1)]for cal_type, val in steps:perform_calibration_step(cal_type,val,False)def ShortCalRear():print("REAR short calibration")wait_with_prompt("Set switch to REAR. Make sure 4-wire short in REAR", 1)CheckTerminal("Rear")steps = [('ZRESR',100000),('ZRESR',10000),('ZRESR',1000),('ZRESR',100),#('ZRESR',10), #Maybe not on 8845a('ZVDCR',1),('ZVDCR',0.1),('ZVDCRREF',1),('ZVDCRREF',0.1)]for cal_type, val in steps:perform_calibration_step(cal_type,val,False)def DCVFrontCal():print("WARNING! LETHAL VOLTAGES USED IN DCV CALIBRATION. Proceed with caution and own risk.")wait_with_prompt("5-write connect Fluke 5700a with Fluke 8845a. Current cable to 10A input", 1)CheckTerminal("FRONT)")F5700a.write("EXTSENSE OFF")F5700a.write("OUT 0 HZ")for voltage in DCV_VALUES:F5700a.write(f"OUT {voltage} V")perform_calibration_step( "GVDC", voltage, "ON", True)def ResFrontCal():print("Performing Resistance calibration...")# add higherst R for 1 wireF5700a.write("EXTSENSE ON")F5700a.write(f"OUT 100000000 OHM")actual_r = float(F5700a.ask("ADJOUT?").split(","))F5700a.write("OPER")F5700a.write("OPC*")F5700a.ask("*OPC?")time.sleep(1)time.sleep(SETTLE_TIME)print(f"Calibrating 100,000,000 Ohm. Cal value: {actual_r}", end = "")F8845a.write(f"CAL:VAL GRES, 100000000")F8845a.write(f"CAL:STEP 120, {actual_r}")CalStat = int(F8845a.ask("CAL? ON"))if CalStat ==1:input("Warning! Calibration step failed. Press Enter to continue")else:print (f" - Done")step = 121for r_val in RESISTANCE_VALUES:F5700a.write(f"OUT {r_val} OHM")F5700a.write("EXTSENSE ON")actual_r = float(F5700a.ask("ADJOUT?").split(","))#actual_r = float(F5700a.write("ADJOUT?", expect_response=True).split(","))print(f"Calibrating {r_val:,} Ohm. Cal value: {actual_r}" , end="")F5700a.write("OPER")F5700a.write("OPC*")F5700a.ask("*OPC?")time.sleep(SETTLE_TIME)#perform_calibration_step(F8845a, "GRES", r_val)F8845a.write(f"CAL:VAL GRES, {r_val}")F8845a.write(f"CAL:STEP {step}, {actual_r}")CalStat = int(F8845a.ask("CAL? ON"))if CalStat ==1:input("Warning! Calibration step failed. Press Enter to continue")else:print (f" - Done")step += 1def ACVCal():print("Performing AC Voltage calibration...")F5700a.write("OUT 0 V")F5700a.write("STBY")F5700a.write("EXTSENSE OFF")for func, freq, val in ACV_STEPS:print(f"AC Voltage: {val} V, Frequency: {freq} Hz, Function: {func}")F5700a.write(f"OUT {freq} Hz")F5700a.write(f"OUT {val} V")F5700a.write(f"OUT {freq} Hz")time.sleep(0.5)perform_calibration_step(func, val,True)F5700a.write("STBY")def DCIHiCal():#input("Make sure current cable is connected to 10A current input. Press Enter")F5700a.write("CUR_POST AUX")steps = [('GIDC',1),('GIDC',-1)]# Do not have capabilites to claibrate 10Afor cal_type, val in steps:F5700a.write("OUT 0 Hz")F5700a.write(f"OUT {val}A")perform_calibration_step(cal_type,val,True)def ACIHiCal():#input("Make sure current cable is connected to 10A current input. Press Enter")F5700a.write("CUR_POST AUX")steps = [('GIAC',1),('GIACS',1),]# Do not have capabilites to claibrate 10Afor cal_type, val in steps:F5700a.write("OUT 1200 Hz")F5700a.write(f"OUT {val}A")perform_calibration_step(cal_type,val,True)def DCILowCal():print("Performing Low DCI calibration...")F5700a.write("CUR_POST AUX")for current in DCI_LOW_VALUES:F5700a.write("OUT 0 Hz")F5700a.write(f"OUT {current}A")perform_calibration_step("GIDC", current,True)def ACILowCal():print("Performing Low ACI calibration...")input("Swap current cable to 400mA connector. Press ENTER when done")F5700a.write("CUR_POST AUX")for current in ACI_LOW_VALUES:print(f"AC Current: {current} A, Frequency: 1200 Hz")F5700a.write(f"OUT {current} A")F5700a.write("OUT 1200 Hz")perform_calibration_step("GIAC", current ,True)perform_calibration_step("GIACS", current,True)def LowIZeroCal():print("Low DCI short cal")wait_with_prompt("Set to FRONT. Short 400mA to Low Input Terminal on FRONT.", 1)CheckTerminal("FRONT")steps = [('ZIDC',0.4),('ZIDC',0.1),('ZIDC',0.001),('ZIDC',0.01),('ZIDC',0.0001),('ZIAC',0),('ZIACS',0),('ZIAC',0.001),('ZIACS',0.001),('ZIAC',0.01),('ZIACS',0.01),('ZIAC',0.1),('ZIACS',0.1),('ZIAC',0.4),('ZIACS',0.4),]for cal_type, val in steps:perform_calibration_step(cal_type,val,False)def HiIZeroCal():wait_with_prompt("Short 10A to Low terminal. Set Terminal to FRONT", 1)CheckTerminal("FRONT")steps = [('ZIDC',10),('ZIDC',1),('ZIAC',1),('ZIACS',1),('ZIAC',10),('ZIACS',10)]for cal_type, val in steps:perform_calibration_step(cal_type,val,False)def CheckTerminal (TestTerm): # FRONT is should be front REAR if should be rearTerm = F8845a.ask ("ROUT:TERM?")if Term == "FRON" and TestTerm =="REAR":input("WRONG TERMINALS SELECTED! SWITH TO REAR. Then press enter.")if Term == "REAR" and TestTerm =="FRONT":input("WRONG TERMINALS SELECTED! SWITH TO FRONT. Then press enter.")def main():print("Starting Fluke 8845a Calibrator")initialize_devices()#TestCal()#exit()'''OpenCal()ShortCalFront()ShortCalRear()LowIZeroCal()HiIZeroCal()DCVFrontCal()DCIHiCal()ACIHiCal()ACILowCal()DCILowCal()ACVCal()'''ResFrontCal()F5700a.write("*RST")F5700a.write("STBY")a= input("Do you want to save calibration data and lock DMM6500 calibration (y/n)")if a == "y":F8845a.write("CAL:REC")F8845a.write("CAL:SEC:STAT ON, 'FLUKE884X'")print("Cal data saved, F8845a cal locked, calibration complete")else:print("Calibration complete but data not svaed and F8845a cal not locked")F8845a.write("*RST")F8845a.write("*CLS")#F8845a.write("SYSTem:LOCal")# save calif __name__ == "__main__":main()