Index: dialin/hd/calibration_record.py =================================================================== diff -u -r920d1a0826639951cd7f6cfa07b41dc175083043 -r117251d18835541ec1d8beb5b4fa3be08ccce83d --- dialin/hd/calibration_record.py (.../calibration_record.py) (revision 920d1a0826639951cd7f6cfa07b41dc175083043) +++ dialin/hd/calibration_record.py (.../calibration_record.py) (revision 117251d18835541ec1d8beb5b4fa3be08ccce83d) @@ -393,7 +393,7 @@ @return: temperature sensors hardware group dictionary and the byte size of this hardware group """ - hardware_names = ['onboard_ntc', 'power_supply_1', 'fpga_board', 'venous_pres', 'pba_adc', 'arterial_pres'] + hardware_names = ['onboard_ntc', 'power_supply_1', 'fpga_board', 'venous_pres', 'arterial_pres'] group_byte_size = 0 group_name = 'temperature_sensors' Index: dialin/hd/sw_configs.py =================================================================== diff -u -rcdafac785fe01096baa0cdc78285f97be8d499e0 -r117251d18835541ec1d8beb5b4fa3be08ccce83d --- dialin/hd/sw_configs.py (.../sw_configs.py) (revision cdafac785fe01096baa0cdc78285f97be8d499e0) +++ dialin/hd/sw_configs.py (.../sw_configs.py) (revision 117251d18835541ec1d8beb5b4fa3be08ccce83d) @@ -60,7 +60,7 @@ SW_CONFIG_DISABLE_DRY_SELF_TESTS = 25 SW_CONFIG_DISABLE_PRIMING = 26 SW_CONFIG_DISABLE_WET_SELF_TEST = 27 - SW_CONFIG_ENABLE_DVT_ARTERIAL_PRESSURE_SENSOR = 28 + SW_CONFIG_ENABLE_WET_SELF_TEST_WIDER_VOLUME_TOL = 28 SW_CONFIG_DISABLE_ULTRAFILTRATION_ALARMS = 29 SW_CONFIG_DISABLE_BUBBLE_ALARMS = 30 SW_CONFIG_DISABLE_ACCELEROMETERS = 31 Index: dialin/hd/temperatures.py =================================================================== diff -u -r88b4967ce6b9ac816ac21b26326450de4b540887 -r117251d18835541ec1d8beb5b4fa3be08ccce83d --- dialin/hd/temperatures.py (.../temperatures.py) (revision 88b4967ce6b9ac816ac21b26326450de4b540887) +++ dialin/hd/temperatures.py (.../temperatures.py) (revision 117251d18835541ec1d8beb5b4fa3be08ccce83d) @@ -34,8 +34,7 @@ THERMISTOR_POWER_SUPPLY_1 = 1 TEMPSENSOR_FPGA_BOARD = 2 TEMPSENSOR_VENOUS_PRESS_TEMP = 3 - TEMPSENSOR_PBA_ADC_SENSOR = 4 - TEMPSENSOR_ARTERIAL_PRESS_TEMP = 5 + TEMPSENSOR_ARTERIAL_PRESS_TEMP = 4 class HDTemperatures(AbstractSubSystem): @@ -63,7 +62,6 @@ HDTemperaturesNames.THERMISTOR_POWER_SUPPLY_1.name: 0.0, HDTemperaturesNames.TEMPSENSOR_FPGA_BOARD.name: 0.0, HDTemperaturesNames.TEMPSENSOR_VENOUS_PRESS_TEMP.name: 0.0, - HDTemperaturesNames.TEMPSENSOR_PBA_ADC_SENSOR.name: 0.0, HDTemperaturesNames.TEMPSENSOR_ARTERIAL_PRESS_TEMP.name: 0.0} def get_hd_temperatures_values(self) -> dict: @@ -90,16 +88,13 @@ message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3]))[0] venous_pressure_sensor_temp = struct.unpack('f', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_4:MsgFieldPositions.END_POS_FIELD_4]))[0] - pba_adc_sensor = struct.unpack('f', bytearray( - message['message'][MsgFieldPositions.START_POS_FIELD_5:MsgFieldPositions.END_POS_FIELD_5]))[0] arterial_sensor = struct.unpack('f', bytearray( - message['message'][MsgFieldPositions.START_POS_FIELD_6:MsgFieldPositions.END_POS_FIELD_6]))[0] + message['message'][MsgFieldPositions.START_POS_FIELD_5:MsgFieldPositions.END_POS_FIELD_5]))[0] self.hd_temperatures[HDTemperaturesNames.THERMISTOR_ONBOARD_NTC.name] = onboard_thermistor self.hd_temperatures[HDTemperaturesNames.THERMISTOR_POWER_SUPPLY_1.name] = power_supply_thermistor self.hd_temperatures[HDTemperaturesNames.TEMPSENSOR_FPGA_BOARD.name] = fpga_board_sensor self.hd_temperatures[HDTemperaturesNames.TEMPSENSOR_VENOUS_PRESS_TEMP.name] = venous_pressure_sensor_temp - self.hd_temperatures[HDTemperaturesNames.TEMPSENSOR_PBA_ADC_SENSOR.name] = pba_adc_sensor self.hd_temperatures[HDTemperaturesNames.TEMPSENSOR_ARTERIAL_PRESS_TEMP.name] = arterial_sensor def cmd_temperatures_value_override(self, sensor: int, value: float, reset: int = NO_RESET) -> int: Index: tests/dg_nvm_scripts.py =================================================================== diff -u -r6c9c54b00503ff8124ba864ec846d1866e58b8b7 -r117251d18835541ec1d8beb5b4fa3be08ccce83d --- tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision 6c9c54b00503ff8124ba864ec846d1866e58b8b7) +++ tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision 117251d18835541ec1d8beb5b4fa3be08ccce83d) @@ -27,12 +27,12 @@ # It creates a folder called DG_NV_Records in the destination that is called # If no address is provided, the default location is one folder above the dialin folder wherever it is installed # in your computer. - #dg.sw_configs.cmd_get_dg_sw_config_record() + dg.sw_configs.cmd_get_dg_sw_config_record() # Use cmd_set_dg_sw_config_record() set the changes back to firmware # This function requires an address for the excel report. Use the absolute address of your excel report like the # example below - dg.sw_configs.cmd_update_dg_sw_config_record('/home/fw/projects/DG_NV_Records/2022-07-16-DG-SW-CONFIGS-Record.xlsx') + #dg.sw_configs.cmd_update_dg_sw_config_record('/home/fw/projects/DG_NV_Records/2022-07-16-DG-SW-CONFIGS-Record.xlsx') # Use this function to reset the configuration records to all be 0 #dg.sw_configs.cmd_reset_dg_sw_config_record() Index: tests/dg_tests.py =================================================================== diff -u -r920d1a0826639951cd7f6cfa07b41dc175083043 -r117251d18835541ec1d8beb5b4fa3be08ccce83d --- tests/dg_tests.py (.../dg_tests.py) (revision 920d1a0826639951cd7f6cfa07b41dc175083043) +++ tests/dg_tests.py (.../dg_tests.py) (revision 117251d18835541ec1d8beb5b4fa3be08ccce83d) @@ -42,6 +42,7 @@ from dialin.dg.conductivity_sensors import ConductivitySensorsEnum from dialin.dg.voltages import DGMonitoredVoltages from dialin.hd.valves import HDValves +from dialin.hd.voltages import HDMonitoredVoltages from dialin.hd.pretreatment import PreTreatmentRsrvrState from time import sleep from datetime import datetime @@ -241,13 +242,12 @@ def get_hd_fans_info(): info = ('HD_Fan_DC, {:5.3f}, Target_HD_RPM, {:5.3f}, Inlet1_RPM, {:5.3f}, HD_Board_temp, {:5.3f}, ' - 'HD_Power_supply, {:5.3f}, HD_FPGA_temp, {:5.3f}, PBA_ADC_temp, {:5.3f}, Venous_temp, {:5.3f}, ' + 'HD_Power_supply, {:5.3f}, HD_FPGA_temp, {:5.3f}, Venous_temp, {:5.3f}, ' 'Arterial_temp, {:5.3f}, RPM_time_offset, {}, ' .format(hd.fans.duty_cycle, hd.fans.target_rpm, hd.fans.inlet_1_rpm, hd.temperatures.hd_temperatures[HDTemperaturesNames.THERMISTOR_ONBOARD_NTC.name], hd.temperatures.hd_temperatures[HDTemperaturesNames.THERMISTOR_POWER_SUPPLY_1.name], hd.temperatures.hd_temperatures[HDTemperaturesNames.TEMPSENSOR_FPGA_BOARD.name], - hd.temperatures.hd_temperatures[HDTemperaturesNames.TEMPSENSOR_PBA_ADC_SENSOR.name], hd.temperatures.hd_temperatures[HDTemperaturesNames.TEMPSENSOR_VENOUS_PRESS_TEMP.name], hd.temperatures.hd_temperatures[HDTemperaturesNames.TEMPSENSOR_ARTERIAL_PRESS_TEMP.name], hd.fans.rpm_alarm_time)) @@ -290,9 +290,11 @@ def get_hd_pumps_info(): - info = ('DialIn_tgt_flow, {}, DialIn_meas_flow, {:5.3f}, ' + info = ('DialIn_tgt_flow, {}, DialIn_meas_flow, {:5.3f}, DialIn_current, {:5.3f}, DialOut_current, {:5.3f}, ' .format(hd.dialysate_inlet_flow.target_dialysate_inlet_flow_rate, - hd.dialysate_inlet_flow.measured_dialysate_inlet_flow_rate)) + hd.dialysate_inlet_flow.measured_dialysate_inlet_flow_rate, + hd.dialysate_inlet_flow.measured_dialysate_inlet_pump_mc_current, + hd.dialysate_outlet_flow.measured_dialysate_outlet_pump_mc_current)) return info @@ -311,6 +313,12 @@ return info +def get_voltages_info(): + info = ('HD_24, {:5.3f}, HD_24_regen, {:5.3f}, '. + format(hd.voltages.monitored_voltages[HDMonitoredVoltages.MONITORED_LINE_24V.value], + hd.voltages.monitored_voltages[HDMonitoredVoltages.MONITORED_LINE_24V_REGEN.value])) + return info + def run_dg(): counter = 1 timer = 0.1 @@ -447,13 +455,22 @@ #hd.cmd_hd_software_reset_request() + hd.dialysate_inlet_flow.cmd_dialysate_inlet_flow_broadcast_interval_override(50) + sleep(1) + hd.dialysate_outlet_flow.cmd_dialysate_outlet_flow_broadcast_interval_override(50) + sleep(1) + hd.voltages.cmd_monitored_voltages_broadcast_interval_override(50) + try: while True: - sleep(1) + hd_run = get_hd_run_info() + pumps_info = get_hd_pumps_info() + voltages = get_voltages_info() + var = hd_run + pumps_info + voltages + '\r' + print(var) + f.write(var) + sleep(0.05) except KeyboardInterrupt: - events = hd.hd_events.get_hd_events(2, 0) - for event in events: - print(event) f.close() @@ -651,7 +668,7 @@ #run_heat_disinfect() - # run_chemical_disinfect() + run_chemical_disinfect() #run_dg() @@ -673,12 +690,10 @@ #test_dvt_drain_pump() - test_conc_pumps() + #test_conc_pumps() #ui = HDSimulator() #ui.cmd_send_hd_operation_mode(3, 1) #test_hd_valves() - - Index: tests/hd_nvm_scripts.py =================================================================== diff -u -r920d1a0826639951cd7f6cfa07b41dc175083043 -r117251d18835541ec1d8beb5b4fa3be08ccce83d --- tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision 920d1a0826639951cd7f6cfa07b41dc175083043) +++ tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision 117251d18835541ec1d8beb5b4fa3be08ccce83d) @@ -33,7 +33,7 @@ # Use cmd_update_hd_sw_config_record() set the changes back to firmware # This function requires an address for the excel report. Use the absolute address of your excel report like the # example below - hd.sw_configs.cmd_update_hd_sw_config_record('/home/fw/projects/HD_NV_Records/2022-06-07-HD-SW-CONFIGS-Record.xlsx') + hd.sw_configs.cmd_update_hd_sw_config_record('/home/fw/projects/HD_NV_Records/2022-07-25-HD-SW-CONFIGS-Record.xlsx') # Use this function to reset the configuration records to all be 0 #hd.sw_configs.cmd_reset_hd_sw_config_record() @@ -68,8 +68,8 @@ if hd.cmd_log_in_to_hd(): # Comment this function if not needed - #run_sw_configs_commands() + run_sw_configs_commands() # Comment this function if not needed - run_calibration_commands() + #run_calibration_commands()