diff --git a/dev/test_3_mux_2024.py b/dev/test_3_mux_2024.py index a6430ec5236e2e02fb5fd7e5bd3a18e982a4d729..3a37145318b919eef0a716f2e59063ed926bb5b9 100644 --- a/dev/test_3_mux_2024.py +++ b/dev/test_3_mux_2024.py @@ -47,28 +47,27 @@ if within_ohmpi: from ohmpi.ohmpi import OhmPi print('Starting test of mux within OhmPi.') k = OhmPi() - A, B, M, N = (32, 29, 31, 30) + #A, B, M, N = (32, 29, 31, 30) k.reset_mux() - k._hw.switch_mux([A, B, M, N], state='on') - k._hw.vab_square_wave(12.,12., cycles=2) - k._hw.switch_mux([A, B, M, N], state='off') - k._hw.calibrate_rx_bias() # electrodes 1 4 2 3 should be connected to a reference circuit + #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') + #k._hw.calibrate_rx_bias() # electrodes 1 4 2 3 should be connected to a reference circuit #k._hw.rx._bias = -1.38 - print(f'Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV') + #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() A, B, M, N = (28, 25, 27, 26) - k._hw.switch_mux([A, B, M, N], state='on') - k._hw.vab_square_wave(12., cycle_duration=1., cycles=3) - k._hw.switch_mux([A, B, M, N], state='off') - print(f'OhmPiHardware 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([A, B, M, N], state='on') + # k._hw.vab_square_wave(12., cycle_duration=10., cycles=3) + # k._hw.switch_mux([A, B, M, N], state='off') + # print(f'OhmPiHardware 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() print('using OhmPi') - d = k.run_measurement([A, B, M, N], injection_duration=.5, nb_stack=3) + d = k.run_measurement([A, B, M, N], injection_duration=1., nb_stack=2, duty_cycle=0.5) print(d) - # k._hw._plot_readings() + #k._hw._plot_readings() print(f'OhmPiHardware: Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, sp: {k._hw.sp:.2f} mV, rx bias: {k._hw.rx._bias:.2f} mV') print(f'OhmPi: Resistance: {d["R [ohm]"] :.2f} ohm, dev. {d["R_std [%]"]:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV') k._hw._plot_readings(save_fig=False) # plot_exec_log('ohmpi/logs/exec.log') -change_config('../configs/config_default.py', verbose=False) - +change_config('../configs/config_default.py', verbose=False) \ No newline at end of file