import sys sys.path.append("..") from dialin.hd.constants import RESET, NO_RESET from dialin.hd.hemodialysis_device import HD from time import sleep if __name__ == "__main__": # Create an instance of the DG Class hd = HD() if hd.cmd_log_in_to_hd() == 0: exit(1) valves = hd.valves valves.cmd_home_hd_valve(1) while True: print("Valve, {}, State, {}, Curr_Pos_ID, {}, Prev_Pos_Cnt, {}, Curr_Pos_Cnt {}, Next_Pos_Cnt {}, Current, {}" .format(valves.hd_valve_ID, valves.hd_valve_state, valves.hd_valve_curr_pos_ID, valves.hd_valve_prev_pos_cnt, valves.hd_valve_curr_pos_cnt, valves.hd_valve_next_pos_cnt, valves.hd_valve_current)) sleep(0.1)