Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open 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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
03c239ca
Commit
03c239ca
authored
3 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-358
: Move clock initialisation to APSCT, updated method stubs.
parent
c106a1da
No related branches found
No related tags found
1 merge request
!157
L2SS-358: Get ready for Darkrai
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
devices/clients/opcua_client.py
+2
-0
2 additions, 0 deletions
devices/clients/opcua_client.py
devices/devices/apsct.py
+50
-0
50 additions, 0 deletions
devices/devices/apsct.py
devices/devices/recv.py
+4
-46
4 additions, 46 deletions
devices/devices/recv.py
with
56 additions
and
46 deletions
devices/clients/opcua_client.py
+
2
−
0
View file @
03c239ca
...
@@ -166,6 +166,8 @@ class OPCUAConnection(AsyncCommClient):
...
@@ -166,6 +166,8 @@ class OPCUAConnection(AsyncCommClient):
def
call_method
(
self
,
method_path
,
*
args
):
def
call_method
(
self
,
method_path
,
*
args
):
method_path
=
self
.
get_node_path
(
method_path
)
raise
NotImplementedError
raise
NotImplementedError
...
...
This diff is collapsed.
Click to expand it.
devices/devices/apsct.py
+
50
−
0
View file @
03c239ca
...
@@ -71,11 +71,61 @@ class APSCT(opcua_device):
...
@@ -71,11 +71,61 @@ class APSCT(opcua_device):
# overloaded functions
# overloaded functions
# --------
# --------
def
_initialise_hardware
(
self
):
"""
Initialise the APSCT hardware.
"""
# method calls don't work yet, so don't use them to allow the boot
# device to initialise us without errors
logger
.
error
(
"
OPC-UA methods not supported yet, not initialising APSCT hardware!
"
)
return
# Cycle clock
self
.
CLK_off
()
self
.
wait_attribute
(
"
APSCTTR_translator_busy_R
"
,
False
,
10
)
self
.
CLK_on
()
self
.
wait_attribute
(
"
APSCTTR_translator_busy_R
"
,
False
,
10
)
if
not
self
.
APSCT_PLL_200MHz_locked_R
:
if
self
.
APSCT_I2C_error_R
:
raise
Exception
(
"
I2C is not working. Maybe power cycle subrack to restart CLK board and translator?
"
)
else
:
raise
Exception
(
"
200MHz signal is not locked. The subrack probably do not receive clock input or the CLK PCB is broken?
"
)
# --------
# --------
# Commands
# Commands
# --------
# --------
@command
()
@DebugIt
()
@only_when_on
()
def
CLK_off
(
self
):
"""
:return:None
"""
self
.
opcua_connection
.
call_method
([
"
CLK_off
"
])
@command
()
@DebugIt
()
@only_when_on
()
def
CLK_on
(
self
):
"""
:return:None
"""
self
.
opcua_connection
.
call_method
([
"
CLK_on
"
])
@command
()
@DebugIt
()
@only_when_on
()
def
CLK_PLL_setup
(
self
):
"""
:return:None
"""
self
.
opcua_connection
.
call_method
([
"
CLK_PLL_setup
"
])
# ----------
# ----------
# Run server
# Run server
# ----------
# ----------
...
...
This diff is collapsed.
Click to expand it.
devices/devices/recv.py
+
4
−
46
View file @
03c239ca
...
@@ -117,7 +117,7 @@ class RECV(opcua_device):
...
@@ -117,7 +117,7 @@ class RECV(opcua_device):
:return:None
:return:None
"""
"""
self
.
opcua_connection
.
call_method
([
"
2:PCC
"
,
"
2:
RCU_off
"
])
self
.
opcua_connection
.
call_method
([
"
RCU_off
"
])
@command
()
@command
()
@DebugIt
()
@DebugIt
()
...
@@ -127,7 +127,7 @@ class RECV(opcua_device):
...
@@ -127,7 +127,7 @@ class RECV(opcua_device):
:return:None
:return:None
"""
"""
self
.
opcua_connection
.
call_method
([
"
2:PCC
"
,
"
2:
RCU_on
"
])
self
.
opcua_connection
.
call_method
([
"
RCU_on
"
])
@command
()
@command
()
@DebugIt
()
@DebugIt
()
...
@@ -137,7 +137,7 @@ class RECV(opcua_device):
...
@@ -137,7 +137,7 @@ class RECV(opcua_device):
:return:None
:return:None
"""
"""
self
.
opcua_connection
.
call_method
([
"
2:PCC
"
,
"
2:
ADC_on
"
])
self
.
opcua_connection
.
call_method
([
"
ADC_on
"
])
@command
()
@command
()
@DebugIt
()
@DebugIt
()
...
@@ -147,37 +147,7 @@ class RECV(opcua_device):
...
@@ -147,37 +147,7 @@ class RECV(opcua_device):
:return:None
:return:None
"""
"""
self
.
opcua_connection
.
call_method
([
"
2:PCC
"
,
"
2:RCU_update
"
])
self
.
opcua_connection
.
call_method
([
"
RCU_update
"
])
@command
()
@DebugIt
()
@only_when_on
()
def
CLK_off
(
self
):
"""
:return:None
"""
self
.
opcua_connection
.
call_method
([
"
2:PCC
"
,
"
2:CLK_off
"
])
@command
()
@DebugIt
()
@only_when_on
()
def
CLK_on
(
self
):
"""
:return:None
"""
self
.
opcua_connection
.
call_method
([
"
2:PCC
"
,
"
2:CLK_on
"
])
@command
()
@DebugIt
()
@only_when_on
()
def
CLK_PLL_setup
(
self
):
"""
:return:None
"""
self
.
opcua_connection
.
call_method
([
"
2:PCC
"
,
"
2:CLK_PLL_setup
"
])
def
_initialise_hardware
(
self
):
def
_initialise_hardware
(
self
):
"""
Initialise the RCU hardware.
"""
"""
Initialise the RCU hardware.
"""
...
@@ -187,18 +157,6 @@ class RECV(opcua_device):
...
@@ -187,18 +157,6 @@ class RECV(opcua_device):
logger
.
error
(
"
OPC-UA methods not supported yet, not initialising RCU hardware!
"
)
logger
.
error
(
"
OPC-UA methods not supported yet, not initialising RCU hardware!
"
)
return
return
# Cycle clock
self
.
CLK_off
()
self
.
wait_attribute
(
"
CLK_translator_busy_R
"
,
False
,
10
)
self
.
CLK_on
()
self
.
wait_attribute
(
"
CLK_translator_busy_R
"
,
False
,
10
)
if
not
self
.
CLK_PLL_locked_R
:
if
self
.
CLK_I2C_STATUS_R
>
0
:
raise
Exception
(
"
CLK I2C is not working. Maybe power cycle subrack to restart CLK board and translator?
"
)
else
:
raise
Exception
(
"
CLK signal is not locked. The subrack probably do not receive clock input or the CLK PCB is broken?
"
)
# Cycle RCUs
# Cycle RCUs
self
.
RCU_off
()
self
.
RCU_off
()
self
.
wait_attribute
(
"
RECVTR_translator_busy_R
"
,
False
,
5
)
self
.
wait_attribute
(
"
RECVTR_translator_busy_R
"
,
False
,
5
)
...
...
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