Node('muwaba.psi.ch',
     'multi waterbath',
     'tcp://5000',
     )

Mod('wio_1',
    'frappy_psi.thermofisher.ThermFishIO',
    'connection for water bath',
    uri='serial:///dev/ttyUSB0?baudrate=19200',                 # 3001 = Port 1, 3002 = Port 2 ...
    )

Mod('wio_2',
    'frappy_psi.thermofisher.ThermFishIO',
    'connection for water bath',
    uri='serial:///dev/ttyUSB1?baudrate=19200',                 # 3001 = Port 1, 3002 = Port 2 ...
    )

Mod('wio_3',
    'frappy_psi.thermofisher.ThermFishIO',
    'connection for water bath',
    uri='serial:///dev/ttyUSB2?baudrate=19200',                 # 3001 = Port 1, 3002 = Port 2 ...
    )

Mod('Tbath_1',
    'frappy_psi.thermofisher.TemperatureLoopA10',
    'water_bath_1',
    io='wio_1',
    control_active=0,
    target=25,
    tolerance=0.1,
    settling_time=20,
    )

Mod('Tbath_2',
    'frappy_psi.thermofisher.TemperatureLoopA10',
    'water_bath_2',
    io='wio_2',
    control_active=0,
    target=25,
    tolerance=0.1,
    settling_time=20,
    )

Mod('Tbath_3',
    'frappy_psi.thermofisher.TemperatureLoopA10',
    'water_bath_3',
    io='wio_3',
    control_active=0,
    target=25,
    tolerance=0.1,
    settling_time=20,
    )

Mod('valve_1',
    'frappy_psi.ionopimax.DigitalOutput',
    'valve_for_fast_water_temperature_changing',
    addr = 'o1',
    target = 0,  
   )

Mod('valve_2',
    'frappy_psi.ionopimax.DigitalOutput',
    'valve_for_fast_water_temperature_changing',
    addr = 'o2',
    target = 0, 
   )

Mod('valve_3',
    'frappy_psi.ionopimax.DigitalOutput',
    'valve_for_fast_water_temperature_changing',
    addr = 'o3',
    target = 0, 
   )

Mod('temp_sensor_tc',
    'frappy_psi.ionopimax.SimpleVoltageInput',
    'temperatur_sensor_sample',
    rawrange = (0.0, 10.0),
    valuerange = (5.0, 90.0),
    addr = 'ai1_mv',
    meaning = ['temperature', 20],
    value = Param(unit='degC'),
    )

Mod('temp_sensor_pt1000',
    'frappy_psi.ionopimax.SimpleVoltageInput',
    'temperatur_sensor_sample',
    rawrange = (0.0, 10.0),
    valuerange = (5.0, 90.0),
    value = Param(unit='degC'),
    addr = 'ai2_mv',
    )

Mod('switcher',
    'frappy_psi.muwaba.Switcher',
    'waterbath switcher',
    valve1 = 'valve_1',
    valve2 = 'valve_2',
    valve3 = 'valve_3',
    )
