From cd61ff342cfa668518fa44a4a020bd2ab6aed9c7 Mon Sep 17 00:00:00 2001 From: Gijs Schoonderbeek <schoonderbeek@astron.nl> Date: Fri, 25 Mar 2022 14:42:56 +0100 Subject: [PATCH] Added small script to quick and dirty check UNB2 HW sensor values --- check_UNB_sens.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 check_UNB_sens.py diff --git a/check_UNB_sens.py b/check_UNB_sens.py new file mode 100644 index 0000000..07925a3 --- /dev/null +++ b/check_UNB_sens.py @@ -0,0 +1,26 @@ +""" Script for testing I2C monitor sensors + +""" + +from test_common import * +from time import sleep +connect("opc.tcp://10.87.6.89:4841/") + +#POLS=["UNB2_POL_SWITCH_PHY","UNB2_POL_SWITCH_1V2", "UNB2_FPGA_POL_CORE"] +POLS=["UNB2_FPGA_POL_CORE", "UNB2_FPGA_POL_ERAM", "UNB2_FPGA_POL_RXGXB", "UNB2_FPGA_POL_TXGXB" , "UNB2_FPGA_POL_HGXB", "UNB2_FPGA_POL_PGM", "UNB2_DC_DC_48V_12V", "UNB2_POL_QSFP_N01", "UNB2_POL_QSFP_N23", "UNB2_POL_SWITCH_1V2", "UNB2_POL_SWITCH_PHY" , "UNB2_POL_CLOCK"] +POINTS = ["VOUT", "IOUT", "TEMP"] + +def check_values(values_array, atteribute_to_get): + for check_value in values_array : + if check_value > 50: + stri = "Error in {} {}".format(atteribute_to_get, check_value) + print(stri) + +for loops in range(350): + print(loops) + for sens_cnt in range(len(POLS)*len(POINTS)): + atteribute_to_get = POLS[int(sens_cnt/3)] + "_" + POINTS[sens_cnt%3] + "_R" + ret_value = get_value(atteribute_to_get) + check_values(ret_value, atteribute_to_get) + sleep(5) +print("done") -- GitLab