1 | function varargout = save_boo(varargin) |
---|
2 | % SAVE_BOO M-file for save_boo.fig |
---|
3 | % SAVE_BOO, by itself, creates a new SAVE_BOO or raises the existing |
---|
4 | % singleton*. |
---|
5 | % |
---|
6 | % |
---|
7 | % SAVE_BOO('CALLBACK',hObject,eventData,handles,...) calls the local |
---|
8 | % function named CALLBACK in SAVE_BOO.M with the given input arguments. |
---|
9 | % |
---|
10 | % SAVE_BOO('Property','Value',...) creates a new SAVE_BOO or raises the |
---|
11 | % existing singleton*. Starting from the left, property value pairs are |
---|
12 | % applied to the GUI before save_boo_OpeningFunction gets called. An |
---|
13 | % unrecognized property name or invalid value makes property application |
---|
14 | % stop. All inputs are passed to save_boo_OpeningFcn via varargin. |
---|
15 | % |
---|
16 | % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one |
---|
17 | % instance to run (singleton)". |
---|
18 | % |
---|
19 | % See also: GUIDE, GUIDATA, GUIHANDLES |
---|
20 | |
---|
21 | % Edit the above text to modify the response to help save_boo |
---|
22 | |
---|
23 | % AUGUST 29TH, 2007 : PATH MODIFIED USING GENERIC FUNCTIONS |
---|
24 | |
---|
25 | % Last Modified by GUIDE v2.5 30-May-2006 09:30:29 |
---|
26 | |
---|
27 | % Begin initialization code - DO NOT EDIT |
---|
28 | gui_Singleton = 1; |
---|
29 | gui_State = struct('gui_Name', mfilename, ... |
---|
30 | 'gui_Singleton', gui_Singleton, ... |
---|
31 | 'gui_OpeningFcn', @save_boo_OpeningFcn, ... |
---|
32 | 'gui_OutputFcn', @save_boo_OutputFcn, ... |
---|
33 | 'gui_LayoutFcn', [] , ... |
---|
34 | 'gui_Callback', []); |
---|
35 | if nargin && ischar(varargin{1}) |
---|
36 | gui_State.gui_Callback = str2func(varargin{1}); |
---|
37 | end |
---|
38 | |
---|
39 | if nargout |
---|
40 | [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); |
---|
41 | else |
---|
42 | gui_mainfcn(gui_State, varargin{:}); |
---|
43 | end |
---|
44 | % End initialization code - DO NOT EDIT |
---|
45 | |
---|
46 | |
---|
47 | % --- Executes just before save_boo is made visible. |
---|
48 | function save_boo_OpeningFcn(hObject, eventdata, handles, varargin) |
---|
49 | % This function has no output args, see OutputFcn. |
---|
50 | % hObject handle to figure |
---|
51 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
52 | % handles structure with handles and user data (see GUIDATA) |
---|
53 | % varargin command line arguments to save_boo (see VARARGIN) |
---|
54 | |
---|
55 | % Choose default command line output for save_boo |
---|
56 | handles.output = hObject; |
---|
57 | button_update_boo_Callback(hObject, eventdata, handles) |
---|
58 | |
---|
59 | % Update handles structure |
---|
60 | guidata(hObject, handles); |
---|
61 | |
---|
62 | % UIWAIT makes save_b |
---|
63 | % Directory = '/home/matlabML/measdata/Boosterdata/Datatemp'; |
---|
64 | % pwdold = pwd; |
---|
65 | % cd(Directory); |
---|
66 | % |
---|
67 | % cd(pwdold);oo wait for user response (see UIRESUME) |
---|
68 | % % uiwait(handles.figure1); |
---|
69 | |
---|
70 | |
---|
71 | % --- Outputs from this function are returned to the command line. |
---|
72 | function varargout = save_boo_OutputFcn(hObject, eventdata, handles) |
---|
73 | % varargout cell array for returning output args (see VARARGOUT); |
---|
74 | % hObject handle to figure |
---|
75 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
76 | % handles structure with handles and user data (see GUIDATA) |
---|
77 | |
---|
78 | % Get default command line output from handles structure |
---|
79 | varargout{1} = handles.output; |
---|
80 | |
---|
81 | |
---|
82 | % --- Executes on button press in button_save_all. |
---|
83 | function button_save_all_Callback(hObject, eventdata, handles) |
---|
84 | % hObject handle to button_save_all (see GCBO) |
---|
85 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
86 | % handles structure with handles and user data (see GUIDATA) |
---|
87 | |
---|
88 | file=appendtimestamp('boo_all'); |
---|
89 | set(handles.edit_file,'String',file); |
---|
90 | |
---|
91 | % commentaire |
---|
92 | boo=load_param; |
---|
93 | boo.date =datestr(clock); |
---|
94 | boo.comment=get(handles.edit_legend,'String'); |
---|
95 | % commentaire |
---|
96 | orbit=load_orbit_corr; |
---|
97 | orbit.date =datestr(clock); |
---|
98 | orbit.comment=get(handles.edit_legend,'String'); |
---|
99 | % commentaire |
---|
100 | timing=get_synchro; |
---|
101 | timing.date =datestr(clock); |
---|
102 | timing.comment=get(handles.edit_legend,'String'); |
---|
103 | |
---|
104 | % sauvegarde |
---|
105 | Directory = [getfamilydata('Directory','DataRoot') 'Datatemp']; |
---|
106 | pwdold = pwd; |
---|
107 | cd(Directory); |
---|
108 | save(file, 'boo' ,'timing' ,'orbit'); |
---|
109 | cd(pwdold); |
---|
110 | |
---|
111 | |
---|
112 | |
---|
113 | |
---|
114 | % --- Executes on button press in button_save_param. |
---|
115 | function button_save_param_Callback(hObject, eventdata, handles) |
---|
116 | % hObject handle to button_save_param (see GCBO) |
---|
117 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
118 | % handles structure with handles and user data (see GUIDATA) |
---|
119 | % save parameter |
---|
120 | |
---|
121 | file=appendtimestamp('boo'); |
---|
122 | set(handles.edit_file,'String',file); |
---|
123 | |
---|
124 | % commentaire |
---|
125 | boo=load_param; |
---|
126 | boo.date =datestr(clock); |
---|
127 | boo.comment=get(handles.edit_legend,'String'); |
---|
128 | boo |
---|
129 | % sauvegarde |
---|
130 | Directory = [getfamilydata('Directory','DataRoot') 'Datatemp']; |
---|
131 | pwdold = pwd; |
---|
132 | cd(Directory); |
---|
133 | save(file, 'boo'); |
---|
134 | cd(pwdold); |
---|
135 | |
---|
136 | |
---|
137 | |
---|
138 | % --- Executes on button press in button_save_orbir_corr. |
---|
139 | function button_save_orbir_corr_Callback(hObject, eventdata, handles) |
---|
140 | % hObject handle to button_save_orbir_corr (see GCBO) |
---|
141 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
142 | % handles structure with handles and user data (see GUIDATA) |
---|
143 | % save parameter |
---|
144 | file=appendtimestamp('orbit'); |
---|
145 | set(handles.edit_file,'String',file); |
---|
146 | |
---|
147 | % commentaire |
---|
148 | orbit=load_orbit_corr; |
---|
149 | orbit.date =datestr(clock); |
---|
150 | orbit.comment=get(handles.edit_legend,'String'); |
---|
151 | orbit |
---|
152 | |
---|
153 | % sauvegarde |
---|
154 | Directory = [getfamilydata('Directory','DataRoot') 'Datatemp']; |
---|
155 | pwdold = pwd; |
---|
156 | cd(Directory); |
---|
157 | save(file, 'orbit'); |
---|
158 | cd(pwdold); |
---|
159 | |
---|
160 | |
---|
161 | % --- Executes on button press in button_save_synchro. |
---|
162 | function button_save_synchro_Callback(hObject, eventdata, handles) |
---|
163 | % hObject handle to button_save_synchro (see GCBO) |
---|
164 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
165 | % handles structure with handles and user data (see GUIDATA) |
---|
166 | |
---|
167 | file=appendtimestamp('timing'); |
---|
168 | set(handles.edit_file,'String',file); |
---|
169 | |
---|
170 | % commentaire |
---|
171 | timing=get_synchro; |
---|
172 | timing.date =datestr(clock); |
---|
173 | timing.comment=get(handles.edit_legend,'String'); |
---|
174 | timing |
---|
175 | |
---|
176 | % sauvegarde |
---|
177 | Directory = [getfamilydata('Directory','DataRoot') 'Datatemp']; |
---|
178 | pwdold = pwd; |
---|
179 | cd(Directory); |
---|
180 | save(file, 'timing'); |
---|
181 | cd(pwdold); |
---|
182 | |
---|
183 | |
---|
184 | function edit_legend_Callback(hObject, eventdata, handles) |
---|
185 | % hObject handle to edit_legend (see GCBO) |
---|
186 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
187 | % handles structure with handles and user data (see GUIDATA) |
---|
188 | |
---|
189 | % Hints: get(hObject,'String') returns contents of edit_legend as text |
---|
190 | % str2double(get(hObject,'String')) returns contents of edit_legend as a double |
---|
191 | get(hObject,'String') |
---|
192 | |
---|
193 | % --- Executes during object creation, after setting all properties. |
---|
194 | function edit_legend_CreateFcn(hObject, eventdata, handles) |
---|
195 | % hObject handle to edit_legend (see GCBO) |
---|
196 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
197 | % handles empty - handles not created until after all CreateFcns called |
---|
198 | |
---|
199 | % Hint: edit controls usually have a white background on Windows. |
---|
200 | % See ISPC and COMPUTER. |
---|
201 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
202 | set(hObject,'BackgroundColor','white'); |
---|
203 | end |
---|
204 | |
---|
205 | |
---|
206 | |
---|
207 | function edit_file_Callback(hObject, eventdata, handles) |
---|
208 | % hObject handle to edit_file (see GCBO) |
---|
209 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
210 | % handles structure with handles and user data (see GUIDATA) |
---|
211 | |
---|
212 | % Hints: get(hObject,'String') returns contents of edit_file as text |
---|
213 | % str2double(get(hObject,'String')) returns contents of edit_file as a double |
---|
214 | |
---|
215 | |
---|
216 | % --- Executes during object creation, after setting all properties. |
---|
217 | function edit_file_CreateFcn(hObject, eventdata, handles) |
---|
218 | % hObject handle to edit_file (see GCBO) |
---|
219 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
220 | % handles empty - handles not created until after all CreateFcns called |
---|
221 | |
---|
222 | % Hint: edit controls usually have a white background on Windows. |
---|
223 | % See ISPC and COMPUTER. |
---|
224 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
225 | set(hObject,'BackgroundColor','white'); |
---|
226 | end |
---|
227 | |
---|
228 | |
---|
229 | % --- Executes on button press in button_update_boo. |
---|
230 | function button_update_boo_Callback(hObject, eventdata, handles) |
---|
231 | % hObject handle to button_update_boo (see GCBO) |
---|
232 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
233 | % handles structure with handles and user data (see GUIDATA) |
---|
234 | |
---|
235 | Directory = [getfamilydata('Directory','DataRoot') 'Datatemp']; |
---|
236 | pwdold = pwd; |
---|
237 | cd(Directory); |
---|
238 | |
---|
239 | listefile = dir('boo_*') ; |
---|
240 | comment={}; |
---|
241 | separateur={}; |
---|
242 | for i=1:length(listefile) |
---|
243 | load(listefile(i).name); |
---|
244 | comment=strvcat(comment , boo.comment); |
---|
245 | separateur=strvcat(separateur , ' ==> ' ); |
---|
246 | end |
---|
247 | [sorted_names,sorted_index] = sortrows({listefile.name}'); |
---|
248 | handles.files_names=sorted_names; |
---|
249 | handles.files_index=sorted_index; |
---|
250 | handles.files_comment=comment; |
---|
251 | guidata(hObject, handles); |
---|
252 | |
---|
253 | ttt=strcat(sorted_names,separateur,comment); |
---|
254 | set(handles.listbox1,'String',ttt,'Value',1) |
---|
255 | cd(pwdold); |
---|
256 | |
---|
257 | |
---|
258 | |
---|
259 | % --- Executes on selection change in listbox1. |
---|
260 | function listbox1_Callback(hObject, eventdata, handles) |
---|
261 | % hObject handle to listbox1 (see GCBO) |
---|
262 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
263 | % handles structure with handles and user data (see GUIDATA) |
---|
264 | |
---|
265 | % Hints: contents = get(hObject,'String') returns listbox1 contents as cell array |
---|
266 | % contents{get(hObject,'Value')} returns selected item from listbox1 |
---|
267 | |
---|
268 | num=get(hObject,'Value'); |
---|
269 | file=handles.files_names(num); |
---|
270 | txt=strcat('Selection = ',file ); |
---|
271 | set(handles.edit_file,'String',txt); |
---|
272 | |
---|
273 | |
---|
274 | % --- Executes during object creation, after setting all properties. |
---|
275 | function listbox1_CreateFcn(hObject, eventdata, handles) |
---|
276 | % hObject handle to listbox1 (see GCBO) |
---|
277 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
278 | % handles empty - handles not created until after all CreateFcns called |
---|
279 | |
---|
280 | % Hint: listbox controls usually have a white background on Windows. |
---|
281 | % See ISPC and COMPUTER. |
---|
282 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
283 | set(hObject,'BackgroundColor','white'); |
---|
284 | end |
---|
285 | |
---|
286 | |
---|
287 | % --- Executes on button press in button_load_boo. |
---|
288 | function button_load_boo_Callback(hObject, eventdata, handles) |
---|
289 | % hObject handle to button_load_boo (see GCBO) |
---|
290 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
291 | % handles structure with handles and user data (see GUIDATA) |
---|
292 | |
---|
293 | num=get(handles.listbox1,'Value') |
---|
294 | file=handles.files_names{num} |
---|
295 | Directory = [getfamilydata('Directory','DataRoot') 'Datatemp']; |
---|
296 | pwdold = pwd; |
---|
297 | cd(Directory); |
---|
298 | load(file) |
---|
299 | cd(pwdold); |
---|
300 | boo |
---|
301 | % boo timing orbit |
---|
302 | |
---|
303 | % load |
---|
304 | setam('HCOR',boo.corrx); |
---|
305 | setam('VCOR',boo.corrz); |
---|
306 | writeattribute('LT1/AE/CV.2/current', boo.cv2 ); |
---|
307 | writeattribute('LT1/AE/CV.3/current', boo.cv3 ); |
---|
308 | writeattribute('BOO/AE/dipole/current',boo.DIPcurrent); |
---|
309 | writeattribute('BOO/AE/QF/current',boo.QFcurrent); |
---|
310 | writeattribute('BOO/AE/QD/current',boo.QDcurrent); |
---|
311 | writeattribute('BOO/AE/SF/current',boo.SFcurrent); |
---|
312 | writeattribute('BOO/AE/SD/current',boo.SDcurrent); |
---|
313 | writeattribute('BOO/AE/dipole/waveformOffset',boo.DIPoffset); |
---|
314 | writeattribute('BOO/AE/QF/waveformOffset',boo.QFpoffset); |
---|
315 | writeattribute('BOO/AE/QD/waveformOffset',boo.QDpoffset); |
---|
316 | writeattribute('BOO/AE/SF/waveformOffset',boo.SFpoffset); |
---|
317 | writeattribute('BOO/AE/SD/waveformOffset',boo.SDpoffset); |
---|
318 | |
---|
319 | |
---|
320 | writeattribute('BOO-C01/EP/AL_K.Inj/voltage',boo.KINJvoltage); |
---|
321 | writeattribute('BOO-C22/EP/AL_SEP_P.Inj/voltage',boo.SPINJvoltage); |
---|
322 | writeattribute('BOO-C10/EP/AL_DOF.1/voltagePeakValue',boo.DOF1EXTvoltage); |
---|
323 | writeattribute('BOO-C11/EP/AL_DOF.2/voltagePeakValue',boo.DOF2EXTvoltage); |
---|
324 | writeattribute('BOO-C12/EP/AL_DOF.3/voltagePeakValue',boo.DOF3EXTvoltage); |
---|
325 | writeattribute('BOO-C10/EP/AL_K.Ext/voltage',boo.KEXTvoltage); |
---|
326 | writeattribute('BOO-C11/EP/AL_SEP_P.Ext.1/serialVoltage',boo.SPEXTvoltage); |
---|
327 | writeattribute('BOO-C12/EP/AL_SEP_A.Ext/voltage,',boo.SAEXTvoltage); |
---|
328 | |
---|
329 | |
---|
330 | |
---|
331 | |
---|
332 | % --- Executes on button press in button_update_timing. |
---|
333 | function button_update_timing_Callback(hObject, eventdata, handles) |
---|
334 | % hObject handle to button_update_timing (see GCBO) |
---|
335 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
336 | % handles structure with handles and user data (see GUIDATA) |
---|
337 | |
---|
338 | Directory = [getfamilydata('Directory','DataRoot') 'Datatemp']; |
---|
339 | pwdold = pwd; |
---|
340 | cd(Directory); |
---|
341 | |
---|
342 | listefile = dir('timing_*') ; |
---|
343 | comment={}; |
---|
344 | separateur={}; |
---|
345 | for i=1:length(listefile) |
---|
346 | load(listefile(i).name); |
---|
347 | comment=strvcat(comment , timing.comment); |
---|
348 | separateur=strvcat(separateur , ' ==> ' ); |
---|
349 | end |
---|
350 | [sorted_names,sorted_index] = sortrows({listefile.name}'); |
---|
351 | handles.files_names=sorted_names; |
---|
352 | handles.files_index=sorted_index; |
---|
353 | handles.files_comment=comment; |
---|
354 | guidata(hObject, handles); |
---|
355 | |
---|
356 | ttt=strcat(sorted_names,separateur,comment); |
---|
357 | set(handles.listbox1,'String',ttt,'Value',1) |
---|
358 | cd(pwdold); |
---|
359 | |
---|
360 | |
---|
361 | % --- Executes on button press in button_display. |
---|
362 | function button_display_Callback(hObject, eventdata, handles) |
---|
363 | % hObject handle to button_display (see GCBO) |
---|
364 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
365 | % handles structure with handles and user data (see GUIDATA) |
---|
366 | |
---|
367 | boo=[];timing=[]; |
---|
368 | num=get(handles.listbox1,'Value'); |
---|
369 | file=handles.files_names{num} |
---|
370 | Directory = [getfamilydata('Directory','DataRoot') 'Datatemp']; |
---|
371 | pwdold = pwd; |
---|
372 | cd(Directory); |
---|
373 | load(file); |
---|
374 | cd(pwdold); |
---|
375 | |
---|
376 | format long |
---|
377 | boo |
---|
378 | timing |
---|
379 | |
---|
380 | save('Workspace','boo') |
---|
381 | |
---|
382 | |
---|
383 | % --- Executes on button press in button_load_timing. |
---|
384 | function button_load_timing_Callback(hObject, eventdata, handles) |
---|
385 | % hObject handle to button_load_timing (see GCBO) |
---|
386 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
387 | % handles structure with handles and user data (see GUIDATA) |
---|
388 | |
---|
389 | num=get(handles.listbox1,'Value') |
---|
390 | file=handles.files_names{num} |
---|
391 | load_synchro(file) |
---|
392 | |
---|
393 | % % boo timing orbit |
---|
394 | % tout=0.2; |
---|
395 | % if (length(timing.lin_lpm)==1) % ancien |
---|
396 | % tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay',timing.sdc1);pause(tout); |
---|
397 | % tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmTimeDelay',timing.lin_lpm);pause(tout); |
---|
398 | % tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay',timing.boo_bpm);pause(tout); |
---|
399 | % tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigTimeDelay',timing.boo_bpm);pause(tout); |
---|
400 | % tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigTimeDelay',timing.boo_bpm);pause(tout); |
---|
401 | % tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigTimeDelay',timing.boo_bpm);pause(tout); |
---|
402 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay',timing.lt1_emittance);pause(tout); |
---|
403 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay',timing.lt1_mc1);pause(tout); |
---|
404 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay',timing.lt1_mc2);pause(tout); |
---|
405 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay',timing.lt1_osc);pause(tout); |
---|
406 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay',timing.boo_dcct);pause(tout); |
---|
407 | % tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigTimeDelay',timing.boo_nod);pause(tout); |
---|
408 | % tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay',timing.boo_sep_p_inj);pause(tout); |
---|
409 | % tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay',timing.boo_k_inj);pause(tout); |
---|
410 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay',timing.boo_dp);pause(tout); |
---|
411 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay',timing.boo_qf);pause(tout); |
---|
412 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay',timing.boo_qd);pause(tout); |
---|
413 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay',timing.boo_sf);pause(tout); |
---|
414 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay',timing.boo_sd);pause(tout); |
---|
415 | % tango_write_attribute2('BOO/SY/LOCAL.RF.1', 'rfTimeDelay',timing.boo_rf);pause(tout); |
---|
416 | % tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareTimeDelay',timing.sdc2);pause(tout); |
---|
417 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigTimeDelay',timing.boo_dof_ext);pause(tout); |
---|
418 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigTimeDelay',timing.boo_sep_p_ext);pause(tout); |
---|
419 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigTimeDelay',timing.boo_sep_a_ext);pause(tout); |
---|
420 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigTimeDelay',timing.boo_k_ext);pause(tout); |
---|
421 | % tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',timing.lt2_bpm);pause(tout); |
---|
422 | % tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctTimeDelay',timing.lt2_osc);pause(tout); |
---|
423 | % tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvTimeDelay',timing.lt2_emittance);pause(tout); |
---|
424 | % tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceTimeDelay',timing.lt2_emittance);pause(tout); |
---|
425 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigTimeDelay',timing.ans_k1_inj);pause(tout); |
---|
426 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigTimeDelay',timing.ans_k2_inj);pause(tout); |
---|
427 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigTimeDelay',timing.ans_k3_inj);pause(tout); |
---|
428 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigTimeDelay',timing.ans_k4_inj);pause(tout); |
---|
429 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigTimeDelay',timing.ans_sep_p_inj);pause(tout); |
---|
430 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigTimeDelay',timing.ans_sep_a_inj);pause(tout); |
---|
431 | % tango_write_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',timing.ans_bpm01);pause(tout); |
---|
432 | % tango_write_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm02);pause(tout); |
---|
433 | % tango_write_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm03);pause(tout); |
---|
434 | % tango_write_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm04);pause(tout); |
---|
435 | % tango_write_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm05);pause(tout); |
---|
436 | % tango_write_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm06);pause(tout); |
---|
437 | % tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm07);pause(tout); |
---|
438 | % tango_write_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm08);pause(tout); |
---|
439 | % tango_write_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm09);pause(tout); |
---|
440 | % tango_write_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm10);pause(tout); |
---|
441 | % tango_write_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm11);pause(tout); |
---|
442 | % tango_write_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm12);pause(tout); |
---|
443 | % tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm13);pause(tout); |
---|
444 | % tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm14);pause(tout); |
---|
445 | % tango_write_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm15);pause(tout); |
---|
446 | % tango_write_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm16);pause(tout); |
---|
447 | % tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctTimeDelay',timing.ans_dcct);pause(tout) |
---|
448 | % |
---|
449 | % elseif (length(timing.lin_lpm)==2) % nouveau avec spm |
---|
450 | % display('Delay') |
---|
451 | % tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay',timing.sdc1(1));pause(tout); |
---|
452 | % tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmTimeDelay',timing.lin_lpm(1));pause(tout); |
---|
453 | % if isfield('timing','lin_spm');tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacTimeDelay',timing.lin_spm(1));pause(tout);end |
---|
454 | % tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay',timing.boo_bpm(1));pause(tout); |
---|
455 | % tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigTimeDelay',timing.boo_bpm(1));pause(tout); |
---|
456 | % tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigTimeDelay',timing.boo_bpm(1));pause(tout); |
---|
457 | % tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigTimeDelay',timing.boo_bpm(1));pause(tout); |
---|
458 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay',timing.lt1_emittance(1));pause(tout); |
---|
459 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay',timing.lt1_mc1(1));pause(tout); |
---|
460 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay',timing.lt1_mc2(1));pause(tout); |
---|
461 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay',timing.lt1_osc(1));pause(tout); |
---|
462 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay',timing.boo_dcct(1));pause(tout); |
---|
463 | % tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigTimeDelay',timing.boo_nod(1));pause(tout); |
---|
464 | % tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay',timing.boo_sep_p_inj(1));pause(tout); |
---|
465 | % tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay',timing.boo_k_inj(1));pause(tout); |
---|
466 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay',timing.boo_dp(1));pause(tout); |
---|
467 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay',timing.boo_qf(1));pause(tout); |
---|
468 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay',timing.boo_qd(1));pause(tout); |
---|
469 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay',timing.boo_sf(1));pause(tout); |
---|
470 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay',timing.boo_sd(1));pause(tout); |
---|
471 | % tango_write_attribute2('BOO/SY/LOCAL.RF.1', 'rfTimeDelay',timing.boo_rf(1));pause(tout); |
---|
472 | % tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareTimeDelay',timing.sdc2(1));pause(tout); |
---|
473 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigTimeDelay',timing.boo_dof_ext(1));pause(tout); |
---|
474 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigTimeDelay',timing.boo_sep_p_ext(1));pause(tout); |
---|
475 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigTimeDelay',timing.boo_sep_a_ext(1));pause(tout); |
---|
476 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigTimeDelay',timing.boo_k_ext(1));pause(tout); |
---|
477 | % tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',timing.lt2_bpm(1));pause(tout); |
---|
478 | % tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctTimeDelay',timing.lt2_osc(1));pause(tout); |
---|
479 | % tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvTimeDelay',timing.lt2_emittance(1));pause(tout); |
---|
480 | % tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceTimeDelay',timing.lt2_emittance(1));pause(tout); |
---|
481 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigTimeDelay',timing.ans_k1_inj(1));pause(tout); |
---|
482 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigTimeDelay',timing.ans_k2_inj(1));pause(tout); |
---|
483 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigTimeDelay',timing.ans_k3_inj(1));pause(tout); |
---|
484 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigTimeDelay',timing.ans_k4_inj(1));pause(tout); |
---|
485 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigTimeDelay',timing.ans_sep_p_inj(1));pause(tout); |
---|
486 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigTimeDelay',timing.ans_sep_a_inj(1));pause(tout); |
---|
487 | % tango_write_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',timing.ans_bpm01(1));pause(tout); |
---|
488 | % tango_write_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm02(1));pause(tout); |
---|
489 | % tango_write_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm03(1));pause(tout); |
---|
490 | % tango_write_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm04(1));pause(tout); |
---|
491 | % tango_write_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm05(1));pause(tout); |
---|
492 | % tango_write_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm06(1));pause(tout); |
---|
493 | % tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm07(1));pause(tout); |
---|
494 | % tango_write_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm08(1));pause(tout); |
---|
495 | % tango_write_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm09(1));pause(tout); |
---|
496 | % tango_write_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm10(1));pause(tout); |
---|
497 | % tango_write_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm11(1));pause(tout); |
---|
498 | % tango_write_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm12(1));pause(tout); |
---|
499 | % tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm13(1));pause(tout); |
---|
500 | % tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm14(1));pause(tout); |
---|
501 | % tango_write_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm15(1));pause(tout); |
---|
502 | % tango_write_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',timing.ans_bpm16(1));pause(tout); |
---|
503 | % tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctTimeDelay',timing.ans_dcct(1));pause(tout); |
---|
504 | % display('Event') |
---|
505 | % tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent',int32(timing.sdc1(2)));pause(tout); |
---|
506 | % tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent',int32(timing.lin_lpm(2)));pause(tout); |
---|
507 | % if isfield('timing','lin_spm');tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacEvent',int16(timing.lin_spm(2)));pause(tout);end |
---|
508 | % tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigEvent',int32(timing.boo_bpm(2)));pause(tout); |
---|
509 | % tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigEvent',int32(timing.boo_bpm(2)));pause(tout); |
---|
510 | % tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigEvent',int32(timing.boo_bpm(2)));pause(tout); |
---|
511 | % tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigEvent',int32(timing.boo_bpm(2)));pause(tout); |
---|
512 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent',int32(timing.lt1_emittance(2)));pause(tout); |
---|
513 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event',int32(timing.lt1_mc1(2)));pause(tout); |
---|
514 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event',int32(timing.lt1_mc2(2)));pause(tout); |
---|
515 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent',int32(timing.lt1_osc(2)));pause(tout); |
---|
516 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent',int32(timing.boo_dcct(2)));pause(tout); |
---|
517 | % tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigEvent',int32(timing.boo_nod(2)));pause(tout); |
---|
518 | % tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent',int32(timing.boo_sep_p_inj(2)));pause(tout); |
---|
519 | % tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent',int32(timing.boo_k_inj(2)));pause(tout); |
---|
520 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpEvent',int32(timing.boo_dp(2)));pause(tout); |
---|
521 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfEvent',int32(timing.boo_qf(2)));pause(tout); |
---|
522 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdEvent',int32(timing.boo_qd(2)));pause(tout); |
---|
523 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfEvent',int32(timing.boo_sf(2)));pause(tout); |
---|
524 | % tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdEvent',int32(timing.boo_sd(2)));pause(tout); |
---|
525 | % tango_write_attribute2('BOO/SY/LOCAL.RF.1', 'rfEvent',int32(timing.boo_rf(2)));pause(tout); |
---|
526 | % tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent',int32(timing.sdc2(2)));pause(tout); |
---|
527 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent',int32(timing.boo_dof_ext(2)));pause(tout); |
---|
528 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent',int32(timing.boo_sep_p_ext(2)));pause(tout); |
---|
529 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent',int32(timing.boo_sep_a_ext(2)));pause(tout); |
---|
530 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent',int32(timing.boo_k_ext(2)));pause(tout); |
---|
531 | % tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigEvent',int32(timing.lt2_bpm(2)));pause(tout); |
---|
532 | % tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctEvent',int32(timing.lt2_osc(2)));pause(tout); |
---|
533 | % tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvEvent',int32(timing.lt2_emittance(2)));pause(tout); |
---|
534 | % tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceEvent',int32(timing.lt2_emittance(2)));pause(tout); |
---|
535 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigEvent',int32(timing.ans_k1_inj(2)));pause(tout); |
---|
536 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigEvent',int32(timing.ans_k2_inj(2)));pause(tout); |
---|
537 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigEvent',int32(timing.ans_k3_inj(2)));pause(tout); |
---|
538 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigEvent',int32(timing.ans_k4_inj(2)));pause(tout); |
---|
539 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigEvent',int32(timing.ans_sep_p_inj(2)));pause(tout); |
---|
540 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigEvent',int32(timing.ans_sep_a_inj(2)));pause(tout); |
---|
541 | % tango_write_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigEvent',int32(timing.ans_bpm01(2)));pause(tout); |
---|
542 | % tango_write_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm02(2)));pause(tout); |
---|
543 | % tango_write_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm03(2)));pause(tout); |
---|
544 | % tango_write_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm04(2)));pause(tout); |
---|
545 | % tango_write_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm05(2)));pause(tout); |
---|
546 | % tango_write_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm06(2)));pause(tout); |
---|
547 | % tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm07(2)));pause(tout); |
---|
548 | % tango_write_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm08(2)));pause(tout); |
---|
549 | % tango_write_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm09(2)));pause(tout); |
---|
550 | % tango_write_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm10(2)));pause(tout); |
---|
551 | % tango_write_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm11(2)));pause(tout); |
---|
552 | % tango_write_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm12(2)));pause(tout); |
---|
553 | % tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm13(2)));pause(tout); |
---|
554 | % tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm14(2)));pause(tout); |
---|
555 | % tango_write_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm15(2)));pause(tout); |
---|
556 | % tango_write_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigEvent',int32(timing.ans_bpm16(2)));pause(tout); |
---|
557 | % tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctEvent',int32(timing.ans_dcct(2)));pause(tout); |
---|
558 | % end |
---|
559 | |
---|