Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyPCC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
PyPCC
Commits
b1452b5e
Commit
b1452b5e
authored
4 years ago
by
Paulus Kruger
Browse files
Options
Downloads
Patches
Plain Diff
RCU2L test script update
parent
0bb96271
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
log/RCU2L00000000.log
+6
-0
6 additions, 0 deletions
log/RCU2L00000000.log
log/RCU2L007ff943.log
+48
-0
48 additions, 0 deletions
log/RCU2L007ff943.log
log/RCU2L00807fc6.log
+24
-0
24 additions, 0 deletions
log/RCU2L00807fc6.log
testRCUL.py
+9
-17
9 additions, 17 deletions
testRCUL.py
with
87 additions
and
17 deletions
log/RCU2L00000000.log
0 → 100644
+
6
−
0
View file @
b1452b5e
ID=00000000
RCU Temperature=0.000 K
Value to small
ID=00000000
RCU Temperature=0.000 K
Value to small
This diff is collapsed.
Click to expand it.
log/RCU2L007ff943.log
0 → 100644
+
48
−
0
View file @
b1452b5e
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 **
This diff is collapsed.
Click to expand it.
log/RCU2L00807fc6.log
0 → 100644
+
24
−
0
View file @
b1452b5e
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 **
This diff is collapsed.
Click to expand it.
testRCUL.py
+
9
−
17
View file @
b1452b5e
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)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment