Commit 1fdcc41e authored by Simone Liuzzo's avatar Simone Liuzzo

check status of BPMs before acquisition of data

parent 6bab1ca3
......@@ -72,7 +72,7 @@ classdef RingControl < handle
ver_bpm_offset
status_bpm % BPM status (0 means no error, so ok)
status_bpm % BPM status (1 means no error, so ok)
state_hst % H steerer state (ON OFF FAULT,...)
state_vst % V steerer state (ON OFF FAULT,...)
state_skew % skew quad state (ON OFF FAULT,...)
......
function [hor,ver,sig] = getSAdata(obj)
% read BPMs Slow Acquisition
% check stutus of BPM DS. wait 5s and in case countinue nevertheless
count = 1;
while ~isempty(find(obj.status_bpm() ~= 1, 1)) && count < 3
hor = obj.hor_bpm_SA();
ver = obj.ver_bpm_SA();
sig = obj.sum_bpm_SA(); % signal not available in simulator tango.Attribute(obj.sum_bpm_SA).value;
if isempty(sig)
sig = 1e6*ones(size(hor));
end
pause(1)
disp("bpm status not ok, waiting" + count)
count = count +3;
end
hor = obj.hor_bpm_SA();
ver = obj.ver_bpm_SA();
sig = obj.sum_bpm_SA(); % signal not available in simulator tango.Attribute(obj.sum_bpm_SA).value;
if isempty(sig)
sig = 1e6*ones(size(hor));
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment