Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
FofbTool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
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
DG
FOFB
FofbTool
Commits
8ad86fbb
Commit
8ad86fbb
authored
9 months ago
by
BRONES Romain
Browse files
Options
Downloads
Patches
Plain Diff
fix: Group command call
Use a DeviceData object
parent
08f6b402
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
FofbTool/Operation.py
+15
-8
15 additions, 8 deletions
FofbTool/Operation.py
with
15 additions
and
8 deletions
FofbTool/Operation.py
+
15
−
8
View file @
8ad86fbb
...
...
@@ -202,6 +202,13 @@ def ack_combpm(cellnodename):
ADDR_CCCFG
=
0
# Register address of Libera Electron
ADDR_FAICFG
=
0x2000
# Register address of Libera Electron
def
electron_group_writefadata
(
group
,
listargs
):
args
=
tango
.
DeviceData
()
args
.
insert
(
tango
.
DevVarLongArray
,
listargs
)
r
=
group
.
command_inout
(
"
WriteFAData
"
,
args
)
return
r
def
electron_init_fa
(
bpmlist
):
"""
Configure FA register of Libera Electron
...
...
@@ -230,11 +237,11 @@ def electron_init_fa(bpmlist):
# Configure : bpmid, tframe, mgtpower, mgtlb, bfrclr
pbpm
.
command_inout
(
"
WriteFAData
"
,
[
ADDR_CCCFG
,
4
,
5
,
bpmid
,
6000
,
0
,
0
,
6000
])
electron_group_writefadata
(
pbpm
,
[
ADDR_CCCFG
,
4
,
5
,
bpmid
,
6000
,
0
,
0
,
6000
])
# Ack rise
pbpm
.
command_inout
(
"
WriteFAData
"
,
[
ADDR_FAICFG
,
4
,
1
,
9
])
electron_group_writefadata
(
pbpm
,
[
ADDR_FAICFG
,
4
,
1
,
9
])
# Ack fall
pbpm
.
command_inout
(
"
WriteFAData
"
,
[
ADDR_FAICFG
,
4
,
1
,
8
])
electron_group_writefadata
(
pbpm
,
[
ADDR_FAICFG
,
4
,
1
,
8
])
return
True
...
...
@@ -266,14 +273,14 @@ def electron_start_next_trigger(bpmlist):
return
False
# Write start, tframelim=zero, no debug data
r
=
bpms
.
command_inout
(
"
WriteFAData
"
,
[
ADDR_FAICFG
,
4
,
1
,
8
])
r
=
electron_group_writefadata
(
bpms
,
[
ADDR_FAICFG
,
4
,
1
,
8
])
for
_r
in
r
:
if
_r
.
has_failed
():
logger
.
error
(
"
Failed to apply command WriteFAData on bpm {}
"
.
format
(
_r
.
dev_name
()))
return
False
# Write Enable ITech FAI
r
=
bpms
.
command_inout
(
"
WriteFAData
"
,
[
ADDR_FAICFG
+
4
,
4
,
1
,
1
])
r
=
electron_group_writefadata
(
bpms
,
[
ADDR_FAICFG
+
4
,
4
,
1
,
1
])
for
_r
in
r
:
if
_r
.
has_failed
():
logger
.
error
(
"
Failed to apply command WriteFAData on bpm {}
"
.
format
(
_r
.
dev_name
()))
...
...
@@ -301,21 +308,21 @@ def electron_stop_com(bpmlist):
bpms
.
add
(
bpmlist
)
# Write Disable ITech FAI
r
=
bpms
.
command_inout
(
"
WriteFAData
"
,
[
ADDR_FAICFG
+
4
,
4
,
1
,
0
])
r
=
electron_group_writefadata
(
bpms
,
[
ADDR_FAICFG
+
4
,
4
,
1
,
0
])
for
_r
in
r
:
if
_r
.
has_failed
():
logger
.
error
(
"
Failed to apply command WriteFAData on bpm {}
"
.
format
(
_r
.
dev_name
()))
return
False
# Soft stop
r
=
bpms
.
command_inout
(
"
WriteFAData
"
,
[
ADDR_FAICFG
+
8
,
4
,
1
,
0
])
r
=
electron_group_writefadata
(
bpms
,
[
ADDR_FAICFG
+
8
,
4
,
1
,
0
])
for
_r
in
r
:
if
_r
.
has_failed
():
logger
.
error
(
"
Failed to apply command WriteFAData on bpm {}
"
.
format
(
_r
.
dev_name
()))
return
False
# Reset User FAI
r
=
bpms
.
command_inout
(
"
WriteFAData
"
,
[
ADDR_FAICFG
,
4
,
1
,
0
])
r
=
electron_group_writefadata
(
bpms
,
[
ADDR_FAICFG
,
4
,
1
,
0
])
for
_r
in
r
:
if
_r
.
has_failed
():
logger
.
error
(
"
Failed to apply command WriteFAData on bpm {}
"
.
format
(
_r
.
dev_name
()))
...
...
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