Commit 4ce350f3 authored by Simone Liuzzo's avatar Simone Liuzzo
Browse files

disabled BPMS are not re-defined if the field qemres.wrongbpms exists already.

parent 6c0e2bf6
......@@ -120,13 +120,19 @@ if ~isfield(qemres,'bvrot'), qemres.bvrot=ones(nbpm,1); end
qemres.brot=0.5*(qemres.bhrot+qemres.bvrot);
% store wrong BPMS
try
bpms_dev = tango.Device('sr/d-bpmlibera/all');
qemres.wrongbpms = find(bpms_dev.All_Status.read~=0); % index of BPMS that are not green in libera manager.
catch err
disp(err);
qemres.wrongbpms = [];
warning('tango not available');
if ~isfield(qemres,'wrongbpms') % if this command is reached from Browse, the wrong BPMS must be those defined during the measurement and thus not changed.
try
bpms_dev = tango.Device('sr/d-bpmlibera/all');
actually_disabled_bpms = find(bpms_dev.All_Status.read~=0);
qemres.wrongbpms = actually_disabled_bpms; % index of BPMS that are not green in libera manager.
catch err
disp(err);
qemres.wrongbpms = [];
warning('tango not available');
end
else
disp('This BPMS are disabled: ');
disp(qemres.wrongbpms);
end
elist=sort(selcor(qemres.skcode));
......
Supports Markdown
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