ESA instrument adjustments - Page 1
Forum section: electronics / testgear

author: Aiy
author_rank: Regular Contributor
timestamp: June 07, 2022, 06:45:15 pm
content: Hello Everyone,While working on my own E4407B I uncovered a few things. My own machine had an untuned YTF in the RYTHM which I have since successfully corrected. I discovered from the N7800 docs that no special equipment is used except an external synthesizer with great enough frequency range and a GPIB interface. I therefore set about looking for hidden commands for the SCPI interface.Here are some that I have found so far, with my own notes on format/function calls.Disclaimer:Using these commands can mess with your calibration data, making your unit worse. Please use with caution.SCPI CommandDescriptionDIAG:CAL:ADC?\nGet ADC valueDIAG:CAL? NNN,N\nGetStateEEPROM, NNN,N = addressDIAG:CAL NNN,N,xxx.yyy\nSetStateEEPROMData (RAM), NNN,N = address, xxx.yyy = new valueDIAG:CAL:BEG\nSetStateEEPROMBeginDIAG:CAL:STOR %s\nSetStateEEPROMStoreDIAG:CAL:END\nSetStateEEPROMEndDIAG:CAL:SOUR?\nGetStateCalSourceDIAG:CAL:SOUR %s\nSetStateCalSourceSYST:PASS %s\nSetStatePasswordDIAG:CAL:PIECE %s\nSetStateUpdateDIAG:OPT %s\nSetStateEEPROMOptionDIAG:PARK:LO?\nGetStateParkLODIAG:PARK:LO %d\nSetStateParkLODIAG:CARD? %s\nGetStateInformationDIAG:TEMP? %s\nGetStateTemperatureDIAG:LATC:VAL %f\nSetStateRAMDIAG:LATC:SEL %s\n?DIAG:LATC:VAL?\nGetStateRAMIn addition, I have started mapping out the address space accessible with the DIAG:CAL? nnn,n command. Here a few of the addresses and their corresponding register contentsAddress:Description:43,0TG CAL OFFSET43,1TG CAL SLOPE111,0IF CAL LEVEL112,0RF CAL LEVEL112,0?112,150 MHZ CAL ADJUST DAC (EEPROM)?113,0COARSE SET FREQ REF113,1FINE SET FREQ REF114,0LO LEVEL DAC (EEPROM)115,0COARSE RF GAIN DAC120,0BITG LO LEVEL DAC (EEPROM)121,0TG CORNER122,0TG MOD OFFSET123,0TG GAIN124,0TG A OFFSET124,1TG LB OFFSET124,2TG A SLOPE125,0TG X OFFSET125,1TG X SLOPE126,0TG F SLOPE131,0FEXT B1 LO LEVEL DAC131,1FEXT B2 LO LEVEL DAC131,2FEXT B3 LO LEVEL DAC131,3FEXT B4 LO LEVEL DAC131,4FEXT TG LO LEVEL DAC131,5FEXT B5 LO LEVEL DAC131,6FEXT MIX LO LEVEL DAC132,0YTF TUNE A0132,1YTF TUNE A1132,2YTF TUNE A2132,3YTF TUNE A3132,4YTF TUNE EXT 0132,5YTF TUNE EXT 1132,6YTF TUNE EXT 2132,7YTF TUNE EXT 3133,0FEXT YTF DELAY OFFSET 0133,1FEXT YTF DELAY OFFSET 1133,2FEXT YTF DELAY OFFSET 2133,3FEXT YTF DELAY OFFSET 3133,4FEXT YTF DELAY OFFSET 4133,5FEXT YTF DELAY OFFSET 5133,6FEXT YTF DELAY OFFSET 6133,7FEXT YTF DELAY OFFSET 7133,8FEXT YTF DELAY OFFSET 8133,9FEXT YTF DELAY OFFSET 9134,0B0 REF TEMP PA OFF 0134,1B0 REF TEMP PA OFF 1134,2B0 REF TEMP PA OFF 2135,0B0 REF TEMP PA ON 0135,1B0 REF TEMP PA ON 1135,2B0 REF TEMP PA ON 2136,0B1 REF TEMP 0136,1B1 REF TEMP 1136,2B1 REF TEMP 2137,0B2 REF TEMP 0137,1B2 REF TEMP 1137,2B2 REF TEMP 2138,0B3 REF TEMP 0138,1B3 REF TEMP 1138,2B3 REF TEMP 2139,0B4 REF TEMP 0139,1B4 REF TEMP 1139,2B4 REF TEMP 2140,0LO PRETUNE CONST 0140,1LO PRETUNE CONST 1142,0FEXT YTF DELAY SLOPE 0142,1FEXT YTF DELAY SLOPE 1142,2FEXT YTF DELAY SLOPE 2142,3FEXT YTF DELAY SLOPE 3142,4FEXT YTF DELAY SLOPE 4142,5FEXT YTF DELAY SLOPE 5142,6FEXT YTF DELAY SLOPE 6142,7FEXT YTF DELAY SLOPE 7142,8FEXT YTF DELAY SLOPE 8142,9FEXT YTF DELAY SLOPE 9143,0FEXT BREATHING ROOM 0143,1FEXT BREATHING ROOM 1143,2FEXT BREATHING ROOM 2143,3FEXT BREATHING ROOM 3145,0FEXT PULSE WIDTH145,1FEXT SWEEP DWELL145,2FEXT OVERTUNE FREQ145,3FEXT OVERTUNE STATE145,4FEXT MIX PULSE WIDTH145,5FEXT MIX SWEEP DWELL145,6FEXT MIX OVERTUNE FREQ145,7FEXT MIX OVERTUNE STATE145,6FEXT MIX OVERTUNE FREQ146,0B5 REF TEMP 0146,1B5 REF TEMP 1146,2B5 REF TEMP 2147,0EXT MIX REF TEMP 0147,1EXT MIX REF TEMP 1147,2EXT MIX REF TEMP 2Perhaps with the community's help we can find out more on these units and work together on keeping them running going forwards.Best regardsEdit: formatting

author: smgvbest
author_rank: Unknown
timestamp: June 08, 2022, 12:56:00 am
content: Thank you for bringing this over here.Hopefully we can discover all the SCPI commands and with luck maybe we can come up with some home based calibration procedures.Did you discover these SCPI commands on the E4407B itself or was it by looking at the TME install?if on the E4407B how did you locate these?I looked at previous memory dumps and could not find any of the SCPI commands.I assumed they might be on the SIMM models as that where the application code is.Happy to work with you on thisSandra

author: smgvbest
author_rank: Unknown
timestamp: June 08, 2022, 01:26:32 am
content: I don't know if this helps any but this is a scan of the Disk7 of the install disksI don't see any of the commands you found except DIAG:CAL:BEG and DIAG:CAL:END and that was on the FW disks

author: smgvbest
author_rank: Unknown
timestamp: June 12, 2022, 02:36:35 pm
content: Been thinking of some of what we need to do.Since we're looking to mess around with calibration values we first need to insure we identify them all then have a method to back them up incase we mess up (and we likely will)is there any value in dumping the actual eeproms for comparisons?High Level StepsIdentify all parameters that can be read/written to(we have a good start above from Aiy)Create/Maintain list of matching PCB/EEPROM/PROM including different board revisions if needed(use spreadsheet and maintain on groups.in)Routine to backup those parameters by board/revision(don't expect this to be an issue but best to plan for it)Build a library of backups for(just thinking it could be usefull)Create Calibration guide(for each board)Create Calibration program/scriptsRepeat 4-5 for each boardAre there any other high level steps we should doSkills needed.Researchers(those looking for the SCPI Commands and EEPROM locations)Testers(those willing to try on their ESA SA)Programmers(Those who will write calibration programs)Technical Writers(those who will be writing documentation)Does this cover everything we might need?

author: smgvbest
author_rank: Unknown
timestamp: June 15, 2022, 01:08:09 am
content: I wonder if this topic is would be better in the "Projects, Designs, and Technical Stuff" topic.Any thoughts?

author: volvo_nut_v70
author_rank: Regular Contributor
timestamp: June 15, 2022, 02:28:28 am
content: Is it possible (or make sense) to post a pointer in that group to here?

author: Aiy
author_rank: Regular Contributor
timestamp: June 17, 2022, 06:00:18 pm
content: Hello Everyone,In this post I will describe how I adjusted the preselector filter YTF / RYTHM on my E4407B. It is a description which has to be put into open-source friendly codeSymptoms:The spectrum analyzer does not present correct signal amplitude in the frequency range >3GHz. The signal amplitude is decreasing with increased frequency.Quick check:To check if your analyzer has the YTF misaligned, set the center frequency to a frequency where the amplitude is not correct, but still visible, in my case 5GHz was about 15dB lower than expected amplitude for an input of 5GHz, -20dBm.Set the span to 250MHz, resolution bandwidth 1MHz.Press AMPLITUDE -> Y Scale -> Preselector Center on the spectrum analyzer.The spectrum analyzer will sweep the YTF DAC around the center frequency, attempting to maximize the signal at the center frequency.If successful, your amplitude should be closer to the correct level.Calibration procedure:You need a frequency source that can generate at least 2-20GHz for this procedure, preferrably also connected to your PC so you can script the operations.Connect your spectrum analyzer to your PC using GPIB.Use the DIAG:CAL? NNN,N\n SCPI command to extract your original YTF DAC polynomial data. These reside in the following registers:132,0 YTF TUNE A0132,1 YTF TUNE A1132,2 YTF TUNE A2132,3 YTF TUNE A3The coefficients represent a polynomial which takes frequency in Hz (3.0Ghz - 27GHz) as input and outputs the 16-bit DAC value (0-65535). My polynomial coefficients were-192.18894, 2.2079824e-6, -1.0678219e-18, 3.366169e-29Which gives the following graph when evaluated for 3.2 - 27GTo extract the data needed to adjust the polynomial, the input frequency should be stepped with a constant amplitude (-20dBm).For each frequency in the sweep, the preselector should first be tuned using the SCPI command SENS:POW:RF:PCEN\n.Then, the YTF offset frequency read out using the SCPI command SENS:POW:RF:PADJ?\n.I swept my signal generator at 3.2G, 4G, 5G, 6G ... 20G. The 3.2G is to be sure that the High/low frequency selector is set to the high band.With the YTF offset frequencies in hand, the next step is to evaluate the DAC polynomial with:DAC(input_frequencies + YTF_offset_frequencies) = DAC_setting_newTo get the new polynomial, do a polynomial fit using the DAC_setting_new and the input_frequencies arrays.With the new polynomial settings you can replace the RAM values on your spectrum analyzer using the SCPI commandDIAG:CAL nnn,n,xxx.yyy\n SetStateEEPROMData (RAM), nnn,n = address, xxx.yyy = new valueWhere the addresses are the same as above and xxx.yyy should be your new polynomial coefficients.Take your spectrum analyzer for a testdrive at this point, checking that the input signal has better signal amplitude than it had before. You can reboot the spectrum analyzer to restore the old polynomial coefficients.EXPERIMENTAL:When you are happy with the coefficients it is time to put them into EEPROM. At this point I have to admit I am not entirely certain how this worked, but I will try to explain my steps and I will edit this post when the method has been verified by someone else.Upload my polynomial settings using the commands above.Next. unlock the EEPROM using the SCPI command DIAG:CAL:BEG\n. I believe there is a waiting period here, perhaps OPC? or something can be used.For each coefficient repeat:Reaffirm the polynomial settings using the DIAG:CAL nnn,n,xxx.yyy\nStore the coefficients using the DIAG:STORE nnn,n\n (might be DIAG:CAL:STOR nnn\n, have to check)Lock the EEPROM again with DIAG:CAL:END\nReboot the spectrum analyzer and read out the YTF polynomial coefficients to see if they are now stored in EEPROM.EDIT:Struck out the EEPROM unlock / lock commands. Apparently they are not needed / misleading.Best regards,AIY

