diff --git a/dev/test_2_mux_2024.py b/dev/test_2_mux_2024.py index c36c6cec1df700762a77d4f8002c0a0b0afa10db..c51a7ca748842fad821cb8d1603026d8fd32b110 100644 --- a/dev/test_2_mux_2024.py +++ b/dev/test_2_mux_2024.py @@ -46,13 +46,13 @@ if within_ohmpi: k = OhmPi() k.reset_mux() k._hw.switch_mux([1, 4, 2, 3], state='on') - k._hw.vab_square_wave(12,1) + k._hw.vab_square_wave(3.,1) k._hw.switch_mux([1, 4, 2, 3], state='off') k._hw.calibrate_rx_bias() # electrodes 1 4 2 3 should be connected to a reference circuit print(f'Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV') k._hw._plot_readings() k._hw.switch_mux([1, 4, 2, 3], state='on') - k._hw.vab_square_wave(12,1) + k._hw.vab_square_wave(3.,1) k._hw.switch_mux([1, 4, 2, 3], state='off') print(f'Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV') k._hw._plot_readings() diff --git a/ohmpi/hardware_components/ohmpi_card_3_15.py b/ohmpi/hardware_components/ohmpi_card_3_15.py index 2a88de919c5b35c44fbf9e7253073de6565b127d..e6eb52a0156d2552d4e25f42383077f7200151c6 100644 --- a/ohmpi/hardware_components/ohmpi_card_3_15.py +++ b/ohmpi/hardware_components/ohmpi_card_3_15.py @@ -248,6 +248,7 @@ class Rx(RxAbstract): self._adc_gain = value self._ads_voltage = ads.ADS1115(self.ctl.bus, gain=self.adc_gain, data_rate=860, address=self._ads_voltage_address) + self._ads_voltage.mode = Mode.CONTINUOUS self.exec_logger.debug(f'Setting RX ADC gain to {value}') def adc_gain_auto(self): diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py index eb9491a7cd0bfbdfc182baf5d7ed842a83394b80..1bd7ef60ae4e284c91a7d8b3f8525f491461c884 100644 --- a/ohmpi/hardware_system.py +++ b/ohmpi/hardware_system.py @@ -178,6 +178,7 @@ class OhmPiHardware: sampling_rate = self.rx.sampling_rate sample = 0 # self.exec_logger.info(f'values when starting pulse {self._pulse} : {self.tx.current} mA, {self.rx.voltage} mV') + # _ = self.rx.voltage lap = datetime.datetime.utcnow() # just in case tx_sync is not set immediately after passing wait self.tx_sync.wait() # if not append or self._start_time is None: