Index: tests/dg_heat_and_chemical_disinfect_test.py =================================================================== diff -u -rf0c77deb1d6f38f6bedb5ced326cdc85715fe15f -r7fa5f37e738a58e4e6a784bcd3e638c06a6d0b9e --- tests/dg_heat_and_chemical_disinfect_test.py (.../dg_heat_and_chemical_disinfect_test.py) (revision f0c77deb1d6f38f6bedb5ced326cdc85715fe15f) +++ tests/dg_heat_and_chemical_disinfect_test.py (.../dg_heat_and_chemical_disinfect_test.py) (revision 7fa5f37e738a58e4e6a784bcd3e638c06a6d0b9e) @@ -149,10 +149,18 @@ counter = 1 f = open("/home/fw/projects/dialin/tests/run_dg.log", "w") + + dg.valves.cmd_valve_broadcast_interval_override(50) + sleep(0.25) + dg.pressures.cmd_pressure_broadcast_interval_override(50) + sleep(0.25) + dg.drain_pump.cmd_drain_pump_data_broadcast_interval_override(50) + sleep(0.25) + dg.hd_proxy.cmd_start_stop_dg() sleep(0.1) - dg.hd_proxy.cmd_switch_reservoirs(reservoirID=0) - sleep(0.1) + #dg.hd_proxy.cmd_switch_reservoirs(reservoirID=0) + #sleep(0.1) try: while True: @@ -169,38 +177,28 @@ f.write(var) if DGOperationModes(dg.dg_operation_mode).name == DGOperationModes.DG_OP_MODE_RECIRCULATE.name and\ - dg.dg_operation_sub_mode == 2: - - if counter == 1: - dg.valves.cmd_valve_override(VDrVRcStates.VALVE_STATE_RECIRC_C_TO_NC.value, dg.valves.VALVE_DRAIN) - - if counter == 5: - dg.valves.cmd_valve_override(VDrVRcStates.VALVE_STATE_DRAIN_C_TO_NO.value, dg.valves.VALVE_DRAIN) - dg.valves.cmd_valve_override(VPiVSPVBfVRD1VRD2States.VALVE_STATE_OPEN.value, - dg.valves.VALVE_RESERVOIR_DRAIN_1) - - if counter == 6: - - dg.drain_pump.cmd_drain_pump_speed_set_point_override(2100) - + dg.dg_operation_sub_mode == 2 and counter == 1: + dg.hd_proxy.cmd_switch_reservoirs(reservoirID=0) + sleep(2) counter += 1 - """" if DGOperationModes(dg.dg_operation_mode).name == DGOperationModes.DG_OP_MODE_RECIRCULATE.name and\ dg.dg_operation_sub_mode == 2 and counter == 2: - dg.hd_proxy.cmd_fill(volume=1700) + dg.hd_proxy.cmd_drain(tare_load_cell=True) counter += 1 sleep(0.15) if DGOperationModes(dg.dg_operation_mode).name == DGOperationModes.DG_OP_MODE_RECIRCULATE.name and\ dg.dg_operation_sub_mode == 2 and counter == 3: + dg.hd_proxy.cmd_fill(volume=1900) #dg.hd_proxy.cmd_switch_reservoirs(reservoirID=0) - dg.hd_proxy.cmd_drain(volume=50) + #sleep(10) + #dg.hd_proxy.cmd_drain() counter += 1 - sleep(0.15) - """ - sleep(1) + #sleep(0.15) + sleep(0.05) + except KeyboardInterrupt: dg.hd_proxy.cmd_start_stop_dg(start=False) f.close() @@ -275,11 +273,9 @@ # If the mode came back to standby or standby solo if dg.dg_operation_mode == 3 or dg.dg_operation_mode == 4: - # If it is the first call, stop heat disinfect - if complete_counter == 1: - dg.hd_proxy.cmd_start_stop_dg_chemical_disinfect(start=False) + # Write a few more complete states to make sure the complete state items are recorded - elif complete_counter == 3: + if complete_counter == 3: #pass f.close() break