Skip to content
Snippets Groups Projects
Commit 2f9f46ce authored by Alexis GAMELIN's avatar Alexis GAMELIN
Browse files

Update FOFB device to prevent usage if FOFB is running

parent e82aa7d9
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@ tuneX = DeviceProxy("ans/rf/bbfdataviewer.1-tunex")
tuneZ = DeviceProxy("ans/rf/bbfdataviewer.2-tunez")
RF = DeviceProxy('ANS/RF/MasterClock')
service_locker = DeviceProxy("ANS/CA/SERVICE-LOCKER-MATLAB")
fofb_watcher = DeviceProxy("ANS/DG/FOFB-WATCHER")
#%% chroma measurement
......@@ -66,8 +67,11 @@ def chroma_measurement(N_step_delta=5,
if delta_change_max > 0.004:
raise ValueError("Maximum energy variation should be lower or equal to 0.4 % = 0.004.")
if service_locker.sofb or service_locker.fofb:
raise ValueError("Stop the SOFB and FOFB")
if service_locker.sofb:
raise ValueError("Stop the SOFB")
if fofb_watcher.fofbrunning_x or fofb_watcher.fofbrunning_y:
raise ValueError("Stop the FOFB")
if service_locker.isTunexFBRunning or service_locker.isTunezFBRunning:
raise ValueError("Stop the tune FB")
......
......@@ -154,6 +154,7 @@ def growth_damp(window_width,
# Needed devices
delay = DeviceProxy("ANS-C09/RF/FINE_DELAY_GENERATOR")
service_locker = DeviceProxy("ANS/CA/SERVICE-LOCKER-MATLAB")
fofb_watcher = DeviceProxy("ANS/DG/FOFB-WATCHER")
tuneX = DeviceProxy("ans/rf/bbfdataviewer.1-tunex")
tuneZ = DeviceProxy("ans/rf/bbfdataviewer.2-tunez")
switch_FBT = DeviceProxy("ans/rf/switch_fbt")
......@@ -165,6 +166,15 @@ def growth_damp(window_width,
ValueError("No FBT ?")
fbt = DeviceProxy(fbt_name)
if service_locker.sofb:
raise ValueError("Stop the SOFB")
if fofb_watcher.fofbrunning_x or fofb_watcher.fofbrunning_y:
raise ValueError("Stop the FOFB")
if service_locker.isTunexFBRunning or service_locker.isTunezFBRunning:
raise ValueError("Stop the tune FB")
if datasize != 4:
# Change data size
fbt.automaticacquisitionoff()
......@@ -177,9 +187,6 @@ def growth_damp(window_width,
delay.activateChannelA = True
# Stop MNO
if (service_locker.isTunexFBRunning) or (service_locker.isTunezFBRunning):
raise ValueError("Tune FB is running, MNO can not be stopped.")
else:
selMNOsource_initial = fbt.selMNOsource
fbt.selMNOsource = 0 # no MNO
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment