Index: dialin/dg/hd_proxy.py =================================================================== diff -u -rcea384a65cd9f07a347924eb760c012f3520d874 -r6b97d90c9c2b662d3cb4e7826ab9f91c56de0a9a --- dialin/dg/hd_proxy.py (.../hd_proxy.py) (revision cea384a65cd9f07a347924eb760c012f3520d874) +++ dialin/dg/hd_proxy.py (.../hd_proxy.py) (revision 6b97d90c9c2b662d3cb4e7826ab9f91c56de0a9a) @@ -105,7 +105,7 @@ self.logger.debug("Timeout!!!!") return False - def cmd_drain(self, volume:int=200, tare_load_cell:bool=False) -> int: + def cmd_drain(self, volume:int=0, tare_load_cell:bool=False) -> int: """ Constructs and sends the drain command. Constraints: Index: tests/dg_heat_and_chemical_disinfect_test.py =================================================================== diff -u -rbaa70892bff2030d325d472c58129915872e3755 -r6b97d90c9c2b662d3cb4e7826ab9f91c56de0a9a --- tests/dg_heat_and_chemical_disinfect_test.py (.../dg_heat_and_chemical_disinfect_test.py) (revision baa70892bff2030d325d472c58129915872e3755) +++ tests/dg_heat_and_chemical_disinfect_test.py (.../dg_heat_and_chemical_disinfect_test.py) (revision 6b97d90c9c2b662d3cb4e7826ab9f91c56de0a9a) @@ -155,6 +155,7 @@ counter = 1 timer = 1 sleep_time = 1 + run_number = 1 f = open("/home/fw/projects/dialin/tests/run_dg.log", "w") """ @@ -183,20 +184,24 @@ ro = get_ro_info() valves = get_dg_valves_states() - var = str(timer) + ', ' + str(counter) + ', ' + dg_run + temperature + heaters + load_cell + drain + ro + \ - valves + '\r' + var = str(run_number) + ', ' + str(timer) + ', ' + dg_run + temperature + heaters + load_cell + drain + \ + ro + valves + '\r' print(var) f.write(var) tpo = dg.temperature_sensors.temperature_sensors[TemperatureSensorsNames.OUTLET_PRIMARY_HEATER.name] - if DGOperationModes(dg.dg_operation_mode).name == DGOperationModes.DG_OP_MODE_RECIRCULATE.name and\ + if run_number > 3 and dg.dg_operation_sub_mode == 2: + dg.hd_proxy.cmd_start_stop_dg(start=False) + f.close() + break + + elif DGOperationModes(dg.dg_operation_mode).name == DGOperationModes.DG_OP_MODE_RECIRCULATE.name and\ dg.dg_operation_sub_mode == 2 and counter == 1: if timer == 1: dg.hd_proxy.cmd_switch_reservoirs(reservoirID=1) - timer += 1 if timer > ((1/sleep_time) * 10): @@ -210,13 +215,18 @@ timer = 1 elif DGOperationModes(dg.dg_operation_mode).name == DGOperationModes.DG_OP_MODE_RECIRCULATE.name and\ - dg.dg_operation_sub_mode == 2 and counter == 3 and tpo > 39.0: + dg.dg_operation_sub_mode == 2 and counter == 3: #and tpo > 39.0: timer += 1 if timer > 4: dg.hd_proxy.cmd_fill(volume=1700) counter += 1 + elif DGOperationModes(dg.dg_operation_mode).name == DGOperationModes.DG_OP_MODE_RECIRCULATE.name and\ + dg.dg_operation_sub_mode == 2 and counter == 4: + counter = 1 + run_number += 1 + sleep(sleep_time) except KeyboardInterrupt: @@ -308,6 +318,13 @@ f.close() +def cmd_set_disinfect_ui_screen(): + + hd = HD() + sleep(0.5) + hd.ui.cmd_ui_set_standby_submode_to_disinfect() + + if __name__ == "__main__": dg = DG(log_level='DEBUG') @@ -320,9 +337,9 @@ #run_dg() - #hd = HD() - #sleep(1) - #hd.ui.cmd_ui_set_standby_submode_to_disinfect() + cmd_set_disinfect_ui_screen() + #dg.valves.cmd_valve_override(9,0) +