author: Aiy
author_rank: Regular Contributor
timestamp: June 17, 2022, 06:06:55 pm
content: Hello Everyone,I have performed a scan with the DIAG:CAL? nnn,n\n command on my spectrum analyzer, a E4407B.I looped the readout from 0 to 1000.Note: I scan from 0 to 1000 for the "sub-registers" after the comma, if there is no response from "sub-register" 0 (zero), then I proceed to the next "register". If there are registers hidden that do not start from nnn,0 then I missed them in the scan. The reason I programmed my scan this way was it was too time-consumingBest regards,AIY

author: smgvbest
author_rank: Unknown
timestamp: July 03, 2022, 02:05:11 pm
content: @Aiy,What Additional Boards/Features do you have in your unit beyond the base?This is basic info on mineCode:E4407BFW:A.16.06Boot Rom: 500Rom: 16777216 Ram: 33664432B72:Expansion Memory1DN: 3.0 Ghz TG, 50 Ohm1D5: Hi Stability Freq RefA4H: GPIB & ParallelAlso, I'm interested in being able to calibrate the Tracking Generator

author: mbielman
author_rank: Contributor
timestamp: May 14, 2023, 02:06:42 pm
content: I've been working on software to do this and it all works EXCEPT writing data to the EEPROM.I've tried the following and various alterations - always get an error. (invalid parameter, missing parameter, etc)DIAG:STORE nnn,n\n (might be DIAG:CAL:STOR nnn\nSo stuck now!

author: mbielman
author_rank: Contributor
timestamp: May 15, 2023, 09:12:49 pm
content: Got it working! As can be seen from the earlier (edited) post, I removed the DIAG:CAL:BEG (and DIAG:CAL:END) commands and no more errors when saving to EEPROM.Doesn't make much sense, but that's what I discovered. (at least for MY own E4407B)I used Python 2.7 for the script. Fortunately the numpy.py library has a polyfit() function to do the work.It took a while to get the math right. Here is what I did:for f in calfreqs:x = float(f)*1e9y = x+float(preselect)z = A0 + A1*y + A2*y**2 + A3*y**3if DEBUG: print x, y, zn += 1poly = np.polyfit(x, z, deg=3)poly = poly.tolist()# these are the new coefficientsA0 = str(poly)A1 = str(poly)A2 = str(poly)A3 = str(poly)In my case, the only sig gen I have that goes to 26GHz is the HP 8350B with the 83595A plug in. These are NOT phase locked so the output frequency is a bit off.I tell the SA to do a Peak Search, Center the Marker, and read the frequency. Those are saved in the calfreqs array. I then evaluate using the ORIGINAL polynomialat (calfreqs+preselect offset) and save the result to z. polyfit() then spits out the new coefficients, which are then saved to RAM with DIAG:CAL 132,n.Finally, these are saved to EEPROM with DIAG:CAL:STOR 132.I can post the entire script if there is any interest.regards

author: mankan
author_rank: Regular Contributor
timestamp: January 05, 2024, 01:53:13 pm
content: A while a ago I discovered that power measurements were way off on my E4407B. Started reading service manuals and so and all pointed to a faulty RYTHM unitHowever last night I did some googling and found this thread and today I started experimenting and scripting.My signal generator is not very level but with in a 3dB interval, however I figure it cannot be that critical since this is matter of tuning a preselector YIG filter, right?Anyway, it looks much better nowScript for doing this is available at my GPIB Playground repo athttps://github.com/mankangustafsson/gpib_playground/blob/master/esa_yig_polynom.py.Use at your own risk. No warranties given.Many thanks to Aiy and mbielman.

author: mankan
author_rank: Regular Contributor
timestamp: January 05, 2024, 08:38:22 pm
content: Anyone knows what calibration registers that affects the "Frequency Response" tests or the "Absolute Amplitude Accuracy" tests?

author: mbielman
author_rank: Contributor
timestamp: January 05, 2024, 09:07:29 pm
content: It would be great to have the full list of registers and how they work but I never found that.Nice work on your adjustments!

author: eb3frn
author_rank: Contributor
timestamp: December 07, 2024, 10:58:13 am
content: HiI'm looking your gpib_playground scripts in Github and are great, it will be very useful for me.Thanks a lot to share the info and congratulations for your findings.73! Ibaneb3frn