Commit cb8f3992 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Implements rs_check

Showing with 8 additions and 6 deletions
+8 -6
...@@ -701,10 +701,12 @@ class OhmPi(object): ...@@ -701,10 +701,12 @@ class OhmPi(object):
d = self.run_measurement(quad=quad, nb_stack=1, injection_duration=0.2, tx_volt=tx_volt, autogain=False, d = self.run_measurement(quad=quad, nb_stack=1, injection_duration=0.2, tx_volt=tx_volt, autogain=False,
bypass_check=True) bypass_check=True)
if self._hw.tx.voltage_adjustable: # if self._hw.tx.voltage_adjustable:
voltage = self._hw.tx.voltage # imposed voltage on dps # voltage = self._hw.tx.voltage # imposed voltage on dps
else: # else:
voltage = self._hw.rx.voltage # voltage = self._hw.rx.voltage
voltage = self._hw.rx.voltage
current = self._hw.tx.current current = self._hw.tx.current
# compute resistance measured (= contact resistance) # compute resistance measured (= contact resistance)
...@@ -715,7 +717,7 @@ class OhmPi(object): ...@@ -715,7 +717,7 @@ class OhmPi(object):
f'V: {voltage :>10.3f} mV, ' \ f'V: {voltage :>10.3f} mV, ' \
f'R: {resist :>10.3f} kOhm' f'R: {resist :>10.3f} kOhm'
self.exec_logger.debug(msg) self.exec_logger.info(msg)
# if contact resistance = 0 -> we have a short circuit!! # if contact resistance = 0 -> we have a short circuit!!
if resist < 1e-5: if resist < 1e-5:
...@@ -731,7 +733,7 @@ class OhmPi(object): ...@@ -731,7 +733,7 @@ class OhmPi(object):
# close mux path and put pin back to GND # close mux path and put pin back to GND
self.switch_mux_off(quad) self.switch_mux_off(quad)
self.exec_logger.info(f'R{quad[0]} {quad[1]}: {resist} kOhm')
self.status = 'idle' self.status = 'idle'
# #
......
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