Home > machine > Soleil > common > synchro > synchro_injecteur2.m

synchro_injecteur2

PURPOSE ^

SYNCHRO_INJECTEUR2 M-file for synchro_injecteur2.fig

SYNOPSIS ^

function varargout = synchro_injecteur2(varargin)

DESCRIPTION ^

 SYNCHRO_INJECTEUR2 M-file for synchro_injecteur2.fig
      SYNCHRO_INJECTEUR2, by itself, creates a new SYNCHRO_INJECTEUR2 or raises the existing
      singleton*.

      H = SYNCHRO_INJECTEUR2 returns the handle to a new SYNCHRO_INJECTEUR2 or the handle to
      the existing singleton*.

      SYNCHRO_INJECTEUR2('CALLBACK',hObject,eventData,handles,...) calls the local
      function named CALLBACK in SYNCHRO_INJECTEUR2.M with the given input arguments.

      SYNCHRO_INJECTEUR2('Property','Value',...) creates a new SYNCHRO_INJECTEUR2 or raises the
      existing singleton*.  Starting from the left, property value pairs are
      applied to the GUI before synchro_injecteur2_OpeningFunction gets called.  An
      unrecognized property name or invalid value makes property application
      stop.  All inputs are passed to synchro_injecteur2_OpeningFcn via varargin.

      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
      instance to run (singleton)".

 See also: GUIDE, GUIDATA, GUIHANDLES

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function varargout = synchro_injecteur2(varargin)
0002 % SYNCHRO_INJECTEUR2 M-file for synchro_injecteur2.fig
0003 %      SYNCHRO_INJECTEUR2, by itself, creates a new SYNCHRO_INJECTEUR2 or raises the existing
0004 %      singleton*.
0005 %
0006 %      H = SYNCHRO_INJECTEUR2 returns the handle to a new SYNCHRO_INJECTEUR2 or the handle to
0007 %      the existing singleton*.
0008 %
0009 %      SYNCHRO_INJECTEUR2('CALLBACK',hObject,eventData,handles,...) calls the local
0010 %      function named CALLBACK in SYNCHRO_INJECTEUR2.M with the given input arguments.
0011 %
0012 %      SYNCHRO_INJECTEUR2('Property','Value',...) creates a new SYNCHRO_INJECTEUR2 or raises the
0013 %      existing singleton*.  Starting from the left, property value pairs are
0014 %      applied to the GUI before synchro_injecteur2_OpeningFunction gets called.  An
0015 %      unrecognized property name or invalid value makes property application
0016 %      stop.  All inputs are passed to synchro_injecteur2_OpeningFcn via varargin.
0017 %
0018 %      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
0019 %      instance to run (singleton)".
0020 %
0021 % See also: GUIDE, GUIDATA, GUIHANDLES
0022 
0023 % Edit the above text to modify the response to help synchro_injecteur2
0024 
0025 % Last Modified by GUIDE v2.5 05-May-2006 20:26:14
0026 
0027 % Begin initialization code - DO NOT EDIT
0028 gui_Singleton = 1;
0029 gui_State = struct('gui_Name',       mfilename, ...
0030                    'gui_Singleton',  gui_Singleton, ...
0031                    'gui_OpeningFcn', @synchro_injecteur2_OpeningFcn, ...
0032                    'gui_OutputFcn',  @synchro_injecteur2_OutputFcn, ...
0033                    'gui_LayoutFcn',  [] , ...
0034                    'gui_Callback',   []);
0035 if nargin && ischar(varargin{1})
0036     gui_State.gui_Callback = str2func(varargin{1});
0037 end
0038 
0039 if nargout
0040     [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
0041 else
0042     gui_mainfcn(gui_State, varargin{:});
0043 end
0044 % End initialization code - DO NOT EDIT
0045 
0046 
0047 % --- Executes just before synchro_injecteur2 is made visible.
0048 function synchro_injecteur2_OpeningFcn(hObject, eventdata, handles, varargin)
0049 % This function has no output args, see OutputFcn.
0050 % hObject    handle to figure
0051 % eventdata  reserved - to be defined in a future version of MATLAB
0052 % handles    structure with handles and user data (see GUIDATA)
0053 % varargin   command line arguments to synchro_injecteur2 (see VARARGIN)
0054 
0055 % Choose default command line output for synchro_injecteur2
0056 handles.output = hObject;
0057 load('synchro_offset', 'inj_offset' , 'ext_offset')
0058 set(handles.inj_offset,'String',num2str(inj_offset));
0059 set(handles.ext_offset,'String',num2str(ext_offset));
0060 
0061 % periode du trigger par defaut = 4/3
0062 handles.periode = 1.36;
0063 set(handles.periode_edit,'String',num2str(handles.periode));
0064 
0065 % Creates timer Infinite loop
0066 timer1=timer('StartDelay',1,...
0067     'ExecutionMode','fixedRate','Period',handles.periode,'TasksToExecute',Inf);
0068 timer1.TimerFcn = {@fonction_alex, hObject,eventdata, handles};
0069 setappdata(handles.figure1,'Timer',timer1);
0070 
0071 % button group sur on/off timer du trigger
0072 h = uibuttongroup('visible','off','Position',[0.160 0.24 0.10 0.12],...
0073     'Title','','TitlePosition','centertop',...
0074     'BackgroundColor',[1 0.3 0 ]);
0075 u1 = uicontrol('Style','Radio','String','OFF','Tag','radiobutton1',...
0076     'pos',[45 20 40 25],'parent',h,'HandleVisibility','off',...
0077     'BackgroundColor',[1 0.3 0  ]);
0078 u2 = uicontrol('Style','Radio','String','ON','Tag','radiobutton2',...
0079     'pos',[45 50 40 25],'parent',h,'HandleVisibility','off',...
0080     'BackgroundColor',[1 0.3 0 ]);
0081 set(h,'SelectionChangeFcn',...
0082     {@uibuttongroup_SelectionChangeFcn,handles});
0083 
0084 handles.off = u1;
0085 handles.on = u2;
0086 
0087 set(h,'SelectedObject',u1); 
0088 set(h,'Visible','on');
0089 
0090 %% Set closing gui function
0091 set(handles.figure1,'CloseRequestFcn',{@Closinggui,timer1,handles.figure1});
0092 
0093 % Update handles structure
0094 guidata(hObject, handles);
0095 
0096 % UIWAIT makes synchro_injecteur2 wait for user response (see UIRESUME)
0097 % uiwait(handles.figure1);
0098 
0099 
0100 % --- Outputs from this function are returned to the command line.
0101 function varargout = synchro_injecteur2_OutputFcn(hObject, eventdata, handles) 
0102 % varargout  cell array for returning output args (see VARARGOUT);
0103 % hObject    handle to figure
0104 % eventdata  reserved - to be defined in a future version of MATLAB
0105 % handles    structure with handles and user data (see GUIDATA)
0106 
0107 % Get default command line output from handles structure
0108 varargout{1} = handles.output;
0109 
0110 
0111 
0112 function alim_dipole_Callback(hObject, eventdata, handles)
0113 % hObject    handle to alim_dipole (see GCBO)
0114 % eventdata  reserved - to be defined in a future version of MATLAB
0115 % handles    structure with handles and user data (see GUIDATA)
0116 
0117 % Hints: get(hObject,'String') returns contents of alim_dipole as text
0118 %        str2double(get(hObject,'String')) returns contents of alim_dipole as a double
0119 h=gcf
0120 delay=str2double(get(hObject,'String'));
0121 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay',delay);
0122 
0123 % --- Executes during object creation, after setting all properties.
0124 function alim_dipole_CreateFcn(hObject, eventdata, handles)
0125 % hObject    handle to alim_dipole (see GCBO)
0126 % eventdata  reserved - to be defined in a future version of MATLAB
0127 % handles    empty - handles not created until after all CreateFcns called
0128 
0129 % Hint: edit controls usually have a white background on Windows.
0130 %       See ISPC and COMPUTER.
0131 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0132     set(hObject,'BackgroundColor','white');
0133 end
0134 
0135 
0136 function alim_qf_Callback(hObject, eventdata, handles)
0137 % hObject    handle to alim_qf (see GCBO)
0138 % eventdata  reserved - to be defined in a future version of MATLAB
0139 % handles    structure with handles and user data (see GUIDATA)
0140 
0141 % Hints: get(hObject,'String') returns contents of alim_qf as text
0142 %        str2double(get(hObject,'String')) returns contents of alim_qf as a double
0143 
0144 delay=str2double(get(hObject,'String'));
0145 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay',delay);
0146 
0147 % --- Executes during object creation, after setting all properties.
0148 function alim_qf_CreateFcn(hObject, eventdata, handles)
0149 % hObject    handle to alim_qf (see GCBO)
0150 % eventdata  reserved - to be defined in a future version of MATLAB
0151 % handles    empty - handles not created until after all CreateFcns called
0152 
0153 % Hint: edit controls usually have a white background on Windows.
0154 %       See ISPC and COMPUTER.
0155 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0156     set(hObject,'BackgroundColor','white');
0157 end
0158 
0159 
0160 
0161 function alim_qd_Callback(hObject, eventdata, handles)
0162 % hObject    handle to alim_qd (see GCBO)
0163 % eventdata  reserved - to be defined in a future version of MATLAB
0164 % handles    structure with handles and user data (see GUIDATA)
0165 
0166 % Hints: get(hObject,'String') returns contents of alim_qd as text
0167 %        str2double(get(hObject,'String')) returns contents of alim_qd as a double
0168 
0169 delay=str2double(get(hObject,'String'));
0170 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay',delay);
0171 
0172 % --- Executes during object creation, after setting all properties.
0173 function alim_qd_CreateFcn(hObject, eventdata, handles)
0174 % hObject    handle to alim_qd (see GCBO)
0175 % eventdata  reserved - to be defined in a future version of MATLAB
0176 % handles    empty - handles not created until after all CreateFcns called
0177 
0178 % Hint: edit controls usually have a white background on Windows.
0179 %       See ISPC and COMPUTER.
0180 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0181     set(hObject,'BackgroundColor','white');
0182 end
0183 
0184 
0185 
0186 function alim_sf_Callback(hObject, eventdata, handles)
0187 % hObject    handle to alim_sf (see GCBO)
0188 % eventdata  reserved - to be defined in a future version of MATLAB
0189 % handles    structure with handles and user data (see GUIDATA)
0190 
0191 % Hints: get(hObject,'String') returns contents of alim_sf as text
0192 %        str2double(get(hObject,'String')) returns contents of alim_sf as a double
0193 
0194 delay=str2double(get(hObject,'String'));
0195 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay',delay);
0196 
0197 % --- Executes during object creation, after setting all properties.
0198 function alim_sf_CreateFcn(hObject, eventdata, handles)
0199 % hObject    handle to alim_sf (see GCBO)
0200 % eventdata  reserved - to be defined in a future version of MATLAB
0201 % handles    empty - handles not created until after all CreateFcns called
0202 
0203 % Hint: edit controls usually have a white background on Windows.
0204 %       See ISPC and COMPUTER.
0205 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0206     set(hObject,'BackgroundColor','white');
0207 end
0208 
0209 
0210 
0211 function alim_sd_Callback(hObject, eventdata, handles)
0212 % hObject    handle to alim_sd (see GCBO)
0213 % eventdata  reserved - to be defined in a future version of MATLAB
0214 % handles    structure with handles and user data (see GUIDATA)
0215 
0216 % Hints: get(hObject,'String') returns contents of alim_sd as text
0217 %        str2double(get(hObject,'String')) returns contents of alim_sd as a double
0218 
0219 delay=str2double(get(hObject,'String'));
0220 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay',delay);
0221 
0222 
0223 % --- Executes during object creation, after setting all properties.
0224 function alim_sd_CreateFcn(hObject, eventdata, handles)
0225 % hObject    handle to alim_sd (see GCBO)
0226 % eventdata  reserved - to be defined in a future version of MATLAB
0227 % handles    empty - handles not created until after all CreateFcns called
0228 
0229 % Hint: edit controls usually have a white background on Windows.
0230 %       See ISPC and COMPUTER.
0231 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0232     set(hObject,'BackgroundColor','white');
0233 end
0234 
0235 
0236 
0237 function boo_rf_Callback(hObject, eventdata, handles)
0238 % hObject    handle to boo_rf (see GCBO)
0239 % eventdata  reserved - to be defined in a future version of MATLAB
0240 % handles    structure with handles and user data (see GUIDATA)
0241 
0242 % Hints: get(hObject,'String') returns contents of boo_rf as text
0243 %        str2double(get(hObject,'String')) returns contents of boo_rf as a double
0244 
0245 delay=str2double(get(hObject,'String'));
0246 tango_write_attribute2('BOO/SY/LOCAL.RF.1', 'rfTimeDelay',delay);
0247 
0248 % --- Executes during object creation, after setting all properties.
0249 function boo_rf_CreateFcn(hObject, eventdata, handles)
0250 % hObject    handle to boo_rf (see GCBO)
0251 % eventdata  reserved - to be defined in a future version of MATLAB
0252 % handles    empty - handles not created until after all CreateFcns called
0253 
0254 % Hint: edit controls usually have a white background on Windows.
0255 %       See ISPC and COMPUTER.
0256 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0257     set(hObject,'BackgroundColor','white');
0258 end
0259 
0260 
0261 
0262 function lin_canon_Callback(hObject, eventdata, handles)
0263 % hObject    handle to lin_canon (see GCBO)
0264 % eventdata  reserved - to be defined in a future version of MATLAB
0265 % handles    structure with handles and user data (see GUIDATA)
0266 
0267 % Hints: get(hObject,'String') returns contents of lin_canon as text
0268 %        str2double(get(hObject,'String')) returns contents of lin_canon as a double
0269 inj_offset=str2double(get(handles.inj_offset,'String'));
0270 delay=str2double(get(hObject,'String'))+inj_offset;
0271 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay',delay);
0272 
0273 
0274 % --- Executes during object creation, after setting all properties.
0275 function lin_canon_CreateFcn(hObject, eventdata, handles)
0276 % hObject    handle to lin_canon (see GCBO)
0277 % eventdata  reserved - to be defined in a future version of MATLAB
0278 % handles    empty - handles not created until after all CreateFcns called
0279 
0280 % Hint: edit controls usually have a white background on Windows.
0281 %       See ISPC and COMPUTER.
0282 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0283     set(hObject,'BackgroundColor','white');
0284 end
0285 
0286 
0287 
0288 function lt1_emittance_Callback(hObject, eventdata, handles)
0289 % hObject    handle to lt1_emittance (see GCBO)
0290 % eventdata  reserved - to be defined in a future version of MATLAB
0291 % handles    structure with handles and user data (see GUIDATA)
0292 
0293 % Hints: get(hObject,'String') returns contents of lt1_emittance as text
0294 %        str2double(get(hObject,'String')) returns contents of lt1_emittance as a double
0295 inj_offset=str2double(get(handles.inj_offset,'String'));
0296 delay=str2double(get(hObject,'String'))+inj_offset;
0297 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay',delay);
0298 
0299 % --- Executes during object creation, after setting all properties.
0300 function lt1_emittance_CreateFcn(hObject, eventdata, handles)
0301 % hObject    handle to lt1_emittance (see GCBO)
0302 % eventdata  reserved - to be defined in a future version of MATLAB
0303 % handles    empty - handles not created until after all CreateFcns called
0304 
0305 % Hint: edit controls usually have a white background on Windows.
0306 %       See ISPC and COMPUTER.
0307 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0308     set(hObject,'BackgroundColor','white');
0309 end
0310 
0311 
0312 
0313 function lt1_MC1_Callback(hObject, eventdata, handles)
0314 % hObject    handle to lt1_MC1 (see GCBO)
0315 % eventdata  reserved - to be defined in a future version of MATLAB
0316 % handles    structure with handles and user data (see GUIDATA)
0317 
0318 % Hints: get(hObject,'String') returns contents of lt1_MC1 as text
0319 %        str2double(get(hObject,'String')) returns contents of lt1_MC1 as a double
0320 inj_offset=str2double(get(handles.inj_offset,'String'));
0321 delay=str2double(get(hObject,'String'))+inj_offset;
0322 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay',delay);
0323 
0324 % --- Executes during object creation, after setting all properties.
0325 function lt1_MC1_CreateFcn(hObject, eventdata, handles)
0326 % hObject    handle to lt1_MC1 (see GCBO)
0327 % eventdata  reserved - to be defined in a future version of MATLAB
0328 % handles    empty - handles not created until after all CreateFcns called
0329 
0330 % Hint: edit controls usually have a white background on Windows.
0331 %       See ISPC and COMPUTER.
0332 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0333     set(hObject,'BackgroundColor','white');
0334 end
0335 
0336 
0337 
0338 function lt1_MC2_Callback(hObject, eventdata, handles)
0339 % hObject    handle to lt1_MC2 (see GCBO)
0340 % eventdata  reserved - to be defined in a future version of MATLAB
0341 % handles    structure with handles and user data (see GUIDATA)
0342 
0343 % Hints: get(hObject,'String') returns contents of lt1_MC2 as text
0344 %        str2double(get(hObject,'String')) returns contents of lt1_MC2 as a double
0345 inj_offset=str2double(get(handles.inj_offset,'String'));
0346 delay=str2double(get(hObject,'String'))+inj_offset;
0347 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay',delay);
0348 
0349 % --- Executes during object creation, after setting all properties.
0350 function lt1_MC2_CreateFcn(hObject, eventdata, handles)
0351 % hObject    handle to lt1_MC2 (see GCBO)
0352 % eventdata  reserved - to be defined in a future version of MATLAB
0353 % handles    empty - handles not created until after all CreateFcns called
0354 
0355 % Hint: edit controls usually have a white background on Windows.
0356 %       See ISPC and COMPUTER.
0357 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0358     set(hObject,'BackgroundColor','white');
0359 end
0360 
0361 
0362 
0363 function lt1_osc_Callback(hObject, eventdata, handles)
0364 % hObject    handle to lt1_osc (see GCBO)
0365 % eventdata  reserved - to be defined in a future version of MATLAB
0366 % handles    structure with handles and user data (see GUIDATA)
0367 
0368 % Hints: get(hObject,'String') returns contents of lt1_osc as text
0369 %        str2double(get(hObject,'String')) returns contents of lt1_osc as a double
0370 inj_offset=str2double(get(handles.inj_offset,'String'));
0371 delay=str2double(get(hObject,'String'))+inj_offset;
0372 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay',delay);
0373 
0374 
0375 % --- Executes during object creation, after setting all properties.
0376 function lt1_osc_CreateFcn(hObject, eventdata, handles)
0377 % hObject    handle to lt1_osc (see GCBO)
0378 % eventdata  reserved - to be defined in a future version of MATLAB
0379 % handles    empty - handles not created until after all CreateFcns called
0380 
0381 % Hint: edit controls usually have a white background on Windows.
0382 %       See ISPC and COMPUTER.
0383 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0384     set(hObject,'BackgroundColor','white');
0385 end
0386 
0387 
0388 
0389 function sdc1_Callback(hObject, eventdata, handles)
0390 % hObject    handle to sdc1 (see GCBO)
0391 % eventdata  reserved - to be defined in a future version of MATLAB
0392 % handles    structure with handles and user data (see GUIDATA)
0393 
0394 % Hints: get(hObject,'String') returns contents of sdc1 as text
0395 %        str2double(get(hObject,'String')) returns contents of sdc1 as a double
0396 inj_offset=str2double(get(handles.inj_offset,'String'));
0397 delay=str2double(get(hObject,'String'))+inj_offset;
0398 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay',delay);
0399 
0400 % --- Executes during object creation, after setting all properties.
0401 function sdc1_CreateFcn(hObject, eventdata, handles)
0402 % hObject    handle to sdc1 (see GCBO)
0403 % eventdata  reserved - to be defined in a future version of MATLAB
0404 % handles    empty - handles not created until after all CreateFcns called
0405 
0406 % Hint: edit controls usually have a white background on Windows.
0407 %       See ISPC and COMPUTER.
0408 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0409     set(hObject,'BackgroundColor','white');
0410 end
0411 
0412 
0413 
0414 function boo_inj_septum_Callback(hObject, eventdata, handles)
0415 % hObject    handle to boo_inj_septum (see GCBO)
0416 % eventdata  reserved - to be defined in a future version of MATLAB
0417 % handles    structure with handles and user data (see GUIDATA)
0418 
0419 % Hints: get(hObject,'String') returns contents of boo_inj_septum as text
0420 %        str2double(get(hObject,'String')) returns contents of boo_inj_septum as a double
0421 inj_offset=str2double(get(handles.inj_offset,'String'));
0422 delay=str2double(get(hObject,'String'))+inj_offset;
0423 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay',delay);
0424 
0425 % --- Executes during object creation, after setting all properties.
0426 function boo_inj_septum_CreateFcn(hObject, eventdata, handles)
0427 % hObject    handle to boo_inj_septum (see GCBO)
0428 % eventdata  reserved - to be defined in a future version of MATLAB
0429 % handles    empty - handles not created until after all CreateFcns called
0430 
0431 % Hint: edit controls usually have a white background on Windows.
0432 %       See ISPC and COMPUTER.
0433 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0434     set(hObject,'BackgroundColor','white');
0435 end
0436 
0437 
0438 
0439 function boo_inj_kicker_Callback(hObject, eventdata, handles)
0440 % hObject    handle to boo_inj_kicker (see GCBO)
0441 % eventdata  reserved - to be defined in a future version of MATLAB
0442 % handles    structure with handles and user data (see GUIDATA)
0443 
0444 % Hints: get(hObject,'String') returns contents of boo_inj_kicker as text
0445 %        str2double(get(hObject,'String')) returns contents of boo_inj_kicker as a double
0446 inj_offset=str2double(get(handles.inj_offset,'String'));
0447 delay=str2double(get(hObject,'String'))+inj_offset;
0448 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay',delay);
0449 
0450 % --- Executes during object creation, after setting all properties.
0451 function boo_inj_kicker_CreateFcn(hObject, eventdata, handles)
0452 % hObject    handle to boo_inj_kicker (see GCBO)
0453 % eventdata  reserved - to be defined in a future version of MATLAB
0454 % handles    empty - handles not created until after all CreateFcns called
0455 
0456 % Hint: edit controls usually have a white background on Windows.
0457 %       See ISPC and COMPUTER.
0458 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0459     set(hObject,'BackgroundColor','white');
0460 end
0461 
0462 
0463 
0464 function boo_bpm_Callback(hObject, eventdata, handles)
0465 % hObject    handle to boo_bpm (see GCBO)
0466 % eventdata  reserved - to be defined in a future version of MATLAB
0467 % handles    structure with handles and user data (see GUIDATA)
0468 
0469 % Hints: get(hObject,'String') returns contents of boo_bpm as text
0470 %        str2double(get(hObject,'String')) returns contents of boo_bpm as a double
0471 
0472 inj_offset=str2double(get(handles.inj_offset,'String'));
0473 delay=str2double(get(hObject,'String'))+inj_offset;
0474 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay',delay);
0475 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigTimeDelay',delay);
0476 tango_write_attribute2('BOO-BTB/SY/LOCAL.DG.1', 'bpm-btb.trigTimeDelay',delay);
0477 tango_write_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'bpm-btc.trigTimeDelay',delay);
0478 
0479 
0480 % --- Executes during object creation, after setting all properties.
0481 function boo_bpm_CreateFcn(hObject, eventdata, handles)
0482 % hObject    handle to boo_bpm (see GCBO)
0483 % eventdata  reserved - to be defined in a future version of MATLAB
0484 % handles    empty - handles not created until after all CreateFcns called
0485 
0486 % Hint: edit controls usually have a white background on Windows.
0487 %       See ISPC and COMPUTER.
0488 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0489     set(hObject,'BackgroundColor','white');
0490 end
0491 
0492 
0493 
0494 function boo_nod_Callback(hObject, eventdata, handles)
0495 % hObject    handle to boo_nod (see GCBO)
0496 % eventdata  reserved - to be defined in a future version of MATLAB
0497 % handles    structure with handles and user data (see GUIDATA)
0498 
0499 % Hints: get(hObject,'String') returns contents of boo_nod as text
0500 %        str2double(get(hObject,'String')) returns contents of boo_nod as a double
0501 inj_offset=str2double(get(handles.inj_offset,'String'));
0502 delay=str2double(get(hObject,'String'))+inj_offset;
0503 tango_write_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'bpm-onde.trigTimeDelay',delay);
0504 
0505 % --- Executes during object creation, after setting all properties.
0506 function boo_nod_CreateFcn(hObject, eventdata, handles)
0507 % hObject    handle to boo_nod (see GCBO)
0508 % eventdata  reserved - to be defined in a future version of MATLAB
0509 % handles    empty - handles not created until after all CreateFcns called
0510 
0511 % Hint: edit controls usually have a white background on Windows.
0512 %       See ISPC and COMPUTER.
0513 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0514     set(hObject,'BackgroundColor','white');
0515 end
0516 
0517 
0518 
0519 function boo_dcct_Callback(hObject, eventdata, handles)
0520 % hObject    handle to boo_dcct (see GCBO)
0521 % eventdata  reserved - to be defined in a future version of MATLAB
0522 % handles    structure with handles and user data (see GUIDATA)
0523 
0524 % Hints: get(hObject,'String') returns contents of boo_dcct as text
0525 %        str2double(get(hObject,'String')) returns contents of boo_dcct as a double
0526 inj_offset=str2double(get(handles.inj_offset,'String'));
0527 delay=str2double(get(hObject,'String'))+inj_offset;
0528 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay',delay);
0529 
0530 % --- Executes during object creation, after setting all properties.
0531 function boo_dcct_CreateFcn(hObject, eventdata, handles)
0532 % hObject    handle to boo_dcct (see GCBO)
0533 % eventdata  reserved - to be defined in a future version of MATLAB
0534 % handles    empty - handles not created until after all CreateFcns called
0535 
0536 % Hint: edit controls usually have a white background on Windows.
0537 %       See ISPC and COMPUTER.
0538 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0539     set(hObject,'BackgroundColor','white');
0540 end
0541 
0542 
0543 
0544 function boo_hall_Callback(hObject, eventdata, handles)
0545 % hObject    handle to boo_hall (see GCBO)
0546 % eventdata  reserved - to be defined in a future version of MATLAB
0547 % handles    structure with handles and user data (see GUIDATA)
0548 
0549 % Hints: get(hObject,'String') returns contents of boo_hall as text
0550 %        str2double(get(hObject,'String')) returns contents of boo_hall as a double
0551 
0552 
0553 % --- Executes during object creation, after setting all properties.
0554 function boo_hall_CreateFcn(hObject, eventdata, handles)
0555 % hObject    handle to boo_hall (see GCBO)
0556 % eventdata  reserved - to be defined in a future version of MATLAB
0557 % handles    empty - handles not created until after all CreateFcns called
0558 
0559 % Hint: edit controls usually have a white background on Windows.
0560 %       See ISPC and COMPUTER.
0561 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0562     set(hObject,'BackgroundColor','white');
0563 end
0564 
0565 
0566 
0567 function pc_address_Callback(hObject, eventdata, handles)
0568 % hObject    handle to pc_address (see GCBO)
0569 % eventdata  reserved - to be defined in a future version of MATLAB
0570 % handles    structure with handles and user data (see GUIDATA)
0571 
0572 % Hints: get(hObject,'String') returns contents of pc_address as text
0573 %        str2double(get(hObject,'String')) returns contents of pc_address as a double
0574 
0575 delay=str2double(get(hObject,'String'));
0576 tango_write_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay',delay);
0577 
0578 % --- Executes during object creation, after setting all properties.
0579 function pc_address_CreateFcn(hObject, eventdata, handles)
0580 % hObject    handle to pc_address (see GCBO)
0581 % eventdata  reserved - to be defined in a future version of MATLAB
0582 % handles    empty - handles not created until after all CreateFcns called
0583 
0584 % Hint: edit controls usually have a white background on Windows.
0585 %       See ISPC and COMPUTER.
0586 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0587     set(hObject,'BackgroundColor','white');
0588 end
0589 
0590 
0591 
0592 function inj_address_Callback(hObject, eventdata, handles)
0593 % hObject    handle to inj_address (see GCBO)
0594 % eventdata  reserved - to be defined in a future version of MATLAB
0595 % handles    structure with handles and user data (see GUIDATA)
0596 
0597 % Hints: get(hObject,'String') returns contents of inj_address as text
0598 %        str2double(get(hObject,'String')) returns contents of inj_address as a double
0599 
0600 delay=str2double(get(hObject,'String'));
0601 tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',delay);
0602 
0603 % --- Executes during object creation, after setting all properties.
0604 function inj_address_CreateFcn(hObject, eventdata, handles)
0605 % hObject    handle to inj_address (see GCBO)
0606 % eventdata  reserved - to be defined in a future version of MATLAB
0607 % handles    empty - handles not created until after all CreateFcns called
0608 
0609 % Hint: edit controls usually have a white background on Windows.
0610 %       See ISPC and COMPUTER.
0611 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0612     set(hObject,'BackgroundColor','white');
0613 end
0614 
0615 
0616 
0617 function edit21_Callback(hObject, eventdata, handles)
0618 % hObject    handle to pc_address (see GCBO)
0619 % eventdata  reserved - to be defined in a future version of MATLAB
0620 % handles    structure with handles and user data (see GUIDATA)
0621 
0622 % Hints: get(hObject,'String') returns contents of pc_address as text
0623 %        str2double(get(hObject,'String')) returns contents of pc_address as a double
0624 
0625 
0626 % --- Executes during object creation, after setting all properties.
0627 function edit21_CreateFcn(hObject, eventdata, handles)
0628 % hObject    handle to pc_address (see GCBO)
0629 % eventdata  reserved - to be defined in a future version of MATLAB
0630 % handles    empty - handles not created until after all CreateFcns called
0631 
0632 % Hint: edit controls usually have a white background on Windows.
0633 %       See ISPC and COMPUTER.
0634 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0635     set(hObject,'BackgroundColor','white');
0636 end
0637 
0638 
0639 
0640 function soft_address_Callback(hObject, eventdata, handles)
0641 % hObject    handle to soft_address (see GCBO)
0642 % eventdata  reserved - to be defined in a future version of MATLAB
0643 % handles    structure with handles and user data (see GUIDATA)
0644 
0645 % Hints: get(hObject,'String') returns contents of soft_address as text
0646 %        str2double(get(hObject,'String')) returns contents of soft_address as a double
0647 
0648 delay=str2double(get(hObject,'String'));
0649 tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',delay);
0650 
0651 % --- Executes during object creation, after setting all properties.
0652 function soft_address_CreateFcn(hObject, eventdata, handles)
0653 % hObject    handle to soft_address (see GCBO)
0654 % eventdata  reserved - to be defined in a future version of MATLAB
0655 % handles    empty - handles not created until after all CreateFcns called
0656 
0657 % Hint: edit controls usually have a white background on Windows.
0658 %       See ISPC and COMPUTER.
0659 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0660     set(hObject,'BackgroundColor','white');
0661 end
0662 
0663 
0664 % --- Executes on button press in acquisition1.
0665 function acquisition1_Callback(hObject, eventdata, handles)
0666 % hObject    handle to acquisition1 (see GCBO)
0667 % eventdata  reserved - to be defined in a future version of MATLAB
0668 % handles    structure with handles and user data (see GUIDATA)
0669 
0670 set(handles.inj_offset,'Enable','off');
0671 set(handles.sdc1,'Enable','off');
0672 set(handles.lin_canon,'Enable','off');
0673 set(handles.boo_bpm,'Enable','off');
0674 set(handles.lt1_emittance,'Enable','off');
0675 set(handles.lt1_MC1,'Enable','off');
0676 set(handles.lt1_MC2,'Enable','off');
0677 set(handles.lt1_osc,'Enable','off');
0678 set(handles.boo_dcct,'Enable','off');
0679 set(handles.boo_nod,'Enable','off');
0680 set(handles.boo_inj_septum,'Enable','off');
0681 set(handles.boo_inj_kicker,'Enable','off');
0682 set(handles.alim_dipole,'Enable','off');
0683 set(handles.alim_qf,'Enable','off');
0684 set(handles.alim_qd,'Enable','off');
0685 set(handles.alim_sf,'Enable','off');
0686 set(handles.alim_sd,'Enable','off');
0687 set(handles.boo_rf,'Enable','off');
0688 set(handles.lin_modulateur,'Enable','off');
0689 set(handles.ext_offset,'Enable','off');
0690 set(handles.boo_ext_dof,'Enable','off');
0691 set(handles.boo_ext_sept_p,'Enable','off');
0692 set(handles.boo_ext_sept_a,'Enable','off');
0693 set(handles.boo_ext_kicker,'Enable','off');
0694 set(handles.sdc2,'Enable','off');
0695 set(handles.lt2_emittance,'Enable','off');
0696 set(handles.lt2_osc,'Enable','off');
0697 set(handles.lt2_bpm,'Enable','off');
0698 set(handles.ans_inj_k1,'Enable','off');
0699 set(handles.ans_inj_k2,'Enable','off');
0700 set(handles.ans_inj_k3,'Enable','off');
0701 set(handles.ans_inj_k4,'Enable','off');
0702 set(handles.ans_inj_sept_p,'Enable','off');
0703 set(handles.ans_inj_sept_a,'Enable','off');
0704 set(handles.ans_bpm,'Enable','off');
0705 set(handles.ans_dcct,'Enable','off');
0706 
0707 
0708 
0709 n=1;
0710 
0711 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay');
0712 set(handles.pc_address,'String',num2str(temp.value(n)));
0713 
0714 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
0715 set(handles.inj_address,'String',num2str(temp.value(n)));
0716 
0717 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
0718 set(handles.soft_address,'String',num2str(temp.value(n)));
0719 
0720 temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue');
0721 set(handles.ext_address,'String',num2str(temp.value(n)));
0722 
0723 
0724 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay');
0725 set(handles.sdc1,'String',num2str(temp.value(n)));
0726 
0727 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay');
0728 set(handles.lin_canon,'String',num2str(temp.value(n)));
0729 
0730 temp=tango_read_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay');
0731 set(handles.boo_bpm,'String',num2str(temp.value(n)));
0732 
0733 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay');
0734 set(handles.lt1_emittance,'String',num2str(temp.value(n)));
0735 
0736 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay');
0737 set(handles.lt1_MC1,'String',num2str(temp.value(n)));
0738 
0739 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay');
0740 set(handles.lt1_MC2,'String',num2str(temp.value(n)));
0741 
0742 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay');
0743 set(handles.lt1_osc,'String',num2str(temp.value(n)));
0744 
0745 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay');
0746 set(handles.boo_dcct,'String',num2str(temp.value(n)));
0747 
0748 temp=tango_read_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'bpm-onde.trigTimeDelay');
0749 set(handles.boo_nod,'String',num2str(temp.value(n)));
0750 
0751 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay');
0752 set(handles.boo_inj_septum,'String',num2str(temp.value(n)));
0753 
0754 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay');
0755 set(handles.boo_inj_kicker,'String',num2str(temp.value(n)));
0756 
0757 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay');
0758 set(handles.alim_dipole,'String',num2str(temp.value(n)));
0759 
0760 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay');
0761 set(handles.alim_qf,'String',num2str(temp.value(n)));
0762 
0763 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay');
0764 set(handles.alim_qd,'String',num2str(temp.value(n)));
0765 
0766 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay');
0767 set(handles.alim_sf,'String',num2str(temp.value(n)));
0768 
0769 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay');
0770 set(handles.alim_sd,'String',num2str(temp.value(n)));
0771 
0772 temp=tango_read_attribute2('BOO/SY/LOCAL.RF.1', 'rfTimeDelay');
0773 set(handles.boo_rf,'String',num2str(temp.value(n)));
0774 
0775 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay');
0776 set(handles.lin_modulateur,'String',num2str(temp.value(n)));
0777 
0778 
0779 
0780 
0781 
0782 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigTimeDelay');
0783 set(handles.boo_ext_dof,'String',num2str(temp.value(n)));
0784 
0785 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigTimeDelay');
0786 set(handles.boo_ext_sept_p,'String',num2str(temp.value(n)));
0787 
0788 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigTimeDelay');
0789 set(handles.boo_ext_sept_a,'String',num2str(temp.value(n)));
0790 
0791 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigTimeDelay');
0792 set(handles.boo_ext_kicker,'String',num2str(temp.value(n)));
0793 
0794 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'spareTimeDelay');
0795 set(handles.sdc2,'String',num2str(temp.value(n)));
0796 
0797 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'emittanceTimeDelay');
0798 set(handles.lt2_emittance,'String',num2str(temp.value(n)));
0799 
0800 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'oscTimeDelay');
0801 set(handles.lt2_osc,'String',num2str(temp.value(n)));
0802 
0803 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigTimeDelay');
0804 set(handles.lt2_bpm,'String',num2str(temp.value(n)));
0805 
0806 
0807 
0808 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigTimeDelay');
0809 set(handles.ans_inj_k1,'String',num2str(temp.value(n)));
0810 
0811 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigTimeDelay');
0812 set(handles.ans_inj_k2,'String',num2str(temp.value(n)));
0813 
0814 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigTimeDelay');
0815 set(handles.ans_inj_k3,'String',num2str(temp.value(n)));
0816 
0817 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigTimeDelay');
0818 set(handles.ans_inj_k4,'String',num2str(temp.value(n)));
0819 
0820 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigTimeDelay');
0821 set(handles.ans_inj_sept_p,'String',num2str(temp.value(n)));
0822 
0823 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigTimeDelay');
0824 set(handles.ans_inj_sept_a,'String',num2str(temp.value(n)));
0825 
0826 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigTimeDelay');
0827 set(handles.ans_bpm,'String',num2str(temp.value(n)));
0828 
0829 temp=tango_read_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctTimeDelay');
0830 set(handles.ans_dcct,'String',num2str(temp.value(n)));
0831 
0832 
0833 
0834 %status soft checked on linac
0835 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent');
0836 if (temp.value(n)==2)
0837     set(handles.soft_button,'Value',0);
0838 elseif (temp.value(n)==5)
0839     set(handles.soft_button,'Value',1);
0840 end
0841 
0842 
0843 % --- Executes on button press in acquisition2.
0844 function acquisition2_Callback(hObject, eventdata, handles)
0845 % hObject    handle to acquisition2 (see GCBO)
0846 % eventdata  reserved - to be defined in a future version of MATLAB
0847 % handles    structure with handles and user data (see GUIDATA)
0848 
0849 
0850 set(handles.inj_offset,'Enable','on');
0851 set(handles.sdc1,'Enable','on');
0852 set(handles.lin_canon,'Enable','on');
0853 set(handles.boo_bpm,'Enable','on');
0854 set(handles.lt1_emittance,'Enable','on');
0855 set(handles.lt1_MC1,'Enable','on');
0856 set(handles.lt1_MC2,'Enable','on');
0857 set(handles.lt1_osc,'Enable','on');
0858 set(handles.boo_dcct,'Enable','on');
0859 set(handles.boo_nod,'Enable','on');
0860 set(handles.boo_inj_septum,'Enable','on');
0861 set(handles.boo_inj_kicker,'Enable','on');
0862 set(handles.alim_dipole,'Enable','on');
0863 set(handles.alim_qf,'Enable','on');
0864 set(handles.alim_qd,'Enable','on');
0865 set(handles.alim_sf,'Enable','on');
0866 set(handles.alim_sd,'Enable','on');
0867 set(handles.boo_rf,'Enable','on');
0868 set(handles.lin_modulateur,'Enable','on');
0869 set(handles.ext_offset,'Enable','on');
0870 set(handles.boo_ext_dof,'Enable','on');
0871 set(handles.boo_ext_sept_p,'Enable','on');
0872 set(handles.boo_ext_sept_a,'Enable','on');
0873 set(handles.boo_ext_kicker,'Enable','on');
0874 set(handles.sdc2,'Enable','on');
0875 set(handles.lt2_emittance,'Enable','on');
0876 set(handles.lt2_osc,'Enable','on');
0877 set(handles.lt2_bpm,'Enable','on');
0878 set(handles.ans_inj_k1,'Enable','on');
0879 set(handles.ans_inj_k2,'Enable','on');
0880 set(handles.ans_inj_k3,'Enable','on');
0881 set(handles.ans_inj_k4,'Enable','on');
0882 set(handles.ans_inj_sept_p,'Enable','on');
0883 set(handles.ans_inj_sept_a,'Enable','on');
0884 set(handles.ans_bpm,'Enable','on');
0885 set(handles.ans_dcct,'Enable','on');
0886 
0887 n=1;
0888 
0889 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay');
0890 set(handles.pc_address,'String',num2str(temp.value(n)));
0891 
0892 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
0893 set(handles.inj_address,'String',num2str(temp.value(n)));
0894 
0895 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
0896 set(handles.soft_address,'String',num2str(temp.value(n)));
0897 set(handles.soft_address1,'String',num2str(temp.value(n)));
0898 
0899 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue');
0900 set(handles.ext_address,'String',num2str(temp.value(n)));
0901 
0902 
0903 
0904 inj_offset=str2double(get(handles.inj_offset,'String'));
0905 
0906 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay');
0907 set(handles.sdc1,'String',num2str(temp.value(n)-inj_offset));
0908 
0909 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay');
0910 set(handles.lin_canon,'String',num2str(temp.value(n)-inj_offset));
0911 
0912 temp=tango_read_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay');
0913 set(handles.boo_bpm,'String',num2str(temp.value(n)-inj_offset));
0914 
0915 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay');
0916 set(handles.lt1_emittance,'String',num2str(temp.value(n)-inj_offset));
0917 
0918 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay');
0919 set(handles.lt1_MC1,'String',num2str(temp.value(n)-inj_offset));
0920 
0921 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay');
0922 set(handles.lt1_MC2,'String',num2str(temp.value(n)-inj_offset));
0923 
0924 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay');
0925 set(handles.lt1_osc,'String',num2str(temp.value(n)-inj_offset));
0926 
0927 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay');
0928 set(handles.boo_dcct,'String',num2str(temp.value(n)-inj_offset));
0929 
0930 temp=tango_read_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'bpm-onde.trigTimeDelay');
0931 set(handles.boo_nod,'String',num2str(temp.value(n)-inj_offset));
0932 
0933 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay');
0934 set(handles.boo_inj_septum,'String',num2str(temp.value(n)-inj_offset));
0935 
0936 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay');
0937 set(handles.boo_inj_kicker,'String',num2str(temp.value(n)-inj_offset));
0938 
0939 
0940 
0941 
0942 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay');
0943 set(handles.alim_dipole,'String',num2str(temp.value(n)));
0944 
0945 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay');
0946 set(handles.alim_qf,'String',num2str(temp.value(n)));
0947 
0948 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay');
0949 set(handles.alim_qd,'String',num2str(temp.value(n)));
0950 
0951 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay');
0952 set(handles.alim_sf,'String',num2str(temp.value(n)));
0953 
0954 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay');
0955 set(handles.alim_sd,'String',num2str(temp.value(n)));
0956 
0957 temp=tango_read_attribute2('BOO/SY/LOCAL.RF.1', 'rfTimeDelay');
0958 set(handles.boo_rf,'String',num2str(temp.value(n)));
0959 
0960 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay');
0961 set(handles.lin_modulateur,'String',num2str(temp.value(n)-inj_offset));
0962 
0963 
0964 
0965 ext_offset=str2double(get(handles.ext_offset,'String'));
0966 
0967 
0968 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigTimeDelay');
0969 set(handles.boo_ext_dof,'String',num2str(temp.value(n)-ext_offset));
0970 
0971 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigTimeDelay');
0972 set(handles.boo_ext_sept_p,'String',num2str(temp.value(n)-ext_offset));
0973 
0974 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigTimeDelay');
0975 set(handles.boo_ext_sept_a,'String',num2str(temp.value(n)-ext_offset));
0976 
0977 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigTimeDelay');
0978 set(handles.boo_ext_kicker,'String',num2str(temp.value(n)-ext_offset));
0979 
0980 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'spareTimeDelay');
0981 set(handles.sdc2,'String',num2str(temp.value(n)-ext_offset));
0982 
0983 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'emittanceTimeDelay');
0984 set(handles.lt2_emittance,'String',num2str(temp.value(n)-ext_offset));
0985 
0986 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'oscTimeDelay');
0987 set(handles.lt2_osc,'String',num2str(temp.value(n)-ext_offset));
0988 
0989 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigTimeDelay');
0990 set(handles.lt2_bpm,'String',num2str(temp.value(n)-ext_offset));
0991 
0992 
0993 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigTimeDelay');
0994 set(handles.ans_inj_k1,'String',num2str(temp.value(n)-ext_offset));
0995 
0996 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigTimeDelay');
0997 set(handles.ans_inj_k2,'String',num2str(temp.value(n)-ext_offset));
0998 
0999 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigTimeDelay');
1000 set(handles.ans_inj_k3,'String',num2str(temp.value(n)-ext_offset));
1001 
1002 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigTimeDelay');
1003 set(handles.ans_inj_k4,'String',num2str(temp.value(n)-ext_offset));
1004 
1005 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigTimeDelay');
1006 set(handles.ans_inj_sept_p,'String',num2str(temp.value(n)-ext_offset));
1007 
1008 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigTimeDelay');
1009 set(handles.ans_inj_sept_a,'String',num2str(temp.value(n)-ext_offset));
1010 
1011 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigTimeDelay');
1012 set(handles.ans_bpm,'String',num2str(temp.value(n)-ext_offset));
1013 
1014 temp=tango_read_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctTimeDelay');
1015 set(handles.ans_dcct,'String',num2str(temp.value(n)-ext_offset));
1016 
1017 
1018 %status soft checked on linac
1019 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent');
1020 if (temp.value(n)==2)
1021     set(handles.soft_button,'Value',0);
1022 elseif (temp.value(n)==5)
1023     set(handles.soft_button,'Value',1);
1024 end
1025 
1026 
1027 
1028 % --- Executes on button press in soft_button.
1029 function soft_button_Callback(hObject, eventdata, handles)
1030 % hObject    handle to soft_button (see GCBO)
1031 % eventdata  reserved - to be defined in a future version of MATLAB
1032 % handles    structure with handles and user data (see GUIDATA)
1033 
1034 % Hint: get(hObject,'Value') returns toggle state of soft_button
1035 
1036 etat=get(hObject,'Value');
1037 tout=0.5;
1038 if (etat==0)
1039     event=int32(2) ;% adresse de l'injection
1040     tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent',event); pause(tout);
1041     tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent',event); pause(tout);
1042     tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareEvent',event); pause(tout);
1043     tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigEvent',event); pause(tout);
1044     tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigEvent',event); pause(tout);
1045     tango_write_attribute2('BOO-BTB/SY/LOCAL.DG.1', 'bpm-btb.trigEvent',event); pause(tout);
1046     tango_write_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'bpm-btc.trigEvent',event); pause(tout); 
1047     tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent',event); pause(tout);
1048     tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event',event); pause(tout);
1049     tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event',event); pause(tout);
1050     tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent',event); pause(tout);
1051     tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent',event); pause(tout);
1052     tango_write_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'bpm-onde.trigEvent',event);pause(tout);
1053     tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent',event); pause(tout);
1054     tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent',event);
1055     event=int32(3) ;% adresse de l'extraction
1056     tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent',event);pause(tout);
1057     tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent',event);pause(tout);
1058     tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent',event);pause(tout);
1059     tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent',event);pause(tout);
1060     tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent',event);pause(tout);
1061     tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigEvent',event);pause(tout);
1062     tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'oscEvent',event);pause(tout);
1063     tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'emittanceEvent',event);pause(tout);
1064     tango_write_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'emittanceTimeDelay',event);pause(tout);
1065     tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigEvent',event);pause(tout);
1066     tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigEvent',event);pause(tout);
1067     tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigEvent',event);pause(tout);
1068     tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigEvent',event);pause(tout);
1069     tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigEvent',event);pause(tout);
1070     tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigEvent',event);pause(tout);
1071     tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctEvent',event);pause(tout);
1072     tango_write_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigEvent',event);pause(tout);
1073     tango_write_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1074     tango_write_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1075     tango_write_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1076     tango_write_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1077     tango_write_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1078     tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1079     tango_write_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1080     tango_write_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1081     tango_write_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);  
1082     tango_write_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);  
1083     tango_write_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);  
1084     tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);  
1085     tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);  
1086     tango_write_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);  
1087     tango_write_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);  
1088     
1089 
1090     % special modulateur
1091     inj=str2double(get(handles.inj_address,'String'));
1092     soft=str2double(get(handles.soft_address,'String'));
1093     temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay');
1094     delay=temp.value(1)-(soft)+0.00568;
1095     tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay',delay);
1096     
1097     
1098 elseif (etat==1)
1099     event=int32(5) ;% adresse de l'injection
1100     tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent',event); pause(tout);
1101     tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent',event); pause(tout);
1102     tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigEvent',event); pause(tout);
1103     tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigEvent',event); pause(tout);
1104     tango_write_attribute2('BOO-BTB/SY/LOCAL.DG.1', 'bpm-btb.trigEvent',event); pause(tout);
1105     tango_write_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'bpm-btc.trigEvent',event); pause(tout);     
1106     tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent',event); pause(tout);
1107     tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event',event); pause(tout);
1108     tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event',event); pause(tout);
1109     tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent',event); pause(tout);
1110     tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent',event); pause(tout);
1111     tango_write_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'bpm-onde.trigEvent',event);pause(tout);
1112     tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent',event); pause(tout);
1113     tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent',event);
1114     tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent',event);pause(tout);
1115     tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent',event);pause(tout);
1116     tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent',event);pause(tout);
1117     tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent',event);pause(tout);
1118     tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent',event);pause(tout);
1119     tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigEvent',event);pause(tout);
1120     tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'oscEvent',event);pause(tout);
1121     tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'emittanceEvent',event);pause(tout);
1122     tango_write_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'emittanceTimeDelay',event);pause(tout);
1123     tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigEvent',event);pause(tout);
1124     tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigEvent',event);pause(tout);
1125     tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigEvent',event);pause(tout);
1126     tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigEvent',event);pause(tout);
1127     tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigEvent',event);pause(tout);
1128     tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigEvent',event);pause(tout);
1129     tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctEvent',event);pause(tout);
1130     tango_write_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigEvent',event);pause(tout);
1131     tango_write_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1132     tango_write_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1133     tango_write_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1134     tango_write_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1135     tango_write_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1136     tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1137     tango_write_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1138     tango_write_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1139     tango_write_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);  
1140     tango_write_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);  
1141     tango_write_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);  
1142     tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);  
1143     tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);  
1144     tango_write_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);  
1145     tango_write_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);     
1146     
1147     % special modulateur
1148     tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareEvent',int32(1)); pause(tout);
1149     inj=str2double(get(handles.inj_address,'String'));
1150     soft=str2double(get(handles.soft_address,'String'));
1151     temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay');
1152     delay=temp.value(1)+(soft);
1153     tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay',delay);
1154 end
1155 display('ok change address')
1156 
1157 
1158 % --- Executes on button press in push_soft.
1159 function push_soft_Callback(hObject, eventdata, handles)
1160 % hObject    handle to push_soft (see GCBO)
1161 % eventdata  reserved - to be defined in a future version of MATLAB
1162 % handles    structure with handles and user data (see GUIDATA)
1163 disp('ça marche !!')
1164 tango_command_inout('ANS/SY/CENTRAL','FireSoftEvent');
1165 
1166 
1167 
1168 function periode_edit_Callback(hObject, eventdata, handles)
1169 % hObject    handle to periode_edit (see GCBO)
1170 % eventdata  reserved - to be defined in a future version of MATLAB
1171 % handles    structure with handles and user data (see GUIDATA)
1172 
1173 % Hints: get(hObject,'String') returns contents of periode_edit as text
1174 %        str2double(get(hObject,'String')) returns contents of periode_edit as a double
1175 
1176 val_multishot = get(handles.on,'Value');
1177 
1178 if val_multishot
1179     errordlg('positionner le trigger a OFF !','Attention');
1180     return
1181 else
1182     handles.periode = str2double(get(hObject,'String'));
1183 
1184     % change timer Infinite loop
1185     timer1=timer('StartDelay',1,...
1186         'ExecutionMode','fixedRate','Period',handles.periode,'TasksToExecute',Inf);
1187     timer1.TimerFcn = {@fonction_alex, hObject,eventdata, handles};
1188     setappdata(handles.figure1,'Timer',timer1);
1189 
1190     % Update handles structure
1191     guidata(hObject, handles);
1192 end
1193 
1194 
1195 % --- Executes during object creation, after setting all properties.
1196 function periode_edit_CreateFcn(hObject, eventdata, handles)
1197 % hObject    handle to periode_edit (see GCBO)
1198 % eventdata  reserved - to be defined in a future version of MATLAB
1199 % handles    empty - handles not created until after all CreateFcns called
1200 
1201 % Hint: edit controls usually have a white background on Windows.
1202 %       See ISPC and COMPUTER.
1203 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1204     set(hObject,'BackgroundColor','white');
1205 end
1206 
1207 function uibuttongroup_SelectionChangeFcn(hObject,eventdata,handles)
1208 % hObject    handle to uipanel1 (see GCBO)
1209 % eventdata  reserved - to be defined in a future version of MATLAB
1210 % handles    structure with handles and user data (see GUIDATA)
1211 
1212 timer1 = getappdata(handles.figure1,'Timer');
1213 switch get(get(hObject,'SelectedObject'),'Tag')  % Get Tag of selected object
1214     case 'radiobutton1'
1215         % démarrage du trigger
1216         stop(timer1);
1217        
1218     case 'radiobutton2'
1219         % stop du trigger
1220         start(timer1);
1221         
1222 end
1223 
1224 function fonction_alex(arg1,arg2,hObject,eventdata,handles)
1225 % hObject    handle to uipanel1 (see GCBO)
1226 % eventdata  reserved - to be defined in a future version of MATLAB
1227 % handles    structure with handles and user data (see GUIDATA)
1228 
1229 %%  FONCTION ALEX
1230 disp(datestr(clock))
1231 tango_command_inout('ANS/SY/CENTRAL','FireSoftEvent');
1232 
1233 
1234 
1235 
1236 
1237 
1238 
1239 %% What to do before closing the application
1240 function Closinggui(obj, event, handles, figure1)
1241 
1242 % Get default command line output from handles structure
1243 answer = questdlg('Fermer softsynchro ?',...
1244     'Exit softsynchro',...
1245     'Yes','No','Yes');
1246 
1247 switch answer
1248     case 'Yes'           
1249         delete(handles); %Delete Timer
1250         delete(figure1); %Close gui
1251     otherwise
1252         disp('Closing aborted')
1253 end
1254 
1255 
1256 
1257 % --- Executes on button press in button_softmoins.
1258 function button_softmoins_Callback(hObject, eventdata, handles)
1259 % hObject    handle to button_softmoins (see GCBO)
1260 % eventdata  reserved - to be defined in a future version of MATLAB
1261 % handles    structure with handles and user data (see GUIDATA)
1262 
1263 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
1264 step=temp.value(1)-0.52243;
1265 tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',step);
1266 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
1267 set(handles.soft_address,'String',num2str(temp.value(1)));
1268 
1269 % --- Executes on button press in button_softplus.
1270 function button_softplus_Callback(hObject, eventdata, handles)
1271 % hObject    handle to button_softplus (see GCBO)
1272 % eventdata  reserved - to be defined in a future version of MATLAB
1273 % handles    structure with handles and user data (see GUIDATA)
1274 
1275 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
1276 step=temp.value(1)+0.52243;
1277 tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',step);
1278 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
1279 set(handles.soft_address,'String',num2str(temp.value(1)));
1280 
1281 
1282 % --- Executes on button press in button_injmoins.
1283 function button_injmoins_Callback(hObject, eventdata, handles)
1284 % hObject    handle to button_injmoins (see GCBO)
1285 % eventdata  reserved - to be defined in a future version of MATLAB
1286 % handles    structure with handles and user data (see GUIDATA)
1287 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
1288 step=temp.value(1)-0.52243;
1289 tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',step);
1290 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
1291 set(handles.inj_address,'String',num2str(temp.value(1)));
1292 
1293 % --- Executes on button press in button_injplus.
1294 function button_injplus_Callback(hObject, eventdata, handles)
1295 % hObject    handle to button_injplus (see GCBO)
1296 % eventdata  reserved - to be defined in a future version of MATLAB
1297 % handles    structure with handles and user data (see GUIDATA)
1298 
1299 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
1300 step=temp.value(1)+0.52243;
1301 tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',step);
1302 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
1303 set(handles.inj_address,'String',num2str(temp.value(1)));
1304 
1305 
1306 
1307 function boo_ext_dof_Callback(hObject, eventdata, handles)
1308 % hObject    handle to boo_ext_dof (see GCBO)
1309 % eventdata  reserved - to be defined in a future version of MATLAB
1310 % handles    structure with handles and user data (see GUIDATA)
1311 
1312 % Hints: get(hObject,'String') returns contents of boo_ext_dof as text
1313 %        str2double(get(hObject,'String')) returns contents of boo_ext_dof as a double
1314 ext_offset=str2double(get(handles.ext_offset,'String'));
1315 delay=str2double(get(hObject,'String'))+ext_offset;
1316 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigTimeDelay',delay);
1317 
1318 % --- Executes during object creation, after setting all properties.
1319 function boo_ext_dof_CreateFcn(hObject, eventdata, handles)
1320 % hObject    handle to boo_ext_dof (see GCBO)
1321 % eventdata  reserved - to be defined in a future version of MATLAB
1322 % handles    empty - handles not created until after all CreateFcns called
1323 
1324 % Hint: edit controls usually have a white background on Windows.
1325 %       See ISPC and COMPUTER.
1326 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1327     set(hObject,'BackgroundColor','white');
1328 end
1329 
1330 
1331 
1332 function boo_ext_sept_p_Callback(hObject, eventdata, handles)
1333 % hObject    handle to boo_ext_sept_p (see GCBO)
1334 % eventdata  reserved - to be defined in a future version of MATLAB
1335 % handles    structure with handles and user data (see GUIDATA)
1336 
1337 % Hints: get(hObject,'String') returns contents of boo_ext_sept_p as text
1338 %        str2double(get(hObject,'String')) returns contents of boo_ext_sept_p as a double
1339 ext_offset=str2double(get(handles.ext_offset,'String'));
1340 delay=str2double(get(hObject,'String'))+ext_offset;
1341 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigTimeDelay',delay);
1342 
1343 % --- Executes during object creation, after setting all properties.
1344 function boo_ext_sept_p_CreateFcn(hObject, eventdata, handles)
1345 % hObject    handle to boo_ext_sept_p (see GCBO)
1346 % eventdata  reserved - to be defined in a future version of MATLAB
1347 % handles    empty - handles not created until after all CreateFcns called
1348 
1349 % Hint: edit controls usually have a white background on Windows.
1350 %       See ISPC and COMPUTER.
1351 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1352     set(hObject,'BackgroundColor','white');
1353 end
1354 
1355 
1356 
1357 function boo_ext_sept_a_Callback(hObject, eventdata, handles)
1358 % hObject    handle to boo_ext_sept_a (see GCBO)
1359 % eventdata  reserved - to be defined in a future version of MATLAB
1360 % handles    structure with handles and user data (see GUIDATA)
1361 
1362 % Hints: get(hObject,'String') returns contents of boo_ext_sept_a as text
1363 %        str2double(get(hObject,'String')) returns contents of boo_ext_sept_a as a double
1364 ext_offset=str2double(get(handles.ext_offset,'String'));
1365 delay=str2double(get(hObject,'String'))+ext_offset;
1366 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigTimeDelay',delay);
1367 
1368 % --- Executes during object creation, after setting all properties.
1369 function boo_ext_sept_a_CreateFcn(hObject, eventdata, handles)
1370 % hObject    handle to boo_ext_sept_a (see GCBO)
1371 % eventdata  reserved - to be defined in a future version of MATLAB
1372 % handles    empty - handles not created until after all CreateFcns called
1373 
1374 % Hint: edit controls usually have a white background on Windows.
1375 %       See ISPC and COMPUTER.
1376 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1377     set(hObject,'BackgroundColor','white');
1378 end
1379 
1380 
1381 
1382 function boo_ext_kicker_Callback(hObject, eventdata, handles)
1383 % hObject    handle to boo_ext_kicker (see GCBO)
1384 % eventdata  reserved - to be defined in a future version of MATLAB
1385 % handles    structure with handles and user data (see GUIDATA)
1386 
1387 % Hints: get(hObject,'String') returns contents of boo_ext_kicker as text
1388 %        str2double(get(hObject,'String')) returns contents of boo_ext_kicker as a double
1389 ext_offset=str2double(get(handles.ext_offset,'String'));
1390 delay=str2double(get(hObject,'String'))+ext_offset;
1391 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigTimeDelay',delay);
1392 
1393 
1394 % --- Executes during object creation, after setting all properties.
1395 function boo_ext_kicker_CreateFcn(hObject, eventdata, handles)
1396 % hObject    handle to boo_ext_kicker (see GCBO)
1397 % eventdata  reserved - to be defined in a future version of MATLAB
1398 % handles    empty - handles not created until after all CreateFcns called
1399 
1400 % Hint: edit controls usually have a white background on Windows.
1401 %       See ISPC and COMPUTER.
1402 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1403     set(hObject,'BackgroundColor','white');
1404 end
1405 
1406 
1407 
1408 function ans_inj_sept_p_Callback(hObject, eventdata, handles)
1409 % hObject    handle to ans_inj_sept_p (see GCBO)
1410 % eventdata  reserved - to be defined in a future version of MATLAB
1411 % handles    structure with handles and user data (see GUIDATA)
1412 
1413 % Hints: get(hObject,'String') returns contents of ans_inj_sept_p as text
1414 %        str2double(get(hObject,'String')) returns contents of ans_inj_sept_p as a double
1415 
1416 ext_offset=str2double(get(handles.ext_offset,'String'));
1417 delay=str2double(get(hObject,'String'))+ext_offset;
1418 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigTimeDelay',delay);
1419 
1420 % --- Executes during object creation, after setting all properties.
1421 function ans_inj_sept_p_CreateFcn(hObject, eventdata, handles)
1422 % hObject    handle to ans_inj_sept_p (see GCBO)
1423 % eventdata  reserved - to be defined in a future version of MATLAB
1424 % handles    empty - handles not created until after all CreateFcns called
1425 
1426 % Hint: edit controls usually have a white background on Windows.
1427 %       See ISPC and COMPUTER.
1428 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1429     set(hObject,'BackgroundColor','white');
1430 end
1431 
1432 
1433 
1434 function ans_inj_sept_a_Callback(hObject, eventdata, handles)
1435 % hObject    handle to ans_inj_sept_a (see GCBO)
1436 % eventdata  reserved - to be defined in a future version of MATLAB
1437 % handles    structure with handles and user data (see GUIDATA)
1438 
1439 % Hints: get(hObject,'String') returns contents of ans_inj_sept_a as text
1440 %        str2double(get(hObject,'String')) returns contents of ans_inj_sept_a as a double
1441 
1442 ext_offset=str2double(get(handles.ext_offset,'String'));
1443 delay=str2double(get(hObject,'String'))+ext_offset;
1444 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigTimeDelay',delay);
1445 
1446 % --- Executes during object creation, after setting all properties.
1447 function ans_inj_sept_a_CreateFcn(hObject, eventdata, handles)
1448 % hObject    handle to ans_inj_sept_a (see GCBO)
1449 % eventdata  reserved - to be defined in a future version of MATLAB
1450 % handles    empty - handles not created until after all CreateFcns called
1451 
1452 % Hint: edit controls usually have a white background on Windows.
1453 %       See ISPC and COMPUTER.
1454 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1455     set(hObject,'BackgroundColor','white');
1456 end
1457 
1458 
1459 
1460 function ans_inj_k1_Callback(hObject, eventdata, handles)
1461 % hObject    handle to ans_inj_k1 (see GCBO)
1462 % eventdata  reserved - to be defined in a future version of MATLAB
1463 % handles    structure with handles and user data (see GUIDATA)
1464 
1465 % Hints: get(hObject,'String') returns contents of ans_inj_k1 as text
1466 %        str2double(get(hObject,'String')) returns contents of ans_inj_k1 as a double
1467 
1468 ext_offset=str2double(get(handles.ext_offset,'String'));
1469 delay=str2double(get(hObject,'String'))+ext_offset;
1470 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigTimeDelay',delay);
1471 
1472 
1473 
1474 % --- Executes during object creation, after setting all properties.
1475 function ans_inj_k1_CreateFcn(hObject, eventdata, handles)
1476 % hObject    handle to ans_inj_k1 (see GCBO)
1477 % eventdata  reserved - to be defined in a future version of MATLAB
1478 % handles    empty - handles not created until after all CreateFcns called
1479 
1480 % Hint: edit controls usually have a white background on Windows.
1481 %       See ISPC and COMPUTER.
1482 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1483     set(hObject,'BackgroundColor','white');
1484 end
1485 
1486 
1487 
1488 function ans_inj_k2_Callback(hObject, eventdata, handles)
1489 % hObject    handle to ans_inj_k2 (see GCBO)
1490 % eventdata  reserved - to be defined in a future version of MATLAB
1491 % handles    structure with handles and user data (see GUIDATA)
1492 
1493 % Hints: get(hObject,'String') returns contents of ans_inj_k2 as text
1494 %        str2double(get(hObject,'String')) returns contents of ans_inj_k2 as a double
1495 
1496 ext_offset=str2double(get(handles.ext_offset,'String'));
1497 delay=str2double(get(hObject,'String'))+ext_offset;
1498 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigTimeDelay',delay);
1499 
1500 % --- Executes during object creation, after setting all properties.
1501 function ans_inj_k2_CreateFcn(hObject, eventdata, handles)
1502 % hObject    handle to ans_inj_k2 (see GCBO)
1503 % eventdata  reserved - to be defined in a future version of MATLAB
1504 % handles    empty - handles not created until after all CreateFcns called
1505 
1506 % Hint: edit controls usually have a white background on Windows.
1507 %       See ISPC and COMPUTER.
1508 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1509     set(hObject,'BackgroundColor','white');
1510 end
1511 
1512 
1513 
1514 function ans_inj_k3_Callback(hObject, eventdata, handles)
1515 % hObject    handle to ans_inj_k3 (see GCBO)
1516 % eventdata  reserved - to be defined in a future version of MATLAB
1517 % handles    structure with handles and user data (see GUIDATA)
1518 
1519 % Hints: get(hObject,'String') returns contents of ans_inj_k3 as text
1520 %        str2double(get(hObject,'String')) returns contents of ans_inj_k3 as a double
1521 
1522 ext_offset=str2double(get(handles.ext_offset,'String'));
1523 delay=str2double(get(hObject,'String'))+ext_offset;
1524 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigTimeDelay',delay);
1525 
1526 % --- Executes during object creation, after setting all properties.
1527 function ans_inj_k3_CreateFcn(hObject, eventdata, handles)
1528 % hObject    handle to ans_inj_k3 (see GCBO)
1529 % eventdata  reserved - to be defined in a future version of MATLAB
1530 % handles    empty - handles not created until after all CreateFcns called
1531 
1532 % Hint: edit controls usually have a white background on Windows.
1533 %       See ISPC and COMPUTER.
1534 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1535     set(hObject,'BackgroundColor','white');
1536 end
1537 
1538 
1539 
1540 function ans_inj_k4_Callback(hObject, eventdata, handles)
1541 % hObject    handle to ans_inj_k4 (see GCBO)
1542 % eventdata  reserved - to be defined in a future version of MATLAB
1543 % handles    structure with handles and user data (see GUIDATA)
1544 
1545 % Hints: get(hObject,'String') returns contents of ans_inj_k4 as text
1546 %        str2double(get(hObject,'String')) returns contents of ans_inj_k4 as a double
1547 
1548 ext_offset=str2double(get(handles.ext_offset,'String'));
1549 delay=str2double(get(hObject,'String'))+ext_offset;
1550 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigTimeDelay',delay);
1551 
1552 % --- Executes during object creation, after setting all properties.
1553 function ans_inj_k4_CreateFcn(hObject, eventdata, handles)
1554 % hObject    handle to ans_inj_k4 (see GCBO)
1555 % eventdata  reserved - to be defined in a future version of MATLAB
1556 % handles    empty - handles not created until after all CreateFcns called
1557 
1558 % Hint: edit controls usually have a white background on Windows.
1559 %       See ISPC and COMPUTER.
1560 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1561     set(hObject,'BackgroundColor','white');
1562 end
1563 
1564 
1565 
1566 function ans_dcct_Callback(hObject, eventdata, handles)
1567 % hObject    handle to ans_dcct (see GCBO)
1568 % eventdata  reserved - to be defined in a future version of MATLAB
1569 % handles    structure with handles and user data (see GUIDATA)
1570 
1571 % Hints: get(hObject,'String') returns contents of ans_dcct as text
1572 %        str2double(get(hObject,'String')) returns contents of ans_dcct as a double
1573 
1574 ext_offset=str2double(get(handles.ext_offset,'String'));
1575 delay=str2double(get(hObject,'String'))+ext_offset;
1576 tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctTimeDelay',delay);
1577 
1578 
1579 % --- Executes during object creation, after setting all properties.
1580 function ans_dcct_CreateFcn(hObject, eventdata, handles)
1581 % hObject    handle to ans_dcct (see GCBO)
1582 % eventdata  reserved - to be defined in a future version of MATLAB
1583 % handles    empty - handles not created until after all CreateFcns called
1584 
1585 % Hint: edit controls usually have a white background on Windows.
1586 %       See ISPC and COMPUTER.
1587 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1588     set(hObject,'BackgroundColor','white');
1589 end
1590 
1591 
1592 
1593 function ans_bpm_Callback(hObject, eventdata, handles)
1594 % hObject    handle to ans_bpm (see GCBO)
1595 % eventdata  reserved - to be defined in a future version of MATLAB
1596 % handles    structure with handles and user data (see GUIDATA)
1597 
1598 % Hints: get(hObject,'String') returns contents of ans_bpm as text
1599 %        str2double(get(hObject,'String')) returns contents of ans_bpm as a double
1600 
1601 ext_offset=str2double(get(handles.ext_offset,'String'));
1602 delay=str2double(get(hObject,'String'))+ext_offset;
1603 tango_write_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',delay);
1604 tango_write_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1605 tango_write_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1606 tango_write_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1607 tango_write_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1608 tango_write_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1609 tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1610 tango_write_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1611 tango_write_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1612 tango_write_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1613 tango_write_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1614 tango_write_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1615 tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1616 tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1617 tango_write_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1618 tango_write_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1619 
1620 
1621 
1622 % --- Executes during object creation, after setting all properties.
1623 function ans_bpm_CreateFcn(hObject, eventdata, handles)
1624 % hObject    handle to ans_bpm (see GCBO)
1625 % eventdata  reserved - to be defined in a future version of MATLAB
1626 % handles    empty - handles not created until after all CreateFcns called
1627 
1628 % Hint: edit controls usually have a white background on Windows.
1629 %       See ISPC and COMPUTER.
1630 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1631     set(hObject,'BackgroundColor','white');
1632 end
1633 
1634 
1635 
1636 function ext_address_Callback(hObject, eventdata, handles)
1637 % hObject    handle to ext_address (see GCBO)
1638 % eventdata  reserved - to be defined in a future version of MATLAB
1639 % handles    structure with handles and user data (see GUIDATA)
1640 
1641 % Hints: get(hObject,'String') returns contents of ext_address as text
1642 %        str2double(get(hObject,'String')) returns contents of ext_address as a double
1643 %'ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue'
1644 
1645 delay=str2double(get(hObject,'String'));
1646 tango_write_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue',delay);
1647 
1648 % --- Executes during object creation, after setting all properties.
1649 function ext_address_CreateFcn(hObject, eventdata, handles)
1650 % hObject    handle to ext_address (see GCBO)
1651 % eventdata  reserved - to be defined in a future version of MATLAB
1652 % handles    empty - handles not created until after all CreateFcns called
1653 
1654 % Hint: edit controls usually have a white background on Windows.
1655 %       See ISPC and COMPUTER.
1656 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1657     set(hObject,'BackgroundColor','white');
1658 end
1659 
1660 
1661 
1662 function soft_address1_Callback(hObject, eventdata, handles)
1663 % hObject    handle to soft_address1 (see GCBO)
1664 % eventdata  reserved - to be defined in a future version of MATLAB
1665 % handles    structure with handles and user data (see GUIDATA)
1666 
1667 % Hints: get(hObject,'String') returns contents of soft_address1 as text
1668 %        str2double(get(hObject,'String')) returns contents of soft_address1 as a double
1669 
1670 delay=str2double(get(hObject,'String'));
1671 tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',delay);
1672 
1673 % --- Executes during object creation, after setting all properties.
1674 function soft_address1_CreateFcn(hObject, eventdata, handles)
1675 % hObject    handle to soft_address1 (see GCBO)
1676 % eventdata  reserved - to be defined in a future version of MATLAB
1677 % handles    empty - handles not created until after all CreateFcns called
1678 
1679 % Hint: edit controls usually have a white background on Windows.
1680 %       See ISPC and COMPUTER.
1681 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1682     set(hObject,'BackgroundColor','white');
1683 end
1684 
1685 
1686 % --- Executes on button press in radiobutton6.
1687 function radiobutton6_Callback(hObject, eventdata, handles)
1688 % hObject    handle to radiobutton6 (see GCBO)
1689 % eventdata  reserved - to be defined in a future version of MATLAB
1690 % handles    structure with handles and user data (see GUIDATA)
1691 
1692 % Hint: get(hObject,'Value') returns toggle state of radiobutton6
1693 
1694 
1695 % --- Executes on button press in pushbutton8.
1696 function pushbutton8_Callback(hObject, eventdata, handles)
1697 % hObject    handle to pushbutton8 (see GCBO)
1698 % eventdata  reserved - to be defined in a future version of MATLAB
1699 % handles    structure with handles and user data (see GUIDATA)
1700 
1701 
1702 % --- Executes on button press in pushbutton9.
1703 function pushbutton9_Callback(hObject, eventdata, handles)
1704 % hObject    handle to pushbutton9 (see GCBO)
1705 % eventdata  reserved - to be defined in a future version of MATLAB
1706 % handles    structure with handles and user data (see GUIDATA)
1707 
1708 
1709 % --- Executes on button press in button_extmoins.
1710 function button_extmoins_Callback(hObject, eventdata, handles)
1711 % hObject    handle to button_extmoins (see GCBO)
1712 % eventdata  reserved - to be defined in a future version of MATLAB
1713 % handles    structure with handles and user data (see GUIDATA)
1714 
1715 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue');
1716 step=temp.value(1)-52*0.52243;
1717 tango_write_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue',step);
1718 temp=tango_read_attribute2('ANS/SY/CENTRAL','ExtractionOffsetTimeValue');
1719 set(handles.ext_address,'String',num2str(temp.value(1)));
1720 
1721 % --- Executes on button press in button_extplus.
1722 function button_extplus_Callback(hObject, eventdata, handles)
1723 % hObject    handle to button_extplus (see GCBO)
1724 % eventdata  reserved - to be defined in a future version of MATLAB
1725 % handles    structure with handles and user data (see GUIDATA)
1726 
1727 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue');
1728 step=temp.value(1)+52*0.52243;
1729 tango_write_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue',step);
1730 temp=tango_read_attribute2('ANS/SY/CENTRAL','ExtractionOffsetTimeValue');
1731 set(handles.ext_address,'String',num2str(temp.value(1)));
1732 
1733 function sdc2_Callback(hObject, eventdata, handles)
1734 % hObject    handle to sdc2 (see GCBO)
1735 % eventdata  reserved - to be defined in a future version of MATLAB
1736 % handles    structure with handles and user data (see GUIDATA)
1737 
1738 % Hints: get(hObject,'String') returns contents of sdc2 as text
1739 %        str2double(get(hObject,'String')) returns contents of sdc2 as a double
1740 ext_offset=str2double(get(handles.ext_offset,'String'));
1741 delay=str2double(get(hObject,'String'))+ext_offset;
1742 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareTimeDelay',delay);
1743 
1744 % --- Executes during object creation, after setting all properties.
1745 function sdc2_CreateFcn(hObject, eventdata, handles)
1746 % hObject    handle to sdc2 (see GCBO)
1747 % eventdata  reserved - to be defined in a future version of MATLAB
1748 % handles    empty - handles not created until after all CreateFcns called
1749 
1750 % Hint: edit controls usually have a white background on Windows.
1751 %       See ISPC and COMPUTER.
1752 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1753     set(hObject,'BackgroundColor','white');
1754 end
1755 
1756 
1757 
1758 function lt2_emittance_Callback(hObject, eventdata, handles)
1759 % hObject    handle to lt2_emittance (see GCBO)
1760 % eventdata  reserved - to be defined in a future version of MATLAB
1761 % handles    structure with handles and user data (see GUIDATA)
1762 
1763 % Hints: get(hObject,'String') returns contents of lt2_emittance as text
1764 %        str2double(get(hObject,'String')) returns contents of lt2_emittance as a double
1765 ext_offset=str2double(get(handles.ext_offset,'String'));
1766 delay=str2double(get(hObject,'String'))+ext_offset;
1767 tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'emittanceTimeDelay',delay);
1768 tango_write_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'emittanceTimeDelay',delay);
1769 
1770 
1771 % --- Executes during object creation, after setting all properties.
1772 function lt2_emittance_CreateFcn(hObject, eventdata, handles)
1773 % hObject    handle to lt2_emittance (see GCBO)
1774 % eventdata  reserved - to be defined in a future version of MATLAB
1775 % handles    empty - handles not created until after all CreateFcns called
1776 
1777 % Hint: edit controls usually have a white background on Windows.
1778 %       See ISPC and COMPUTER.
1779 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1780     set(hObject,'BackgroundColor','white');
1781 end
1782 
1783 
1784 
1785 function lt2_bpm_Callback(hObject, eventdata, handles)
1786 % hObject    handle to lt2_bpm (see GCBO)
1787 % eventdata  reserved - to be defined in a future version of MATLAB
1788 % handles    structure with handles and user data (see GUIDATA)
1789 
1790 % Hints: get(hObject,'String') returns contents of lt2_bpm as text
1791 %        str2double(get(hObject,'String')) returns contents of lt2_bpm as a double
1792 ext_offset=str2double(get(handles.ext_offset,'String'));
1793 delay=str2double(get(hObject,'String'))+ext_offset;
1794 tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',delay);
1795 
1796 % --- Executes during object creation, after setting all properties.
1797 function lt2_bpm_CreateFcn(hObject, eventdata, handles)
1798 % hObject    handle to lt2_bpm (see GCBO)
1799 % eventdata  reserved - to be defined in a future version of MATLAB
1800 % handles    empty - handles not created until after all CreateFcns called
1801 
1802 % Hint: edit controls usually have a white background on Windows.
1803 %       See ISPC and COMPUTER.
1804 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1805     set(hObject,'BackgroundColor','white');
1806 end
1807 
1808 
1809 
1810 function lt2_osc_Callback(hObject, eventdata, handles)
1811 % hObject    handle to lt2_osc (see GCBO)
1812 % eventdata  reserved - to be defined in a future version of MATLAB
1813 % handles    structure with handles and user data (see GUIDATA)
1814 
1815 % Hints: get(hObject,'String') returns contents of lt2_osc as text
1816 %        str2double(get(hObject,'String')) returns contents of lt2_osc as a double
1817 ext_offset=str2double(get(handles.ext_offset,'String'));
1818 delay=str2double(get(hObject,'String'))+ext_offset;
1819 tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'oscTimeDelay',delay);
1820 
1821 % --- Executes during object creation, after setting all properties.
1822 function lt2_osc_CreateFcn(hObject, eventdata, handles)
1823 % hObject    handle to lt2_osc (see GCBO)
1824 % eventdata  reserved - to be defined in a future version of MATLAB
1825 % handles    empty - handles not created until after all CreateFcns called
1826 
1827 % Hint: edit controls usually have a white background on Windows.
1828 %       See ISPC and COMPUTER.
1829 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1830     set(hObject,'BackgroundColor','white');
1831 end
1832 
1833 
1834 
1835 function lin_modulateur_Callback(hObject, eventdata, handles)
1836 % hObject    handle to lin_modulateur (see GCBO)
1837 % eventdata  reserved - to be defined in a future version of MATLAB
1838 % handles    structure with handles and user data (see GUIDATA)
1839 
1840 % Hints: get(hObject,'String') returns contents of lin_modulateur as text
1841 %        str2double(get(hObject,'String')) returns contents of lin_modulateur as a double
1842 inj_offset=str2double(get(handles.inj_offset,'String'));
1843 delay=str2double(get(hObject,'String'))+inj_offset;
1844 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay',delay);
1845 
1846 % --- Executes during object creation, after setting all properties.
1847 function lin_modulateur_CreateFcn(hObject, eventdata, handles)
1848 % hObject    handle to lin_modulateur (see GCBO)
1849 % eventdata  reserved - to be defined in a future version of MATLAB
1850 % handles    empty - handles not created until after all CreateFcns called
1851 
1852 % Hint: edit controls usually have a white background on Windows.
1853 %       See ISPC and COMPUTER.
1854 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1855     set(hObject,'BackgroundColor','white');
1856 end
1857 
1858 
1859 
1860 function inj_offset_Callback(hObject, eventdata, handles)
1861 % hObject    handle to inj_offset (see GCBO)
1862 % eventdata  reserved - to be defined in a future version of MATLAB
1863 % handles    structure with handles and user data (see GUIDATA)
1864 
1865 % Hints: get(hObject,'String') returns contents of inj_offset as text
1866 %        str2double(get(hObject,'String')) returns contents of inj_offset as a double
1867 
1868 inj_offset=str2double(get(hObject,'String'));
1869 ext_offset=str2double(get(handles.ext_offset,'String'));
1870 save('synchro_offset', 'inj_offset' , 'ext_offset')
1871 
1872 %LIN
1873 delay=str2double(get(handles.lin_canon,'String'))+inj_offset;
1874 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay',delay);
1875 
1876 delay=str2double(get(handles.lin_modulateur,'String'))+inj_offset;
1877 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay',delay);
1878 
1879 delay=str2double(get(handles.sdc1,'String'))+inj_offset;
1880 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay',delay);
1881 
1882 
1883 % LT1
1884 delay=str2double(get(handles.lt1_MC2,'String'))+inj_offset;
1885 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay',delay);
1886 
1887 delay=str2double(get(handles.lt1_MC1,'String'))+inj_offset;
1888 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay',delay);
1889 
1890 delay=str2double(get(handles.lt1_emittance,'String'))+inj_offset;
1891 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay',delay);
1892 
1893 delay=str2double(get(handles.lt1_osc,'String'))+inj_offset;
1894 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay',delay);
1895 
1896 
1897 % BOO
1898 delay=str2double(get(handles.boo_inj_septum,'String'))+inj_offset;
1899 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay',delay);
1900 
1901 delay=str2double(get(handles.boo_inj_kicker,'String'))+inj_offset;
1902 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay',delay);
1903 
1904 delay=str2double(get(handles.boo_bpm,'String'))+inj_offset;
1905 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay',delay);
1906 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigTimeDelay',delay);
1907 tango_write_attribute2('BOO-BTB/SY/LOCAL.DG.1', 'bpm-btb.trigTimeDelay',delay);
1908 tango_write_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'bpm-btc.trigTimeDelay',delay);
1909 
1910 
1911 delay=str2double(get(handles.boo_nod,'String'))+inj_offset;
1912 tango_write_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'bpm-onde.trigTimeDelay',delay);
1913 
1914 delay=str2double(get(handles.boo_dcct,'String'))+inj_offset;
1915 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay',delay);
1916 
1917 
1918 
1919 % --- Executes during object creation, after setting all properties.
1920 function inj_offset_CreateFcn(hObject, eventdata, handles)
1921 % hObject    handle to inj_offset (see GCBO)
1922 % eventdata  reserved - to be defined in a future version of MATLAB
1923 % handles    empty - handles not created until after all CreateFcns called
1924 
1925 % Hint: edit controls usually have a white background on Windows.
1926 %       See ISPC and COMPUTER.
1927 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1928     set(hObject,'BackgroundColor','white');
1929 end
1930 
1931 
1932 
1933 function ext_offset_Callback(hObject, eventdata, handles)
1934 % hObject    handle to ext_offset (see GCBO)
1935 % eventdata  reserved - to be defined in a future version of MATLAB
1936 % handles    structure with handles and user data (see GUIDATA)
1937 
1938 % Hints: get(hObject,'String') returns contents of ext_offset as text
1939 %        str2double(get(hObject,'String')) returns contents of ext_offset as a double
1940 
1941 ext_offset=str2double(get(hObject,'String'));
1942 inj_offset=str2double(get(handles.inj_offset,'String'));
1943 save('synchro_offset', 'inj_offset' , 'ext_offset')
1944 
1945 %BOO
1946 delay=str2double(get(handles.boo_ext_dof,'String'))+ext_offset;
1947 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigTimeDelay',delay);
1948 
1949 delay=str2double(get(handles.boo_ext_sept_p,'String'))+ext_offset;
1950 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigTimeDelay',delay);
1951 
1952 delay=str2double(get(handles.boo_ext_sept_a,'String'))+ext_offset;
1953 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigTimeDelay',delay);
1954 
1955 delay=str2double(get(handles.boo_ext_kicker,'String'))+ext_offset;
1956 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigTimeDelay',delay);
1957 
1958 delay=str2double(get(handles.sdc2,'String'))+ext_offset;
1959 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareTimeDelay',delay);
1960 
1961 %LT2
1962 delay=str2double(get(handles.lt2_bpm,'String'))+ext_offset;
1963 tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',delay);
1964 
1965 delay=str2double(get(handles.lt2_osc,'String'))+ext_offset;
1966 tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'oscTimeDelay',delay);
1967 
1968 delay=str2double(get(handles.lt2_emittance,'String'))+ext_offset;
1969 tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'emittanceTimeDelay',delay);
1970 
1971 
1972 % --- Executes during object creation, after setting all properties.
1973 function ext_offset_CreateFcn(hObject, eventdata, handles)
1974 % hObject    handle to ext_offset (see GCBO)
1975 % eventdata  reserved - to be defined in a future version of MATLAB
1976 % handles    empty - handles not created until after all CreateFcns called
1977 
1978 % Hint: edit controls usually have a white background on Windows.
1979 %       See ISPC and COMPUTER.
1980 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1981     set(hObject,'BackgroundColor','white');
1982 end
1983 
1984 
1985 % --- Executes on button press in Acquisition_address.
1986 function Acquisition_address_Callback(hObject, eventdata, handles)
1987 % hObject    handle to Acquisition_address (see GCBO)
1988 % eventdata  reserved - to be defined in a future version of MATLAB
1989 % handles    structure with handles and user data (see GUIDATA)
1990 
1991 set(handles.inj_offset,'Enable','off');
1992 set(handles.sdc1,'Enable','off');
1993 set(handles.lin_canon,'Enable','off');
1994 set(handles.boo_bpm,'Enable','off');
1995 set(handles.lt1_emittance,'Enable','off');
1996 set(handles.lt1_MC1,'Enable','off');
1997 set(handles.lt1_MC2,'Enable','off');
1998 set(handles.lt1_osc,'Enable','off');
1999 set(handles.boo_dcct,'Enable','off');
2000 set(handles.boo_nod,'Enable','off');
2001 set(handles.boo_inj_septum,'Enable','off');
2002 set(handles.boo_inj_kicker,'Enable','off');
2003 set(handles.alim_dipole,'Enable','off');
2004 set(handles.alim_qf,'Enable','off');
2005 set(handles.alim_qd,'Enable','off');
2006 set(handles.alim_sf,'Enable','off');
2007 set(handles.alim_sd,'Enable','off');
2008 set(handles.boo_rf,'Enable','off');
2009 set(handles.lin_modulateur,'Enable','off');
2010 set(handles.ext_offset,'Enable','off');
2011 set(handles.boo_ext_dof,'Enable','off');
2012 set(handles.boo_ext_sept_p,'Enable','off');
2013 set(handles.boo_ext_sept_a,'Enable','off');
2014 set(handles.boo_ext_kicker,'Enable','off');
2015 set(handles.sdc2,'Enable','off');
2016 set(handles.lt2_emittance,'Enable','off');
2017 set(handles.lt2_osc,'Enable','off');
2018 set(handles.lt2_bpm,'Enable','off');
2019 set(handles.ans_inj_k1,'Enable','off');
2020 set(handles.ans_inj_k2,'Enable','off');
2021 set(handles.ans_inj_k3,'Enable','off');
2022 set(handles.ans_inj_k4,'Enable','off');
2023 set(handles.ans_inj_sept_p,'Enable','off');
2024 set(handles.ans_inj_sept_a,'Enable','off');
2025 set(handles.ans_bpm,'Enable','off');
2026 set(handles.ans_dcct,'Enable','off');
2027 
2028 n=1;
2029 
2030 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay');
2031 set(handles.pc_address,'String',num2str(temp.value(n)));
2032 
2033 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
2034 set(handles.inj_address,'String',num2str(temp.value(n)));
2035 
2036 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
2037 set(handles.soft_address,'String',num2str(temp.value(n)));
2038 
2039 temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue');
2040 set(handles.ext_address,'String',num2str(temp.value(n)));
2041 
2042 
2043 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent');
2044 set(handles.sdc1,'String',num2str(temp.value(n)));
2045 
2046 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent');
2047 set(handles.lin_canon,'String',num2str(temp.value(n)));
2048 
2049 temp=tango_read_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigEvent');
2050 set(handles.boo_bpm,'String',num2str(temp.value(n)));
2051 
2052 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent');
2053 set(handles.lt1_emittance,'String',num2str(temp.value(n)));
2054 
2055 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event');
2056 set(handles.lt1_MC1,'String',num2str(temp.value(n)));
2057 
2058 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event');
2059 set(handles.lt1_MC2,'String',num2str(temp.value(n)));
2060 
2061 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent');
2062 set(handles.lt1_osc,'String',num2str(temp.value(n)));
2063 
2064 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent');
2065 set(handles.boo_dcct,'String',num2str(temp.value(n)));
2066 
2067 temp=tango_read_attribute2('BOO-BTC/SY/LOCAL.DG.1', 'bpm-onde.trigEvent');
2068 set(handles.boo_nod,'String',num2str(temp.value(n)));
2069 
2070 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent');
2071 set(handles.boo_inj_septum,'String',num2str(temp.value(n)));
2072 
2073 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent');
2074 set(handles.boo_inj_kicker,'String',num2str(temp.value(n)));
2075 
2076 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpEvent');
2077 set(handles.alim_dipole,'String',num2str(temp.value(n)));
2078 
2079 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfEvent');
2080 set(handles.alim_qf,'String',num2str(temp.value(n)));
2081 
2082 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdEvent');
2083 set(handles.alim_qd,'String',num2str(temp.value(n)));
2084 
2085 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfEvent');
2086 set(handles.alim_sf,'String',num2str(temp.value(n)));
2087 
2088 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdEvent');
2089 set(handles.alim_sd,'String',num2str(temp.value(n)));
2090 
2091 temp=tango_read_attribute2('BOO/SY/LOCAL.RF.1', 'rfEvent');
2092 set(handles.boo_rf,'String',num2str(temp.value(n)));
2093 
2094 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareEvent');
2095 set(handles.lin_modulateur,'String',num2str(temp.value(n)));
2096 
2097 
2098 
2099 
2100 
2101 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent');
2102 set(handles.boo_ext_dof,'String',num2str(temp.value(n)));
2103 
2104 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent');
2105 set(handles.boo_ext_sept_p,'String',num2str(temp.value(n)));
2106 
2107 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent');
2108 set(handles.boo_ext_sept_a,'String',num2str(temp.value(n)));
2109 
2110 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent');
2111 set(handles.boo_ext_kicker,'String',num2str(temp.value(n)));
2112 
2113 
2114 
2115 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent');
2116 set(handles.sdc2,'String',num2str(temp.value(n)));
2117 
2118 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'emittanceEvent');
2119 set(handles.lt2_emittance,'String',num2str(temp.value(n)));
2120 
2121 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'oscEvent');
2122 set(handles.lt2_osc,'String',num2str(temp.value(n)));
2123 
2124 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigEvent');
2125 set(handles.lt2_bpm,'String',num2str(temp.value(n)));
2126 
2127 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigEvent');
2128 set(handles.ans_inj_k1,'String',num2str(temp.value(n)));
2129 
2130 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigEvent');
2131 set(handles.ans_inj_k2,'String',num2str(temp.value(n)));
2132 
2133 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigEvent');
2134 set(handles.ans_inj_k3,'String',num2str(temp.value(n)));
2135 
2136 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigEvent');
2137 set(handles.ans_inj_k4,'String',num2str(temp.value(n)));
2138 
2139 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigEvent');
2140 set(handles.ans_inj_sept_p,'String',num2str(temp.value(n)));
2141 
2142 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigEvent');
2143 set(handles.ans_inj_sept_a,'String',num2str(temp.value(n)));
2144 
2145 temp=tango_read_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctEvent');
2146 set(handles.ans_dcct,'String',num2str(temp.value(n)));
2147 
2148 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigEvent');
2149 set(handles.ans_bpm,'String',num2str(temp.value(n)));
2150 
2151 
2152 
2153 
2154 
2155 
2156 % --- Executes on button press in button_offinj_moins.
2157 function button_offinj_moins_Callback(hObject, eventdata, handles)
2158 % hObject    handle to button_offinj_moins (see GCBO)
2159 % eventdata  reserved - to be defined in a future version of MATLAB
2160 % handles    structure with handles and user data (see GUIDATA)
2161 
2162 temp=str2double(get(handles.inj_offset,'String'));
2163 step=temp-52*0.52243;
2164 set(handles.inj_offset,'String',step);
2165 inj_offset_Callback(handles.inj_offset, eventdata, handles);
2166 
2167 % --- Executes on button press in button_offinj_plus.
2168 function button_offinj_plus_Callback(hObject, eventdata, handles)
2169 % hObject    handle to button_offinj_plus (see GCBO)
2170 % eventdata  reserved - to be defined in a future version of MATLAB
2171 % handles    structure with handles and user data (see GUIDATA)
2172 
2173 temp=str2double(get(handles.inj_offset,'String'));
2174 step=temp+52*0.52243;
2175 set(handles.inj_offset,'String',step);
2176 inj_offset_Callback(handles.inj_offset, eventdata, handles);
2177 
2178 % --- Executes on button press in button_offext_moins.
2179 function button_offext_moins_Callback(hObject, eventdata, handles)
2180 % hObject    handle to button_offext_moins (see GCBO)
2181 % eventdata  reserved - to be defined in a future version of MATLAB
2182 % handles    structure with handles and user data (see GUIDATA)
2183 
2184 temp=str2double(get(handles.ext_offset,'String'));
2185 step=temp-52*0.52243;
2186 set(handles.ext_offset,'String',step);
2187 ext_offset_Callback(handles.ext_offset, eventdata, handles);
2188 
2189 % --- Executes on button press in button_offext_plus.
2190 function button_offext_plus_Callback(hObject, eventdata, handles)
2191 % hObject    handle to button_offext_plus (see GCBO)
2192 % eventdata  reserved - to be defined in a future version of MATLAB
2193 % handles    structure with handles and user data (see GUIDATA)
2194 
2195 temp=str2double(get(handles.ext_offset,'String'));
2196 step=temp+52*0.52243;
2197 set(handles.ext_offset,'String',step);
2198 ext_offset_Callback(handles.ext_offset, eventdata, handles);
2199

Generated on Mon 21-May-2007 15:35:27 by m2html © 2003