diff --git a/log/RCU2L00000000.log b/log/RCU2L00000000.log new file mode 100644 index 0000000000000000000000000000000000000000..007b3bf1c04efc3cc026b37cd7920e5a540963a0 --- /dev/null +++ b/log/RCU2L00000000.log @@ -0,0 +1,6 @@ +ID=00000000 +RCU Temperature=0.000 K +Value to small +ID=00000000 +RCU Temperature=0.000 K +Value to small diff --git a/log/RCU2L007ff943.log b/log/RCU2L007ff943.log new file mode 100644 index 0000000000000000000000000000000000000000..bfa1fec65dd3402265477a95d55d9c68c80d7751 --- /dev/null +++ b/log/RCU2L007ff943.log @@ -0,0 +1,48 @@ +ID=007ff943 +Time=2021-05-19 03:51 +RCU Temperature=333.028 K +3V3 =3.343 V +Switch RCU Power on + Check IO expander 1&2 +Check voltages + 1V8 =1.790 V + 2V5 =2.546 V + Vant_in=8.01 7.96 8.05 +Switch Antenna power on + Vant_out=7.96 7.98 7.98 + Iant_out=0.02 0.01 0.02 +Test ADC read + Check IO expander 3 + ADC JESD (0x14)=14 14 14 +Test ADC write + ADC sync (0x1)=1 1 1 +Test DITHER communication + Set frequency 150MHz + Readback frequency 150000000.000000 + Readback frequency 150000000.000000 + Readback frequency 150000000.000000 +** PASSED Power and Control test ** +ID=007ff943 +Time=2021-05-19 03:52 +RCU Temperature=333.028 K +3V3 =3.343 V +Switch RCU Power on + Check IO expander 1&2 +Check voltages + 1V8 =1.790 V + 2V5 =2.545 V + Vant_in=8.01 7.96 8.05 +Switch Antenna power on + Vant_out=7.96 7.98 7.98 + Iant_out=0.02 0.01 0.02 +Test ADC read + Check IO expander 3 + ADC JESD (0x14)=14 14 14 +Test ADC write + ADC sync (0x1)=1 1 1 +Test DITHER communication + Set frequency 150MHz + Readback frequency 150000000.000000 + Readback frequency 150000000.000000 + Readback frequency 150000000.000000 +** PASSED Power and Control test ** diff --git a/log/RCU2L00807fc6.log b/log/RCU2L00807fc6.log new file mode 100644 index 0000000000000000000000000000000000000000..7443674ae3abf42e6c3e3ce64a382680e1125ee4 --- /dev/null +++ b/log/RCU2L00807fc6.log @@ -0,0 +1,24 @@ +ID=00807fc6 +Time=2021-05-19 03:53 +RCU Temperature=335.992 K +3V3 =3.345 V +Switch RCU Power on + Check IO expander 1&2 +Check voltages + 1V8 =1.786 V + 2V5 =2.546 V + Vant_in=7.98 7.96 8.00 +Switch Antenna power on + Vant_out=7.98 7.94 7.95 + Iant_out=0.02 0.02 0.02 +Test ADC read + Check IO expander 3 + ADC JESD (0x14)=14 14 14 +Test ADC write + ADC sync (0x1)=1 1 1 +Test DITHER communication + Set frequency 150MHz + Readback frequency 150000000.000000 + Readback frequency 150000000.000000 + Readback frequency 150000000.000000 +** PASSED Power and Control test ** diff --git a/testRCUL.py b/testRCUL.py index d6457359410543fae4b2f9fd22fe16ab28c36321..56f5eec2f38f2811d71c8ae3b4f446b03f4e0ce1 100644 --- a/testRCUL.py +++ b/testRCUL.py @@ -1,3 +1,6 @@ +name='RECVTR' #YAML config file with all register values etc +logPath='log' + import logging import argparse from opcuaserv import opcuaserv @@ -11,30 +14,19 @@ import sys import signal from yamlconfig import Find; import yamlconfig as yc +from datetime import datetime +RCUNR=(3 if len(sys.argv)<1 else int(sys.argv[1])); +print("RCU NR=",RCUNR); logging.basicConfig(level="WARNING",format='%(asctime)s [%(levelname)-8s,%(filename)-20s:%(lineno)-3d] %(message)s') #logging.basicConfig(level="DEBUG",format='%(asctime)s [%(levelname)-8s,%(filename)-20s:%(lineno)-3d] %(message)s') RunTimer=True; -#def signal_handler(sig, frame): -# logging.warn('Stop signal received!') -# global RunTimer; -# RunTimer=False -#signal.signal(signal.SIGINT, signal_handler) - -#logging.info("Start I2C processes") -#threads=[] -#I2Cclients=[] -name='RECVTR' -#RCU_I2C=i2client.i2client(name=name) -RCUNR=1; conf=yc.yamlconfig(name) conf.linkdevices() conf.loaddrivers() conf.linkdrivers() -#def getRCU(D,N=1): -#return D[N*RCUNR:N*(RCUNR+1)] def GetVal(name,N=1): varid=conf.getvarid(name); @@ -48,10 +40,8 @@ def GetVal(name,N=1): data,var1=GetVal('RCU_ID'); -#print("ID= %h%h%h%h" % (,str([hex(d) for d in data[:4]])); ID=("%.2x%.2x%.2x%.2x" % (data[0],data[1],data[2],data[3])) -logPath='log' rootLogger = logging.getLogger() fileHandler = logging.FileHandler("{0}/{1}.log".format(logPath, "RCU2L"+ID)) @@ -59,6 +49,8 @@ fileHandler = logging.FileHandler("{0}/{1}.log".format(logPath, "RCU2L"+ID)) rootLogger.addHandler(fileHandler) logging.warning("ID=%s" % ID) +now=datetime.now(); +logging.warning("Time="+now.strftime("%Y-%m-%d %H:%M")); #exit(); #print("Check def Check(D,Dmin,Dmax): @@ -222,7 +214,7 @@ if True: if not Check([f2],f-1,f+1): exit(); # print([hex(h) for h in data[:30]]) -logging.warning("** I2C communication working **"); +logging.warning("** PASSED Power and Control test **"); #print(data) #scale=float(scale)