Skip to content
Snippets Groups Projects
Commit b1452b5e authored by Paulus Kruger's avatar Paulus Kruger
Browse files

RCU2L test script update

parent 0bb96271
No related branches found
No related tags found
No related merge requests found
ID=00000000
RCU Temperature=0.000 K
Value to small
ID=00000000
RCU Temperature=0.000 K
Value to small
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 **
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 **
name='RECVTR' #YAML config file with all register values etc
logPath='log'
import logging import logging
import argparse import argparse
from opcuaserv import opcuaserv from opcuaserv import opcuaserv
...@@ -11,30 +14,19 @@ import sys ...@@ -11,30 +14,19 @@ import sys
import signal import signal
from yamlconfig import Find; from yamlconfig import Find;
import yamlconfig as yc 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="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') #logging.basicConfig(level="DEBUG",format='%(asctime)s [%(levelname)-8s,%(filename)-20s:%(lineno)-3d] %(message)s')
RunTimer=True; 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=yc.yamlconfig(name)
conf.linkdevices() conf.linkdevices()
conf.loaddrivers() conf.loaddrivers()
conf.linkdrivers() conf.linkdrivers()
#def getRCU(D,N=1):
#return D[N*RCUNR:N*(RCUNR+1)]
def GetVal(name,N=1): def GetVal(name,N=1):
varid=conf.getvarid(name); varid=conf.getvarid(name);
...@@ -48,10 +40,8 @@ def GetVal(name,N=1): ...@@ -48,10 +40,8 @@ def GetVal(name,N=1):
data,var1=GetVal('RCU_ID'); 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])) ID=("%.2x%.2x%.2x%.2x" % (data[0],data[1],data[2],data[3]))
logPath='log'
rootLogger = logging.getLogger() rootLogger = logging.getLogger()
fileHandler = logging.FileHandler("{0}/{1}.log".format(logPath, "RCU2L"+ID)) fileHandler = logging.FileHandler("{0}/{1}.log".format(logPath, "RCU2L"+ID))
...@@ -59,6 +49,8 @@ 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) rootLogger.addHandler(fileHandler)
logging.warning("ID=%s" % ID) logging.warning("ID=%s" % ID)
now=datetime.now();
logging.warning("Time="+now.strftime("%Y-%m-%d %H:%M"));
#exit(); #exit();
#print("Check #print("Check
def Check(D,Dmin,Dmax): def Check(D,Dmin,Dmax):
...@@ -222,7 +214,7 @@ if True: ...@@ -222,7 +214,7 @@ if True:
if not Check([f2],f-1,f+1): exit(); if not Check([f2],f-1,f+1): exit();
# print([hex(h) for h in data[:30]]) # print([hex(h) for h in data[:30]])
logging.warning("** I2C communication working **"); logging.warning("** PASSED Power and Control test **");
#print(data) #print(data)
#scale=float(scale) #scale=float(scale)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment