diff --git a/config.py b/config.py index 73c8a402281524e8ebb2f8de4fc2504b6380a8e7..7da09b06cbaa9af969693f7f51dd5ae9f5688d44 100644 --- a/config.py +++ b/config.py @@ -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', diff --git a/ohmpi.py b/ohmpi.py index 6f63632e3ec5aba5e8c6fc687859d48ff7c227a2..3ecc6f52f45ebca00922290b80c0e748e0391aac 100644 --- a/ohmpi.py +++ b/ohmpi.py @@ -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) diff --git a/test.py b/test.py index 8a73f168c52de53b714643879b701620ab5d7e84..e8cbd02dc6e807cb5b3d6a345138cf2a255e3e8a 100644 --- a/test.py +++ b/test.py @@ -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)