Commit c31a451e authored by Guillaume Blanchy's avatar Guillaume Blanchy
Browse files

Fix typo _switchable + add ohmpi_settings.json

Showing with 10 additions and 9 deletions
+10 -9
......@@ -85,11 +85,11 @@ if within_ohmpi:
print('Starting test with OhmPi.')
k = OhmPi()
# k.get_data()
k.load_sequence(os.path.join(os.path.dirname(__file__), '../sequences/test_circuit_1423.txt'))
k.load_sequence(os.path.join(os.path.dirname(__file__), '../sequences/wenner.txt'))
k.reset_mux()
# k.run_multiple_sequences(sequence_delay=20, nb_meas=3)
# k.run_sequence(injection_duration=0.2)
k.rs_check(tx_volt=4)
k.run_sequence(injection_duration=0.2)
# k.rs_check(tx_volt=4)
# k.test_mux(mux_id=None, activation_time=0.2)
# k._hw.switch_mux([A, B, M, N], state='on')
# k._hw.vab_square_wave(12.,1., cycles=2)
......
......@@ -17,14 +17,15 @@ OHMPI_CONFIG = {
'settings': 'ohmpi_settings.json', # INSERT YOUR FAVORITE SETTINGS FILE HERE
}
r_shunt = 2.
HARDWARE_CONFIG = {
'ctl': {'model': 'raspberry_pi'},
'pwr': {'model': 'pwr_batt', 'voltage': 12., 'interface_name': 'none'},
'tx': {'model': 'mb_2023_0_X',
'voltage_max': 12., # Maximum voltage supported by the TX board [V]
'adc_voltage_max': 4800., # Maximum voltage read by the current ADC on the TX board [mA]
'r_shunt': 2., # Shunt resistance in Ohms
'interface_name': 'i2c',
'voltage_max': 50., # Maximum voltage supported by the TX board [V]
'current_max': 4.80/(50*r_shunt), # Maximum voltage read by the current ADC on the TX board [A]
'r_shunt': r_shunt, # Shunt resistance in Ohms
'interface_name': 'i2c'
},
'rx': {'model': 'mb_2023_0_X',
'coef_p2': 2.50, # slope for conversion for ADS, measurement in V/V
......
......@@ -423,7 +423,7 @@ class TxAbstract(ABC):
def pwr_state(self, state):
if state == 'on':
self._pwr_state = 'on'
if not self.pwr.switchable:
if not self.pwr._switchable:
self.exec_logger.debug(f'{self.model} cannot switch on power source')
self.pwr.reload_settings()
elif state == 'off':
......
{
"nb_electrodes": 64,
"nb_electrodes": 16,
"injection_duration": 0.2,
"nb_stack": 1,
"nb_meas": 1,
......
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