Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cs
util
sequencer
scan-p-gun-vgrid
Commits
755d7637
Commit
755d7637
authored
May 28, 2022
by
Francesco Tripaldi
Browse files
Add TopUp Test Mode
parent
78ae95c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
755d7637
...
...
@@ -24,7 +24,7 @@ attr;publish_to_elog;bool;1
attr;graph_title;string;GUN grid Scan
attr;best_vgrid_result;double;0
attr;plot_best_vgrid;bool;1
attr;topup_test_mode;bool;0
```
...
...
src/ScanPGunVgrid.py
View file @
755d7637
...
...
@@ -52,6 +52,7 @@ def main():
scan_start
=
selfseq_dev
.
read_attribute
(
"scan_start"
).
value
scan_stop
=
selfseq_dev
.
read_attribute
(
"scan_stop"
).
value
scan_step
=
selfseq_dev
.
read_attribute
(
"scan_step"
).
value
topup_test_mode
=
selfseq_dev
.
read_attribute
(
"topup_test_mode"
).
value
dcct_samples
=
int
(
selfseq_dev
.
read_attribute
(
"dcct_mean_samples"
).
value
)
starting_gun
=
gun_dev
.
read_attribute
(
'GridVoltage'
).
value
selfseq_dev
.
write_attribute
(
"ScriptErr"
,
""
)
...
...
@@ -81,12 +82,16 @@ def main():
if
bool
(
timing_enable
.
read_attribute
(
"ExtractionEnabled"
).
value
)
==
False
:
selfseq_dev
.
write_attribute
(
"ScriptErr"
,
'SE Extraction DISABLED'
)
sys
.
exit
(
1
)
if
float
(
gun_dev
.
read_attribute
(
'GridVoltage'
).
value
)
<
0.5
:
plc_status
=
dcct_dev
.
read_attribute
(
'Stat'
).
value
if
float
(
gun_dev
.
read_attribute
(
'GridVoltage'
).
value
)
<
0.5
and
topup_test_mode
==
False
:
selfseq_dev
.
write_attribute
(
"ScriptErr"
,
"Grid disabled or zero voltage during scan"
)
gun_dev
.
write_attribute
(
'FastGridVoltage'
,
starting_gun
)
sys
.
exit
(
1
)
if
topup_test_mode
==
True
and
(
plc_status
[
9
]
==
True
or
bool
(
trigger_gun
.
read_attribute
(
"gun_trigger_on"
).
value
)
==
False
):
#print("Interlock dcct booster, stop")
scan_stop
=
x
break
#print("valore gun: " + str(x))
gun_dev
.
write_attribute
(
'FastGridVoltage'
,
x
)
if
not
first_time
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment