Author Topic: DIY scan card for Keysight 34970A  (Read 8254 times)

2N3055 and 4 Guests are viewing this topic.

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 844
  • Country: se
Re: DIY scan card for Keysight 34970A
« Reply #50 on: June 09, 2022, 05:59:54 pm »
When I got the 0x17E4 value I was reading the CJ temp via SCPI (I don't think you can do it via the front panel?).

I've done a 1 minute capture at power up and I don't see any calibration data. I've also configured a channel for T/C and as soon as you select Temperature the DAQ sends 0x1E1, 0x0FF (open all channels), then a 0x109/0x121 request/response, followed by the DAQ sending 0x169, 0x030, 0x001 which the card confirms with 0x121. After that nothing happens and I've let it sit idle for 5 minutes. A 34908A can't do TC but it's the exact same sequence when configuring a channel for temperature.

If the calibration is applied by the card CPU then surely we'd get the same displayed value for the same raw value but we don't so the calibration "must" be applied by the main CPU but there does not seem to be any transfer of that data. With the 34907A there's a lot of traffic at the configuration stage and some of it seems to be offset and gain calibration for the two DAC channels. Not so with the 34901A.

For the 34908A the 40 channels are numbered straight from 0x001 to 0x028. Commands to close/open channels are the same as for the 34901A.

EDIT: Still, that 0x169, 0x030, 0x001 is intereting, but the card just responds with 0x121. Perhaps the CJ compensation factors are lost and the FRAM has been re-initialised? But why would it try to read CJ calibration from a 34908A?
« Last Edit: June 09, 2022, 06:05:07 pm by H.O »
 

Offline strawberry

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: lv
Re: DIY scan card for Keysight 34970A
« Reply #51 on: June 09, 2022, 06:24:19 pm »
someone replaced with new EEPROM making card nonfunctional, if remember right
 

Online voltsandjoltsTopic starter

  • Supporter
  • ****
  • Posts: 2386
  • Country: gb
Re: DIY scan card for Keysight 34970A
« Reply #52 on: June 09, 2022, 06:31:02 pm »
I've done a 1 minute capture at power up and I don't see any calibration data.
I've just done the same. I agree, no cal data transfer there. Nor at time of reading first CJ temperature.

Quote
If the calibration is applied by the card CPU then surely we'd get the same displayed value for the same raw value
Yes, and everything would make sense, just a weird scaling of values for hex to °C.
I'm going to check my result (0x17E4 == 16.464°C) again, in case I screwed up.

Do you have a couple more hex values and associated °C CJ reading from your unit?
Unfortunately I only have one 34972A here at the moment, no 34970A (there should be no difference 72/70A for this CJ stuff).
 

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 844
  • Country: se
Re: DIY scan card for Keysight 34970A
« Reply #53 on: June 10, 2022, 03:14:45 pm »
0x13FE = 20.031°C  (low bank)
0x1404 = 19.996°C  (high bank)

Then, when repeated about two minutes later I get the EXACT same values as above. Wait another minute or two:
0x140E = 20.005°C
0x140E = 20.005°C

Yes, it actually did return the same value for both banks. Then, another couple of minutes:
0x1434 = 20.172°C
0x143E = 20.226°C

Then I warmed the card up with the heatgun:
0x477E = 77.375
0x3FA6 = 66.004

0x3AFC = 62.785
0x35EA = 55.437

0x2A80 = 43.629
0x296E = 41.805



 
The following users thanked this post: voltsandjolts

Online voltsandjoltsTopic starter

  • Supporter
  • ****
  • Posts: 2386
  • Country: gb
Re: DIY scan card for Keysight 34970A
« Reply #54 on: June 10, 2022, 03:15:34 pm »

Edit:
We were typing at the same time,  I posted this some milliseconds after your post above :D
/Edit

OK, I found the culprit of the confusion:
When reading the CJ temperature, both bank1 and bank2 readings are sent by the card (16bits each).
But the dmm uses some kind of weighted average of the two readings, weighted toward the bank CJ you requested.
All our examples so far (of hex to °C) are null and void, because they were all influenced by what the other bank CJ reading was at the time.

By setting both CJ readings to the same value, I can see the scaling used by the dmm:
0x0000 = -7.109 °C
0x17e4 = 23.180 °C
0x7d00 = 124.289 °C
This scale is still odd, similar to the DS75 datasheet, but different ???
But that's my understanding at the moment.
You can't arrange your card to return exactly the same temperature hex for both CJ readings,....
...but my 0x17e4 reading of 23.180 is very close to what you got 23.0156 (your card must have been temperature equalised).
So, I think we are all good and we can assume the card applies the CJ calibration.


« Last Edit: June 10, 2022, 03:26:00 pm by voltsandjolts »
 

Online voltsandjoltsTopic starter

  • Supporter
  • ****
  • Posts: 2386
  • Country: gb
Re: DIY scan card for Keysight 34970A
« Reply #55 on: June 10, 2022, 03:24:31 pm »
Then, when repeated about two minutes later I get the EXACT same values as above. Wait another minute or two:
0x140E = 20.005°C
0x140E = 20.005°C

Hmm, when I program my card to return 0x140E for both CJ readings, I get 19.344°C
Close, but not exact as I expected ???

Edit:
I wonder if the dmm has an internal temperature sensor, and that is also included (to a small extent) into the weighted temperature average. Hmm.

...No. Can't be. For same hex values I get exact same TJ some 15mins later. If there were a third sensor in the mix, there would be some small change.

It could be a time series average in the dmm, so 0x140E might be 19.344°C, and HO's card was cooling a little and showing time average of 20.005°C (delayed reading).....No. HO's reading show the card is warming slightly, over a few minutes.
« Last Edit: June 10, 2022, 04:17:16 pm by voltsandjolts »
 

Offline tv84

  • Super Contributor
  • ***
  • Posts: 3288
  • Country: pt
Re: DIY scan card for Keysight 34970A
« Reply #56 on: June 10, 2022, 03:28:37 pm »
Why not read the temp for all the hex values and draw the line with the comparison? Or it's to cumbersome?

With that you could probably discover what is the difference rule.
 

Online voltsandjoltsTopic starter

  • Supporter
  • ****
  • Posts: 2386
  • Country: gb
Re: DIY scan card for Keysight 34970A
« Reply #57 on: June 10, 2022, 03:34:19 pm »
Sure, but HO can only do a few points with his setup.
I just wanted to see a perfect match to my setup with a few points.
But maybe dmm averaging makes this impossible.
 

Offline strawberry

  • Super Contributor
  • ***
  • !
  • Posts: 1199
  • Country: lv
Re: DIY scan card for Keysight 34970A
« Reply #58 on: June 10, 2022, 06:36:17 pm »
70A cant find internal temp sensor
nothing interesting
5118   20.031   5124   19.996
5134   20.005   5134   20.005
5172   20.172   5182   20.226
10880   43.629   10606   41.805
15100   62.785   13802   55.437
18302   77.375   16294   66.004
 

Online voltsandjoltsTopic starter

  • Supporter
  • ****
  • Posts: 2386
  • Country: gb
Re: DIY scan card for Keysight 34970A
« Reply #59 on: June 19, 2022, 03:06:27 pm »
I have updated the first post in this topic to include the design files for this card.
 

Online voltsandjoltsTopic starter

  • Supporter
  • ****
  • Posts: 2386
  • Country: gb
Re: DIY scan card for Keysight 34970A
« Reply #60 on: July 27, 2022, 11:37:50 am »
Firmware updated to include relay cycle counters to demonstrate the DAQ commands.
They are just in RAM, so start at 0 on every power-up.
See first post to download.

The cycle counters are accessed from python like this:
Code: [Select]
import pyvisa as visa
import time,sys

#py -m pip install -U pyvisa
#py -m pip install -U pyvisa-py     (for the pure python backend)
#py -m pip install -U pyserial

#https://pyvisa.readthedocs.io/en/latest/index.html

#How do I know if PyVISA-py is properly installed? Get info about PyVISA, the installed backends and their options:
# python -m visa info

#On Windows, you may have to uninstall the USBTMC specific driver installed by Windows and re-install a generic driver.
#https://pyvisa.readthedocs.io/en/latest/introduction/configuring.html
#rm = visa.ResourceManager('@py')  # Use pure python backend
#rm = visa.ResourceManager('@ivi') # Use IVI-VISA backend
rm = visa.ResourceManager() # default backend

#print('Available devices: ', rm.list_resources()) # Will show async serial devices (comports) as e.g. ASRL16::INSTR for COM16

print('\nOpening device:')
inst = rm.open_resource('USB0::0x0957::0x2007::MY57007585::INSTR') #For the 34972A on USB
#inst = rm.open_resource("ASRL3::INSTR", baud_rate = 115200) #For the 34970A on RS232 (need to edit port number appropriately 'ASRL?' and check instrument baud setting)

#reading and writing values:
#https://pyvisa.readthedocs.io/en/latest/introduction/rvalues.html

#inst.write('*rst; *cls') #reset to power on state, clear status
# After *rst we now have these settings:
# 1PLC,  5½ digits resolution
# scaling is OFF and scale values are cleared
# sets the scan interval to immediate (0 seconds) and the scan count to 1 sweep.

DEFAULT_TIMEOUT = 5000 # default timeout is 5 seconds
inst.timeout = DEFAULT_TIMEOUT

#print(inst.query('*IDN?'))
#print('Slot 1 card type:')
#print(inst.query(':SYST:CTYPE? 100'))
#print('Slot 2 card type:')
#print(inst.query(':SYST:CTYPE? 200'))
#print('Slot 3 card type:')
#print(inst.query(':SYST:CTYPE? 300'))

print('DAQ Internal relay cycle count:')
print(inst.query('DIAG:DMM:CYCLES?'))

print('Scan card relay cycle count:')
print(inst.query('DIAG:RELAY:CYCLES? (@301:322)'))

#Clear DAQ Internal or the scan card cycle counts like this:
#print(inst.query('CAL:SEC:STAT?'))
#inst.write('CAL:SEC:STAT OFF,HP034970') #unsecure the instrument '970A
#inst.write('CAL:SEC:STAT OFF,AT034972') #unsecure the instrument '972A
#print(inst.query('CAL:SEC:STAT?'))
#inst.write('DIAG:REL:CYCL:CLE (@320)') #clears the relay cycle count on channel 20 in card slot 300
#inst.write('DIAG:REL:CYCL:CLE (@118)') #clears the relay cycle count on channel 18 in card slot 100
#inst.write('DIAGnostic:DMM:CYCLes:CLEar 1') #clear internal DMM relay cycle count K102
#inst.write('DIAGnostic:DMM:CYCLes:CLEar 2') #clear internal DMM relay cycle count K103
#inst.write('DIAGnostic:DMM:CYCLes:CLEar 3') #clear internal DMM relay cycle count K104
#inst.write('CAL:SEC:STAT ON,HP034970') #secure the instrument '970A
#inst.write('CAL:SEC:STAT ON,AT034972') #secure the instrument '972A
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf