Author Topic: HP / Agilent 34401A hidden menu  (Read 28873 times)

0 Members and 1 Guest are viewing this topic.

Offline alan.bain

  • Regular Contributor
  • *
  • Posts: 73
  • Country: gb
Re: HP / Agilent 34401A hidden menu
« Reply #100 on: January 13, 2023, 11:52:17 am »
You could try the diag:peek? -10,<option>,0 commands where option:
// 0 N/A
// 1  sdev,pp
// 2 temp
// 3 scale
// 4 custom aperture
// 5 Save state
// 6 N/A

If this works then it's likely the POKES 28-33 do as well.  If you *really* want to check look for the byte sequence A704 (magic 1191) in the firmware  e.g.
LANG=LC_ALL grep -oabP "\xa7\x04" firmware.bin and look for a hit in the bottom 64K; this is the POKE check.  In the 07-05-02 firmware it is at 46E2. Disassemble from 1 byte before this and you'll seek the POKE table dispatch routine which uses a table + 2*( zeroth arg + 4) like this

46E1       CMP     E2,#04A7; int(I2)==1191?
46E5       JNE     46EA
46E7       LDB     E1,#01 ; second arg is 1191 -magic on value?

;; Arg too big?
46EC       LD      1C,1E[18] // p=*(SP+1e) (orig p)
46EE       LD      1C,2[1C] //1c = *(p+2)  => command
// Table lookup
46F2       SUB     1C,#0FFFC ; +4
46F6       JLT     46FE ;; if <0 => -1
46F8       CMP     1C,#0025 ;
46FC       JLE     4701; <=0x25 (max tbl, allowing for shift of 4)
46FE       LDBSE   1C,#FF // -1
4701       ADD     1C,1C // table index
4704       LD      1C,470E[1C] ; base + 2* (zeroth arg+4)
4709       BR      [1C]
 

Offline Hydron

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: gb
Re: HP / Agilent 34401A hidden menu
« Reply #101 on: January 13, 2023, 12:36:47 pm »
You could also run strings on the FW binary - if it doesn't spit out a bunch of stuff like "SCALE" "TEMP" "RECALL" (I think the menu stuff is mostly grouped together) etc then you're unlikely to have the options in the FW.
 
The following users thanked this post: dreamcat4

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4894
  • Country: vc
Re: HP / Agilent 34401A hidden menu
« Reply #102 on: January 13, 2023, 12:43:17 pm »
Any hint how many digits the "scale" coeffs (gain, offset) allow? I can see in the 34420A manual the options, but without any indication on the precision of those coefficients..
« Last Edit: January 13, 2023, 12:45:33 pm by imo »
 

Offline Hydron

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: gb
Re: HP / Agilent 34401A hidden menu
« Reply #103 on: January 13, 2023, 12:45:23 pm »
7 digits with scale. Also you can use the custom aperture to get faster 6-digit readings than otherwise possible.

Edit: to clarify, you get 7 digits (no overrange though, so 9,999,999 count max) on both the output and the coefficients
« Last Edit: January 13, 2023, 01:27:49 pm by Hydron »
 
The following users thanked this post: iMo

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4894
  • Country: vc
Re: HP / Agilent 34401A hidden menu
« Reply #104 on: January 13, 2023, 12:52:11 pm »
I've been using PLC100 with 6digits ("slow 6digits"), getting 1x.xxx.xxx digits at 10V over serial, and doing the "scale" in double in an MCU (sending the scaled and TCed data over BT). I have to double check whether those 7digits of gain and offset give comparable results with my process, a great option when not using the MCU, however..

PS: yep, "7digits scale coeffs" are not enough to scale the above resolution, 8 would be the minimum (see an example below)..
« Last Edit: January 13, 2023, 01:57:43 pm by imo »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4894
  • Country: vc
Re: HP / Agilent 34401A hidden menu
« Reply #105 on: January 13, 2023, 02:32:22 pm »
7 digits with scale. Also you can use the custom aperture to get faster 6-digit readings than otherwise possible.

Edit: to clarify, you get 7 digits (no overrange though, so 9,999,999 count max) on both the output and the coefficients

The question is how you would enter those two coefficients into the meter.. How many significant digits of the "gain" and the "offset" you can enter into..
For example in my above example with 7digits, the required 0,999.994.67 would be entered as "0,999.995" (and it is not precise enough for 1uV resolution, even though it is an extreme example when talking 34401A..).
« Last Edit: January 13, 2023, 02:50:52 pm by imo »
 

Offline Hydron

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: gb
Re: HP / Agilent 34401A hidden menu
« Reply #106 on: January 13, 2023, 08:56:46 pm »
Sounds like you might be expecting a little much from an unofficial feature of a 30 year old 6.5 digit meter!
Won't hurt to enable it and see how you go though. Note that the first digit out of the 7 can be a 9 and you can move the decimal point (i.e. if you think of it as a base-10 float, the 7 digits is the mantissa, and you can change the exponent)
 
The following users thanked this post: iMo

Offline dreamcat4

  • Frequent Contributor
  • **
  • Posts: 495
  • Country: gb
Re: HP / Agilent 34401A hidden menu
« Reply #107 on: January 13, 2023, 09:05:55 pm »
can i do all this peeking and poking over the rs232 serial port. or is this gpib only?
 

Offline Hydron

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: gb
Re: HP / Agilent 34401A hidden menu
« Reply #108 on: January 13, 2023, 09:36:23 pm »
RS232 is fine, but I wouldn't do anything other than PEEK without confirmation that FW v6 can enable the extra features - looks like v5 doesn't have them, v7+ does, see post here: https://www.eevblog.com/forum/testgear/hp-agilent-34401a-hidden-menu/msg3228980/#msg3228980
Unfortunately xdevs doesn't have a copy of FW 06-xx-yy to check - if the ROM read commands from this post work then you might be able to dump it to check (and add to the xdevs collection) though: https://www.eevblog.com/forum/testgear/hp-agilent-34401a-hidden-menu/msg4562218/#msg4562218
 
The following users thanked this post: dreamcat4

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4894
  • Country: vc
Re: HP / Agilent 34401A hidden menu
« Reply #109 on: January 14, 2023, 09:11:25 am »
Btw. - would be great to write a small piece of code or a small script for reading out all rom/flash content of the meter in a safe manner..
A no-brainer which will spit out the hex in a standard format without creating a risk, a quick Sunday's afternoon exercise for the experts here - the noobs like me would be thankful..  ;)

 

Offline alan.bain

  • Regular Contributor
  • *
  • Posts: 73
  • Country: gb
Re: HP / Agilent 34401A hidden menu
« Reply #110 on: January 14, 2023, 10:43:30 am »
When playing with POKES and PEEKS it is worth making sure your meter is in calibration secured mode. The worst commands (e.g. the ones which alter the non-linear AD correction coefficient) are disabled then.

PEEKS other than -8 are safe. I think this is the complete peek list.  PEEK -7 is rather interesting as it lets you read the raw count from the AD (a combination of the counts from processor, U501 and the residual AD value).  Most of the transformations to turn this into a result are affine but there is a small non-linear correction which is a function of the voltage at the input to the AD. I don't totally understand the reason for this. If anyone is interested I could dig out the function from my old notes.

PEEK -12 lookup block table in ROM data using index to stored address
PEEK -11 lookup NVRAM data by block using the index to stored address
PEEK -10 hidden feature enabled?
PEEK -9 No of rows in the block table
PEEK -8 [unsecured] enable: ZERO DCV
PEEK -7 adc raw value (combination of T2 count, U501 count and residual AD) with MZ adjustment
PEEK -6 stack dump from last unexpected interrupt
PEEK -5 is there an ext interrupt pending?
PEEK -4 line freq 1 = 50Hz, 0=60Hz
PEEK -3 ROM ref values for specified block number e.g. PEEK -2, 70, 0
PEEK -2 NVRAM values at specified block number
PEEK -1, eeprom word from direct address by counting blocks read
PEEK 0, ram byte
PEEK 1, ram word
PEEK 2, ram dword
PEEK 3, ram float
[Thanks to razvan784 for filling some gaps here!]

The NVRAM storage is split into numbered blocks; the low part is for safe changes the high part is for calibration data and can only be written when unsecured.  A few blocks as examples

70  count gain between T2 ticks and residual on 80C196 AD
71  non-linear correction coeff1 (quadratic)
73  non-linear correction coeff2 (cubic)
76 transform params for DC 1V range (multiplier, shift, NA, offset, ?) must be scaled for line/NPLC

 
The following users thanked this post: Mickle T., splin, jaromir, ps, razvan784, iMo, zrq

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4894
  • Country: vc
Re: HP / Agilent 34401A hidden menu
« Reply #111 on: January 14, 2023, 11:49:35 am »
.. If anyone is interested I could dig out the function from my old notes.
Any info on the internal working of the 34401A would be greatly appreciated!!
 

Offline coromonadalix

  • Super Contributor
  • ***
  • Posts: 6205
  • Country: ca
Re: HP / Agilent 34401A hidden menu
« Reply #112 on: January 14, 2023, 02:33:21 pm »
.. If anyone is interested I could dig out the function from my old notes.
Any info on the internal working of the 34401A would be greatly appreciated!!

You already have a full service manual for them,  it's a good start ?
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4894
  • Country: vc
Re: HP / Agilent 34401A hidden menu
« Reply #113 on: January 14, 2023, 03:11:06 pm »
.. If anyone is interested I could dig out the function from my old notes.
Any info on the internal working of the 34401A would be greatly appreciated!!

You already have a full service manual for them,  it's a good start ?
What info in this thread is available in the service manual?? Could you show it? :)
 

Offline jaromir

  • Supporter
  • ****
  • Posts: 338
  • Country: sk
Re: HP / Agilent 34401A hidden menu
« Reply #114 on: January 16, 2023, 09:33:40 pm »
PEEK -7 is rather interesting as it lets you read the raw count from the AD (a combination of the counts from processor, U501 and the residual AD value).  Most of the transformations to turn this into a result are affine but there is a small non-linear correction which is a function of the voltage at the input to the AD. I don't totally understand the reason for this. If anyone is interested I could dig out the function from my old notes.

That is interesting indeed. I'd be very grateful if you could find this valuable information.
I wonder if you tried to log both raw ADC value and result from the meter to see the relationship between those.

70  count gain between T2 ticks and residual on 80C196 AD
71  non-linear correction coeff1 (quadratic)
73  non-linear correction coeff2 (cubic)

Looking at reply 65 with example EEPROM dump, those are byte 0x70 (only single byte?) and word 0x71-0x72 and 0x73-0x74, right? How to interpret those values into the correction coefficients?
 
The following users thanked this post: Mickle T., robert.rozee

Offline alan.bain

  • Regular Contributor
  • *
  • Posts: 73
  • Country: gb
Re: HP / Agilent 34401A hidden menu
« Reply #115 on: January 17, 2023, 07:40:20 pm »
OK. Sorry about the length but I dug up various old notes.  The service manual is helpful to a point, but it doesn't always seem right and there is a big caveat. Everything here was determined by reverse engineering.  There may (will) be mistakes - I'm writing as if all is fact, just because too many "I believe that" gets annoying. For example I do not know what causes the need for the quadratic non-linear correction.

I was primarily interested in how the ADC worked on the DC volts ranges. The various measurement types are split into three classes "DC-like", "AC-like" and "time-like" (classed as 0 to 2 respectively).

The primary hardware is an integrator U402-A. The inputs are summed from (a) signal (which can be switched to ground (MZ), input amp (MC) or pre-charge DAC amplifier (PRE)) or (b) positive fixed current (from a precision voltage source through a precision resistor) (c) negative fixed current. The integrator output feeds to the channel 0 AD input on the 80C196KB.  It also feeds indirectly to the ASIC.  In operation at all times either the positive (b) or negative current is turned on (c) (this is not made clear, but implied from the calculation in the rundown gain calibration test (error 605). The ASIC checks the output every 2.66us and switches between positive and negative current inputs as required to drive integrator output toward 2.5V (input range is 0-5V).

While one sign (presumed +) of current is enabled, the ASIC counter counts pulses (assumed to be the clock) in a 256 state internal counter. Pulses are gated to not be counted while the opposite sign is active. Overflow from this 256 state counter feeds P2.3 (T2CLK) on the CPU (and because they are at least divided by 256 they fall within the timing requirements of this counter).  The CPU for DC measurement is configured to interrupt on T2-capture, but not on internal AD done. By raising a sync pulse (positive edge) on P2.4 of the CPU, T2Capture latches the state of the T2 clock in CPU and also an internal U501 latch captures the value of the 256 state counter in the ASIC into a register mapped to RAM at 1FFA (byte).  The values of both counters can the be concatenated bitwise to give a complete 24-bit count. The counter is NOT reset by this operation, the current value is copied to a separate latch (manual suggests otherwise but this wouldn't work for the long period integrations e.g. 100NPLC).

A sampling process is as follows:
Two Timer1 counts [1] before the sync pulse to latch T2 and the ASIC count, the AD in the 80C196KB triggers its AD sample and hold selecting channel 0 (output of the integrator). Because the CPU has clock of 12MHz is "fast" (err manual says fast is >6MHz) the internal AD uses a clock pre-scaler and its sample and hold time would appear to be 15 state times, with 1 state time to start the process.  Thus the S+H gate closes at the same time as the count is latched. The sync also triggers a T2 count capture and subsequently a T2 capture interrupt.  The handler for this interrupt assembles the complete count data and collects the internal AD result (interestingly no attempt is made to check that the conversion is complete e.g. from AD status, or AD done interrupt). Judging by a pointless left shift 15 places of 0 instruction (which is slow) the code execution path has been made sufficiently long that this is a given (although I have not been able to verify this, partly due to lack of clear data).


All measurements are differential and process is as follows:
* Settling time (200us) after selecting a new input switch
* AD start followed by sync pulse is used to record initial values
* CPU HSO timer used to implement fixed delay e.g. 15000 T1 ticks for 1PLC at 50Hz
*   start AD after fixed delay
*   2 T1 ticks after AD raise SYNC
HSO control scheduled this way is accurate +/50ns. Long times > 10PLC are split up (and increments over each period summed) to avoid risks from complete 24-bit counter wrap arounds. In auto-zero mode for these long periods it appears that instead of a block of MZ and a block of MC there are alternating blocks.

Interim results are computed in long integrations (possibly to allow ranging decisions to be made more quickly?) so the actual structure is two nested measurement loops up to 10x 10x in NPLC 100 case, but the finished flag is only set when the full period has elapsed.  For reference with a 50Hz supply
NPLC  T1-cycles(50Hz)  T1-cycles (60Hz) Inner Loop Outer Loop (wrap avoidances and MC/MZ switch)
0.02     300                  300            1          1
0.2     2250                2250            1          1
1      15000              12500            1          1
10    15000              12500            10         1
100  15000              12500            10        10

The astute observer will see the T1-counts for < 1PLC are the same for both line frequencies (and the first is correct at 50Hz and the second at 60Hz). I cannot explain this other than by assuming it was decided that for < 1 full cycle the precise timing didn't matter. The longer periods which are integral multiples of the line period are exact.

To subtract two results we need to know about rundown gain. This may be standard but I don't have a reference to hand:
[BEGIN THEORY DIGRESSION]

With input voltage v, if we integrate for a time t clocks, and the count at start is c_0 and end is c_t then voltage at output of integrator V_t will be given by

V_t-V_0 = v* a *t + b*(c_t-c_0) - b(t-(c_t-c_0))

a is proportionality constant for measurement current & integrator capacitor
b is proportionality constant for the fixed voltage and resistor & integrator capacitor used in the multislope converter

So if V=V_t-V_0 is difference in integrator voltage over period
and   C =c_t-c_0 is count diff

Then

V = (a*v-b)*t + 2*b*C

Or
(a*v-b)*t = 2*b*C -V  = (rundown gain)*C -V

If we now apply v=0 (call this MZ for measure zero, in contrast to MC for measure client) and repeat

-b*t = (rundown gain)*C_MZ - V_MZ

So subtracting the two

a*v*t = ((rundown gain)*C_MC - V_MC) - ((rundown gain)*C_MZ - V_MZ)

From which v may be derived.
[END THEORY DIGRESSION]

Depending on the Auto-Zero setting one MZ measurement is made at the start of a block of measurements or MC and MZ alternating. For long > 10PLC measurements the alternating occurs within the measurement period after blocks of 10PLC. After disconnecting MZ, pre-charge is applied for a fixed time (busy loop) and then the pre-charge switch opened before connecting MC (and thus the input amplifier).

Rundown gain may be estimated by selecting MZ and integrating over two different time periods T_1 and T_2 obtaining internal 80C196KB AD count differences V_1 and V_2 and multislope count differences C_1 and C_2

rundown gain = (V_1*T_2 - V_2*T_1)/(T1*C_1 -T_2*C_2)

This is used to test the AD functionality, but not as part of the calibration, the NVRAM stored value is used to reduce measurements. Invalid results (e.g. same for both times) give errors 605/6. The calibration is repeated 8 times and the similarity of results checked (error 607) to ensure the difference between maximum and minimum values obtained is less than 0x100 otherwise the test fails.

For the purpose of reducing measurements the rundown gain is used as follows. It should be noted that fixed precision arithmetic is used throughout the result reduction process.

Value diff = (count diff)*(rundown gain param #70)/4  - (Ad count diff)

The divide by 4 is simply to allow the gain to be expressed in a finer increment of 0.25 rather than 1.0

So for more practical points:

You can see the gain with a SCPI peek
diag:peek? -2,70,0 (mine is 1694)

and after a measurement (e.g. a READ?) you can see the value diff
diag:peek? -7,0,0


Next stage is to turn this raw count into an expression voltage at the AD input. This is done by first an affine transformation (y=ax+b) in fixed precision arithmetic. This is expressed as

y = round((x-offset) * mult * 2^shift / 2^32)

where 0<=mult<2^32, and as usual in this form of representation to represent a factor c, the shift is chosen to be the smallest integer such that 2^shift>c
which is corrected by the mult/2^32. Two offsets are stored on each range, for front and rear terminals. 

The coeffs from NVRAM must be adjusted for
a) integration time (and line period if NPLC)
b) to compensate for the non-linear adjustment at 10V input to ADC
Having thus determined a first value for the input to the ADC the non-linear correction may be applied. This has two terms one quadratic and the other cubic (effectively the cubic is a mid range correction). The graph shows the form.

The input to the adc is expressed as an integer value which is multiplied by 1e-7 to give ADC input in volts. The actual meter inputs may require further multiplication by powers of 10 to correct for input amp gain, or divider ratio. Let the true value in volts be x. The corrections are implemented in fixed point arithmetic but for the sake of comprehension we use floating point expressions:

First stage quadratic correction (in counts) = 0.10077 * nlc1 * x^2

Second stage correction (in counts) =nlc2 * x * ( 2.691209 - x^2 * 0.02712)

The two corrections are added to the ADC input count and this is the result. These fp values are approximate - because these adjustments have a granularity limited to 1 tick there seems little point in writing them out with loads of huge numbers.

It will be noted that only the first correction is significant at full scale, where with an input x=10V, the output reads 10^8 + 0.10077*nlc1*100 = 1e8+10+10*nlc1. Thus the raw multiplier from calib is corrected in presence of non-linear correction

mult = (calib mult) *(plc correction) * 1e8/ (1e8 + nlc1 * 10)

This ensures that the same calib coeffs can be used irrespective of the non-linear correction choices.


Data format
The range cal data can be extracted using diag:peek? -2, set, 0
Set numbers from lowest to highest range are
DCV  75-79
DCI  82-85
OHM  87-92
OHM4 94-99
ACV  104-108

Looking in more detail at one row, the DC 10V range is 77. On my meter (and obviously not yours as the calibration is probably different!) this is
2271461829,1,0,69,77, 

The values are:
multiplier, shift left count, 0, offset front terminals, offset rear terminals

I have no idea if the 0 can be given a value, but when in use in the meter this value is replaced by NLC2 (the second global nonlinear AD correction)

These values are applicable for the longest standard integration time.  They are converted via factors for NPLC and line frequency (again note the 0.02 and 0.2 NPLC have the same factors for 50 & 60Hz), I suspect this is actually wrong, but since it is < 1 cycle it doesn't really matter).

We have an affine form mult*(x-offset) applicable where x is measured over the longest integration time. If we integrate x over a fraction r<1 of the calibrated time we expect

ADC input count = mult * (x /r - offset) = (mult/r) * (x - offset*r)

This is the NPLC scaling.

mult -> mult/r
offset -> offset*r

Since r<1 this requires no shift and can be expressed as (offset multiplier)/2^32.
The multiplier by 1/r requires a 2^k term since it is greater than unity. For minimal loss of precision it is desirable to ensure that the multiplier (unsigned) has its leading 1 as close as possible to the MSB.  This may be achieved by

Scaling
scaled multiplier = mult/r = 2^(shift)*mult * 2^{adjshift} * adjmult / 2^32
scaled offset = offset*r = offset * adjoffset/2^32

The adjustments are as follows
50Hz line
NPLC0.02 adjoffset 0x000d1b71, adjmult 0xa0000000 adjshift 0x3
NPLC0.2  adjoffset 0x00624dd3, adjmult 0xa6aaaaac adjshift 0xa
NPLC 1   adjoffset 0x028f5c29, adjmult 0xc8000000 adjshift 0x7
NPLC 10  adjoffset 0x1999999a, adjmult 0xa0000000 adjshift 0x4
NPLC 100 adjoffset 0xffffffff, adjmult 0x80000000 adjshift 0x1


60Hz
NPLC 0.02 adjoffset 0x000d1b71, adjmult 0xa0000000 adjshift 0x3
NPLC 0.2  adjoffset 0x00624dd3, adtmult 0xa6aaaaac adjshift 0xa
NPLC 1    adjoffset 0x02222222, adjmult 0xf0000000 adjshift 0x7
NPLC 10   adjoffset 0x15555555. adjmult 0xc0000000 adjshift 0x4
NPLC 100  adjoffset 0xd5555555, adjmult 0x9999999a adjshift 0x1


An example might help here. Suppose we wish to use the 10V DC range to measure the voltage of a 1.5V cell using the front panel using a 10NPLC sampling window. The cal data is 2271461829,1,0,69,77, and assume a 50Hz line supply.

The 10NPLC adjust is
NPLC 10  adjoffset 1999999a, adjmult a0000000 adjshift 4

New offset = round (1999999a * 69)/2^32 = round (0.1 * 69) = 7
New shift = 4 + 1 = 5 (subject to adjustment)
New multiplier = 2271461829 * a0000000  / 2^32 = 1,419,663,643.15 
The binary representation of this begins 01... so to avoid precision loss we multiply by 2 and drop by one the shift
So
shift=4
multiplier = 2,839,327,286

[So basically offset is divided by 10 and mutliplier multiplied by 10 to account for the shorter integration time]

Now this meter has NLC1=27 and NLC2=4 (decimal) and as a result for a full scale AD input of +/-10V the first nonlinear correction results in a count value of 10^8 = 10^8  + NLC1*10. It should read 10^7 *10 = 10^8 so the multiplier correction required is
1e8/100,000,270

Offset = 7
Multiplier = 2,839,327,286 * 1e8/100,000,270  = 2,839,319,619
Shift =4

In the 7-5-2 firmware the coeffs used can be read out at location 15B2 and these are indeed the ones used.

Let us now reduce a reading; suppose we measure a 1.5V cell and get a raw count of 1510615 (peek -7,0,0 value). 

Reading = round(2^(shift)*mult*(count - offset)/2^32) = round( 2^4 *  2,839,319,619 * ( 1510615 - 7) /2^32)
        = 15,978,139
Now we must apply the non linear corrections; this suggests x = 1.5978139

first correction = round( 0.10077 * nlc1 * x^2 ) = ropund ( 0.10077*27*(1.5978139)^2) =  7
second correction = int ( nlc2 * x * ( 2.691209 - x^2 * 0.02712) ) = round (4 *(1.5978139)*(2.691209 - (1.5978139)^2*0.02712) = int (16.75) =16

Result =  15,978,139 + 7+16  =15,978,162

So voltage = 1.5978162V

To be continued maybe... pre-charge is worth a discussion

[1] A T1 count is 8 state times. One state time is two clock cycles (at 12MHz)
[2] Did anyone make it here or was it too boring?
[3] I don't have a similar doc on the 3458. Maybe someday if someone gave me one....?
« Last Edit: January 17, 2023, 07:43:53 pm by alan.bain »
 

Offline Hydron

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: gb
Re: HP / Agilent 34401A hidden menu
« Reply #116 on: January 18, 2023, 08:19:44 am »
OK. Sorry about the length but I dug up various old notes.

...

To be continued maybe... pre-charge is worth a discussion

[2] Did anyone make it here or was it too boring?
No worries about the length, and certainly also interested in pre-charge. As for [2] <- I did indeed make it, though I didn't look at the math too closely. Thanks for sharing!
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4894
  • Country: vc
Re: HP / Agilent 34401A hidden menu
« Reply #117 on: January 18, 2023, 09:50:15 am »
Unbelievable math! Now, the question would be whether the standard calibration process sets all those coefficients/constants to new values, or, it sets some of them only.. I mean - it could be some coefficients/constants could be strongly hw related, thus replacing any ADC related parts on the board leads to a loss of validity of some coeffs which are only determined by the manufacturer upon final assembly (and are not subject to the user cal process)..
« Last Edit: January 18, 2023, 09:53:07 am by imo »
 

Online mawyatt

  • Super Contributor
  • ***
  • Posts: 3504
  • Country: us
Re: HP / Agilent 34401A hidden menu
« Reply #118 on: January 18, 2023, 05:38:57 pm »
OK. Sorry about the length but I dug up various old notes.  The service manual is helpful to a point, but it doesn't always seem right and there is a big caveat. Everything here was determined by reverse engineering.  There may (will) be mistakes - I'm writing as if all is fact, just because too many "I believe that" gets annoying. For example I do not know what causes the need for the quadratic non-linear correction.

I was primarily interested in how the ADC worked on the DC volts ranges. The various measurement types are split into three classes "DC-like", "AC-like" and "time-like" (classed as 0 to 2 respectively).


Result =  15,978,139 + 7+16  =15,978,162

So voltage = 1.5978162V


To be continued maybe... pre-charge is worth a discussion

[1] A T1 count is 8 state times. One state time is two clock cycles (at 12MHz)
[2] Did anyone make it here or was it too boring?
[3] I don't have a similar doc on the 3458. Maybe someday if someone gave me one....?

Massive undertaking and effort...thanks :-+

So from an outsider looking in, this seems to convey the 34401A can resolve ~8 digits if accessed thru the remote, and has additional "hidden" features. Is this extra resolution repeatable within reasonable limits, as in doing ratio or difference measurements in a short time at same temperature?

From reviewing your description and other posts here, seems HP has "created" an instrument beyond the front panel accessible limits & features that has demonstrated an amazing life span, reminiscent of HP of old!!

We have an old HP Rev 05-01-01 and a AG Rev 11-05-02 (our first 6-1/2 DMMs), but neither has anything connected to the RS232 nor HP-IP ports. What would folks recommend as gaining remote access with an adapter, from Ethernet (preferred), with an intent of looking into these "enabling" features?

Anyway, thanks for the details, especially the ADC inner workings and analysis!!

Best,
Curiosity killed the cat, also depleted my wallet!
~Wyatt Labs by Mike~
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4894
  • Country: vc
Re: HP / Agilent 34401A hidden menu
« Reply #119 on: January 18, 2023, 05:59:18 pm »
The 34401A returns 7.5 digits (like 10.000.023, 100NPLC) when reading the data via rs232, and the last digit is not just a math "noise", as is sometimes mentioned here.. But the ADC of the meter and its 399 reference are "noisy", sure, therefore the last digit fluctuates, but you may see clearly it follows a trend with a stable source.. Thus during a "quiet" period the last digit flips +/-1 from time to time only..

EDIT: the 1uV resolution is actually the 8th digit above.
Below 10V, for example, it returns 9.999.994.6 where the 7th "4" is the last stable digit, the 8th "6" could be the math rounding noise..
« Last Edit: January 18, 2023, 06:42:27 pm by imo »
 
The following users thanked this post: mawyatt

Offline Hydron

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: gb
Re: HP / Agilent 34401A hidden menu
« Reply #120 on: January 18, 2023, 07:15:41 pm »
We have an old HP Rev 05-01-01 and a AG Rev 11-05-02 (our first 6-1/2 DMMs), but neither has anything connected to the RS232 nor HP-IP ports. What would folks recommend as gaining remote access with an adapter, from Ethernet (preferred), with an intent of looking into these "enabling" features?
The 05-01-01 unit will not be able to use the new features (if you look in the FW the menu strings are absent), the 11-05-02 will work fine though (I have the same FW).
I'm not sure what the best ethernet options are (GPIB-Ethernet adapters are rather pricey), but a simple USB-RS232 cable plus a null modem adapter (must have TX/RX and DTR/DSR crossovers) will work fine if you go and turn on the appropriate options in the IO menu. You won't get maximum reading rate via RS232, but that's not an issue in the high-res modes.
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 4894
  • Country: vc
Re: HP / Agilent 34401A hidden menu
« Reply #121 on: January 18, 2023, 07:31:08 pm »
We have an old HP Rev 05-01-01 and a AG Rev 11-05-02 (our first 6-1/2 DMMs), but neither has anything connected to the RS232 nor HP-IP ports. What would folks recommend as gaining remote access with an adapter, from Ethernet (preferred), with an intent of looking into these "enabling" features?
The 05-01-01 unit will not be able to use the new features (if you look in the FW the menu strings are absent), the 11-05-02 will work fine though (I have the same FW).
I'm not sure what the best ethernet options are (GPIB-Ethernet adapters are rather pricey), but a simple USB-RS232 cable plus a null modem adapter (must have TX/RX and DTR/DSR crossovers) will work fine if you go and turn on the appropriate options in the IO menu. You won't get maximum reading rate via RS232, but that's not an issue in the high-res modes.
In order to get a continuous stream of results via rs232 you have to enable the "talk only" mode in the HP-IB settings (do set the address 31 via front buttons). With the 9600 8N2 (you have to set in the meter too via front buttons) it works with some lower NPLCs as well. Simply open TeraTerm or other terminal app and you will see the values coming in..
« Last Edit: January 18, 2023, 08:05:40 pm by imo »
 

Offline Hydron

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: gb
Re: HP / Agilent 34401A hidden menu
« Reply #122 on: January 18, 2023, 08:12:58 pm »
If you're okay with polling using READ? (or setting up triggers and using INIT/FETCH) then you don't need to use the "talk only" mode and can adjust settings via SCPI as well. I suspect for most remote controlled operations using SCPI will be desirable. There is also a driver for HKJ's "TestController" software that can be used for graphing, scripting etc (though it needs updates to take advantage of the new TEMPerature measurement functions etc).
 

Offline Hydron

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: gb
Re: HP / Agilent 34401A hidden menu
« Reply #123 on: January 23, 2023, 07:12:41 pm »
I've done a little testing of what new SCPI commands are available with the "upgraded" meters, here is what I came up with:
Code: [Select]
Commands with ? as a suffix are read only, all others are read/write unless noted (using ? and no arguments for read). As usual only capitalised letters are required, syntax is the same as used by HPAK in their manuals.

Math operations:
Scale math operations (only one math operation available at a time, e.g. no min/max simultaneous with SCALE):
CALCulate:FUNCtion SCALe
CALCulate:SCALe:GAIN
CALCulate:SCALe:OFFSet

Average math operation (in addition to existing):
CALCulate:AVERage:SDEViation?
CALCulate:AVERage:PTPeak?


Temperature measurment:
DIAGnostic:TEMPerature? <- read internal on-chip temperature sensor (I assume in U101-B), note that it operates relay(s) when reading it for some reason regardless of selected function

CONF? <- when in TEMP mode also returns transducer type and subtype in addition to range/resolution (range fixed as "1")

CONF:TEMPerature {TCouple|RTD|FRTD|THERmistor|DEF},{TC type, or (F)RTD alpha, or Thermistor type},{<range>|MIN|MAX|DEF},{<resolution>|MIN|MAX|DEF} <- Temperature measurement mode/transducer/subtype; no query possible, transducer DEF(ault) = last used, range is ignored

UNIT:TEMPerature {Cel|Far|K}

[SENSe]:TEMPerature:TRANsducer:TYPE {TCouple|RTD|FRTD|THERmistor|DEF} <- FRTD is 4W RTD, RTD is 2W, DEF(ault) = TC (unlike for CONF:TEMP)

[SENSe]:TEMPerature:NPLCycles {0.02|0.2|1|10|100|MINimum|MAXimum}

Thermocouple options:
[SENSe]:TEMPerature:TRANsducer:TCouple:TYPE {B|E|J|K|N|R|S|T} <- TC type
[SENSe]:TEMPerature:TRANsducer:TCouple:RJUNction {<temperature>|MIN|MAX} <- Reference junction temperature for TC, -1 to 55C range

RTD options (shared between 2W RTD and 4W RTD, either RTD or FRTD will work in SCPI command):
[SENSe]:TEMPerature:TRANsducer:RTD:TYPE {85|91} <- RTD alpha value, 0.00385 or 0.00391
[SENSe]:TEMPerature:TRANsducer:RTD:RESistance:REFerence {<R0 resistance>|MIN|MAX} <- RTD reference (25C) resistance, 4.9 - 2100 ohm range

Thermistor subtype option:
[SENSe]:TEMPerature:TRANsducer:THERMistor:TYPE {2200,5000,10000} <- Thermistor type (in ohms)


Custom aperture:
<measurement function>:APER {<aperture value>|MIN|MAX} <- On a normal 34401A this will only accept values which correspont to the standard NPLC settings. When custom aperture option is enabled, it will instead accept values anywhere in the range of 0.4ms to 2s. The NPLC option will not accept "non-standard" values - when set to a non-standard value the next highest standard value will be used instead.

I haven't managed to work out what (if any) SCPI commands control settings save/recall functionality (not critical for remote use tbh), and the custom aperture settings work a little differently compared to when set from the front-panel:
- custom apertures set manually via the front panel menu system (by selecting "custom" in the resolution menu, enabling the extra aperture time menu) will always show full 6.5digit resolution regardless of aperture time setting (which has a range of 0.4ms to 2s)
- There is no explicit "custom aperture" setting via SCPI that I found, only that you can use the <function>:APER SCPI command set it to arbitrary values (in the same 0.4ms to 2s range) after the POKE 32 upgrade
- any SCPI-set aperture that corresponds to a "normal" NPLC setting will result in the meter going back to showing the "normal" resolution, e.g. 5.5 digits for a 50Hz aperture of 20ms (1 NPLC)
- again this is probably not a big deal for remote control, as the resolution returned by SCPI behaves as it does normally (i.e. is independent of aperture time/NPLC and greater than display resolution)

I'll also be uploading a modified instrument definition for HKJ's SW to enable the Temperature functions here shortly: https://www.eevblog.com/forum/testgear/program-that-can-log-from-many-multimeters/

Edit: Seems I spoke too soon about save/recall SCPI commands. I took a look at the 34410A manual and the following seem to work:
Code: [Select]
*RCL 0 (or another number, only 1 slot it seems) <- recall saved state
*SAV 0 (or another number as above) <- store current state
MEMory:STATe:RECall:AUTO {OFF|0|ON|1} <- turn power-up recall on/off
The other 34410A memory commands I tried didn't seem to work.
« Last Edit: January 23, 2023, 10:38:20 pm by Hydron »
 
The following users thanked this post: iMo

Offline Kosmic

  • Super Contributor
  • ***
  • Posts: 2546
  • Country: ca
Re: HP / Agilent 34401A hidden menu
« Reply #124 on: January 24, 2023, 06:16:56 pm »
Most of the hidden SCPI functions are documented in the manual of the HP 34970A (see attachment).

I guess the custom aperture can be set with this:
Quote
[SENSe:]
 VOLTage:DC:APERture {<time>|MIN|MAX}[,(@<ch_list>)]
 VOLTage:DC:APERture? [{(@<ch_list>)|MIN|MAX}]
« Last Edit: January 24, 2023, 06:25:21 pm by Kosmic »
 
The following users thanked this post: iMo


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf