Index: tests/test_conductivity.py =================================================================== diff -u -rda38ea23e487b717e2671fdfc06af915dfc17929 -r32e628abcbbd3fd70866505d9f2836a6f732ef06 --- tests/test_conductivity.py (.../test_conductivity.py) (revision da38ea23e487b717e2671fdfc06af915dfc17929) +++ tests/test_conductivity.py (.../test_conductivity.py) (revision 32e628abcbbd3fd70866505d9f2836a6f732ef06) @@ -1,10 +1,26 @@ +########################################################################### +# +# Copyright (c) 2022-2024 Diality Inc. - All Rights Reserved. +# +# THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN +# WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. +# +# @file test_conductivity.py +# +# @author (last) Hung Nguyen +# @date (last) 30-Mar-2022 +# @author (original) Hung Nguyen +# @date (original) 08-Mar-2022 +# +############################################################################ import sys import time from datetime import datetime from dialin.dg.dialysate_generator import DG import os import csv + directory = 'DG Cond' file_name = 'Test 1' notes = 'None' @@ -15,9 +31,9 @@ if not os.path.isdir(cwd + f'/{directory}'): os.mkdir(cwd + f'/{directory}') + current_time = datetime.now().strftime('%b-%d-%Y %H-%M-%S') result_file_name = f'{directory}/{file_name} - {current_time}.csv' - dg = DG() if dg.cmd_log_in_to_dg() == 0: sys.exit('Unable to login into DG') @@ -42,14 +58,16 @@ cd2_raw = cond_data[7] # Temperature + # dg.temperatures.cmd_temperatures_value_override(0, 38.0) tpi = dg.temperatures.get_temperatures_values(0) tpo = dg.temperatures.get_temperatures_values(2) td1 = dg.temperatures.get_temperatures_values(3) td2 = dg.temperatures.get_temperatures_values(4) # DG Op modes dg_mode = dg.get_operation_mode() - dg_sub_mode = dg.dg_operation_sub_mode() + dg_sub_mode = dg.get_operation_sub_mode() + dg_sub_sub_mode = dg.gen_idle.get_sub_state() # log the gen idle bad fill sub-states # flows fmp = dg.ro_pump.get_measured_flow_rate() @@ -72,8 +90,10 @@ lc_b1 = dg.load_cells.load_cell_B1 lc_b2 = dg.load_cells.load_cell_B2 + # f'DG SubMode, {dg_sub_mode}, ' \ data_string = f'DG Mode, {dg_mode}, ' \ - f'DG SubMode, {dg_sub_mode}, ' \ + f'SubMode, {dg_sub_mode}, ' \ + f'SubSubMode, {dg_sub_sub_mode}, ' \ f'CPi, {cpi:.4f}, ' \ f'CPo, {cpo:.4f}, ' \ f'CD1, {cd1:.4f}, ' \