...
 
Commits (3)
......@@ -61,7 +61,7 @@ obj.getTbTdata = @(obj)getTbTdata_EBS_SIMU(obj);
% inputs to function getTbTdata
obj.hor_bpm_TBT = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/TBT_HPositions']).value;
obj.ver_bpm_TBT = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/TBT_VPositions']).value;
obj.sum_bpm_TBT = @()tango.Attribute([]).value;
obj.sum_bpm_TBT = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/TBT_Sums']).value;
% bpm fresh data counter
obj.bpm_trigger_counter = @()tango.Attribute('sys/ringsimulator/ebs/Counter').value;
% load reference sum signal
......@@ -75,11 +75,11 @@ obj.getSAdata = @(obj)getSAdata_EBS_SIMU(obj);
% inputs to function getTbTdata
obj.hor_bpm_SA = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/SA_HPositions']).value;
obj.ver_bpm_SA = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/SA_VPositions']).value;
obj.sum_bpm_SA = @()tango.Attribute([]).value;
obj.sum_bpm_SA = @()tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/SA_Sums']).value;
%% state and enabled disabled for RingControl
% mask of correctors to exclude
obj.status_bpm =@()(tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/All_Status']).value==0); % BPM status (0 means no error, so ok)
obj.status_bpm =@()(arrayfun(@(a)isequal(a,0),tango.Attribute([TANGO_HOST 'srdiag/beam-position/all/All_Status']).value)); % BPM status (0 means no error, so ok)
obj.state_hst =@()(strcmp(tango.Attribute([TANGO_HOST 'srmag/hst/all/CorrectorStates']).value,'Disabled')==0); % H steerer status (ON OFF FAULT,...)
obj.state_vst =@()(strcmp(tango.Attribute([TANGO_HOST 'srmag/vst/all/CorrectorStates']).value,'Disabled')==0); % V steerer status (ON OFF FAULT,...)
......
This diff is collapsed.
......@@ -4,7 +4,7 @@ function [h,v,s] = getTbTdata_ESRF_SR(obj)
% read BPM TbT buffer counter
data_counter = obj.bpm_trigger_counter;
data_counter = obj.bpm_trigger_counter();
pause(1.0) % necessary!! or later trigger counter re-reading will be already after KE shot!
% necessary!! or could read two identical buffers!
......@@ -17,7 +17,7 @@ end
% wait for trigger couter to change
integralwaited = 0.0;
dt =0.2;
while obj.bpm_trigger_counter == data_counter
while obj.bpm_trigger_counter() == data_counter
disp('waiting for fresh data');
pause(dt);
integralwaited = integralwaited + dt;
......@@ -25,13 +25,13 @@ while obj.bpm_trigger_counter == data_counter
warning('Waiting too long for new data, take what is available');
break
end
disp(['next data ' num2str(obj.bpm_trigger_counter) ' before Ke: ' num2str(data_counter)]);
disp(['next data ' num2str(obj.bpm_trigger_counter()) ' before Ke: ' num2str(data_counter)]);
end
% read BPM Turn-by-Turn
h = obj.hor_bpm_TBT;
v = obj.ver_bpm_TBT;
sig = obj.sum_bpm_TBT;
h = obj.hor_bpm_TBT();
v = obj.ver_bpm_TBT();
sig = obj.sum_bpm_TBT();
sumsignal = sig(:,obj.first_turn_index); % measured signal
......