import sys sys.path.append("..") from dialin.dg.dialysate_generator import DG from dialin.dg.hd_proxy import DGHDProxy from time import sleep if __name__ == "__main__": dg = DG() dg.cmd_log_in_to_dg() #dg.drain_pump.cmd_drain_pump_speed_set_point_override(2800) #dg.valves.cmd_valve_override(0, dg.valves.VALVE_PRESSURE_OUTLET ) sleep(1) #dg.valves.cmd_valve_override(0, dg.valves.VALVE_RESERVOIR_OUTLET) #dg.valves.cmd_valve_override(1, dg.valves.VALVE_RESERVOIR_INLET) dg.hd_proxy.cmd_stop_heat_disinfection() sleep(3) dg.hd_proxy.cmd_start_heat_disinfection() while True: print('Flow, {:5.3f}, PWM, {:5.3f}, TgtPres, {:5.3f}, MeaPres, {:5.3f}, State, {}, Mode, {}, Sub, {} RPM, {}'.format(dg.ro_pump.measured_flow_rate_lpm, dg.ro_pump.pwm_duty_cycle_pct, dg.ro_pump.target_pressure_psi, dg.pressures.ro_pump_outlet_pressure, dg.ro_pump.ro_pump_state, dg.dg_operation_mode, dg.dg_operation_sub_mode, dg.drain_pump.target_drain_pump_speed_RPM)) sleep(0.25)