...
 
Commits (2)
......@@ -22,19 +22,30 @@ obj.s12 = movable('');
obj.s3 = movable('');
obj.cv8 = movable('');
obj.cv9 = movable('');
getfunction = @(devname)tango.Attribute(devname).value;
setfunction = @(devname,val)setfield(tango.Attribute(devname),'set',val);
obj.sh = movable([TANGO_HOST 'srmag/hst/all/Strengths'],...
'get_fun',@(devname)tango.Attribute(devname).value,...
'set_fun',@(devname,val)setfield(tango.Attribute(devname),'set',val),...
'get_fun',getfunction,'set_fun',setfunction,...
'absolute',true,'limits',[-4e-4 4e-4]);
obj.sv = movable([TANGO_HOST 'srmag/vst/all/Strengths'],...
'get_fun',getfunction,'set_fun',setfunction,...
'absolute',true,'limits',[-4e-4 4e-4]);
obj.sv = movable([TANGO_HOST 'srmag/vst/all/Strengths'],'absolute',true,'limits',[-4e-4 4e-4]);
% limits can be higher, but they depend on the strengths of the steerers
obj.skew = movable([TANGO_HOST 'srmag/sqp/all/CorrectionStrengths'],'absolute',true,'limits',[-1.5e-2 1.5e-2]);
obj.rf = movable([TANGO_HOST 'srrf/master-oscillator/1/Frequency'],'absolute',false,'limits',[0.99 1.01]);
obj.quad = movable([TANGO_HOST 'srmag/m-q/all/CorrectionStrengths']);
obj.sext = movable([TANGO_HOST 'srmag/m-s/all/CorrectionStrengths']);
obj.octu = movable([TANGO_HOST 'srmag/m-o/all/CorrectionStrengths']);
obj.initial_coordinates = movable([TANGO_HOST 'sys/ringsimulator/ebs/TbT_InCoord']);
obj.skew = movable([TANGO_HOST 'srmag/sqp/all/CorrectionStrengths'],...
'get_fun',getfunction,'set_fun',setfunction,...
'absolute',true,'limits',[-1.5e-2 1.5e-2]);
obj.rf = movable([TANGO_HOST 'srrf/master-oscillator/1/Frequency'],...
'get_fun',getfunction,'set_fun',setfunction,...
'absolute',false,'limits',[0.99 1.01]);
obj.quad = movable([TANGO_HOST 'srmag/m-q/all/CorrectionStrengths'],...
'get_fun',getfunction,'set_fun',setfunction);
obj.sext = movable([TANGO_HOST 'srmag/m-s/all/CorrectionStrengths'],...
'get_fun',getfunction,'set_fun',setfunction);
obj.octu = movable([TANGO_HOST 'srmag/m-o/all/CorrectionStrengths'],...
'get_fun',getfunction,'set_fun',setfunction);
obj.initial_coordinates = movable([TANGO_HOST 'sys/ringsimulator/ebs/TbT_InCoord'],...
'get_fun',getfunction,'set_fun',setfunction);
%% diagnostics, read only attributes
obj.stored_current = @()tango.Attribute([TANGO_HOST 'srdiag/beam-current/total/Current']).value;
......
......@@ -42,15 +42,23 @@ classdef movable < handle
% set_tolerance: array of scalars of calibration [units]/A
% value_at_init: value of attribute at init of class
% get_fun: function to retrive the wished values
% @(devname)fun(...)
% set_fun: function to set the wished values
%
% @(devname, values)fun(...)
% devname is the input name, that is passed to this
% object.
% ex1:
% rf = moovable(['srrf/master-oscillator/1/Frequency'],'absolute',true,'limits',[0 352e6]);
% ex2:
% rf = moovable(['srrf/master-oscillator/1/Frequency'],'absolute',false,'limits',[0.9 1.1]);
% ex3:
% empt = moovable('');
%
% ex4:
% sh = movable([TANGO_HOST 'srmag/hst/all/Strengths'],...
% 'get_fun',@(devname)tango.Attribute(devname).value,...
% 'set_fun',@(devname,val)setfield(tango.Attribute(devname),'set',val),...
% 'absolute',true,'limits',[-4e-4 4e-4]);
%
%see also:
p = inputParser;
......