diff --git a/dev/test_mb_2024_1_mux_2024.py b/dev/test_mb_2024_1_mux_2024.py index 873b0ae4906168f1cd30ba5fd6f4688053f56b54..0f119bb6c35d0ee70277e25fb779d2ed757405cf 100644 --- a/dev/test_mb_2024_1_mux_2024.py +++ b/dev/test_mb_2024_1_mux_2024.py @@ -51,6 +51,10 @@ if stand_alone: current = tx.current mux.switch(elec_dict={'A': [1], 'B': [4], 'M': [2], 'N': [3]}, state='off') print(f'Resistance: {voltage / current :.2f} ohm, voltage: {voltage:.2f} mV, current: {current:.2f} mA') + mux.reset() + mux.test({'A': [i for i in range(1, 9)], 'B': [i for i in range(1, 9)], + 'M': [i for i in range(1, 9)], 'N': [i for i in range(1, 9)]}, activation_time=.1) + mux.reset() # mux as part of a OhmPiHardware system if part_of_hardware_system: @@ -65,8 +69,9 @@ if part_of_hardware_system: # time.sleep(1.) # k.switch_mux(electrodes=[1, 4, 2, 3], roles=['A', 'B', 'M', 'N'], state='off') # k.mux_boards[mux_id].test(activation_time=.4) - k.test_mux((1,'A')) - + # k.test_mux_one_relay((1, 'A')) + + if within_ohmpi: from ohmpi.ohmpi import OhmPi # from ohmpi.plots import plot_exec_log @@ -75,7 +80,7 @@ if within_ohmpi: k = OhmPi() # A, B, M, N = (32, 29, 31, 30) k.reset_mux() - k.test_mux(mux_id='mux_03') + k.test_mux_one_relay(mux_id='mux_03') # k._hw.switch_mux([A, B, M, N], state='on') # k._hw.vab_square_wave(12.,1., cycles=2) # k._hw.switch_mux([A, B, M, N], state='off') diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py index 60429ff864189c06fe1c7a30bc57d71f9b913ac9..1b1bdc6f9ab46765d8805a33c2c82aff15b73100 100644 --- a/ohmpi/hardware_system.py +++ b/ohmpi/hardware_system.py @@ -502,7 +502,7 @@ class OhmPiHardware: self.exec_logger.event(f'OhmPiHardware\tswitch_mux\tend\t{datetime.datetime.utcnow()}') return status - def test_mux(self, channel=None, activation_time=1.0): + def test_mux_one_relay(self, channel=None, activation_time=1.0): #TODO: is this needed at OhmpiHardware level? """Interactive method to test the multiplexer. Parameters diff --git a/ohmpi/ohmpi.py b/ohmpi/ohmpi.py index 36590e0891fffe4d855695819f199104e1e8e25d..3212666de1fa1928f1813b5a3a427d3e3b3a48ad 100644 --- a/ohmpi/ohmpi.py +++ b/ohmpi/ohmpi.py @@ -825,7 +825,7 @@ class OhmPi(object): """ self.reset_mux() # All mux boards should be reset even if we only want to test one otherwise we might create a shortcut if mux_id is None: - self._hw.test_mux(activation_time=activation_time) + self._hw.test_mux_one_relay(activation_time=activation_time) else: self._hw.mux_boards[mux_id].test(activation_time=activation_time)