Commit c9fedad4 authored by rpi2.0's avatar rpi2.0
Browse files

fix for v2.0 compatibility (v22.10)

Showing with 14 additions and 14 deletions
+14 -14
......@@ -14,7 +14,7 @@ OHMPI_CONFIG = {
'integer': 2, # Max value 10 # TODO: Explain what this is...
'version': 2,
'max_elec': 64,
'board_address': {'A': 0x72, 'B': 0x73, 'M': 0x70, 'N': 0x71}, # def. {'A': 0x76, 'B': 0x71, 'M': 0x74, 'N': 0x70}
'board_address': {'A': 0x73, 'B': 0x72, 'M': 0x71, 'N': 0x70}, # def. {'A': 0x76, 'B': 0x71, 'M': 0x74, 'N': 0x70}
#'board_address': {'A': 0x70, 'B': 0x71, 'M': 0x72, 'N': 0x73}, # def. {'A': 0x76, 'B': 0x71, 'M': 0x74, 'N': 0x70}
'settings': 'ohmpi_settings.json',
'board_version': '22.10',
......
......@@ -853,18 +853,18 @@ class OhmPi(object):
d = self.run_measurement(quad=quad, nb_stack=1, injection_duration=1, tx_volt=tx_volt, autogain=False)
if self.idps:
voltage = tx_volt # imposed voltage on dps5005
voltage = tx_volt * 1000.0 # imposed voltage on dps5005
else:
voltage = d['Vmn [mV]']
current = d['I [mA]']
# compute resistance measured (= contact resistance)
resist = abs(voltage / current) / 1000
print(str(quad) + '> I: {:>10.3f} mA, V: {:>10.3f} mV, R: {:>10.3f} kOhm'.format(
resist = abs(voltage / current) /1000.
#print(str(quad) + '> I: {:>10.3f} mA, V: {:>10.3f} mV, R: {:>10.3f} kOhm'.format(
current, voltage, resist))
msg = f'Contact resistance {str(quad):s}: I: {current * 1000.:>10.3f} mA, ' \
f'V: {voltage * 1000.:>10.3f} mV, ' \
f'R: {resistance /1000.:>10.3f} kOhm'
f'V: {voltage :>10.3f} mV, ' \
f'R: {resist :>10.3f} kOhm'
self.exec_logger.debug(msg)
......
......@@ -9,23 +9,23 @@ n = a + 2
seq = np.c_[a, b, m, n]
k = OhmPi(idps=False)
k.settings['injection_duration'] = 0.5
k.settings['injection_duration'] = 1
k.settings['nb_stack'] = 1
k.settings['nbr_meas'] = 1
#k.sequence = seq
#k.reset_mux()
#k.switch_mux_on([4, 7, 5, 6])
k.sequence = seq
k.reset_mux()
#k.switch_mux_on([1, 4, 2, 3])
#k.switch_mux_on([12, 15, 13, 14])
#k.measure(strategy='vmax')
#print('vab', k.compute_tx_volt(strategy='vmin'))
#k.rs_check()
# out = k.run_measurement(quad=[3, 3, 3, 3], nb_stack=1, tx_volt=12, strategy='constant', autogain=True)
k.rs_check()
#out = k.run_measurement(quad=[3, 3, 3, 3], nb_stack=1, tx_volt=12, strategy='constant', autogain=True)
#k.reset_mux()
#k.rs_check(tx_volt=12)
# x = []
for i in range(3):
out = k.run_measurement(injection_duration=2, nb_stack=2, strategy='constant', tx_volt=5, autogain=False)
#for i in range(3):
# out = k.run_measurement(injection_duration=2, nb_stack=2, strategy='constant', tx_volt=5, autogain=False)
#x.append(out['R [ohm]'])
#k.append_and_save('out.csv', out)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment