1 | function varargout = synchro_injecteur8_rafale(varargin) |
---|
2 | % SYNCHRO_INJECTEUR8_RAFALE M-file for synchro_injecteur8_rafale.fig |
---|
3 | % SYNCHRO_INJECTEUR8_RAFALE, by itself, creates a new SYNCHRO_INJECTEUR8_RAFALE or raises the existing |
---|
4 | % singleton*. |
---|
5 | % |
---|
6 | % H = SYNCHRO_INJECTEUR8_RAFALE returns the handle to a new SYNCHRO_INJECTEUR8_RAFALE or the handle to |
---|
7 | % the existing singleton*. |
---|
8 | % |
---|
9 | % SYNCHRO_INJECTEUR8_RAFALE('CALLBACK',hObject,eventData,handles,...) calls the local |
---|
10 | % function named CALLBACK in SYNCHRO_INJECTEUR8_RAFALE.M with the given input arguments. |
---|
11 | % |
---|
12 | % SYNCHRO_INJECTEUR8_RAFALE('Property','Value',...) creates a new SYNCHRO_INJECTEUR8_RAFALE or raises the |
---|
13 | % existing singleton*. Starting from the left, property value pairs are |
---|
14 | % applied to the GUI before synchro_injecteur8_rafale_OpeningFunction gets called. An |
---|
15 | % unrecognized property name or invalid value makes property application |
---|
16 | % stop. All inputs are passed to synchro_injecteur8_rafale_OpeningFcn via varargin. |
---|
17 | % |
---|
18 | % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one |
---|
19 | % instance to run (singleton)". |
---|
20 | % |
---|
21 | % See also: GUIDE, GUIDATA, GUIHANDLES |
---|
22 | |
---|
23 | % For the compiler |
---|
24 | %#function aoinit setao setoperationalmode |
---|
25 | %#function boosterinit |
---|
26 | %#function magnetcoefficients |
---|
27 | % |
---|
28 | |
---|
29 | % Edit the above text to modify the response to help synchro_injecteur8_rafale |
---|
30 | |
---|
31 | % Last Modified by GUIDE v2.5 23-Aug-2011 10:05:25 |
---|
32 | |
---|
33 | % Begin initialization code - DO NOT EDIT |
---|
34 | gui_Singleton = 1; |
---|
35 | gui_State = struct('gui_Name', mfilename, ... |
---|
36 | 'gui_Singleton', gui_Singleton, ... |
---|
37 | 'gui_OpeningFcn', @synchro_injecteur8_rafale_OpeningFcn, ... |
---|
38 | 'gui_OutputFcn', @synchro_injecteur8_rafale_OutputFcn, ... |
---|
39 | 'gui_LayoutFcn', [] , ... |
---|
40 | 'gui_Callback', []); |
---|
41 | if nargin && ischar(varargin{1}) |
---|
42 | gui_State.gui_Callback = str2func(varargin{1}); |
---|
43 | end |
---|
44 | |
---|
45 | if nargout |
---|
46 | [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); |
---|
47 | else |
---|
48 | gui_mainfcn(gui_State, varargin{:}); |
---|
49 | end |
---|
50 | % End initialization code - DO NOT EDIT |
---|
51 | |
---|
52 | |
---|
53 | % --- Executes just before synchro_injecteur8_rafale is made visible. |
---|
54 | function synchro_injecteur8_rafale_OpeningFcn(hObject, eventdata, handles, varargin) |
---|
55 | % This function has no output args, see OutputFcn. |
---|
56 | % hObject handle to figure |
---|
57 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
58 | % handles structure with handles and user data (see GUIDATA) |
---|
59 | % varargin command line arguments to synchro_injecteur8_rafale (see VARARGIN) |
---|
60 | |
---|
61 | % Choose default command line output for synchro_injecteur8_rafale |
---|
62 | handles.output = hObject; |
---|
63 | |
---|
64 | % list les devices annexe pour etat |
---|
65 | fprintf('Liste devices annexes \n'); |
---|
66 | % name={'ANS-C03/DG/DCCT','LT1/DG/MC','BOO-C01/DG/DCCT',... |
---|
67 | % 'ANS/DG/PUB-FillingMode', 'ANS/FC/INJ_COND'}; |
---|
68 | name={'ANS/DG/DCCT-CTRL','LT1/DG/MC','BOO-C01/DG/DCCT',... |
---|
69 | 'ANS/DG/PUB-FillingMode', 'ANS/FC/INJ_COND'}; |
---|
70 | for i=1:4 |
---|
71 | try |
---|
72 | txt=tango_command_inout2(name{2},'State'); |
---|
73 | %temp=tango_read_attribute(name{i},'State'); |
---|
74 | %temp=tango_read_attribute(name{i},'Status');txt=temp.value; |
---|
75 | catch |
---|
76 | txt='bug_device'; |
---|
77 | end |
---|
78 | fprintf('%s : %s \n',name{i},txt); |
---|
79 | end |
---|
80 | |
---|
81 | % Added by Laurent |
---|
82 | if isdeployed |
---|
83 | cd(getenv('MLROOT')); |
---|
84 | setpathsoleil('Booster'); |
---|
85 | end |
---|
86 | % End |
---|
87 | |
---|
88 | % Directories |
---|
89 | %Directory='/home/matlabML/measdata/SOLEIL/Boosterdata/Datatemp'; % ALEX |
---|
90 | Directory = [getfamilydata('Directory','DataRoot') '../Boosterdata/Datatemp']; % Laurent |
---|
91 | handles.Directory=Directory; % for saved data |
---|
92 | |
---|
93 | %FileName = fullfile+31.555cxxccx(getfamilydata('Directory', 'Synchro'), 'synchro_offset_lin_alim'); |
---|
94 | % DirName ='/home/matlabML/machine/SOLEIL/common/synchro/'; % ALEX |
---|
95 | DirName = getfamilydata('Directory', 'Synchro'); % Laurent |
---|
96 | handles.DirName=DirName; % for offset & table |
---|
97 | |
---|
98 | % Charge les offset |
---|
99 | FileName = [DirName 'synchro_offset_lin']; |
---|
100 | fprintf('Laurent:%s\n', FileName'); |
---|
101 | load(FileName, 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
102 | set(handles.inj_offset,'String',num2str(inj_offset)); |
---|
103 | set(handles.ext_offset,'String',num2str(ext_offset)); |
---|
104 | set(handles.lin_canon_spm_fin,'String',num2str(lin_fin)); |
---|
105 | % Periode linac fin |
---|
106 | handles.lin_fin_step=0.090; % En ns (90 ps) |
---|
107 | handles.one_bunch=2.84/handles.lin_fin_step; % Nombre de pas pour sauter un paquet |
---|
108 | |
---|
109 | % Periode du trigger par defaut = 10 s |
---|
110 | handles.periode = 10; |
---|
111 | set(handles.periode_edit,'String',num2str(handles.periode)); |
---|
112 | set(handles.edit_Ncycle,'String',num2str(1)); |
---|
113 | set(handles.edit_Ncoup,'String',1.0); |
---|
114 | |
---|
115 | %Memorise les délais spare et soft initiaux |
---|
116 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSprStepDelay'); |
---|
117 | clk1=temp.value(1); |
---|
118 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftStepDelay'); |
---|
119 | clk2=temp.value(1); |
---|
120 | |
---|
121 | %Stocke les sauts pour les 4 quarts mode LPM |
---|
122 | jump=int32([0 39 26 13]); |
---|
123 | handles.clk_spare =jump + int32(clk1); |
---|
124 | handles.clk_soft=jump + int32(clk2); |
---|
125 | handles.quart=1; |
---|
126 | |
---|
127 | % Table initiale sur paquet 1 |
---|
128 | bunch=[1]; |
---|
129 | [dtour,dpaquet]=bucketnumber(bunch); |
---|
130 | offset_linac=lin_fin/handles.lin_fin_step; |
---|
131 | bjump=handles.one_bunch; |
---|
132 | dpaquet=dpaquet*bjump+offset_linac; |
---|
133 | handles.table=int32([length(bunch) dtour dpaquet]); |
---|
134 | handles.table0=handles.table; |
---|
135 | handles.bunch=bunch; |
---|
136 | |
---|
137 | handles.mode = 'Mode=???'; |
---|
138 | set(handles.edit_filling_relecture_tables,'Enable','off'); |
---|
139 | set(handles.edit_filling_relecture_bunch,'Enable','off'); |
---|
140 | |
---|
141 | % Verifie le mode selectionné en SPM ou LPM |
---|
142 | % Verifie le mode central selectionné : rafale ou continue |
---|
143 | % Verifie le mode selectionné en SPM : 1 2 ou 3 paquets |
---|
144 | % Verifie le mode d'injection selectionné : soft ou 3Hz |
---|
145 | test_modes(handles); |
---|
146 | |
---|
147 | |
---|
148 | % Choix des events |
---|
149 | handles.event0 =int32(0); |
---|
150 | handles.event00=int32(100); %Spéciale EP |
---|
151 | |
---|
152 | % Cache le tableau des délais BPM |
---|
153 | set(handles.panel_bpm,'Visible','off'); |
---|
154 | set(handles.uipanel_kicker_machine,'Visible','off'); |
---|
155 | |
---|
156 | % text affichage |
---|
157 | handles.txt_inj= ' INJECTION AUTOMATIQUE EN COURS '; % txt injection auto en cours |
---|
158 | handles.txt_noinj=' INJECTION INTERDITE '; % txt injection non autorise (Grp fonctionnement) |
---|
159 | |
---|
160 | % Publisher - fonctionnement (gere sur injection en boucle) |
---|
161 | tango_write_attribute2('ANS/DG/PUB-FillingMode','mode_auto',uint8(0)) % flag injection auto |
---|
162 | tango_write_attribute2('ANS/DG/PUB-FillingMode','courant_consigne',uint8(0)) % flag courant consigne atteint |
---|
163 | |
---|
164 | % tango parser ANS/FC/INJ_COND |
---|
165 | % temp=tango_read_attribute2('ANS/FC/INJ_COND', 'COND_INJ'); |
---|
166 | % handles.cond_inj=temp.value; % 0 no injection, 1 injection |
---|
167 | % try temp=tango_read_attribute2('ANS/FC/INJ_COND', 'COND_INJ'); % 0 no injection, 1 injection |
---|
168 | % val=temp.value; catch val=1 ; end ; if val~=0 ; val=1; end; |
---|
169 | % handles.cond_inj=val; |
---|
170 | |
---|
171 | |
---|
172 | % Fonction timer pour injection en boucle |
---|
173 | % Creates timer Infinite loop |
---|
174 | timer2=timer('StartDelay',1,... |
---|
175 | 'ExecutionMode','fixedRate','Period',3,'TasksToExecute',Inf); |
---|
176 | timer2.TimerFcn = {@fonction_alex2, hObject,eventdata, handles}; |
---|
177 | setappdata(handles.figure1,'Timer2',timer2); |
---|
178 | |
---|
179 | % Creates timer Infinite loop |
---|
180 | timer1=timer('StartDelay',1,... |
---|
181 | 'ExecutionMode','fixedRate','Period',handles.periode,'TasksToExecute',Inf); |
---|
182 | timer1.TimerFcn = {@fonction_alex1, hObject,eventdata, handles}; |
---|
183 | setappdata(handles.figure1,'Timer1',timer1); |
---|
184 | |
---|
185 | % button group sur on/off timer du trigger |
---|
186 | h = uibuttongroup('visible','off','Position',[0.7275 0.72 0.125 0.145],... |
---|
187 | 'Title','','TitlePosition','centertop',... |
---|
188 | 'BackgroundColor',[1 0.3 0 ]); |
---|
189 | u1 = uicontrol('Style','Radio','String',' OFF','Tag','radiobutton1',... |
---|
190 | 'pos',[05 85 55 25],'parent',h,'HandleVisibility','off',... |
---|
191 | 'BackgroundColor',[1 0.3 0 ]); |
---|
192 | u2 = uicontrol('Style','Radio','String',' Laps :','Tag','radiobutton2',... |
---|
193 | 'pos',[05 45 55 25],'parent',h,'HandleVisibility','off',... |
---|
194 | 'BackgroundColor',[1 0.3 0 ]); |
---|
195 | u3 = uicontrol('Style','Radio','String',' Imin :','Tag','radiobutton3',... |
---|
196 | 'pos',[05 05 55 25],'parent',h,'HandleVisibility','off',... |
---|
197 | 'BackgroundColor',[1 0.3 0 ]); |
---|
198 | |
---|
199 | set(h,'SelectionChangeFcn',... |
---|
200 | {@uibuttongroup_SelectionChangeFcn,handles}); |
---|
201 | |
---|
202 | handles.off = u1; |
---|
203 | handles.on1 = u2; |
---|
204 | handles.on2 = u3; |
---|
205 | |
---|
206 | set(h,'SelectedObject',u1); |
---|
207 | set(h,'Visible','on'); |
---|
208 | |
---|
209 | %% Set closing gui function |
---|
210 | set(handles.figure1,'CloseRequestFcn',{@Closinggui,timer1,handles.figure1}); |
---|
211 | set(handles.figure1,'CloseRequestFcn',{@Closinggui,timer2,handles.figure1}); |
---|
212 | |
---|
213 | |
---|
214 | % Update handles structure |
---|
215 | guidata(hObject, handles); |
---|
216 | |
---|
217 | % UIWAIT makes synchro_injecteur8_rafale wait for user response (see UIRESUME) |
---|
218 | % uiwait(handles.figure1); |
---|
219 | |
---|
220 | |
---|
221 | % --- Outputs from this function are returned to the command line. |
---|
222 | function varargout = synchro_injecteur8_rafale_OutputFcn(hObject, eventdata, handles) |
---|
223 | % varargout cell array for returning output args (see VARARGOUT); |
---|
224 | % hObject handle to figure |
---|
225 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
226 | % handles structure with handles and user data (see GUIDATA) |
---|
227 | |
---|
228 | % Get default command line output from handles structure |
---|
229 | varargout{1} = handles.output; |
---|
230 | |
---|
231 | |
---|
232 | |
---|
233 | function boo_alim_dipole_Callback(hObject, eventdata, handles) |
---|
234 | % hObject handle to boo_alim_dipole (see GCBO) |
---|
235 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
236 | % handles structure with handles and user data (see GUIDATA) |
---|
237 | |
---|
238 | % Hints: get(hObject,'String') returns contents of boo_alim_dipole as text |
---|
239 | % str2double(get(hObject,'String')) returns contents of boo_alim_dipole as a double |
---|
240 | %h=gcf |
---|
241 | delay=str2double(get(hObject,'String')); |
---|
242 | tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay',delay); |
---|
243 | |
---|
244 | % --- Executes during object creation, after setting all properties. |
---|
245 | function boo_alim_dipole_CreateFcn(hObject, eventdata, handles) |
---|
246 | % hObject handle to boo_alim_dipole (see GCBO) |
---|
247 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
248 | % handles empty - handles not created until after all CreateFcns called |
---|
249 | |
---|
250 | % Hint: edit controls usually have a white background on Windows. |
---|
251 | % See ISPC and COMPUTER. |
---|
252 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
253 | set(hObject,'BackgroundColor','white'); |
---|
254 | end |
---|
255 | |
---|
256 | |
---|
257 | function boo_alim_qf_Callback(hObject, eventdata, handles) |
---|
258 | % hObject handle to boo_alim_qf (see GCBO) |
---|
259 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
260 | % handles structure with handles and user data (see GUIDATA) |
---|
261 | |
---|
262 | % Hints: get(hObject,'String') returns contents of boo_alim_qf as text |
---|
263 | % str2double(get(hObject,'String')) returns contents of boo_alim_qf as a double |
---|
264 | |
---|
265 | delay=str2double(get(hObject,'String')); |
---|
266 | tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay',delay); |
---|
267 | |
---|
268 | % --- Executes during object creation, after setting all properties. |
---|
269 | function boo_alim_qf_CreateFcn(hObject, eventdata, handles) |
---|
270 | % hObject handle to boo_alim_qf (see GCBO) |
---|
271 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
272 | % handles empty - handles not created until after all CreateFcns called |
---|
273 | |
---|
274 | % Hint: edit controls usually have a white background on Windows. |
---|
275 | % See ISPC and COMPUTER. |
---|
276 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
277 | set(hObject,'BackgroundColor','white'); |
---|
278 | end |
---|
279 | |
---|
280 | |
---|
281 | |
---|
282 | function boo_alim_qd_Callback(hObject, eventdata, handles) |
---|
283 | % hObject handle to boo_alim_qd (see GCBO) |
---|
284 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
285 | % handles structure with handles and user data (see GUIDATA) |
---|
286 | |
---|
287 | % Hints: get(hObject,'String') returns contents of boo_alim_qd as text |
---|
288 | % str2double(get(hObject,'String')) returns contents of boo_alim_qd as a double |
---|
289 | |
---|
290 | delay=str2double(get(hObject,'String')); |
---|
291 | tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay',delay); |
---|
292 | |
---|
293 | % --- Executes during object creation, after setting all properties. |
---|
294 | function boo_alim_qd_CreateFcn(hObject, eventdata, handles) |
---|
295 | % hObject handle to boo_alim_qd (see GCBO) |
---|
296 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
297 | % handles empty - handles not created until after all CreateFcns called |
---|
298 | |
---|
299 | % Hint: edit controls usually have a white background on Windows. |
---|
300 | % See ISPC and COMPUTER. |
---|
301 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
302 | set(hObject,'BackgroundColor','white'); |
---|
303 | end |
---|
304 | |
---|
305 | |
---|
306 | |
---|
307 | function boo_alim_sf_Callback(hObject, eventdata, handles) |
---|
308 | % hObject handle to boo_alim_sf (see GCBO) |
---|
309 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
310 | % handles structure with handles and user data (see GUIDATA) |
---|
311 | |
---|
312 | % Hints: get(hObject,'String') returns contents of boo_alim_sf as text |
---|
313 | % str2double(get(hObject,'String')) returns contents of boo_alim_sf as a double |
---|
314 | |
---|
315 | delay=str2double(get(hObject,'String')); |
---|
316 | tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay',delay); |
---|
317 | |
---|
318 | % --- Executes during object creation, after setting all properties. |
---|
319 | function boo_alim_sf_CreateFcn(hObject, eventdata, handles) |
---|
320 | % hObject handle to boo_alim_sf (see GCBO) |
---|
321 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
322 | % handles empty - handles not created until after all CreateFcns called |
---|
323 | |
---|
324 | % Hint: edit controls usually have a white background on Windows. |
---|
325 | % See ISPC and COMPUTER. |
---|
326 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
327 | set(hObject,'BackgroundColor','white'); |
---|
328 | end |
---|
329 | |
---|
330 | |
---|
331 | |
---|
332 | function boo_alim_sd_Callback(hObject, eventdata, handles) |
---|
333 | % hObject handle to boo_alim_sd (see GCBO) |
---|
334 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
335 | % handles structure with handles and user data (see GUIDATA) |
---|
336 | |
---|
337 | % Hints: get(hObject,'String') returns contents of boo_alim_sd as text |
---|
338 | % str2double(get(hObject,'String')) returns contents of boo_alim_sd as a double |
---|
339 | |
---|
340 | delay=str2double(get(hObject,'String')); |
---|
341 | tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay',delay); |
---|
342 | |
---|
343 | |
---|
344 | % --- Executes during object creation, after setting all properties. |
---|
345 | function boo_alim_sd_CreateFcn(hObject, eventdata, handles) |
---|
346 | % hObject handle to boo_alim_sd (see GCBO) |
---|
347 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
348 | % handles empty - handles not created until after all CreateFcns called |
---|
349 | |
---|
350 | % Hint: edit controls usually have a white background on Windows. |
---|
351 | % See ISPC and COMPUTER. |
---|
352 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
353 | set(hObject,'BackgroundColor','white'); |
---|
354 | end |
---|
355 | |
---|
356 | |
---|
357 | |
---|
358 | function boo_rf_Callback(hObject, eventdata, handles) |
---|
359 | % hObject handle to boo_rf (see GCBO) |
---|
360 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
361 | % handles structure with handles and user data (see GUIDATA) |
---|
362 | |
---|
363 | % Hints: get(hObject,'String') returns contents of boo_rf as text |
---|
364 | % str2double(get(hObject,'String')) returns contents of boo_rf as a double |
---|
365 | |
---|
366 | delay=str2double(get(hObject,'String')); |
---|
367 | tango_write_attribute2('BOO/SY/LOCAL.RF.1', 'rfTimeDelay',delay); |
---|
368 | |
---|
369 | % --- Executes during object creation, after setting all properties. |
---|
370 | function boo_rf_CreateFcn(hObject, eventdata, handles) |
---|
371 | % hObject handle to boo_rf (see GCBO) |
---|
372 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
373 | % handles empty - handles not created until after all CreateFcns called |
---|
374 | |
---|
375 | % Hint: edit controls usually have a white background on Windows. |
---|
376 | % See ISPC and COMPUTER. |
---|
377 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
378 | set(hObject,'BackgroundColor','white'); |
---|
379 | end |
---|
380 | |
---|
381 | |
---|
382 | |
---|
383 | function lin_canon_lpm_Callback(hObject, eventdata, handles) |
---|
384 | % hObject handle to lin_alim_canon_lpm (see GCBO) |
---|
385 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
386 | % handles structure with handles and user data (see GUIDATA) |
---|
387 | |
---|
388 | % Hints: get(hObject,'String') returns contents of lin_alim_canon_lpm as text |
---|
389 | % str2double(get(hObject,'String')) returns contents of lin_alim_canon_lpm as a double |
---|
390 | |
---|
391 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
392 | delay=str2double(get(hObject,'String'))+inj_offset; |
---|
393 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmTimeDelay',delay); |
---|
394 | |
---|
395 | |
---|
396 | % --- Executes during object creation, after setting all properties. |
---|
397 | function lin_canon_lpm_CreateFcn(hObject, eventdata, handles) |
---|
398 | % hObject handle to lin_alim_canon_lpm (see GCBO) |
---|
399 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
400 | % handles empty - handles not created until after all CreateFcns called |
---|
401 | |
---|
402 | % Hint: edit controls usually have a white background on Windows. |
---|
403 | % See ISPC and COMPUTER. |
---|
404 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
405 | set(hObject,'BackgroundColor','white'); |
---|
406 | end |
---|
407 | |
---|
408 | |
---|
409 | |
---|
410 | function lt1_emittance_Callback(hObject, eventdata, handles) |
---|
411 | % hObject handle to lt1_emittance (see GCBO) |
---|
412 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
413 | % handles structure with handles and user data (see GUIDATA) |
---|
414 | |
---|
415 | % Hints: get(hObject,'String') returns contents of lt1_emittance as text |
---|
416 | % str2double(get(hObject,'String')) returns contents of lt1_emittance as a double |
---|
417 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
418 | delay=str2double(get(hObject,'String'))+inj_offset; |
---|
419 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay',delay); |
---|
420 | |
---|
421 | % --- Executes during object creation, after setting all properties. |
---|
422 | function lt1_emittance_CreateFcn(hObject, eventdata, handles) |
---|
423 | % hObject handle to lt1_emittance (see GCBO) |
---|
424 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
425 | % handles empty - handles not created until after all CreateFcns called |
---|
426 | |
---|
427 | % Hint: edit controls usually have a white background on Windows. |
---|
428 | % See ISPC and COMPUTER. |
---|
429 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
430 | set(hObject,'BackgroundColor','white'); |
---|
431 | end |
---|
432 | |
---|
433 | |
---|
434 | |
---|
435 | function lt1_MC1_Callback(hObject, eventdata, handles) |
---|
436 | % hObject handle to lt1_MC1 (see GCBO) |
---|
437 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
438 | % handles structure with handles and user data (see GUIDATA) |
---|
439 | |
---|
440 | % Hints: get(hObject,'String') returns contents of lt1_MC1 as text |
---|
441 | % str2double(get(hObject,'String')) returns contents of lt1_MC1 as a double |
---|
442 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
443 | delay=str2double(get(hObject,'String'))+inj_offset; |
---|
444 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay',delay); |
---|
445 | |
---|
446 | % --- Executes during object creation, after setting all properties. |
---|
447 | function lt1_MC1_CreateFcn(hObject, eventdata, handles) |
---|
448 | % hObject handle to lt1_MC1 (see GCBO) |
---|
449 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
450 | % handles empty - handles not created until after all CreateFcns called |
---|
451 | |
---|
452 | % Hint: edit controls usually have a white background on Windows. |
---|
453 | % See ISPC and COMPUTER. |
---|
454 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
455 | set(hObject,'BackgroundColor','white'); |
---|
456 | end |
---|
457 | |
---|
458 | |
---|
459 | |
---|
460 | function lt1_MC2_Callback(hObject, eventdata, handles) |
---|
461 | % hObject handle to lt1_MC2 (see GCBO) |
---|
462 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
463 | % handles structure with handles and user data (see GUIDATA) |
---|
464 | |
---|
465 | % Hints: get(hObject,'String') returns contents of lt1_MC2 as text |
---|
466 | % str2double(get(hObject,'String')) returns contents of lt1_MC2 as a double |
---|
467 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
468 | delay=str2double(get(hObject,'String'))+inj_offset; |
---|
469 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay',delay); |
---|
470 | |
---|
471 | % --- Executes during object creation, after setting all properties. |
---|
472 | function lt1_MC2_CreateFcn(hObject, eventdata, handles) |
---|
473 | % hObject handle to lt1_MC2 (see GCBO) |
---|
474 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
475 | % handles empty - handles not created until after all CreateFcns called |
---|
476 | |
---|
477 | % Hint: edit controls usually have a white background on Windows. |
---|
478 | % See ISPC and COMPUTER. |
---|
479 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
480 | set(hObject,'BackgroundColor','white'); |
---|
481 | end |
---|
482 | |
---|
483 | |
---|
484 | |
---|
485 | function lt1_osc_Callback(hObject, eventdata, handles) |
---|
486 | % hObject handle to lt1_osc (see GCBO) |
---|
487 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
488 | % handles structure with handles and user data (see GUIDATA) |
---|
489 | |
---|
490 | % Hints: get(hObject,'String') returns contents of lt1_osc as text |
---|
491 | % str2double(get(hObject,'String')) returns contents of lt1_osc as a double |
---|
492 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
493 | delay=str2double(get(hObject,'String'))+inj_offset; |
---|
494 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay',delay); |
---|
495 | |
---|
496 | |
---|
497 | % --- Executes during object creation, after setting all properties. |
---|
498 | function lt1_osc_CreateFcn(hObject, eventdata, handles) |
---|
499 | % hObject handle to lt1_osc (see GCBO) |
---|
500 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
501 | % handles empty - handles not created until after all CreateFcns called |
---|
502 | |
---|
503 | % Hint: edit controls usually have a white background on Windows. |
---|
504 | % See ISPC and COMPUTER. |
---|
505 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
506 | set(hObject,'BackgroundColor','white'); |
---|
507 | end |
---|
508 | |
---|
509 | |
---|
510 | |
---|
511 | function sdc1_Callback(hObject, eventdata, handles) |
---|
512 | % hObject handle to sdc1 (see GCBO) |
---|
513 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
514 | % handles structure with handles and user data (see GUIDATA) |
---|
515 | |
---|
516 | % Hints: get(hObject,'String') returns contents of sdc1 as text |
---|
517 | % str2double(get(hObject,'String')) returns contents of sdc1 as a double |
---|
518 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
519 | delay=str2double(get(hObject,'String'))+inj_offset; |
---|
520 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay',delay); |
---|
521 | |
---|
522 | % --- Executes during object creation, after setting all properties. |
---|
523 | function sdc1_CreateFcn(hObject, eventdata, handles) |
---|
524 | % hObject handle to sdc1 (see GCBO) |
---|
525 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
526 | % handles empty - handles not created until after all CreateFcns called |
---|
527 | |
---|
528 | % Hint: edit controls usually have a white background on Windows. |
---|
529 | % See ISPC and COMPUTER. |
---|
530 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
531 | set(hObject,'BackgroundColor','white'); |
---|
532 | end |
---|
533 | |
---|
534 | |
---|
535 | |
---|
536 | function boo_inj_septum_Callback(hObject, eventdata, handles) |
---|
537 | % hObject handle to boo_inj_septum (see GCBO) |
---|
538 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
539 | % handles structure with handles and user data (see GUIDATA) |
---|
540 | |
---|
541 | % Hints: get(hObject,'String') returns contents of boo_inj_septum as text |
---|
542 | % str2double(get(hObject,'String')) returns contents of boo_inj_septum as a double |
---|
543 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
544 | delay=str2double(get(hObject,'String'))+inj_offset; |
---|
545 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay',delay); |
---|
546 | |
---|
547 | % --- Executes during object creation, after setting all properties. |
---|
548 | function boo_inj_septum_CreateFcn(hObject, eventdata, handles) |
---|
549 | % hObject handle to boo_inj_septum (see GCBO) |
---|
550 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
551 | % handles empty - handles not created until after all CreateFcns called |
---|
552 | |
---|
553 | % Hint: edit controls usually have a white background on Windows. |
---|
554 | % See ISPC and COMPUTER. |
---|
555 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
556 | set(hObject,'BackgroundColor','white'); |
---|
557 | end |
---|
558 | |
---|
559 | |
---|
560 | |
---|
561 | function boo_inj_kicker_Callback(hObject, eventdata, handles) |
---|
562 | % hObject handle to boo_inj_kicker (see GCBO) |
---|
563 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
564 | % handles structure with handles and user data (see GUIDATA) |
---|
565 | |
---|
566 | % Hints: get(hObject,'String') returns contents of boo_inj_kicker as text |
---|
567 | % str2double(get(hObject,'String')) returns contents of boo_inj_kicker as a double |
---|
568 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
569 | delay=str2double(get(hObject,'String'))+inj_offset; |
---|
570 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay',delay); |
---|
571 | |
---|
572 | % --- Executes during object creation, after setting all properties. |
---|
573 | function boo_inj_kicker_CreateFcn(hObject, eventdata, handles) |
---|
574 | % hObject handle to boo_inj_kicker (see GCBO) |
---|
575 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
576 | % handles empty - handles not created until after all CreateFcns called |
---|
577 | |
---|
578 | % Hint: edit controls usually have a white background on Windows. |
---|
579 | % See ISPC and COMPUTER. |
---|
580 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
581 | set(hObject,'BackgroundColor','white'); |
---|
582 | end |
---|
583 | |
---|
584 | |
---|
585 | |
---|
586 | function boo_bpm_Callback(hObject, eventdata, handles) |
---|
587 | % hObject handle to boo_bpm (see GCBO) |
---|
588 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
589 | % handles structure with handles and user data (see GUIDATA) |
---|
590 | |
---|
591 | % Hints: get(hObject,'String') returns contents of boo_bpm as text |
---|
592 | % str2double(get(hObject,'String')) returns contents of boo_bpm as a double |
---|
593 | |
---|
594 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
595 | delay=str2double(get(hObject,'String'))+inj_offset; |
---|
596 | tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay',delay); |
---|
597 | tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigTimeDelay',delay); |
---|
598 | tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigTimeDelay',delay); |
---|
599 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigTimeDelay',delay); |
---|
600 | |
---|
601 | |
---|
602 | % --- Executes during object creation, after setting all properties. |
---|
603 | function boo_bpm_CreateFcn(hObject, eventdata, handles) |
---|
604 | % hObject handle to boo_bpm (see GCBO) |
---|
605 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
606 | % handles empty - handles not created until after all CreateFcns called |
---|
607 | |
---|
608 | % Hint: edit controls usually have a white background on Windows. |
---|
609 | % See ISPC and COMPUTER. |
---|
610 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
611 | set(hObject,'BackgroundColor','white'); |
---|
612 | end |
---|
613 | |
---|
614 | |
---|
615 | |
---|
616 | function boo_nod_Callback(hObject, eventdata, handles) |
---|
617 | % hObject handle to boo_nod (see GCBO) |
---|
618 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
619 | % handles structure with handles and user data (see GUIDATA) |
---|
620 | |
---|
621 | % Hints: get(hObject,'String') returns contents of boo_nod as text |
---|
622 | % str2double(get(hObject,'String')) returns contents of boo_nod as a double |
---|
623 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
624 | delay=str2double(get(hObject,'String'))+inj_offset; |
---|
625 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigTimeDelay',delay); |
---|
626 | |
---|
627 | % --- Executes during object creation, after setting all properties. |
---|
628 | function boo_nod_CreateFcn(hObject, eventdata, handles) |
---|
629 | % hObject handle to boo_nod (see GCBO) |
---|
630 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
631 | % handles empty - handles not created until after all CreateFcns called |
---|
632 | |
---|
633 | % Hint: edit controls usually have a white background on Windows. |
---|
634 | % See ISPC and COMPUTER. |
---|
635 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
636 | set(hObject,'BackgroundColor','white'); |
---|
637 | end |
---|
638 | |
---|
639 | |
---|
640 | |
---|
641 | function boo_dcct_Callback(hObject, eventdata, handles) |
---|
642 | % hObject handle to boo_dcct (see GCBO) |
---|
643 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
644 | % handles structure with handles and user data (see GUIDATA) |
---|
645 | |
---|
646 | % Hints: get(hObject,'String') returns contents of boo_dcct as text |
---|
647 | % str2double(get(hObject,'String')) returns contents of boo_dcct as a double |
---|
648 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
649 | delay=str2double(get(hObject,'String'))+inj_offset; |
---|
650 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay',delay); |
---|
651 | |
---|
652 | % --- Executes during object creation, after setting all properties. |
---|
653 | function boo_dcct_CreateFcn(hObject, eventdata, handles) |
---|
654 | % hObject handle to boo_dcct (see GCBO) |
---|
655 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
656 | % handles empty - handles not created until after all CreateFcns called |
---|
657 | |
---|
658 | % Hint: edit controls usually have a white background on Windows. |
---|
659 | % See ISPC and COMPUTER. |
---|
660 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
661 | set(hObject,'BackgroundColor','white'); |
---|
662 | end |
---|
663 | |
---|
664 | |
---|
665 | |
---|
666 | function lin_canon_spm_fin_Callback(hObject, eventdata, handles) |
---|
667 | % hObject handle to lin_alim_canon_spm_fin (see GCBO) |
---|
668 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
669 | % handles structure with handles and user data (see GUIDATA) |
---|
670 | |
---|
671 | % Hints: get(hObject,'String') returns contents of lin_alim_canon_spm_fin as text |
---|
672 | % str2double(get(hObject,'String')) returns contents of lin_alim_canon_spm_fin as a double |
---|
673 | |
---|
674 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
675 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
676 | lin_fin =str2double(get(handles.lin_canon_spm_fin,'String')); |
---|
677 | |
---|
678 | %FileName = fullfile(getfamilydata('Directory', 'Synchro'), 'synchro_offset_lin_alim'); |
---|
679 | FileName = [handles.DirName 'synchro_offset_lin']; |
---|
680 | save(FileName, 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
681 | |
---|
682 | % --- Executes during object creation, after setting all properties. |
---|
683 | function lin_canon_spm_fin_CreateFcn(hObject, eventdata, handles) |
---|
684 | % hObject handle to lin_alim_canon_spm_fin (see GCBO) |
---|
685 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
686 | % handles empty - handles not created until after all CreateFcns called |
---|
687 | |
---|
688 | % Hint: edit controls usually have a white background on Windows. |
---|
689 | % See ISPC and COMPUTER. |
---|
690 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
691 | set(hObject,'BackgroundColor','white'); |
---|
692 | end |
---|
693 | |
---|
694 | |
---|
695 | |
---|
696 | function central_spare_Callback(hObject, eventdata, handles) |
---|
697 | % hObject handle to central_spare (see GCBO) |
---|
698 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
699 | % handles structure with handles and user data (see GUIDATA) |
---|
700 | |
---|
701 | % Hints: get(hObject,'String') returns contents of central_spare as text |
---|
702 | % str2double(get(hObject,'String')) returns contents of central_spare as a double |
---|
703 | |
---|
704 | delay=str2double(get(hObject,'String')); |
---|
705 | tango_write_attribute2('ANS/SY/CENTRAL', 'TSprTimeDelay',delay); |
---|
706 | |
---|
707 | %status soft checked on linac |
---|
708 | temp=tango_read_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent'); |
---|
709 | if (temp.value(1)==2) |
---|
710 | % |
---|
711 | elseif (temp.value(1)==5) |
---|
712 | dt=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay'); |
---|
713 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
714 | dt1=tango_read_attribute2('ANS/SY/CENTRAL', 'TSprTimeDelay'); |
---|
715 | delay=dt.value(1)-dt1.value(1)+inj_offset; |
---|
716 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareTimeDelay',delay); |
---|
717 | temp=tango_read_attribute2('LIN/SY/LOCAL.LPM.1', 'spareTimeDelay'); |
---|
718 | set(handles.lin_modulateur,'String',num2str(temp.value(1)-inj_offset)); |
---|
719 | end |
---|
720 | |
---|
721 | % --- Executes during object creation, after setting all properties. |
---|
722 | function central_spare_CreateFcn(hObject, eventdata, handles) |
---|
723 | % hObject handle to central_spare (see GCBO) |
---|
724 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
725 | % handles empty - handles not created until after all CreateFcns called |
---|
726 | |
---|
727 | % Hint: edit controls usually have a white background on Windows. |
---|
728 | % See ISPC and COMPUTER. |
---|
729 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
730 | set(hObject,'BackgroundColor','white'); |
---|
731 | end |
---|
732 | |
---|
733 | |
---|
734 | |
---|
735 | function central_inj_Callback(hObject, eventdata, handles) |
---|
736 | % hObject handle to central_inj (see GCBO) |
---|
737 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
738 | % handles structure with handles and user data (see GUIDATA) |
---|
739 | |
---|
740 | % Hints: get(hObject,'String') returns contents of central_inj as text |
---|
741 | % str2double(get(hObject,'String')) returns contents of central_inj as a double |
---|
742 | |
---|
743 | delay=str2double(get(hObject,'String')); |
---|
744 | tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',delay); |
---|
745 | |
---|
746 | % --- Executes during object creation, after setting all properties. |
---|
747 | function central_inj_CreateFcn(hObject, eventdata, handles) |
---|
748 | % hObject handle to central_inj (see GCBO) |
---|
749 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
750 | % handles empty - handles not created until after all CreateFcns called |
---|
751 | |
---|
752 | % Hint: edit controls usually have a white background on Windows. |
---|
753 | % See ISPC and COMPUTER. |
---|
754 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
755 | set(hObject,'BackgroundColor','white'); |
---|
756 | end |
---|
757 | |
---|
758 | |
---|
759 | |
---|
760 | |
---|
761 | function central_soft_Callback(hObject, eventdata, handles) |
---|
762 | % hObject handle to central_soft (see GCBO) |
---|
763 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
764 | % handles structure with handles and user data (see GUIDATA) |
---|
765 | |
---|
766 | % Hints: get(hObject,'String') returns contents of central_soft as text |
---|
767 | % str2double(get(hObject,'String')) returns contents of central_soft as a double |
---|
768 | |
---|
769 | delay=str2double(get(hObject,'String')); |
---|
770 | tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',delay); |
---|
771 | |
---|
772 | % temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftStepDelay'); |
---|
773 | % clkinj=int32(temp.value(1)+5*52); |
---|
774 | % clkext=int32(temp.value(1)/52+10); |
---|
775 | % tango_write_attribute2('ANS/SY/CENTRAL', 'TInjStepDelay',clkinj); |
---|
776 | % tango_write_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue',clkext); |
---|
777 | % |
---|
778 | % %status soft checked on linac |
---|
779 | % temp=tango_read_attribute2('lin_alim/SY/LOCAL.LPM.1', 'spareEvent'); |
---|
780 | % if (temp.value(1)==2) |
---|
781 | % % |
---|
782 | % elseif (temp.value(1)==1) |
---|
783 | % dt=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay'); |
---|
784 | % inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
785 | % dt1=tango_read_attribute2('ANS/SY/CENTRAL', 'TSprTimeDelay'); |
---|
786 | % delay=dt.value(1)-dt1.value(1)+inj_offset; |
---|
787 | % tango_write_attribute2('lin_alim/SY/LOCAL.LPM.1', 'spareTimeDelay',delay); |
---|
788 | % temp=tango_read_attribute2('lin_alim/SY/LOCAL.LPM.1', 'spareTimeDelay'); |
---|
789 | % set(handles.lin_alim_modulateur,'String',num2str(temp.value(1)-inj_offset)); |
---|
790 | % end |
---|
791 | |
---|
792 | % --- Executes during object creation, after setting all properties. |
---|
793 | function central_soft_CreateFcn(hObject, eventdata, handles) |
---|
794 | % hObject handle to central_soft (see GCBO) |
---|
795 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
796 | % handles empty - handles not created until after all CreateFcns called |
---|
797 | |
---|
798 | % Hint: edit controls usually have a white background on Windows. |
---|
799 | % See ISPC and COMPUTER. |
---|
800 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
801 | set(hObject,'BackgroundColor','white'); |
---|
802 | end |
---|
803 | |
---|
804 | |
---|
805 | % --- Executes on button press in button_acquisition_nooffset. |
---|
806 | function button_acquisition_nooffset_Callback(hObject, eventdata, handles) |
---|
807 | % hObject handle to button_acquisition_nooffset (see GCBO) |
---|
808 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
809 | % handles structure with handles and user data (see GUIDATA) |
---|
810 | |
---|
811 | test_modes(handles); |
---|
812 | |
---|
813 | |
---|
814 | set(handles.inj_offset,'Enable','off'); |
---|
815 | set(handles.sdc1,'Enable','off'); |
---|
816 | set(handles.lin_canon_lpm,'Enable','off'); |
---|
817 | set(handles.lin_canon_spm,'Enable','off'); |
---|
818 | set(handles.lin_canon_spm_fin,'Enable','off'); |
---|
819 | set(handles.lin_alim,'Enable','off'); |
---|
820 | set(handles.boo_bpm,'Enable','off'); |
---|
821 | set(handles.lt1_emittance,'Enable','off'); |
---|
822 | set(handles.lt1_MC1,'Enable','off'); |
---|
823 | set(handles.lt1_MC2,'Enable','off'); |
---|
824 | set(handles.lt1_osc,'Enable','off'); |
---|
825 | set(handles.boo_dcct,'Enable','off'); |
---|
826 | set(handles.boo_nod,'Enable','off'); |
---|
827 | set(handles.boo_inj_septum,'Enable','off'); |
---|
828 | set(handles.boo_inj_kicker,'Enable','off'); |
---|
829 | set(handles.boo_alim_dipole,'Enable','off'); |
---|
830 | set(handles.boo_alim_qf,'Enable','off'); |
---|
831 | set(handles.boo_alim_qd,'Enable','off'); |
---|
832 | set(handles.boo_alim_sf,'Enable','off'); |
---|
833 | set(handles.boo_alim_sd,'Enable','off'); |
---|
834 | set(handles.boo_alim_cp,'Enable','off'); |
---|
835 | set(handles.boo_rf,'Enable','off'); |
---|
836 | set(handles.boo_mrsv,'Enable','off'); |
---|
837 | set(handles.lin_modulateur,'Enable','off'); |
---|
838 | set(handles.ext_offset,'Enable','off'); |
---|
839 | set(handles.boo_ext_dof,'Enable','off'); |
---|
840 | set(handles.boo_ext_sept_p,'Enable','off'); |
---|
841 | set(handles.boo_ext_sept_a,'Enable','off'); |
---|
842 | set(handles.boo_ext_kicker,'Enable','off'); |
---|
843 | set(handles.sdc2,'Enable','off'); |
---|
844 | set(handles.lt2_emittance,'Enable','off'); |
---|
845 | set(handles.lt2_osc,'Enable','off'); |
---|
846 | set(handles.lt2_bpm,'Enable','off'); |
---|
847 | set(handles.ans_inj_k1,'Enable','off'); |
---|
848 | set(handles.ans_inj_k2,'Enable','off'); |
---|
849 | set(handles.ans_inj_k3,'Enable','off'); |
---|
850 | set(handles.ans_inj_k4,'Enable','off'); |
---|
851 | set(handles.ans_inj_sept_p,'Enable','off'); |
---|
852 | set(handles.ans_inj_sept_a,'Enable','off'); |
---|
853 | set(handles.ans_fbt,'Enable','off'); |
---|
854 | set(handles.ans_dcct,'Enable','off'); |
---|
855 | set(handles.ans_nod,'Enable','off'); |
---|
856 | set(handles.ans_bpm_c01,'Enable','off'); |
---|
857 | set(handles.ans_bpm_c02,'Enable','off'); |
---|
858 | set(handles.ans_bpm_c03,'Enable','off'); |
---|
859 | set(handles.ans_bpm_c04,'Enable','off'); |
---|
860 | set(handles.ans_bpm_c05,'Enable','off'); |
---|
861 | set(handles.ans_bpm_c06,'Enable','off'); |
---|
862 | set(handles.ans_bpm_c07,'Enable','off'); |
---|
863 | set(handles.ans_bpm_c08,'Enable','off'); |
---|
864 | set(handles.ans_bpm_c09,'Enable','off'); |
---|
865 | set(handles.ans_bpm_c10,'Enable','off'); |
---|
866 | set(handles.ans_bpm_c11,'Enable','off'); |
---|
867 | set(handles.ans_bpm_c12,'Enable','off'); |
---|
868 | set(handles.ans_bpm_c13,'Enable','off'); |
---|
869 | set(handles.ans_bpm_c14,'Enable','off'); |
---|
870 | set(handles.ans_bpm_c15,'Enable','off'); |
---|
871 | set(handles.ans_bpm_c16,'Enable','off'); |
---|
872 | |
---|
873 | get_synchro_delay_nooffset(handles) |
---|
874 | n=1; |
---|
875 | |
---|
876 | temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'libre.1TimeDelay'); |
---|
877 | try txt=num2str(temp.value(n)); catch txt='Bug device' ; end |
---|
878 | set(handles.lin_alim,'String',txt); |
---|
879 | |
---|
880 | temp=tango_read_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceTimeDelay'); |
---|
881 | try ;txt=num2str(temp.value(n)); catch txt=bug_device ; end |
---|
882 | set(handles.boo_mrsv,'String',txt); |
---|
883 | |
---|
884 | temp=tango_read_attribute2('ANS-C14/SY/LOCAL.DG.1', 'perteTimeDelay'); |
---|
885 | try ;txt=num2str(temp.value(n)); catch txt=bug_device ; end |
---|
886 | set(handles.ans_nod,'String',txt); |
---|
887 | |
---|
888 | |
---|
889 | %status soft checked on linac |
---|
890 | temp=tango_read_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent'); |
---|
891 | if (temp.value(n)==2) |
---|
892 | %set(handles.soft_button,'Value',0); |
---|
893 | elseif (temp.value(n)==5) |
---|
894 | %set(handles.soft_button,'Value',1); |
---|
895 | end |
---|
896 | |
---|
897 | %status tables |
---|
898 | temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue'); |
---|
899 | offset=temp.value(1)*52; |
---|
900 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TablesCurrentDepth'); |
---|
901 | n=temp.value; |
---|
902 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionDelayTable'); |
---|
903 | table=temp.value(1:n)-offset; |
---|
904 | set(handles.edit_filling_relecture_tables,'String',['T=' , num2str(table)]); |
---|
905 | |
---|
906 | |
---|
907 | |
---|
908 | % --- Executes on button press in button_acquisition_delay. |
---|
909 | function button_acquisition_delay_Callback(hObject, eventdata, handles) |
---|
910 | % hObject handle to button_acquisition_delay (see GCBO) |
---|
911 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
912 | % handles structure with handles and user data (see GUIDATA) |
---|
913 | bug_device='Bug device'; |
---|
914 | |
---|
915 | test_modes(handles); |
---|
916 | |
---|
917 | set(handles.inj_offset,'Enable','on'); |
---|
918 | set(handles.sdc1,'Enable','on'); |
---|
919 | set(handles.lin_canon_lpm,'Enable','on'); |
---|
920 | set(handles.lin_canon_spm,'Enable','on'); |
---|
921 | set(handles.lin_canon_spm_fin,'Enable','on'); |
---|
922 | set(handles.lin_alim,'Enable','on'); |
---|
923 | set(handles.boo_bpm,'Enable','on'); |
---|
924 | set(handles.lt1_emittance,'Enable','on'); |
---|
925 | set(handles.lt1_MC1,'Enable','on'); |
---|
926 | set(handles.lt1_MC2,'Enable','on'); |
---|
927 | set(handles.lt1_osc,'Enable','on'); |
---|
928 | set(handles.boo_dcct,'Enable','on'); |
---|
929 | set(handles.boo_nod,'Enable','on'); |
---|
930 | set(handles.boo_inj_septum,'Enable','on'); |
---|
931 | set(handles.boo_inj_kicker,'Enable','on'); |
---|
932 | set(handles.boo_alim_dipole,'Enable','on'); |
---|
933 | set(handles.boo_alim_qf,'Enable','on'); |
---|
934 | set(handles.boo_alim_qd,'Enable','on'); |
---|
935 | set(handles.boo_alim_sf,'Enable','on'); |
---|
936 | set(handles.boo_alim_sd,'Enable','on'); |
---|
937 | set(handles.boo_alim_cp,'Enable','on'); |
---|
938 | set(handles.boo_rf,'Enable','on'); |
---|
939 | set(handles.boo_mrsv,'Enable','on'); |
---|
940 | set(handles.lin_modulateur,'Enable','on'); |
---|
941 | set(handles.ext_offset,'Enable','on'); |
---|
942 | set(handles.boo_ext_dof,'Enable','on'); |
---|
943 | set(handles.boo_ext_sept_p,'Enable','on'); |
---|
944 | set(handles.boo_ext_sept_a,'Enable','on'); |
---|
945 | set(handles.boo_ext_kicker,'Enable','on'); |
---|
946 | set(handles.sdc2,'Enable','on'); |
---|
947 | set(handles.lt2_emittance,'Enable','on'); |
---|
948 | set(handles.lt2_osc,'Enable','on'); |
---|
949 | set(handles.lt2_bpm,'Enable','on'); |
---|
950 | set(handles.ans_inj_k1,'Enable','on'); |
---|
951 | set(handles.ans_inj_k2,'Enable','on'); |
---|
952 | set(handles.ans_inj_k3,'Enable','on'); |
---|
953 | set(handles.ans_inj_k4,'Enable','on'); |
---|
954 | set(handles.ans_inj_sept_p,'Enable','on'); |
---|
955 | set(handles.ans_inj_sept_a,'Enable','on'); |
---|
956 | set(handles.ans_fbt,'Enable','on'); |
---|
957 | set(handles.ans_dcct,'Enable','on'); |
---|
958 | set(handles.ans_nod,'Enable','on'); |
---|
959 | set(handles.ans_bpm_c01,'Enable','on'); |
---|
960 | set(handles.ans_bpm_c02,'Enable','on'); |
---|
961 | set(handles.ans_bpm_c03,'Enable','on'); |
---|
962 | set(handles.ans_bpm_c04,'Enable','on'); |
---|
963 | set(handles.ans_bpm_c05,'Enable','on'); |
---|
964 | set(handles.ans_bpm_c06,'Enable','on'); |
---|
965 | set(handles.ans_bpm_c07,'Enable','on'); |
---|
966 | set(handles.ans_bpm_c08,'Enable','on'); |
---|
967 | set(handles.ans_bpm_c09,'Enable','on'); |
---|
968 | set(handles.ans_bpm_c10,'Enable','on'); |
---|
969 | set(handles.ans_bpm_c11,'Enable','on'); |
---|
970 | set(handles.ans_bpm_c12,'Enable','on'); |
---|
971 | set(handles.ans_bpm_c13,'Enable','on'); |
---|
972 | set(handles.ans_bpm_c14,'Enable','on'); |
---|
973 | set(handles.ans_bpm_c15,'Enable','on'); |
---|
974 | set(handles.ans_bpm_c16,'Enable','on'); |
---|
975 | set(handles.ans_k_pc,'Enable','on'); |
---|
976 | set(handles.ans_k_h,'Enable','on'); |
---|
977 | set(handles.ans_k_v,'Enable','on'); |
---|
978 | |
---|
979 | |
---|
980 | %FileName = fullfile(getfamilydata('Directory', 'Synchro'), 'synchro_offset_lin_alim'); |
---|
981 | FileName = [handles.DirName 'synchro_offset_lin']; |
---|
982 | load(FileName, 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
983 | set(handles.inj_offset,'String',num2str(inj_offset)); |
---|
984 | set(handles.ext_offset,'String',num2str(ext_offset)); |
---|
985 | set(handles.lin_canon_spm_fin,'String',num2str(lin_fin)); |
---|
986 | |
---|
987 | get_synchro_delay(handles) |
---|
988 | n=1; |
---|
989 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
990 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay'); |
---|
991 | set(handles.central_pc,'String',num2str(temp.value(n))); |
---|
992 | |
---|
993 | temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'libre.1TimeDelay'); |
---|
994 | try txt=num2str(temp.value(n)); catch txt='Bug device' ; end |
---|
995 | set(handles.lin_alim,'String',txt); |
---|
996 | |
---|
997 | temp=tango_read_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceTimeDelay'); |
---|
998 | try ;txt=num2str(temp.value(n)-ext_offset); catch txt=bug_device ; end |
---|
999 | set(handles.boo_mrsv,'String',txt); |
---|
1000 | |
---|
1001 | temp=tango_read_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.pmTimeDelay'); |
---|
1002 | try ;txt=num2str(temp.value(n)-ext_offset); catch txt=bug_device ; end |
---|
1003 | set(handles.ans_nod,'String',txt); |
---|
1004 | |
---|
1005 | |
---|
1006 | %status soft checked on linac |
---|
1007 | temp=tango_read_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent'); |
---|
1008 | if (temp.value(n)==2) |
---|
1009 | %set(handles.soft_button,'Value',0); |
---|
1010 | elseif (temp.value(n)==5) |
---|
1011 | %set(handles.uipanel_mode,'String','Mode Soft'); |
---|
1012 | end |
---|
1013 | |
---|
1014 | %status tables |
---|
1015 | %temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue'); |
---|
1016 | %offset=temp.value(1)*52; |
---|
1017 | offset_linac=10*lin_fin; |
---|
1018 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TablesCurrentDepth'); |
---|
1019 | n=temp.value; |
---|
1020 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionDelayTable'); |
---|
1021 | table_ext=temp.value(1:n); %-offset_ext; |
---|
1022 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'LinacDelayTable'); |
---|
1023 | table_linac=(temp.value(1:n)-offset_linac)/28; |
---|
1024 | table=[]; |
---|
1025 | for i=1:n |
---|
1026 | table=[table ' ' '(' num2str([table_ext(i)]) ' ' num2str([table_linac(i)]) ')']; |
---|
1027 | end |
---|
1028 | set(handles.edit_filling_relecture_tables,'String',[num2str(table)]); |
---|
1029 | set(handles.edit_filling_relecture_bunch, 'String','??'); |
---|
1030 | |
---|
1031 | |
---|
1032 | |
---|
1033 | % --- Executes on button press in button_injection_soft. |
---|
1034 | function button_injection_soft_Callback(hObject, eventdata, handles) |
---|
1035 | % hObject handle to button_injection_soft (see GCBO) |
---|
1036 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1037 | % handles structure with handles and user data (see GUIDATA) |
---|
1038 | |
---|
1039 | % verifie si inj autorisé |
---|
1040 | % try temp=tango_read_attribute2('ANS/FC/INJ_COND', 'COND_INJ'); % 0 no injection, 1 injection |
---|
1041 | % val=temp.value; catch val=1 ; end ; if val~=0 ; val=1; end; |
---|
1042 | % |
---|
1043 | % if (val==1) |
---|
1044 | % |
---|
1045 | % tic |
---|
1046 | % [r1,r2]=fire_injection(handles); |
---|
1047 | % toc |
---|
1048 | % else |
---|
1049 | % % pas d'injection, tir non autorise |
---|
1050 | % fprintf('%s\n','Gap U20 < limite dans ANS/EI/GAP_U20_SECURITY'); |
---|
1051 | % end |
---|
1052 | |
---|
1053 | [r1,r2]=fire_injection(handles); |
---|
1054 | |
---|
1055 | % check synchro booster |
---|
1056 | %flag=0 : OK |
---|
1057 | %falg=1 : mauvais delais |
---|
1058 | [flag]=check_boo_synchro; |
---|
1059 | if flag==1 && r1> 20 |
---|
1060 | set(handles.central_inj,'Backgroundcolor', [1 0 0]); % KO |
---|
1061 | else |
---|
1062 | set(handles.central_inj,'Backgroundcolor', [1 1 1]); % OK |
---|
1063 | end |
---|
1064 | |
---|
1065 | % % Warning mauvais rendement booster |
---|
1066 | % if r1 < 90 |
---|
1067 | % set(handles.edit_rboo,'Backgroundcolor', [1 0 0]); % KO |
---|
1068 | % set(handles.edit_rboo,'Foregroundcolor', [0 0 0]); |
---|
1069 | % else |
---|
1070 | % set(handles.edit_rboo,'Backgroundcolor', [1 1 1]); % OK |
---|
1071 | % set(handles.edit_rboo,'Foregroundcolor', [1 0 0]); |
---|
1072 | % end |
---|
1073 | |
---|
1074 | % |
---|
1075 | test_modes(handles); |
---|
1076 | |
---|
1077 | function periode_edit_Callback(hObject, eventdata, handles) |
---|
1078 | % hObject handle to periode_edit (see GCBO) |
---|
1079 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1080 | % handles structure with handles and user data (see GUIDATA) |
---|
1081 | |
---|
1082 | % Hints: get(hObject,'String') returns contents of periode_edit as text |
---|
1083 | % str2double(get(hObject,'String')) returns contents of periode_edit as a double |
---|
1084 | |
---|
1085 | val_multishot = get(handles.on1,'Value'); |
---|
1086 | |
---|
1087 | if val_multishot |
---|
1088 | errordlg('positionner le trigger a OFF !','Attention'); |
---|
1089 | return |
---|
1090 | else |
---|
1091 | periode = str2double(get(hObject,'String')); |
---|
1092 | |
---|
1093 | % change timer Infinite loop |
---|
1094 | timer1=timer('StartDelay',1,... |
---|
1095 | 'ExecutionMode','fixedRate','Period',periode,'TasksToExecute',Inf); |
---|
1096 | timer1.TimerFcn = {@fonction_alex1, hObject,eventdata, handles}; |
---|
1097 | setappdata(handles.figure1,'Timer1',timer1); |
---|
1098 | |
---|
1099 | % Update handles structure |
---|
1100 | guidata(hObject, handles); |
---|
1101 | |
---|
1102 | %getappdata(handles.figure1,'Timer1') |
---|
1103 | |
---|
1104 | end |
---|
1105 | |
---|
1106 | |
---|
1107 | |
---|
1108 | % --- Executes during object creation, after setting all properties. |
---|
1109 | function periode_edit_CreateFcn(hObject, eventdata, handles) |
---|
1110 | % hObject handle to periode_edit (see GCBO) |
---|
1111 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1112 | % handles empty - handles not created until after all CreateFcns called |
---|
1113 | |
---|
1114 | % Hint: edit controls usually have a white background on Windows. |
---|
1115 | % See ISPC and COMPUTER. |
---|
1116 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1117 | set(hObject,'BackgroundColor','white'); |
---|
1118 | end |
---|
1119 | |
---|
1120 | function uibuttongroup_SelectionChangeFcn(hObject,eventdata,handles) |
---|
1121 | % hObject handle to uipanel1 (see GCBO) |
---|
1122 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1123 | % handles structure with handles and user data (see GUIDATA) |
---|
1124 | |
---|
1125 | %handles = guidata(gcbo); |
---|
1126 | timer1 = getappdata(handles.figure1,'Timer1'); |
---|
1127 | timer2 = getappdata(handles.figure1,'Timer2'); |
---|
1128 | |
---|
1129 | %txt1=' INJECTION EN COURS '; |
---|
1130 | |
---|
1131 | switch get(get(hObject,'SelectedObject'),'Tag') % Get Tag of selected object |
---|
1132 | case 'radiobutton1' |
---|
1133 | % stop du trigger |
---|
1134 | stop(timer1); |
---|
1135 | stop(timer2); |
---|
1136 | set(handles.uipanel6,'Backgroundcolor', [1 0.3 0]); |
---|
1137 | test_modes(handles); |
---|
1138 | tango_write_attribute2('ANS/DG/PUB-FillingMode','mode_auto',uint8(0)) |
---|
1139 | tango_write_attribute2('ANS/DG/PUB-FillingMode','courant_consigne',uint8(0)) |
---|
1140 | case 'radiobutton2' |
---|
1141 | % démarrage du trigger 1 |
---|
1142 | start(timer1); |
---|
1143 | set(handles.edit_modes,'String',handles.txt_inj); |
---|
1144 | tango_write_attribute2('ANS/DG/PUB-FillingMode','mode_auto',uint8(1)) |
---|
1145 | case 'radiobutton3' |
---|
1146 | % démarrage du trigger 2 |
---|
1147 | temp=tango_read_attribute2('ANS/DG/DCCT-CTRL','current');anscur=temp.value; |
---|
1148 | if (anscur>1.) |
---|
1149 | start(timer2); |
---|
1150 | set(handles.edit_modes,'String',handles.txt_inj); |
---|
1151 | tango_write_attribute2('ANS/DG/PUB-FillingMode','mode_auto',uint8(1)) |
---|
1152 | else |
---|
1153 | % ne fait rien, en cas de perte faisceau |
---|
1154 | end |
---|
1155 | end |
---|
1156 | |
---|
1157 | |
---|
1158 | function fonction_alex1(arg1,arg2,hObject,eventdata,handles) |
---|
1159 | % hObject handle to uipanel1 (see GCBO) |
---|
1160 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1161 | % handles structure with handles and user data (see GUIDATA)set(handles.boo_alim_sd,'Enable','on'); |
---|
1162 | |
---|
1163 | color=get(handles.uipanel6,'Backgroundcolor'); |
---|
1164 | if color==[1 0.3 0] |
---|
1165 | set(handles.uipanel6,'Backgroundcolor', [1 0.3 1]); |
---|
1166 | elseif color==[1 0.3 1] |
---|
1167 | set(handles.uipanel6,'Backgroundcolor', [1 0.3 0]); |
---|
1168 | end |
---|
1169 | |
---|
1170 | button_injection_soft_Callback(hObject,eventdata,handles) |
---|
1171 | |
---|
1172 | |
---|
1173 | function fonction_alex2(arg1,arg2,hObject,eventdata,handles) |
---|
1174 | % hObject handle to uipanel1 (see GCBO) |
---|
1175 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1176 | % handles structure with handles and user data (see GUIDATA) |
---|
1177 | |
---|
1178 | |
---|
1179 | temp=tango_read_attribute2('ANS/DG/DCCT-CTRL','current');anscur=temp.value; |
---|
1180 | set(handles.edit_courant_total,'String', num2str(anscur,'%5.2f')); |
---|
1181 | Imin=str2double(get(handles.edit_Imin,'String')); |
---|
1182 | |
---|
1183 | color=get(handles.uipanel6,'Backgroundcolor'); |
---|
1184 | if color==[1 0.3 0] |
---|
1185 | set(handles.uipanel6,'Backgroundcolor', [1 0.3 1]); |
---|
1186 | elseif color==[1 0.3 1] |
---|
1187 | set(handles.uipanel6,'Backgroundcolor', [1 0.3 0]); |
---|
1188 | end |
---|
1189 | |
---|
1190 | |
---|
1191 | if (anscur>Imin) |
---|
1192 | %on attend |
---|
1193 | %fprintf('Cur = %g \n',anscur) |
---|
1194 | tango_write_attribute2('ANS/DG/PUB-FillingMode','courant_consigne',uint8(1)) |
---|
1195 | else |
---|
1196 | %inject le cycle en cours |
---|
1197 | %fprintf('Cur = %g : Injection \n',anscur) |
---|
1198 | %set(handles.uipanel6,'Backgroundcolor', [1 1 0]); |
---|
1199 | button_injection_soft_Callback(hObject, eventdata, handles) |
---|
1200 | end |
---|
1201 | |
---|
1202 | |
---|
1203 | |
---|
1204 | %% What to do before closing the application |
---|
1205 | function Closinggui(obj, event, handles, figure1) |
---|
1206 | |
---|
1207 | % Get default command line output from handles structure |
---|
1208 | answer = questdlg('Fermer softsynchro ?',... |
---|
1209 | 'Exit softsynchro',... |
---|
1210 | 'Yes','No','Yes'); |
---|
1211 | |
---|
1212 | switch answer |
---|
1213 | case 'Yes' |
---|
1214 | delete(handles); %Delete Timer |
---|
1215 | delete(figure1); %Close gui |
---|
1216 | otherwise |
---|
1217 | disp('Closing aborted') |
---|
1218 | end |
---|
1219 | |
---|
1220 | |
---|
1221 | |
---|
1222 | % --- Executes on button press in button_softmoins. |
---|
1223 | function button_softmoins_Callback(hObject, eventdata, handles) |
---|
1224 | % hObject handle to button_softmoins (see GCBO) |
---|
1225 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1226 | % handles structure with handles and user data (see GUIDATA) |
---|
1227 | tt=0.6; |
---|
1228 | |
---|
1229 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftStepDelay'); |
---|
1230 | step=temp.value(1)-52; |
---|
1231 | tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftStepDelay',step); |
---|
1232 | pause(2*tt) |
---|
1233 | |
---|
1234 | %status soft checked on linac |
---|
1235 | temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent'); |
---|
1236 | if (temp.value(1)==2) |
---|
1237 | pause(tt) |
---|
1238 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay'); |
---|
1239 | set(handles.central_soft,'String',num2str(temp.value(1))); |
---|
1240 | elseif (temp.value(1)==5) |
---|
1241 | dt=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay'); |
---|
1242 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
1243 | dt1=tango_read_attribute2('ANS/SY/CENTRAL', 'TSprTimeDelay'); |
---|
1244 | delay=dt.value(1)-dt1.value(1)+inj_offset; |
---|
1245 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareTimeDelay',delay); |
---|
1246 | |
---|
1247 | pause(tt) |
---|
1248 | % read again for possible delay |
---|
1249 | temp=tango_read_attribute2('LIN/SY/LOCAL.LPM.1', 'spareTimeDelay'); |
---|
1250 | set(handles.lin_modulateur,'String',num2str(temp.value(1)-inj_offset)); |
---|
1251 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay'); |
---|
1252 | set(handles.central_soft,'String',num2str(temp.value(1))); |
---|
1253 | end |
---|
1254 | |
---|
1255 | |
---|
1256 | |
---|
1257 | % --- Executes on button press in button_softplus. |
---|
1258 | function button_softplus_Callback(hObject, eventdata, handles) |
---|
1259 | % hObject handle to button_softplus (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 | tt=0.6; |
---|
1263 | |
---|
1264 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftStepDelay'); |
---|
1265 | step=temp.value(1)+52; |
---|
1266 | tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftStepDelay',step); |
---|
1267 | pause(2*tt) |
---|
1268 | |
---|
1269 | %status soft checked on linac |
---|
1270 | temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent'); |
---|
1271 | if (temp.value(1)==2) |
---|
1272 | pause(tt) |
---|
1273 | % read again for possible delay |
---|
1274 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay'); |
---|
1275 | set(handles.central_soft,'String',num2str(temp.value(1))); |
---|
1276 | elseif (temp.value(1)==5) |
---|
1277 | dt=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay'); |
---|
1278 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
1279 | dt1=tango_read_attribute2('ANS/SY/CENTRAL', 'TSprTimeDelay'); |
---|
1280 | delay=dt.value(1)-dt1.value(1)+inj_offset; |
---|
1281 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareTimeDelay',delay); |
---|
1282 | |
---|
1283 | pause(tt) |
---|
1284 | % read again for possible delay |
---|
1285 | temp=tango_read_attribute2('LIN/SY/LOCAL.LPM.1', 'spareTimeDelay'); |
---|
1286 | set(handles.lin_modulateur,'String',num2str(temp.value(1)-inj_offset)); |
---|
1287 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay'); |
---|
1288 | set(handles.central_soft,'String',num2str(temp.value(1))); |
---|
1289 | end |
---|
1290 | |
---|
1291 | |
---|
1292 | |
---|
1293 | % --- Executes on button press in button_injmoins. |
---|
1294 | function button_injmoins_Callback(hObject, eventdata, handles) |
---|
1295 | % hObject handle to button_injmoins (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 | tt=0.6; |
---|
1299 | |
---|
1300 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjStepDelay'); |
---|
1301 | step=temp.value(1)-52; |
---|
1302 | tango_write_attribute2('ANS/SY/CENTRAL', 'TInjStepDelay',step); |
---|
1303 | pause(2*tt) |
---|
1304 | |
---|
1305 | %status soft checked on linac |
---|
1306 | temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent'); |
---|
1307 | if (temp.value(1)==5) |
---|
1308 | pause(tt) |
---|
1309 | % read again for possible delay |
---|
1310 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay'); |
---|
1311 | set(handles.central_inj,'String',num2str(temp.value(1))); |
---|
1312 | elseif (temp.value(1)==2) |
---|
1313 | % commented With address spare = 2 |
---|
1314 | % dt=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay'); |
---|
1315 | % inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
1316 | % dt1=tango_read_attribute2('ANS/SY/CENTRAL', 'TSprTimeDelay'); |
---|
1317 | % delay=dt.value(1)-dt1.value(1)+inj_offset; |
---|
1318 | % tango_write_attribute2('lin_alim/SY/LOCAL.LPM.1', 'spareTimeDelay',delay); |
---|
1319 | % |
---|
1320 | % pause(tt) |
---|
1321 | % % read again for possible delay |
---|
1322 | % temp=tango_read_attribute2('lin_alim/SY/LOCAL.LPM.1', 'spareTimeDelay'); |
---|
1323 | % set(handles.lin_alim_modulateur,'String',num2str(temp.value(1)-inj_offset)); |
---|
1324 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay'); |
---|
1325 | set(handles.central_inj,'String',num2str(temp.value(1))); |
---|
1326 | end |
---|
1327 | |
---|
1328 | |
---|
1329 | % --- Executes on button press in button_injplus. |
---|
1330 | function button_injplus_Callback(hObject, eventdata, handles) |
---|
1331 | % hObject handle to button_injplus (see GCBO) |
---|
1332 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1333 | % handles structure with handles and user data (see GUIDATA) |
---|
1334 | tt=0.6; |
---|
1335 | set(handles.boo_alim_sd,'Enable','on'); |
---|
1336 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjStepDelay'); |
---|
1337 | step=temp.value(1)+52; |
---|
1338 | tango_write_attribute2('ANS/SY/CENTRAL', 'TInjStepDelay',step); |
---|
1339 | pause(2*tt) |
---|
1340 | |
---|
1341 | %status soft checked on linac |
---|
1342 | temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent'); |
---|
1343 | if (temp.value(1)==5) |
---|
1344 | pause(tt) |
---|
1345 | % read again for possible delay |
---|
1346 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay'); |
---|
1347 | set(handles.central_inj,'String',num2str(temp.value(1))); |
---|
1348 | elseif (temp.value(1)==2) |
---|
1349 | % commented With address spare = 2 |
---|
1350 | % dt=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay'); |
---|
1351 | % inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
1352 | % dt1=tango_read_attribute2('ANS/SY/CENTRAL', 'TSprTimeDelay'); |
---|
1353 | % delay=dt.value(1)-dt1.value(1)+inj_offset; |
---|
1354 | % tango_write_attribute2('lin_alim/SY/LOCAL.LPM.1', 'spareTimeDelay',delay); |
---|
1355 | % |
---|
1356 | % pause(tt) |
---|
1357 | % % read again for possible delay |
---|
1358 | % temp=tango_read_attribute2('lin_alim/SY/LOCAL.LPM.1', 'spareTimeDelay'); |
---|
1359 | % set(handles.lin_alim_modulateur,'String',num2str(temp.value(1)-inj_offset)); |
---|
1360 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay'); |
---|
1361 | set(handles.central_inj,'String',num2str(temp.value(1))); |
---|
1362 | end |
---|
1363 | |
---|
1364 | |
---|
1365 | |
---|
1366 | |
---|
1367 | |
---|
1368 | |
---|
1369 | function boo_ext_sept_p_Callback(hObject, eventdata, handles) |
---|
1370 | % hObject handle to boo_ext_sept_p (see GCBO) |
---|
1371 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1372 | % handles structure with handles and user data (see GUIDATA) |
---|
1373 | |
---|
1374 | % Hints: get(hObject,'String') returns contents of boo_ext_sept_p as text |
---|
1375 | % str2double(get(hObject,'String')) returns contents of boo_ext_sept_p as a double |
---|
1376 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1377 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1378 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigTimeDelay',delay); |
---|
1379 | |
---|
1380 | % --- Executes during object creation, after setting all properties. |
---|
1381 | function boo_ext_sept_p_CreateFcn(hObject, eventdata, handles) |
---|
1382 | % hObject handle to boo_ext_sept_p (see GCBO) |
---|
1383 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1384 | % handles empty - handles not created until after all CreateFcns called |
---|
1385 | |
---|
1386 | % Hint: edit controls usually have a white background on Windows. |
---|
1387 | % See ISPC and COMPUTER. |
---|
1388 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1389 | set(hObject,'BackgroundColor','white'); |
---|
1390 | end |
---|
1391 | |
---|
1392 | |
---|
1393 | function boo_ext_dof_Callback(hObject, eventdata, handles) |
---|
1394 | % hObject handle to boo_ext_dof (see GCBO) |
---|
1395 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1396 | % handles structure with handles and user data (see GUIDATA) |
---|
1397 | |
---|
1398 | % Hints: get(hObject,'String') returns contents of boo_ext_dof as text |
---|
1399 | % str2double(get(hObject,'String')) returns contents of boo_ext_dof as a double |
---|
1400 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1401 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1402 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigTimeDelay',delay); |
---|
1403 | |
---|
1404 | % --- Executes during object creation, after setting all properties. |
---|
1405 | function boo_ext_dof_CreateFcn(hObject, eventdata, handles) |
---|
1406 | % hObject handle to boo_ext_dof (see GCBO) |
---|
1407 | % eventdata reserved - to be defined in a future version of MATset(handles.boo_alim_sd,'Enable','on');LAB |
---|
1408 | % handles empty - handles not created until after all CreateFcns called |
---|
1409 | |
---|
1410 | % Hint: edit controls usually have a white background on Windows. |
---|
1411 | % See ISPC and COMPUTER. |
---|
1412 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1413 | set(hObject,'BackgroundColor','white'); |
---|
1414 | end |
---|
1415 | |
---|
1416 | |
---|
1417 | function boo_ext_sept_a_Callback(hObject, eventdata, handles) |
---|
1418 | % hObject handle to boo_ext_sept_a (see GCBO) |
---|
1419 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1420 | % handles structure with handles and user data (see GUIDATA) |
---|
1421 | |
---|
1422 | % Hints: get(hObject,'String') returns contents of boo_ext_sept_a as text |
---|
1423 | % str2double(get(hObject,'String')) returns contents of boo_ext_sept_a as a double |
---|
1424 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1425 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1426 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigTimeDelay',delay); |
---|
1427 | |
---|
1428 | % --- Executes during object creation, after setting all properties. |
---|
1429 | function boo_ext_sept_a_CreateFcn(hObject, eventdata, handles) |
---|
1430 | % hObject handle to boo_ext_sept_a (see GCBO) |
---|
1431 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1432 | % handles empty - handles not created until after all CreateFcns called |
---|
1433 | |
---|
1434 | % Hint: edit controls usually have a white background on Windows. |
---|
1435 | % See ISPC and COMPUTER. |
---|
1436 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1437 | set(hObject,'BackgroundColor','white'); |
---|
1438 | end |
---|
1439 | |
---|
1440 | |
---|
1441 | |
---|
1442 | function boo_ext_kicker_Callback(hObject, eventdata, handles) |
---|
1443 | % hObject handle to boo_ext_kicker (see GCBO)set(handles.boo_alim_sd,'Enable','on'); |
---|
1444 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1445 | % handles structure with handles and user data (see GUIDATA) |
---|
1446 | |
---|
1447 | % Hints: get(hObject,'String') returns contents of boo_ext_kicker as text |
---|
1448 | % str2double(get(hObject,'String')) returns contents of boo_ext_kicker as a double |
---|
1449 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1450 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1451 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigTimeDelay',delay); |
---|
1452 | |
---|
1453 | |
---|
1454 | % --- Executes during object creation, after setting all properties. |
---|
1455 | function boo_ext_kicker_CreateFcn(hObject, eventdata, handles) |
---|
1456 | % hObject handle to boo_ext_kicker (see GCBO) |
---|
1457 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1458 | % handles empty - handles not created until after all CreateFcns called |
---|
1459 | |
---|
1460 | % Hint: edit controls usually have a white background on Windows. |
---|
1461 | % See ISPC and COMPUTER. |
---|
1462 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1463 | set(hObject,'BackgroundColor','white'); |
---|
1464 | end |
---|
1465 | |
---|
1466 | |
---|
1467 | |
---|
1468 | function ans_inj_sept_p_Callback(hObject, eventdata, handles) |
---|
1469 | % hObject handle to ans_inj_sept_p (see GCBO) |
---|
1470 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1471 | % handles structure with handles and user data (see GUIDATA) |
---|
1472 | |
---|
1473 | % Hints: get(hObject,'String') returns contents of ans_inj_sept_p as text |
---|
1474 | % str2double(get(hObject,'String')) returns contents of ans_inj_sept_p as a double |
---|
1475 | |
---|
1476 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1477 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1478 | tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigTimeDelay',delay); |
---|
1479 | |
---|
1480 | % --- Executes during object creation, after setting all properties. |
---|
1481 | function ans_inj_sept_p_CreateFcn(hObject, eventdata, handles) |
---|
1482 | % hObject handle to ans_inj_sept_p (see GCBO) |
---|
1483 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1484 | % handles empty - handles not created until after all CreateFcns called |
---|
1485 | |
---|
1486 | % Hint: edit controls usually have a white background on Windows. |
---|
1487 | % See ISPC and COMPUTER. |
---|
1488 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1489 | set(hObject,'BackgroundColor','white'); |
---|
1490 | end |
---|
1491 | |
---|
1492 | |
---|
1493 | |
---|
1494 | function ans_inj_sept_a_Callback(hObject, eventdata, handles) |
---|
1495 | % hObject handle to ans_inj_sept_a (see GCBO) |
---|
1496 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1497 | % handles structure with handles and user data (see GUIDATA) |
---|
1498 | |
---|
1499 | % Hints: get(hObject,'String') returns contents of ans_inj_sept_a as text |
---|
1500 | % str2double(get(hObject,'String')) returns contents of ans_inj_sept_a as a double |
---|
1501 | |
---|
1502 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1503 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1504 | tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigTimeDelay',delay); |
---|
1505 | |
---|
1506 | % --- Executes during object creation, after setting all properties. |
---|
1507 | function ans_inj_sept_a_CreateFcn(hObject, eventdata, handles) |
---|
1508 | % hObject handle to ans_inj_sept_a (see GCBO) |
---|
1509 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1510 | % handles empty - handles not created until after all CreateFcns called |
---|
1511 | |
---|
1512 | % Hint: edit controls usually have a white background on Windows. |
---|
1513 | % See ISPC and COMPUTER. |
---|
1514 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1515 | set(hObject,'BackgroundColor','white'); |
---|
1516 | end |
---|
1517 | |
---|
1518 | |
---|
1519 | |
---|
1520 | function ans_inj_k1_Callback(hObject, eventdata, handles) |
---|
1521 | % hObject handle to ans_inj_k1 (see GCBO) |
---|
1522 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1523 | % handles structure with handles and user data (see GUIDATA) |
---|
1524 | |
---|
1525 | % Hints: get(hObject,'String') returns contents of ans_inj_k1 as text |
---|
1526 | % str2double(get(hObject,'String')) returns contents of ans_inj_k1 as a double |
---|
1527 | |
---|
1528 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1529 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1530 | tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigTimeDelay',delay); |
---|
1531 | |
---|
1532 | |
---|
1533 | |
---|
1534 | % --- Executes during object creation, after setting all properties. |
---|
1535 | function ans_inj_k1_CreateFcn(hObject, eventdata, handles) |
---|
1536 | % hObject handle to ans_inj_k1 (see GCBO) |
---|
1537 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1538 | % handles empty - handles not created until after all CreateFcns called |
---|
1539 | |
---|
1540 | % Hint: edit controls usually have a white background on Windows. |
---|
1541 | % See ISPC and COMPUTER. |
---|
1542 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1543 | set(hObject,'BackgroundColor','white'); |
---|
1544 | end |
---|
1545 | |
---|
1546 | |
---|
1547 | |
---|
1548 | function ans_inj_k2_Callback(hObject, eventdata, handles) |
---|
1549 | % hObject handle to ans_inj_k2 (see GCBO) |
---|
1550 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1551 | % handles structure with handles and user data (see GUIDATA) |
---|
1552 | |
---|
1553 | % Hints: get(hObject,'String') returns contents of ans_inj_k2 as text |
---|
1554 | % str2double(get(hObject,'String')) returns contents of ans_inj_k2 as a double |
---|
1555 | |
---|
1556 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1557 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1558 | tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigTimeDelay',delay); |
---|
1559 | |
---|
1560 | % --- Executes during object creation, after setting all properties. |
---|
1561 | function ans_inj_k2_CreateFcn(hObject, eventdata, handles) |
---|
1562 | % hObject handle to ans_inj_k2 (see GCBO) |
---|
1563 | % eventdata reserved - to be defined in a future version of MATset(handles.boo_alim_sd,'Enable','on');LAB |
---|
1564 | % handles empty - handles not created until after all CreateFcns called |
---|
1565 | |
---|
1566 | % Hint: edit controls usually have a white background on Windows. |
---|
1567 | % See ISPC and COMPUTER. |
---|
1568 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1569 | set(hObject,'BackgroundColor','white'); |
---|
1570 | end |
---|
1571 | |
---|
1572 | |
---|
1573 | |
---|
1574 | function ans_inj_k3_Callback(hObject, eventdata, handles) |
---|
1575 | % hObject handle to ans_inj_k3 (see GCBO) |
---|
1576 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1577 | % handles structure with handles and user data (see GUIDATA) |
---|
1578 | |
---|
1579 | % Hints: get(hObject,'String') returns contents of ans_inj_k3 as text |
---|
1580 | % str2double(get(hObject,'String')) returns contents of ans_inj_k3 as a double |
---|
1581 | |
---|
1582 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1583 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1584 | tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigTimeDelay',delay); |
---|
1585 | |
---|
1586 | % --- Executes during object creation, after setting all properties. |
---|
1587 | function ans_inj_k3_CreateFcn(hObject, eventdata, handles) |
---|
1588 | % hObject handle to ans_inj_k3 (see GCBO) |
---|
1589 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1590 | % handles empty - handles not created until after all CreateFcns called |
---|
1591 | |
---|
1592 | % Hint: edit controls usually have a white background on Windows. |
---|
1593 | % See ISPC and COMPUTER. |
---|
1594 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1595 | set(hObject,'BackgroundColor','white'); |
---|
1596 | end |
---|
1597 | |
---|
1598 | |
---|
1599 | |
---|
1600 | function ans_inj_k4_Callback(hObject, eventdata, handles) |
---|
1601 | % hObject handle to ans_inj_k4 (see GCBO) |
---|
1602 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1603 | % handles structure with handles and user data (see GUIDATA) |
---|
1604 | |
---|
1605 | % Hints: get(hObject,'String') returns contents of ans_inj_k4 as text |
---|
1606 | % str2double(get(hObject,'String')) returns contents of ans_inj_k4 as a double |
---|
1607 | |
---|
1608 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1609 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1610 | tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigTimeDelay',delay); |
---|
1611 | |
---|
1612 | % --- Executes during object creation, after setting all properties. |
---|
1613 | function ans_inj_k4_CreateFcn(hObject, eventdata, handles) |
---|
1614 | % hObject handle to ans_inj_k4 (see GCBO) |
---|
1615 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1616 | % handles empty - handles not created until after all CreateFcns called |
---|
1617 | |
---|
1618 | % Hint: edit controls usually have a white background on Windows. |
---|
1619 | % See ISPC and COMPUTER. |
---|
1620 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1621 | set(hObject,'BackgroundColor','white'); |
---|
1622 | end |
---|
1623 | |
---|
1624 | |
---|
1625 | |
---|
1626 | function ans_dcct_Callback(hObject, eventdata, handles) |
---|
1627 | % hObject handle to ans_dcct (see GCBO) |
---|
1628 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1629 | % handles structure with handles and user data (see GUIDATA) |
---|
1630 | |
---|
1631 | % Hints: get(hObject,'String') returns contents of ans_dcct as text |
---|
1632 | % str2double(get(hObject,'String')) returns contents of ans_dcct as a double |
---|
1633 | |
---|
1634 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1635 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1636 | tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'perteTimeDelay',delay); |
---|
1637 | |
---|
1638 | |
---|
1639 | % --- Executes during object creation, after setting all properties. |
---|
1640 | function ans_dcct_CreateFcn(hObject, eventdata, handles) |
---|
1641 | % hObject handle to ans_dcct (see GCBO) |
---|
1642 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1643 | % handles empty - handles not created until after all CreateFcns called |
---|
1644 | |
---|
1645 | % Hint: edit controls usually have a white background on Windows. |
---|
1646 | % See ISPC and COMPUTER. |
---|
1647 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1648 | set(hObject,'BackgroundColor','white'); |
---|
1649 | end |
---|
1650 | |
---|
1651 | |
---|
1652 | |
---|
1653 | function ans_fbt_Callback(hObject, eventdata, handles) |
---|
1654 | % hObject handle to ans_fbt (see GCBO) |
---|
1655 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1656 | % handles structure with handles and user data (see GUIDATA) |
---|
1657 | |
---|
1658 | % Hints: get(hObject,'String') returns contents of ans_fbt as text |
---|
1659 | % str2double(get(hObject,'String')) returns contents of ans_fbt as a double |
---|
1660 | |
---|
1661 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1662 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1663 | tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'libre.1TimeDelay',delay); |
---|
1664 | |
---|
1665 | |
---|
1666 | % --- Executes during object creation, after setting all properties. |
---|
1667 | function ans_fbt_CreateFcn(hObject, eventdata, handles) |
---|
1668 | % hObject handle to ans_fbt (see GCBO) |
---|
1669 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1670 | % handles empty - handles not created until after all CreateFcns called |
---|
1671 | |
---|
1672 | % Hint: edit controls usually have a white background on Windows. |
---|
1673 | % See ISPC and COMPUTER. |
---|
1674 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1675 | set(hObject,'BackgroundColor','white'); |
---|
1676 | end |
---|
1677 | |
---|
1678 | |
---|
1679 | |
---|
1680 | function central_ext_Callback(hObject, eventdata, handles) |
---|
1681 | % hObject handle to central_ext (see GCBO) |
---|
1682 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1683 | % handles structure with handles and user data (see GUIDATA) |
---|
1684 | |
---|
1685 | % Hints: get(hObject,'String') returns contents of central_ext as text |
---|
1686 | % str2double(get(hObject,'String')) returns contents of central_ext as a double |
---|
1687 | %'ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue' |
---|
1688 | |
---|
1689 | delay=str2double(get(hObject,'String')); |
---|
1690 | tango_write_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue',delay); |
---|
1691 | |
---|
1692 | % --- Executes during object creation, after setting all properties. |
---|
1693 | function central_ext_CreateFcn(hObject, eventdata, handles) |
---|
1694 | % hObject handle to central_ext (see GCBO) |
---|
1695 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1696 | % handles empty - handles not created until after all CreateFcns called |
---|
1697 | |
---|
1698 | % Hint: edit controls usually have a white background on Windows. |
---|
1699 | % See ISPC and COMPUTER. |
---|
1700 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1701 | set(hObject,'BackgroundColor','white'); |
---|
1702 | end |
---|
1703 | |
---|
1704 | |
---|
1705 | |
---|
1706 | function central_soft1_Callback(hObject, eventdata, handles) |
---|
1707 | % hObject handle to central_soft (see GCBO) |
---|
1708 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1709 | % handles structure with handles and user data (see GUIDATA) |
---|
1710 | |
---|
1711 | % Hints: get(hObject,'String') returns contents of central_soft as text |
---|
1712 | % str2double(get(hObject,'String')) returns contents of central_soft as a double |
---|
1713 | |
---|
1714 | |
---|
1715 | |
---|
1716 | % --- Executes during object creation, after setting all properties. |
---|
1717 | function central_soft1_CreateFcn(hObject, eventdata, handles) |
---|
1718 | % hObject handle to central_soft (see GCBO) |
---|
1719 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1720 | % handles empty - handles not created until after all CreateFcns called |
---|
1721 | |
---|
1722 | % Hint: edit controls usually have a white background on Windows. |
---|
1723 | % See ISPC and COMPUTER. |
---|
1724 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1725 | set(hObject,'BackgroundColor','white'); |
---|
1726 | end |
---|
1727 | |
---|
1728 | |
---|
1729 | % --- Executes on button press in button_extmoins. |
---|
1730 | function button_extmoins_Callback(hObject, eventdata, handles) |
---|
1731 | % hObject handle to button_extmoins (see GCBO) |
---|
1732 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1733 | % handles structure with handles and user data (see GUIDATA) |
---|
1734 | |
---|
1735 | dclk=10; |
---|
1736 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue'); |
---|
1737 | step=temp.value(1)-dclk; |
---|
1738 | tango_write_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue',int32(step)); |
---|
1739 | temp=tango_read_attribute2('ANS/SY/CENTRAL','ExtractionOffsetTimeValue'); |
---|
1740 | set(handles.central_ext,'String',num2str(temp.value(1))); |
---|
1741 | |
---|
1742 | % on fait suivre les septa actif |
---|
1743 | % temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigStepDelay');boo=temp.value(1); |
---|
1744 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigStepDelay',double(boo-dclk*52*184/2)); |
---|
1745 | % temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigStepDelay');ans=temp.value(1); |
---|
1746 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigStepDelay',double(ans-dclk*52*184/2)) |
---|
1747 | |
---|
1748 | % --- Executes on button press in button_extplus. |
---|
1749 | function button_extplus_Callback(hObject, eventdata, handles) |
---|
1750 | % hObject handle to button_extplus (see GCBO) |
---|
1751 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1752 | % handles structure with handles and user data (see GUIDATA) |
---|
1753 | |
---|
1754 | dclk=10; |
---|
1755 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue'); |
---|
1756 | step=temp.value(1)+dclk; |
---|
1757 | tango_write_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue',int32(step)); |
---|
1758 | temp=tango_read_attribute2('ANS/SY/CENTRAL','ExtractionOffsetTimeValue'); |
---|
1759 | set(handles.central_ext,'String',num2str(temp.value(1))); |
---|
1760 | |
---|
1761 | % on fait suivre les septa actif |
---|
1762 | % temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigStepDelay');boo=temp.value(1); |
---|
1763 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigStepDelay',double(boo+dclk*52*184/2)); |
---|
1764 | % temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigStepDelay');ans=temp.value(1); |
---|
1765 | % tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigStepDelay',double(ans+dclk*52*184/2)) |
---|
1766 | |
---|
1767 | function sdc2_Callback(hObject, eventdata, handles) |
---|
1768 | % hObject handle to sdc2 (see GCBO) |
---|
1769 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1770 | % handles structure with handles and user data (see GUIDATA) |
---|
1771 | |
---|
1772 | % Hints: get(hObject,'String') returns contents of sdc2 as text |
---|
1773 | % str2double(get(hObject,'String')) returns contents of sdc2 as a double |
---|
1774 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1775 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1776 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareTimeDelay',delay); |
---|
1777 | |
---|
1778 | % --- Executes during object creation, after setting all properties. |
---|
1779 | function sdc2_CreateFcn(hObject, eventdata, handles) |
---|
1780 | % hObject handle to sdc2 (see GCBO) |
---|
1781 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1782 | % handles empty - handles not created until after all CreateFcns called |
---|
1783 | |
---|
1784 | % Hint: edit controls usually have a white background on Windows. |
---|
1785 | % See ISPC and COMPUTER. |
---|
1786 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1787 | set(hObject,'BackgroundColor','white'); |
---|
1788 | end |
---|
1789 | |
---|
1790 | |
---|
1791 | |
---|
1792 | function lt2_emittance_Callback(hObject, eventdata, handles) |
---|
1793 | % hObject handle to lt2_emittance (see GCBO) |
---|
1794 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1795 | % handles structure with handles and user data (see GUIDATA) |
---|
1796 | |
---|
1797 | % Hints: get(hObject,'String') returns contents of lt2_emittance as text |
---|
1798 | % str2double(get(hObject,'String')) returns contents of lt2_emittance as a double |
---|
1799 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1800 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1801 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvTimeDelay',delay); |
---|
1802 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceTimeDelay',delay); |
---|
1803 | |
---|
1804 | |
---|
1805 | % --- Executes during object creation, after setting all properties. |
---|
1806 | function lt2_emittance_CreateFcn(hObject, eventdata, handles) |
---|
1807 | % hObject handle to lt2_emittance (see GCBO) |
---|
1808 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1809 | % handles empty - handles not created until after all CreateFcns called |
---|
1810 | |
---|
1811 | % Hint: edit controls usually have a white background on Windows. |
---|
1812 | % See ISPC and COMPUTER. |
---|
1813 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1814 | set(hObject,'BackgroundColor','white'); |
---|
1815 | end |
---|
1816 | |
---|
1817 | |
---|
1818 | |
---|
1819 | function lt2_bpm_Callback(hObject, eventdata, handles) |
---|
1820 | % hObject handle to lt2_bpm (see GCBO) |
---|
1821 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1822 | % handles structure with handles and user data (see GUIDATA) |
---|
1823 | |
---|
1824 | % Hints: get(hObject,'String') returns contents of lt2_bpm as text |
---|
1825 | % str2double(get(hObject,'String')) returns contents of lt2_bpm as a double |
---|
1826 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1827 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1828 | tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',delay); |
---|
1829 | |
---|
1830 | % --- Executes during object creation, after setting all properties. |
---|
1831 | function lt2_bpm_CreateFcn(hObject, eventdata, handles) |
---|
1832 | % hObject handle to lt2_bpm (see GCBO) |
---|
1833 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1834 | % handles empty - handles not created until after all CreateFcns called |
---|
1835 | |
---|
1836 | % Hint: edit controls usually have a white background on Windows. |
---|
1837 | % See ISPC and COMPUTER. |
---|
1838 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1839 | set(hObject,'BackgroundColor','white'); |
---|
1840 | end |
---|
1841 | |
---|
1842 | |
---|
1843 | |
---|
1844 | function lt2_osc_Callback(hObject, eventdata, handles) |
---|
1845 | % hObject handle to lt2_osc (see GCBO) |
---|
1846 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1847 | % handles structure with handles and user data (see GUIDATA) |
---|
1848 | |
---|
1849 | % Hints: get(hObject,'String') returns contents of lt2_osc as text |
---|
1850 | % str2double(get(hObject,'String')) returns contents of lt2_osc as a double |
---|
1851 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1852 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
1853 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctTimeDelay',delay); |
---|
1854 | |
---|
1855 | % --- Executes during object creation, after setting all properties. |
---|
1856 | function lt2_osc_CreateFcn(hObject, eventdata, handles) |
---|
1857 | % hObject handle to lt2_osc (see GCBO) |
---|
1858 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1859 | % handles empty - handles not created until after all CreateFcns called |
---|
1860 | |
---|
1861 | % Hint: edit controls usually have a white background on Windows. |
---|
1862 | % See ISPC and COMPUTER. |
---|
1863 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1864 | set(hObject,'BackgroundColor','white'); |
---|
1865 | end |
---|
1866 | |
---|
1867 | |
---|
1868 | |
---|
1869 | function lin_modulateur_Callback(hObject, eventdata, handles) |
---|
1870 | % hObject handle to lin_alim_modulateur (see GCBO) |
---|
1871 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1872 | % handles structure with handles and user data (see GUIDATA) |
---|
1873 | |
---|
1874 | % Hints: get(hObject,'String') returns contents of lin_alim_modulateur as text |
---|
1875 | % str2double(get(hObject,'String')) returns contents of lin_alim_modulateur as a double |
---|
1876 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
1877 | delay=str2double(get(hObject,'String'))+inj_offset; |
---|
1878 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareTimeDelay',delay); |
---|
1879 | |
---|
1880 | % --- Executes during object creation, after setting all properties. |
---|
1881 | function lin_modulateur_CreateFcn(hObject, eventdata, handles) |
---|
1882 | % hObject handle to lin_alim_modulateur (see GCBO) |
---|
1883 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1884 | % handles empty - handles not created until after all CreateFcns called |
---|
1885 | |
---|
1886 | % Hint: edit controls usually have a white background on Windows. |
---|
1887 | % See ISPC and COMPUTER. |
---|
1888 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1889 | set(hObject,'BackgroundColor','white'); |
---|
1890 | end |
---|
1891 | |
---|
1892 | |
---|
1893 | |
---|
1894 | function inj_offset_Callback(hObject, eventdata, handles) |
---|
1895 | % hObject handle to inj_offset (see GCBO) |
---|
1896 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1897 | % handles structure with handles and user data (see GUIDATA) |
---|
1898 | |
---|
1899 | % Hints: get(hObject,'String') returns contents of inj_offset as text |
---|
1900 | % str2double(get(hObject,'String')) returns contents of inj_offset as a double |
---|
1901 | |
---|
1902 | inj_offset=str2double(get(hObject,'String')); |
---|
1903 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
1904 | lin_fin =str2double(get(handles.lin_canon_spm_fin,'String')); |
---|
1905 | %FileName = fullfile(getfamilydata('Directory', 'Synchro'), 'synchro_offset_lin_alim'); |
---|
1906 | FileName = [handles.DirName 'synchro_offset_lin']; |
---|
1907 | save(FileName, 'inj_offset' , 'ext_offset', 'lin_fin') |
---|
1908 | |
---|
1909 | %lin_alim |
---|
1910 | delay=str2double(get(handles.lin_canon_lpm,'String'))+inj_offset; |
---|
1911 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmTimeDelay',delay); |
---|
1912 | |
---|
1913 | delay=str2double(get(handles.lin_canon_spm,'String'))+inj_offset; |
---|
1914 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacTimeDelay',delay); |
---|
1915 | |
---|
1916 | delay=str2double(get(handles.lin_modulateur,'String'))+inj_offset; |
---|
1917 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareTimeDelay',delay); |
---|
1918 | |
---|
1919 | delay=str2double(get(handles.sdc1,'String'))+inj_offset; |
---|
1920 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay',delay); |
---|
1921 | |
---|
1922 | |
---|
1923 | % LT1 |
---|
1924 | delay=str2double(get(handles.lt1_MC2,'String'))+inj_offset; |
---|
1925 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay',delay); |
---|
1926 | |
---|
1927 | delay=str2double(get(handles.lt1_MC1,'String'))+inj_offset; |
---|
1928 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay',delay); |
---|
1929 | |
---|
1930 | delay=str2double(get(handles.lt1_emittance,'String'))+inj_offset; |
---|
1931 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay',delay); |
---|
1932 | |
---|
1933 | delay=str2double(get(handles.lt1_osc,'String'))+inj_offset; |
---|
1934 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay',delay); |
---|
1935 | |
---|
1936 | |
---|
1937 | % BOO |
---|
1938 | delay=str2double(get(handles.boo_inj_septum,'String'))+inj_offset; |
---|
1939 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay',delay); |
---|
1940 | |
---|
1941 | delay=str2double(get(handles.boo_inj_kicker,'String'))+inj_offset; |
---|
1942 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay',delay); |
---|
1943 | |
---|
1944 | delay=str2double(get(handles.boo_bpm,'String'))+inj_offset; |
---|
1945 | tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay',delay); |
---|
1946 | tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigTimeDelay',delay); |
---|
1947 | tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigTimeDelay',delay); |
---|
1948 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigTimeDelay',delay); |
---|
1949 | |
---|
1950 | |
---|
1951 | delay=str2double(get(handles.boo_nod,'String'))+inj_offset; |
---|
1952 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigTimeDelay',delay); |
---|
1953 | |
---|
1954 | % delay=str2double(get(handles.boo_dcct,'String'))+inj_offset; |
---|
1955 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay',delay); |
---|
1956 | |
---|
1957 | |
---|
1958 | |
---|
1959 | % --- Executes during object creation, after setting all properties. |
---|
1960 | function inj_offset_CreateFcn(hObject, eventdata, handles) |
---|
1961 | % hObject handle to inj_offset (see GCBO) |
---|
1962 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
1963 | % handles empty - handles not created until after all CreateFcns called |
---|
1964 | |
---|
1965 | % Hint: edit controls usually have a white background on Windows. |
---|
1966 | % See ISPC and COMPUTER. |
---|
1967 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
1968 | set(hObject,'BackgroundColor','white'); |
---|
1969 | end |
---|
1970 | |
---|
1971 | |
---|
1972 | |
---|
1973 | function ext_offset_Callback(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 structure with handles and user data (see GUIDATA) |
---|
1977 | |
---|
1978 | % Hints: get(hObject,'String') returns contents of ext_offset as text |
---|
1979 | % str2double(get(hObject,'String')) returns contents of ext_offset as a double |
---|
1980 | |
---|
1981 | ext_offset=str2double(get(hObject,'String')); |
---|
1982 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
1983 | lin_fin =str2double(get(handles.lin_canon_spm_fin,'String')); |
---|
1984 | |
---|
1985 | %FileName = fullfile(getfamilydata('Directory', 'Synchro'), 'synchro_offset_lin_alim'); |
---|
1986 | FileName = [handles.DirName 'synchro_offset_lin']; |
---|
1987 | save(FileName, 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
1988 | |
---|
1989 | |
---|
1990 | %BOO |
---|
1991 | delay=str2double(get(handles.boo_ext_dof,'String'))+ext_offset; |
---|
1992 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigTimeDelay',delay); |
---|
1993 | |
---|
1994 | delay=str2double(get(handles.boo_ext_sept_p,'String'))+ext_offset; |
---|
1995 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigTimeDelay',delay); |
---|
1996 | |
---|
1997 | delay=str2double(get(handles.boo_ext_sept_a,'String'))+ext_offset; |
---|
1998 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigTimeDelay',delay); |
---|
1999 | |
---|
2000 | delay=str2double(get(handles.boo_ext_kicker,'String'))+ext_offset; |
---|
2001 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigTimeDelay',delay); |
---|
2002 | |
---|
2003 | delay=str2double(get(handles.sdc2,'String'))+ext_offset; |
---|
2004 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareTimeDelay',delay); |
---|
2005 | |
---|
2006 | %LT2 |
---|
2007 | delay=str2double(get(handles.lt2_bpm,'String'))+ext_offset; |
---|
2008 | tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',delay); |
---|
2009 | |
---|
2010 | delay=str2double(get(handles.lt2_osc,'String'))+ext_offset; |
---|
2011 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctTimeDelay',delay); |
---|
2012 | |
---|
2013 | delay=str2double(get(handles.lt2_emittance,'String'))+ext_offset; |
---|
2014 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvTimeDelay',delay); |
---|
2015 | |
---|
2016 | %ANS |
---|
2017 | |
---|
2018 | delay=str2double(get(handles.ans_inj_sept_a,'String'))+ext_offset; |
---|
2019 | tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigTimeDelay',delay); |
---|
2020 | |
---|
2021 | delay=str2double(get(handles.ans_inj_sept_p,'String'))+ext_offset; |
---|
2022 | tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigTimeDelay',delay); |
---|
2023 | |
---|
2024 | delay=str2double(get(handles.ans_inj_k1,'String'))+ext_offset; |
---|
2025 | tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigTimeDelay',delay); |
---|
2026 | |
---|
2027 | delay=str2double(get(handles.ans_inj_k2,'String'))+ext_offset; |
---|
2028 | tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigTimeDelay',delay); |
---|
2029 | |
---|
2030 | delay=str2double(get(handles.ans_inj_k3,'String'))+ext_offset; |
---|
2031 | tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigTimeDelay',delay); |
---|
2032 | |
---|
2033 | delay=str2double(get(handles.ans_inj_k4,'String'))+ext_offset; |
---|
2034 | tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigTimeDelay',delay); |
---|
2035 | |
---|
2036 | |
---|
2037 | |
---|
2038 | % --- Executes during object creation, after setting all properties. |
---|
2039 | function ext_offset_CreateFcn(hObject, eventdata, handles) |
---|
2040 | % hObject handle to ext_offset (see GCBO) |
---|
2041 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2042 | % handles empty - handles not created until after all CreateFcns called |
---|
2043 | |
---|
2044 | % Hint: edit controls usually have a white background on Windows. |
---|
2045 | % See ISPC and COMPUTER. |
---|
2046 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2047 | set(hObject,'BackgroundColor','white'); |
---|
2048 | end |
---|
2049 | |
---|
2050 | |
---|
2051 | % --- Executes on button press in button_acquisition_address. |
---|
2052 | function button_acquisition_address_Callback(hObject, eventdata, handles) |
---|
2053 | % hObject handle to button_acquisition_address (see GCBO) |
---|
2054 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2055 | % handles structure with handles and user data (see GUIDATA) |
---|
2056 | |
---|
2057 | test_modes(handles); |
---|
2058 | |
---|
2059 | |
---|
2060 | set(handles.inj_offset,'Enable','off'); |
---|
2061 | set(handles.sdc1,'Enable','off'); |
---|
2062 | set(handles.lin_canon_lpm,'Enable','off'); |
---|
2063 | set(handles.lin_canon_spm,'Enable','off'); |
---|
2064 | set(handles.lin_canon_spm_fin,'Enable','off'); |
---|
2065 | set(handles.lin_alim,'Enable','off'); |
---|
2066 | set(handles.boo_bpm,'Enable','off'); |
---|
2067 | set(handles.lt1_emittance,'Enable','off'); |
---|
2068 | set(handles.lt1_MC1,'Enable','off'); |
---|
2069 | set(handles.lt1_MC2,'Enable','off'); |
---|
2070 | set(handles.lt1_osc,'Enable','off'); |
---|
2071 | set(handles.boo_dcct,'Enable','off'); |
---|
2072 | set(handles.boo_nod,'Enable','off'); |
---|
2073 | set(handles.boo_inj_septum,'Enable','off'); |
---|
2074 | set(handles.boo_inj_kicker,'Enable','off'); |
---|
2075 | set(handles.boo_alim_dipole,'Enable','off'); |
---|
2076 | set(handles.boo_alim_qf,'Enable','off'); |
---|
2077 | set(handles.boo_alim_qd,'Enable','off'); |
---|
2078 | set(handles.boo_alim_sf,'Enable','off'); |
---|
2079 | set(handles.boo_alim_sd,'Enable','off'); |
---|
2080 | set(handles.boo_alim_cp,'Enable','off'); |
---|
2081 | set(handles.boo_rf,'Enable','off'); |
---|
2082 | set(handles.boo_mrsv,'Enable','off'); |
---|
2083 | set(handles.lin_modulateur,'Enable','off'); |
---|
2084 | set(handles.ext_offset,'Enable','off'); |
---|
2085 | set(handles.boo_ext_dof,'Enable','off'); |
---|
2086 | set(handles.boo_ext_sept_p,'Enable','off'); |
---|
2087 | set(handles.boo_ext_sept_a,'Enable','off'); |
---|
2088 | set(handles.boo_ext_kicker,'Enable','off'); |
---|
2089 | set(handles.sdc2,'Enable','off'); |
---|
2090 | set(handles.lt2_emittance,'Enable','off'); |
---|
2091 | set(handles.lt2_osc,'Enable','off'); |
---|
2092 | set(handles.lt2_bpm,'Enable','off'); |
---|
2093 | set(handles.ans_inj_k1,'Enable','off'); |
---|
2094 | set(handles.ans_inj_k2,'Enable','off'); |
---|
2095 | set(handles.ans_inj_k3,'Enable','off'); |
---|
2096 | set(handles.ans_inj_k4,'Enable','off'); |
---|
2097 | set(handles.ans_inj_sept_p,'Enable','off'); |
---|
2098 | set(handles.ans_inj_sept_a,'Enable','off'); |
---|
2099 | set(handles.ans_fbt,'Enable','off'); |
---|
2100 | set(handles.ans_dcct,'Enable','off'); |
---|
2101 | set(handles.ans_nod,'Enable','off'); |
---|
2102 | set(handles.ans_bpm_c01,'Enable','off'); |
---|
2103 | set(handles.ans_bpm_c02,'Enable','off'); |
---|
2104 | set(handles.ans_bpm_c03,'Enable','off'); |
---|
2105 | set(handles.ans_bpm_c04,'Enable','off'); |
---|
2106 | set(handles.ans_bpm_c05,'Enable','off'); |
---|
2107 | set(handles.ans_bpm_c06,'Enable','off'); |
---|
2108 | set(handles.ans_bpm_c07,'Enable','off'); |
---|
2109 | set(handles.ans_bpm_c08,'Enable','off'); |
---|
2110 | set(handles.ans_bpm_c09,'Enable','off'); |
---|
2111 | set(handles.ans_bpm_c10,'Enable','off'); |
---|
2112 | set(handles.ans_bpm_c11,'Enable','off'); |
---|
2113 | set(handles.ans_bpm_c12,'Enable','off'); |
---|
2114 | set(handles.ans_bpm_c13,'Enable','off'); |
---|
2115 | set(handles.ans_bpm_c14,'Enable','off'); |
---|
2116 | set(handles.ans_bpm_c15,'Enable','off'); |
---|
2117 | set(handles.ans_bpm_c16,'Enable','off'); |
---|
2118 | |
---|
2119 | |
---|
2120 | %FileName = fullfile(getfamilydata('Directory', 'Synchro'), 'synchro_offset_lin_alim'); |
---|
2121 | FileName = [handles.DirName 'synchro_offset_lin']; |
---|
2122 | load(FileName, 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
2123 | set(handles.inj_offset,'String',num2str(inj_offset)); |
---|
2124 | set(handles.ext_offset,'String',num2str(ext_offset)); |
---|
2125 | set(handles.lin_canon_spm_fin,'String',num2str(lin_fin)); |
---|
2126 | |
---|
2127 | get_synchro_address(handles) |
---|
2128 | n=1; |
---|
2129 | temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'libre.1Event'); |
---|
2130 | try txt=num2str(temp.value(n)); catch txt='Bug device' ; end |
---|
2131 | set(handles.lin_alim,'String',txt); |
---|
2132 | |
---|
2133 | temp=tango_read_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceEvent'); |
---|
2134 | try ;txt=num2str(temp.value(n)); catch txt=bug_device ; end |
---|
2135 | set(handles.boo_mrsv,'String',txt); |
---|
2136 | |
---|
2137 | temp=tango_read_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.pmEvent'); |
---|
2138 | try ;txt=num2str(temp.value(n)); catch txt=bug_device ; end |
---|
2139 | set(handles.ans_nod,'String',txt); |
---|
2140 | set(handles.boo_alim_sd,'Enable','off'); |
---|
2141 | |
---|
2142 | % --- Executes on button press in button_offinj_moins. |
---|
2143 | function button_offinj_moins_Callback(hObject, eventdata, handles) |
---|
2144 | % hObject handle to button_offinj_moins (see GCBO) |
---|
2145 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2146 | % handles structure with handles and user data (see GUIDATA) |
---|
2147 | |
---|
2148 | temp=str2double(get(handles.inj_offset,'String')); |
---|
2149 | step=temp-52*0.52243; |
---|
2150 | set(handles.inj_offset,'String',step); |
---|
2151 | inj_offset_Callback(handles.inj_offset, eventdata, handles); |
---|
2152 | |
---|
2153 | % --- Executes on button press in button_offinj_plus. |
---|
2154 | function button_offinj_plus_Callback(hObject, eventdata, handles) |
---|
2155 | % hObject handle to button_offinj_plus (see GCBO) |
---|
2156 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2157 | % handles structure with handles and user data (see GUIDATA) |
---|
2158 | |
---|
2159 | temp=str2double(get(handles.inj_offset,'String')); |
---|
2160 | step=temp+52*0.52243; |
---|
2161 | set(handles.inj_offset,'String',step); |
---|
2162 | inj_offset_Callback(handles.inj_offset, eventdata, handles); |
---|
2163 | |
---|
2164 | % --- Executes on button press in button_offext_moins. |
---|
2165 | function button_offext_moins_Callback(hObject, eventdata, handles) |
---|
2166 | % hObject handle to button_offext_moins (see GCBO) |
---|
2167 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2168 | % handles structure with handles and user data (see GUIDATA) |
---|
2169 | |
---|
2170 | temp=str2double(get(handles.ext_offset,'String')); |
---|
2171 | step=temp-52*0.52243; |
---|
2172 | set(handles.ext_offset,'String',step); |
---|
2173 | ext_offset_Callback(handles.ext_offset, eventdata, handles); |
---|
2174 | |
---|
2175 | % --- Executes on button press in button_offext_plus. |
---|
2176 | function button_offext_plus_Callback(hObject, eventdata, handles) |
---|
2177 | % hObject handle to button_offext_plus (see GCBO) |
---|
2178 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2179 | % handles structure with handles and user data (see GUIDATA) |
---|
2180 | |
---|
2181 | temp=str2double(get(handles.ext_offset,'String')); |
---|
2182 | step=temp+52*0.52243; |
---|
2183 | set(handles.ext_offset,'String',step); |
---|
2184 | ext_offset_Callback(handles.ext_offset, eventdata, handles); |
---|
2185 | |
---|
2186 | |
---|
2187 | % --- Executes on button press in button_bpm. |
---|
2188 | function button_bpm_Callback(hObject, eventdata, handles) |
---|
2189 | % hObject handle to button_bpm (see GCBO) |
---|
2190 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2191 | % handles structure with handles and user data (see GUIDATA) |
---|
2192 | |
---|
2193 | % Hint: get(hObject,'Value') returns toggle state of button_bpm |
---|
2194 | |
---|
2195 | bpm=get(hObject,'Value'); |
---|
2196 | |
---|
2197 | if (bpm==0) |
---|
2198 | set(handles.panel_bpm,'Visible','off'); |
---|
2199 | elseif (bpm==1) |
---|
2200 | set(handles.panel_bpm,'Visible','on'); |
---|
2201 | end |
---|
2202 | |
---|
2203 | |
---|
2204 | |
---|
2205 | function ans_bpm_c01_Callback(hObject, eventdata, handles) |
---|
2206 | % hObject handle to ans_bpm_c01 (see GCBO) |
---|
2207 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2208 | % handles structure with handles and user data (see GUIDATA) |
---|
2209 | |
---|
2210 | % Hints: get(hObject,'String') returns contents of ans_bpm_c01 as text |
---|
2211 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c01 as a double |
---|
2212 | |
---|
2213 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2214 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2215 | tango_write_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',delay); |
---|
2216 | |
---|
2217 | % --- Executes during object creation, after setting all properties. |
---|
2218 | function ans_bpm_c01_CreateFcn(hObject, eventdata, handles) |
---|
2219 | % hObject handle to ans_bpm_c01 (see GCBO) |
---|
2220 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2221 | % handles empty - handles not created until after all CreateFcns called |
---|
2222 | |
---|
2223 | % Hint: edit controls usually have a white background on Windows. |
---|
2224 | % See ISPC and COMPUTER. |
---|
2225 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2226 | set(hObject,'BackgroundColor','white'); |
---|
2227 | end |
---|
2228 | |
---|
2229 | |
---|
2230 | function ans_bpm_c02_Callback(hObject, eventdata, handles) |
---|
2231 | % hObject handle to ans_bpm_c02 (see GCBO) |
---|
2232 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2233 | % handles structure with handles and user data (see GUIDATA) |
---|
2234 | |
---|
2235 | % Hints: get(hObject,'String') returns contents of ans_bpm_c02 as text |
---|
2236 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c02 as a double |
---|
2237 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2238 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2239 | tango_write_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2240 | |
---|
2241 | |
---|
2242 | % --- Executes during object creation, after setting all properties. |
---|
2243 | function ans_bpm_c02_CreateFcn(hObject, eventdata, handles) |
---|
2244 | % hObject handle to ans_bpm_c02 (see GCBO) |
---|
2245 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2246 | % handles empty - handles not created until after all CreateFcns called |
---|
2247 | |
---|
2248 | % Hint: edit controls usually have a white background on Windows. |
---|
2249 | % See ISPC and COMPUTER. |
---|
2250 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2251 | set(hObject,'BackgroundColor','white'); |
---|
2252 | end |
---|
2253 | |
---|
2254 | |
---|
2255 | |
---|
2256 | function ans_bpm_c03_Callback(hObject, eventdata, handles) |
---|
2257 | % hObject handle to ans_bpm_c03 (see GCBO) |
---|
2258 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2259 | % handles structure with handles and user data (see GUIDATA) |
---|
2260 | |
---|
2261 | % Hints: get(hObject,'String') returns contents of ans_bpm_c03 as text |
---|
2262 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c03 as a double |
---|
2263 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2264 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2265 | tango_write_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2266 | |
---|
2267 | |
---|
2268 | % --- Executes during object creation, after setting all properties. |
---|
2269 | function ans_bpm_c03_CreateFcn(hObject, eventdata, handles) |
---|
2270 | % hObject handle to ans_bpm_c03 (see GCBO) |
---|
2271 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2272 | % handles empty - handles not created until after all CreateFcns called |
---|
2273 | |
---|
2274 | % Hint: edit controls usually have a white background on Windows. |
---|
2275 | % See ISPC and COMPUTER. |
---|
2276 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2277 | set(hObject,'BackgroundColor','white'); |
---|
2278 | end |
---|
2279 | |
---|
2280 | |
---|
2281 | |
---|
2282 | function ans_bpm_c04_Callback(hObject, eventdata, handles) |
---|
2283 | % hObject handle to ans_bpm_c04 (see GCBO) |
---|
2284 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2285 | % handles structure with handles and user data (see GUIDATA) |
---|
2286 | |
---|
2287 | % Hints: get(hObject,'String') returns contents of ans_bpm_c04 as text |
---|
2288 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c04 as a double |
---|
2289 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2290 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2291 | tango_write_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2292 | |
---|
2293 | |
---|
2294 | % --- Executes during object creation, after setting all properties. |
---|
2295 | function ans_bpm_c04_CreateFcn(hObject, eventdata, handles) |
---|
2296 | % hObject handle to ans_bpm_c04 (see GCBO) |
---|
2297 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2298 | % handles empty - handles not created until after all CreateFcns called |
---|
2299 | |
---|
2300 | % Hint: edit controls usually have a white background on Windows. |
---|
2301 | % See ISPC and COMPUTER. |
---|
2302 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2303 | set(hObject,'BackgroundColor','white'); |
---|
2304 | end |
---|
2305 | |
---|
2306 | |
---|
2307 | |
---|
2308 | function ans_bpm_c05_Callback(hObject, eventdata, handles) |
---|
2309 | % hObject handle to ans_bpm_c05 (see GCBO) |
---|
2310 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2311 | % handles structure with handles and user data (see GUIDATA) |
---|
2312 | |
---|
2313 | % Hints: get(hObject,'String') returns contents of ans_bpm_c05 as text |
---|
2314 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c05 as a double |
---|
2315 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2316 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2317 | tango_write_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2318 | |
---|
2319 | |
---|
2320 | % --- Executes during object creation, after setting all properties. |
---|
2321 | function ans_bpm_c05_CreateFcn(hObject, eventdata, handles) |
---|
2322 | % hObject handle to ans_bpm_c05 (see GCBO) |
---|
2323 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2324 | % handles empty - handles not created until after all CreateFcns called |
---|
2325 | |
---|
2326 | % Hint: edit controls usually have a white background on Windows. |
---|
2327 | % See ISPC and COMPUTER. |
---|
2328 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2329 | set(hObject,'BackgroundColor','white'); |
---|
2330 | end |
---|
2331 | |
---|
2332 | |
---|
2333 | |
---|
2334 | function ans_bpm_c06_Callback(hObject, eventdata, handles) |
---|
2335 | % hObject handle to ans_bpm_c06 (see GCBO) |
---|
2336 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2337 | % handles structure with handles and user data (see GUIDATA) |
---|
2338 | |
---|
2339 | % Hints: get(hObject,'String') returns contents of ans_bpm_c06 as text |
---|
2340 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c06 as a double |
---|
2341 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2342 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2343 | tango_write_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2344 | |
---|
2345 | |
---|
2346 | % --- Executes during object creation, after setting all properties. |
---|
2347 | function ans_bpm_c06_CreateFcn(hObject, eventdata, handles) |
---|
2348 | % hObject handle to ans_bpm_c06 (see GCBO) |
---|
2349 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2350 | % handles empty - handles not created until after all CreateFcns called |
---|
2351 | |
---|
2352 | % Hint: edit controls usually have a white background on Windows. |
---|
2353 | % See ISPC and COMPUTER. |
---|
2354 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2355 | set(hObject,'BackgroundColor','white'); |
---|
2356 | end |
---|
2357 | |
---|
2358 | |
---|
2359 | |
---|
2360 | function ans_bpm_c07_Callback(hObject, eventdata, handles) |
---|
2361 | % hObject handle to ans_bpm_c07 (see GCBO) |
---|
2362 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2363 | % handles structure with handles and user data (see GUIDATA) |
---|
2364 | |
---|
2365 | % Hints: get(hObject,'String') returns contents of ans_bpm_c07 as text |
---|
2366 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c07 as a double |
---|
2367 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2368 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2369 | tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2370 | |
---|
2371 | |
---|
2372 | % --- Executes during object creation, after setting all properties. |
---|
2373 | function ans_bpm_c07_CreateFcn(hObject, eventdata, handles) |
---|
2374 | % hObject handle to ans_bpm_c07 (see GCBO) |
---|
2375 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2376 | % handles empty - handles not created until after all CreateFcns called |
---|
2377 | |
---|
2378 | % Hint: edit controls usually have a white background on Windows. |
---|
2379 | % See ISPC and COMPUTER. |
---|
2380 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2381 | set(hObject,'BackgroundColor','white'); |
---|
2382 | end |
---|
2383 | |
---|
2384 | |
---|
2385 | |
---|
2386 | function ans_bpm_c08_Callback(hObject, eventdata, handles) |
---|
2387 | % hObject handle to ans_bpm_c08 (see GCBO) |
---|
2388 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2389 | % handles structure with handles and user data (see GUIDATA) |
---|
2390 | |
---|
2391 | % Hints: get(hObject,'String') returns contents of ans_bpm_c08 as text |
---|
2392 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c08 as a double |
---|
2393 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2394 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2395 | tango_write_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2396 | |
---|
2397 | |
---|
2398 | % --- Executes during object creation, after setting all properties. |
---|
2399 | function ans_bpm_c08_CreateFcn(hObject, eventdata, handles) |
---|
2400 | % hObject handle to ans_bpm_c08 (see GCBO) |
---|
2401 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2402 | % handles empty - handles not created until after all CreateFcns called |
---|
2403 | |
---|
2404 | % Hint: edit controls usually have a white background on Windows. |
---|
2405 | % See ISPC and COMPUTER. |
---|
2406 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2407 | set(hObject,'BackgroundColor','white'); |
---|
2408 | end |
---|
2409 | |
---|
2410 | |
---|
2411 | |
---|
2412 | function ans_bpm_c09_Callback(hObject, eventdata, handles) |
---|
2413 | % hObject handle to ans_bpm_c09 (see GCBO) |
---|
2414 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2415 | % handles structure with handles and user data (see GUIDATA) |
---|
2416 | |
---|
2417 | % Hints: get(hObject,'String') returns contents of ans_bpm_c09 as text |
---|
2418 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c09 as a double |
---|
2419 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2420 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2421 | tango_write_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2422 | |
---|
2423 | |
---|
2424 | % --- Executes during object creation, after setting all properties. |
---|
2425 | function ans_bpm_c09_CreateFcn(hObject, eventdata, handles) |
---|
2426 | % hObject handle to ans_bpm_c09 (see GCBO) |
---|
2427 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2428 | % handles empty - handles not created until after all CreateFcns called |
---|
2429 | |
---|
2430 | % Hint: edit controls usually have a white background on Windows. |
---|
2431 | % See ISPC and COMPUTER. |
---|
2432 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2433 | set(hObject,'BackgroundColor','white'); |
---|
2434 | end |
---|
2435 | |
---|
2436 | |
---|
2437 | |
---|
2438 | function ans_bpm_c10_Callback(hObject, eventdata, handles) |
---|
2439 | % hObject handle to ans_bpm_c10 (see GCBO) |
---|
2440 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2441 | % handles structure with handles and user data (see GUIDATA) |
---|
2442 | |
---|
2443 | % Hints: get(hObject,'String') returns contents of ans_bpm_c10 as text |
---|
2444 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c10 as a double |
---|
2445 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2446 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2447 | tango_write_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2448 | |
---|
2449 | |
---|
2450 | % --- Executes during object creation, after setting all properties. |
---|
2451 | function ans_bpm_c10_CreateFcn(hObject, eventdata, handles) |
---|
2452 | % hObject handle to ans_bpm_c10 (see GCBO) |
---|
2453 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2454 | % handles empty - handles not created until after all CreateFcns called |
---|
2455 | |
---|
2456 | % Hint: edit controls usually have a white background on Windows. |
---|
2457 | % See ISPC and COMPUTER. |
---|
2458 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2459 | set(hObject,'BackgroundColor','white'); |
---|
2460 | end |
---|
2461 | |
---|
2462 | |
---|
2463 | |
---|
2464 | function ans_bpm_c11_Callback(hObject, eventdata, handles) |
---|
2465 | % hObject handle to ans_bpm_c11 (see GCBO) |
---|
2466 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2467 | % handles structure with handles and user data (see GUIDATA) |
---|
2468 | |
---|
2469 | % Hints: get(hObject,'String') returns contents of ans_bpm_c11 as text |
---|
2470 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c11 as a double |
---|
2471 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2472 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2473 | tango_write_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2474 | |
---|
2475 | |
---|
2476 | % --- Executes during object creation, after setting all properties. |
---|
2477 | function ans_bpm_c11_CreateFcn(hObject, eventdata, handles) |
---|
2478 | % hObject handle to ans_bpm_c11 (see GCBO) |
---|
2479 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2480 | % handles empty - handles not created until after all CreateFcns called |
---|
2481 | |
---|
2482 | % Hint: edit controls usually have a white background on Windows. |
---|
2483 | % See ISPC and COMPUTER. |
---|
2484 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2485 | set(hObject,'BackgroundColor','white'); |
---|
2486 | end |
---|
2487 | |
---|
2488 | |
---|
2489 | |
---|
2490 | function ans_bpm_c12_Callback(hObject, eventdata, handles) |
---|
2491 | % hObject handle to ans_bpm_c12 (see GCBO) |
---|
2492 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2493 | % handles structure with handles and user data (see GUIDATA) |
---|
2494 | |
---|
2495 | % Hints: get(hObject,'String') returns contents of ans_bpm_c12 as text |
---|
2496 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c12 as a double |
---|
2497 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2498 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2499 | tango_write_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2500 | |
---|
2501 | |
---|
2502 | % --- Executes during object creation, after setting all properties. |
---|
2503 | function ans_bpm_c12_CreateFcn(hObject, eventdata, handles) |
---|
2504 | % hObject handle to ans_bpm_c12 (see GCBO) |
---|
2505 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2506 | % handles empty - handles not created until after all CreateFcns called |
---|
2507 | |
---|
2508 | % Hint: edit controls usually have a white background on Windows. |
---|
2509 | % See ISPC and COMPUTER. |
---|
2510 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2511 | set(hObject,'BackgroundColor','white'); |
---|
2512 | end |
---|
2513 | |
---|
2514 | |
---|
2515 | |
---|
2516 | function ans_bpm_c13_Callback(hObject, eventdata, handles) |
---|
2517 | % hObject handle to ans_bpm_c13 (see GCBO) |
---|
2518 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2519 | % handles structure with handles and user data (see GUIDATA) |
---|
2520 | |
---|
2521 | % Hints: get(hObject,'String') returns contents of ans_bpm_c13 as text |
---|
2522 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c13 as a double |
---|
2523 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2524 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2525 | tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2526 | |
---|
2527 | |
---|
2528 | % --- Executes during object creation, after setting all properties. |
---|
2529 | function ans_bpm_c13_CreateFcn(hObject, eventdata, handles) |
---|
2530 | % hObject handle to ans_bpm_c13 (see GCBO) |
---|
2531 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2532 | % handles empty - handles not created until after all CreateFcns called |
---|
2533 | |
---|
2534 | % Hint: edit controls usually have a white background on Windows. |
---|
2535 | % See ISPC and COMPUTER. |
---|
2536 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2537 | set(hObject,'BackgroundColor','white'); |
---|
2538 | end |
---|
2539 | |
---|
2540 | |
---|
2541 | |
---|
2542 | function ans_bpm_c14_Callback(hObject, eventdata, handles) |
---|
2543 | % hObject handle to ans_bpm_c14 (see GCBO) |
---|
2544 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2545 | % handles structure with handles and user data (see GUIDATA) |
---|
2546 | |
---|
2547 | % Hints: get(hObject,'String') returns contents of ans_bpm_c14 as text |
---|
2548 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c14 as a double |
---|
2549 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2550 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2551 | tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2552 | |
---|
2553 | |
---|
2554 | % --- Executes during object creation, after setting all properties. |
---|
2555 | function ans_bpm_c14_CreateFcn(hObject, eventdata, handles) |
---|
2556 | % hObject handle to ans_bpm_c14 (see GCBO) |
---|
2557 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2558 | % handles empty - handles not created until after all CreateFcns called |
---|
2559 | |
---|
2560 | % Hint: edit controls usually have a white background on Windows. |
---|
2561 | % See ISPC and COMPUTER. |
---|
2562 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2563 | set(hObject,'BackgroundColor','white'); |
---|
2564 | end |
---|
2565 | |
---|
2566 | |
---|
2567 | |
---|
2568 | function ans_bpm_c15_Callback(hObject, eventdata, handles) |
---|
2569 | % hObject handle to ans_bpm_c15 (see GCBO) |
---|
2570 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2571 | % handles structure with handles and user data (see GUIDATA) |
---|
2572 | |
---|
2573 | % Hints: get(hObject,'String') returns contents of ans_bpm_c15 as text |
---|
2574 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c15 as a double |
---|
2575 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2576 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2577 | tango_write_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2578 | |
---|
2579 | |
---|
2580 | % --- Executes during object creation, after setting all properties. |
---|
2581 | function ans_bpm_c15_CreateFcn(hObject, eventdata, handles) |
---|
2582 | % hObject handle to ans_bpm_c15 (see GCBO) |
---|
2583 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2584 | % handles empty - handles not created until after all CreateFcns called |
---|
2585 | |
---|
2586 | % Hint: edit controls usually have a white background on Windows. |
---|
2587 | % See ISPC and COMPUTER. |
---|
2588 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2589 | set(hObject,'BackgroundColor','white'); |
---|
2590 | end |
---|
2591 | |
---|
2592 | |
---|
2593 | |
---|
2594 | function ans_bpm_c16_Callback(hObject, eventdata, handles) |
---|
2595 | % hObject handle to ans_bpm_c16 (see GCBO) |
---|
2596 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2597 | % handles structure with handles and user data (see GUIDATA) |
---|
2598 | |
---|
2599 | % Hints: get(hObject,'String') returns contents of ans_bpm_c16 as text |
---|
2600 | % str2double(get(hObject,'String')) returns contents of ans_bpm_c16 as a double |
---|
2601 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
2602 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
2603 | tango_write_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay); |
---|
2604 | |
---|
2605 | |
---|
2606 | % --- Executes during object creation, after setting all properties. |
---|
2607 | function ans_bpm_c16_CreateFcn(hObject, eventdata, handles) |
---|
2608 | % hObject handle to ans_bpm_c16 (see GCBO) |
---|
2609 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2610 | % handles empty - handles not created until after all CreateFcns called |
---|
2611 | |
---|
2612 | % Hint: edit controls usually have a white background on Windows. |
---|
2613 | % See ISPC and COMPUTER. |
---|
2614 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2615 | set(hObject,'BackgroundColor','white'); |
---|
2616 | end |
---|
2617 | |
---|
2618 | |
---|
2619 | |
---|
2620 | function edit_filling_relecture_tables_Callback(hObject, eventdata, handles) |
---|
2621 | % hObject handle to edit_filling_relecture_tables (see GCBO) |
---|
2622 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2623 | % handles structure with handles and user data (see GUIDATA) |
---|
2624 | |
---|
2625 | % Hints: get(hObject,'String') returns contents of edit_filling_relecture_tables as text |
---|
2626 | % str2double(get(hObject,'String')) returns contents of edit_filling_relecture_tables as a double |
---|
2627 | |
---|
2628 | |
---|
2629 | % --- Executes during object creation, after setting all properties. |
---|
2630 | function edit_filling_relecture_tables_CreateFcn(hObject, eventdata, handles) |
---|
2631 | % hObject handle to edit_filling_relecture_tables (see GCBO) |
---|
2632 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2633 | % handles empty - handles not created until after all CreateFcns called |
---|
2634 | |
---|
2635 | % Hint: edit controls usually have a white background on Windows. |
---|
2636 | % See ISPC and COMPUTER. |
---|
2637 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2638 | set(hObject,'BackgroundColor','white'); |
---|
2639 | end |
---|
2640 | |
---|
2641 | |
---|
2642 | |
---|
2643 | function edit_filling_relecture_bunch_Callback(hObject, eventdata, handles) |
---|
2644 | % hObject handle to edit_filling_relecture_bunch (see GCBO) |
---|
2645 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2646 | % handles structure with handles and user data (see GUIDATA) |
---|
2647 | |
---|
2648 | % Hints: get(hObject,'String') returns contents of edit_filling_relecture_bunch as text |
---|
2649 | % str2double(get(hObject,'String')) returns contents of edit_filling_relecture_bunch as a double |
---|
2650 | |
---|
2651 | |
---|
2652 | % --- Executes during object creation, after setting all properties. |
---|
2653 | function edit_filling_relecture_bunch_CreateFcn(hObject, eventdata, handles) |
---|
2654 | % hObject handle to edit_filling_relecture_bunch (see GCBO) |
---|
2655 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2656 | % handles empty - handles not created until after all CreateFcns called |
---|
2657 | |
---|
2658 | % Hint: edit controls usually have a white background on Windows. |
---|
2659 | % See ISPC and COMPUTER. |
---|
2660 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2661 | set(hObject,'BackgroundColor','white'); |
---|
2662 | end |
---|
2663 | |
---|
2664 | |
---|
2665 | |
---|
2666 | function edit_filling_entrer_bunch_Callback(hObject, eventdata, handles) |
---|
2667 | % hObject handle to edit_filling_entrer_bunch (see GCBO) |
---|
2668 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2669 | % handles structure with handles and user data (see GUIDATA) |
---|
2670 | |
---|
2671 | % Hints: get(hObject,'String') returns contents of edit_filling_entrer_bunch as text |
---|
2672 | % str2double(get(hObject,'String')) returns contents of edit_filling_entrer_bunch as a double |
---|
2673 | |
---|
2674 | %set(handles.listbox_fillingmode,'value',12); |
---|
2675 | %listbox_fillingmode_Callback; |
---|
2676 | |
---|
2677 | % --- Executes during object creation, after setting all properties. |
---|
2678 | function edit_filling_entrer_bunch_CreateFcn(hObject, eventdata, handles) |
---|
2679 | % hObject handle to edit_filling_entrer_bunch (see GCBO) |
---|
2680 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2681 | % handles empty - handles not created until after all CreateFcns called |
---|
2682 | |
---|
2683 | % Hint: edit controls usually have a white background on Windows. |
---|
2684 | % See ISPC and COMPUTER. |
---|
2685 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2686 | set(hObject,'BackgroundColor','white'); |
---|
2687 | end |
---|
2688 | |
---|
2689 | |
---|
2690 | % --- Executes on button press in button_update. |
---|
2691 | function button_update_Callback(hObject, eventdata, handles) |
---|
2692 | % hObject handle to button_update (see GCBO) |
---|
2693 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2694 | % handles structure with handles and user data (see GUIDATA) |
---|
2695 | |
---|
2696 | do_update |
---|
2697 | |
---|
2698 | % --- Executes on button press in button_acquisition_trigstatus. |
---|
2699 | function button_acquisition_trigstatus_Callback(hObject, eventdata, handles) |
---|
2700 | % hObject handle to button_acquisition_trigstatus (see GCBO) |
---|
2701 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2702 | % handles structure with handles and user data (see GUIDATA) |
---|
2703 | |
---|
2704 | test_modes(handles); |
---|
2705 | |
---|
2706 | set(handles.inj_offset,'Enable','off'); |
---|
2707 | set(handles.sdc1,'Enable','off'); |
---|
2708 | set(handles.lin_canon_lpm,'Enable','off');set(handles.boo_alim_sd,'Enable','off'); |
---|
2709 | set(handles.lin_canon_spm,'Enable','off'); |
---|
2710 | set(handles.lin_canon_spm_fin,'Enable','off'); |
---|
2711 | set(handles.lin_alim,'Enable','off'); |
---|
2712 | set(handles.boo_bpm,'Enable','off'); |
---|
2713 | set(handles.lt1_emittance,'Enable','off'); |
---|
2714 | set(handles.lt1_MC1,'Enable','off'); |
---|
2715 | set(handles.lt1_MC2,'Enable','off'); |
---|
2716 | set(handles.lt1_osc,'Enable','off'); |
---|
2717 | set(handles.boo_dcct,'Enable','off'); |
---|
2718 | set(handles.boo_nod,'Enable','off'); |
---|
2719 | set(handles.boo_inj_septum,'Enable','off'); |
---|
2720 | set(handles.boo_inj_kicker,'Enable','off'); |
---|
2721 | set(handles.boo_alim_dipole,'Enable','off'); |
---|
2722 | set(handles.boo_alim_qf,'Enable','off'); |
---|
2723 | set(handles.boo_alim_qd,'Enable','off'); |
---|
2724 | set(handles.boo_alim_sf,'Enable','off'); |
---|
2725 | set(handles.boo_alim_sd,'Enable','off'); |
---|
2726 | set(handles.boo_alim_cp,'Enable','off'); |
---|
2727 | set(handles.boo_rf,'Enable','off'); |
---|
2728 | set(handles.boo_mrsv,'Enable','off'); |
---|
2729 | set(handles.lin_modulateur,'Enable','off'); |
---|
2730 | set(handles.ext_offset,'Enable','off'); |
---|
2731 | set(handles.boo_ext_dof,'Enable','off'); |
---|
2732 | set(handles.boo_ext_sept_p,'Enable','off'); |
---|
2733 | set(handles.boo_ext_sept_a,'Enable','off'); |
---|
2734 | set(handles.boo_ext_kicker,'Enable','off'); |
---|
2735 | set(handles.sdc2,'Enable','off'); |
---|
2736 | set(handles.lt2_emittance,'Enable','off'); |
---|
2737 | set(handles.lt2_osc,'Enable','off'); |
---|
2738 | set(handles.lt2_bpm,'Enable','off'); |
---|
2739 | set(handles.ans_inj_k1,'Enable','off'); |
---|
2740 | set(handles.ans_inj_k2,'Enable','off'); |
---|
2741 | set(handles.ans_inj_k3,'Enable','off'); |
---|
2742 | set(handles.ans_inj_k4,'Enable','off'); |
---|
2743 | set(handles.ans_inj_sept_p,'Enable','off'); |
---|
2744 | set(handles.ans_inj_sept_a,'Enable','off'); |
---|
2745 | set(handles.ans_fbt,'Enable','off'); |
---|
2746 | set(handles.ans_dcct,'Enable','off'); |
---|
2747 | set(handles.ans_nod,'Enable','off'); |
---|
2748 | set(handles.ans_bpm_c01,'Enable','off'); |
---|
2749 | set(handles.ans_bpm_c02,'Enable','off'); |
---|
2750 | set(handles.ans_bpm_c03,'Enable','off'); |
---|
2751 | set(handles.ans_bpm_c04,'Enable','off'); |
---|
2752 | set(handles.ans_bpm_c05,'Enable','off'); |
---|
2753 | set(handles.ans_bpm_c06,'Enable','off'); |
---|
2754 | set(handles.ans_bpm_c07,'Enable','off'); |
---|
2755 | set(handles.ans_bpm_c08,'Enable','off'); |
---|
2756 | set(handles.ans_bpm_c09,'Enable','off'); |
---|
2757 | set(handles.ans_bpm_c10,'Enable','off'); |
---|
2758 | set(handles.ans_bpm_c11,'Enable','off'); |
---|
2759 | set(handles.ans_bpm_c12,'Enable','off'); |
---|
2760 | set(handles.ans_bpm_c13,'Enable','off'); |
---|
2761 | set(handles.ans_bpm_c14,'Enable','off'); |
---|
2762 | set(handles.ans_bpm_c15,'Enable','off'); |
---|
2763 | set(handles.ans_bpm_c16,'Enable','off'); |
---|
2764 | |
---|
2765 | get_synchro_trigstatus(handles) |
---|
2766 | |
---|
2767 | |
---|
2768 | |
---|
2769 | % --- Executes on button press in togglebutton2. |
---|
2770 | function togglebutton2_Callback(hObject, eventdata, handles) |
---|
2771 | % hObject handle to togglebutton2 (see GCBO) |
---|
2772 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2773 | % handles structure with handles and user data (see GUIDATA) |
---|
2774 | |
---|
2775 | % Hint: get(hObject,'Value') returns toggle state of togglebutton2 |
---|
2776 | |
---|
2777 | |
---|
2778 | % --- Executes on selection change in listbox_fillingmode. |
---|
2779 | function listbox_fillingmode_Callback(hObject, eventdata, handles) |
---|
2780 | % hObject handle to listbox_fillingmode (see GCBO) |
---|
2781 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2782 | % handles structure with handles and user data (see GUIDATA) |
---|
2783 | |
---|
2784 | % Hints: contents = get(hObject,'String') returns listbox_fillingmode contents as cell array |
---|
2785 | % contents{get(hObject,'Value')} returns selected item from listbox_fillingmode |
---|
2786 | pattern=get(hObject,'String'); |
---|
2787 | mode=get(hObject,'Value'); |
---|
2788 | fprintf('***************************************************\n') |
---|
2789 | fprintf('Mode de remplissage sélectionné : %s\n',pattern{mode}) |
---|
2790 | fprintf('***************************************************\n') |
---|
2791 | |
---|
2792 | |
---|
2793 | % Prépare les tables pour le 3 Hz |
---|
2794 | quart=[1 105 209 313]; |
---|
2795 | temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue'); |
---|
2796 | offset_ext=temp.value(1)*52; |
---|
2797 | offset_linac=str2double(get(handles.lin_canon_spm_fin,'String')) ;% délai fin de réglage en ns |
---|
2798 | offset_linac=offset_linac/handles.lin_fin_step; % délai fin de réglage en pas de handles.lin_fin_step ps |
---|
2799 | bjump=handles.one_bunch; |
---|
2800 | |
---|
2801 | |
---|
2802 | if (mode<=4) %LPM |
---|
2803 | bunch=quart(mode); |
---|
2804 | fillingmode='1/4'; |
---|
2805 | elseif (mode>4)&&(mode<=7) %LPM |
---|
2806 | bunch=quart(1:(mode-3)); |
---|
2807 | if mode==5 ; fillingmode='1/2'; end |
---|
2808 | if mode==6 ; fillingmode='3/4'; end |
---|
2809 | if mode==7 ; fillingmode='4/4'; end |
---|
2810 | elseif (mode==8) %LPM |
---|
2811 | bunch=[365]; % SPM hybride |
---|
2812 | %bunch=[0 104+32 2*(104+40)]+1; % spécial 3/4 |
---|
2813 | fillingmode='3/4'; |
---|
2814 | elseif (mode==9) % SPM 1 paquet |
---|
2815 | bunch=[1]; |
---|
2816 | fillingmode='1 bunch'; |
---|
2817 | elseif (mode==10) % SPM 8 paquets |
---|
2818 | bunch=[0:7]*52+1; |
---|
2819 | fillingmode='8 bunches'; |
---|
2820 | elseif (mode==11) % SPM 16 paquets |
---|
2821 | %bunch=[0:15]*26+1; |
---|
2822 | fillingmode='16 bunches'; |
---|
2823 | % Ludo, tu remplis bunch ici |
---|
2824 | bunch=[1:25]; |
---|
2825 | % |
---|
2826 | bunch=[bunch ([1:25]+1*32)]; |
---|
2827 | bunch=[bunch ([1:25]+2*32)]; |
---|
2828 | bunch=[bunch ([1:25]+3*32)]; |
---|
2829 | bunch=[bunch ([1:25]+4*32)]; |
---|
2830 | bunch=[bunch ([1:25]+5*32)]; |
---|
2831 | bunch=[bunch ([1:25]+6*32)]; |
---|
2832 | bunch=[bunch ([1:25]+7*32)]; |
---|
2833 | bunch=[bunch ([1:25]+8*32)]; |
---|
2834 | bunch=[bunch ([1:25]+9*32)]; |
---|
2835 | bunch=[bunch ([1:25]+10*32)]; |
---|
2836 | bunch=[bunch ([1:25]+11*32)]; |
---|
2837 | bunch=[bunch ([1:25]+12*32)]; |
---|
2838 | |
---|
2839 | elseif (mode==12) % SPM n paquets |
---|
2840 | bunch=str2num(get(handles.edit_filling_entrer_bunch,'String')); |
---|
2841 | if isempty(bunch) |
---|
2842 | set(handles.edit_filling_entrer_bunch,'String','Bug format'); |
---|
2843 | end |
---|
2844 | fillingmode='Few bunches'; |
---|
2845 | |
---|
2846 | % bunch=[0:12]*32+1; |
---|
2847 | % fillingmode='3/4'; |
---|
2848 | |
---|
2849 | % bunch=[0 136 272]+1; |
---|
2850 | % fillingmode='LPM spaced 3/4'; |
---|
2851 | |
---|
2852 | % bunch=[0 2 4 6]*52+1; |
---|
2853 | % fillingmode='LPM 8 pulses'; |
---|
2854 | |
---|
2855 | % bunch=[1 105 209 313 1 105 209]; |
---|
2856 | % fillingmode='3.5/4'; |
---|
2857 | |
---|
2858 | elseif (mode==13) % SPM n paquets |
---|
2859 | paq=str2num(get(handles.edit_filling_entrer_bunch1,'String')); |
---|
2860 | if (length(paq) == 2) |
---|
2861 | bunch=paq(1):paq(2); |
---|
2862 | else |
---|
2863 | set(handles.edit_filling_entrer_bunch1,'String','Bug format') |
---|
2864 | end |
---|
2865 | fillingmode='Few bunches'; |
---|
2866 | |
---|
2867 | % bunch=[1 3 5 7]*52+1 + 8; |
---|
2868 | % fillingmode='LPM 8 pulses'; |
---|
2869 | end |
---|
2870 | |
---|
2871 | % Renseigne le filling Mode |
---|
2872 | tango_write_attribute2('ANS/DG/PUB-FillingMode', 'fillingMode',fillingmode) |
---|
2873 | |
---|
2874 | % Charge la longueur de la rafale par défaut sur un cycle |
---|
2875 | Ncoup=length(bunch); |
---|
2876 | boucle=int16(str2double(get(handles.edit_Ncycle,'String'))); |
---|
2877 | if Ncoup>=1 |
---|
2878 | set(handles.edit_Ncoup,'String',num2str(Ncoup)); |
---|
2879 | tango_write_attribute2('ANS/SY/CENTRAL', 'burstSize',int32(Ncoup*boucle)); |
---|
2880 | end |
---|
2881 | |
---|
2882 | |
---|
2883 | [dtour,dpaquet]=bucketnumber(bunch); |
---|
2884 | dpaquet=dpaquet*bjump+offset_linac; |
---|
2885 | table=int32([length(bunch) dtour dpaquet]); |
---|
2886 | handles.table=table; |
---|
2887 | handles.bunch=bunch; |
---|
2888 | |
---|
2889 | %FileName = fullfile(getfamilydata('Directory', 'Synchro'), 'table'); |
---|
2890 | FileName = [handles.DirName 'table.mat']; |
---|
2891 | save(FileName, 'table'); % pour palier aux handles via timer non mis ÃÂ jour !!!!!! |
---|
2892 | |
---|
2893 | modeinj='togglebutton_3Hz'; |
---|
2894 | if strcmp(modeinj,'togglebutton_soft') % on rempli la table sur paquet 1 par défaut, pas utilisée |
---|
2895 | table=handles.table0; |
---|
2896 | tango_command_inout('ANS/SY/CENTRAL','SetTables',table); |
---|
2897 | |
---|
2898 | elseif strcmp(modeinj,'togglebutton_3Hz') % on rempli la table associée au remplissage |
---|
2899 | tango_command_inout('ANS/SY/CENTRAL','SetTables',table); |
---|
2900 | pause(1); % mise a jour table ATK |
---|
2901 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TablesCurrentDepth'); |
---|
2902 | n=temp.value; |
---|
2903 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionDelayTable'); |
---|
2904 | table_ext=temp.value(1:n); %-offset_ext; |
---|
2905 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'LinacDelayTable'); |
---|
2906 | table_linac=(temp.value(1:n)-offset_linac)/bjump; |
---|
2907 | table=[]; |
---|
2908 | for i=1:n |
---|
2909 | table=[table ' ' '(' num2str([table_ext(i)]) ' ' num2str([table_linac(i)]) ')']; |
---|
2910 | end |
---|
2911 | end |
---|
2912 | |
---|
2913 | set(handles.edit_filling_relecture_tables,'String',[num2str(table)]); |
---|
2914 | set(handles.edit_filling_relecture_bunch, 'String',[num2str(bunch)]); |
---|
2915 | |
---|
2916 | |
---|
2917 | guidata(hObject, handles); |
---|
2918 | |
---|
2919 | |
---|
2920 | % --- Executes during object creation, after setting all properties. |
---|
2921 | function listbox_fillingmode_CreateFcn(hObject, eventdata, handles) |
---|
2922 | % hObject handle to listbox_fillingmode (see GCBO) |
---|
2923 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2924 | % handles empty - handles not created until after all CreateFcns called |
---|
2925 | |
---|
2926 | % Hint: listbox controls usually have a white background on Windows. |
---|
2927 | % See ISPC and COMPUTER. |
---|
2928 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2929 | set(hObject,'BackgroundColor','white'); |
---|
2930 | end |
---|
2931 | |
---|
2932 | |
---|
2933 | % --- Executes on button press in button_fix. |
---|
2934 | function button_fix_Callback(hObject, eventdata, handles) |
---|
2935 | % hObject handle to button_fix (see GCBO) |
---|
2936 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2937 | % handles structure with handles and user data (see GUIDATA) |
---|
2938 | |
---|
2939 | [clk_spare,clk_soft]=fix_quart; |
---|
2940 | handles.clk_spare =clk_spare; |
---|
2941 | handles.clk_soft=clk_soft; |
---|
2942 | |
---|
2943 | % n=1; |
---|
2944 | % temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSprStepDelay'); |
---|
2945 | % clk1=temp.value(n); |
---|
2946 | % temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftStepDelay'); |
---|
2947 | % clk2=temp.value(n); |
---|
2948 | % |
---|
2949 | % jump=int32([0 39 26 13]); |
---|
2950 | % handles.clk_spare =jump + int32(clk1); |
---|
2951 | % handles.clk_soft=jump + int32(clk2); |
---|
2952 | |
---|
2953 | guidata(hObject, handles); |
---|
2954 | |
---|
2955 | |
---|
2956 | |
---|
2957 | function edit_Ncycle_Callback(hObject, eventdata, handles) |
---|
2958 | % hObject handle to edit_Ncycle (see GCBO) |
---|
2959 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2960 | % handles structure with handles and user data (see GUIDATA) |
---|
2961 | |
---|
2962 | % Hints: get(hObject,'String') returns contents of edit_Ncycle as text |
---|
2963 | % str2double(get(hObject,'String')) returns contents of edit_Ncycle as a double |
---|
2964 | boucle=str2double(get(hObject,'String')); |
---|
2965 | Ncoup=str2double(get(handles.edit_Ncoup,'String')); |
---|
2966 | tango_write_attribute2('ANS/SY/CENTRAL', 'burstSize',int32(Ncoup*boucle)); |
---|
2967 | |
---|
2968 | % --- Executes during object creation, after setting all properties. |
---|
2969 | function edit_Ncycle_CreateFcn(hObject, eventdata, handles) |
---|
2970 | % hObject handle to edit_Ncycle (see GCBO) |
---|
2971 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2972 | % handles empty - handles not created until after all CreateFcns called |
---|
2973 | |
---|
2974 | % Hint: edit controls usually have a white background on Windows. |
---|
2975 | % See ISPC and COMPUTER. |
---|
2976 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
2977 | set(hObject,'BackgroundColor','white'); |
---|
2978 | end |
---|
2979 | |
---|
2980 | |
---|
2981 | |
---|
2982 | function edit_Ncoup_Callback(hObject, eventdata, handles) |
---|
2983 | % hObject handle to edit_Ncoup (see GCBO) |
---|
2984 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2985 | % handles structure with handles and user data (see GUIDATA) |
---|
2986 | |
---|
2987 | % Hints: get(hObject,'String') returns contents of edit_Ncoup as text |
---|
2988 | % str2double(get(hObject,'String')) returns contents of edit_Ncoup as a double |
---|
2989 | Ncoup=str2double(get(hObject,'String')); |
---|
2990 | boucle=str2double(get(handles.edit_Ncycle,'String')); |
---|
2991 | tango_write_attribute2('ANS/SY/CENTRAL', 'burstSize',int32(Ncoup*boucle)); |
---|
2992 | |
---|
2993 | % --- Executes during object creation, after setting all properties. |
---|
2994 | function edit_Ncoup_CreateFcn(hObject, eventdata, handles) |
---|
2995 | % hObject handle to edit_Ncoup (see GCBO) |
---|
2996 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
2997 | % handles empty - handles not created until after all CreateFcns called |
---|
2998 | |
---|
2999 | % Hint: edit controls usually have a white background on Windows. |
---|
3000 | % See ISPC and COMPUTER. |
---|
3001 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3002 | set(hObject,'BackgroundColor','white'); |
---|
3003 | end |
---|
3004 | |
---|
3005 | |
---|
3006 | |
---|
3007 | function edit_qlt1_Callback(hObject, eventdata, handles) |
---|
3008 | % hObject handle to edit_qlt1 (see GCBO) |
---|
3009 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3010 | % handles structure with handles and user data (see GUIDATA) |
---|
3011 | |
---|
3012 | % Hints: get(hObject,'String') returns contents of edit_qlt1 as text |
---|
3013 | % str2double(get(hObject,'String')) returns contents of edit_qlt1 as a double |
---|
3014 | |
---|
3015 | |
---|
3016 | % --- Executes during object creation, after setting all properties. |
---|
3017 | function edit_qlt1_CreateFcn(hObject, eventdata, handles) |
---|
3018 | % hObject handle to edit_qlt1 (see GCBO) |
---|
3019 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3020 | % handles empty - handles not created until after all CreateFcns called |
---|
3021 | |
---|
3022 | % Hint: edit controls usually have a white background on Windows. |
---|
3023 | % See ISPC and COMPUTER. |
---|
3024 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3025 | set(hObject,'BackgroundColor','white'); |
---|
3026 | end |
---|
3027 | |
---|
3028 | |
---|
3029 | |
---|
3030 | function edit_iboo_Callback(hObject, eventdata, handles) |
---|
3031 | % hObject handle to edit_iboo (see GCBO) |
---|
3032 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3033 | % handles structure with handles and user data (see GUIDATA) |
---|
3034 | |
---|
3035 | % Hints: get(hObject,'String') returns contents of edit_iboo as text |
---|
3036 | % str2double(get(hObject,'String')) returns contents of edit_iboo as a double |
---|
3037 | |
---|
3038 | |
---|
3039 | % --- Executes during object creation, after setting all properties. |
---|
3040 | function edit_iboo_CreateFcn(hObject, eventdata, handles) |
---|
3041 | % hObject handle to edit_iboo (see GCBO) |
---|
3042 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3043 | % handles empty - handles not created until after all CreateFcns called |
---|
3044 | |
---|
3045 | % Hint: edit controls usually have a white background on Windows. |
---|
3046 | % See ISPC and COMPUTER. |
---|
3047 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3048 | set(hObject,'BackgroundColor','white'); |
---|
3049 | end |
---|
3050 | |
---|
3051 | |
---|
3052 | |
---|
3053 | function edit_dians_Callback(hObject, eventdata, handles) |
---|
3054 | % hObject handle to edit_dians (see GCBO) |
---|
3055 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3056 | % handles structure with handles and user data (see GUIDATA) |
---|
3057 | |
---|
3058 | % Hints: get(hObject,'String') returns contents of edit_dians as text |
---|
3059 | % str2double(get(hObject,'String')) returns contents of edit_dians as a double |
---|
3060 | |
---|
3061 | |
---|
3062 | % --- Executes during object creation, after setting all properties. |
---|
3063 | function edit_dians_CreateFcn(hObject, eventdata, handles) |
---|
3064 | % hObject handle to edit_dians (see GCBO) |
---|
3065 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3066 | % handles empty - handles not created until after all CreateFcns called |
---|
3067 | |
---|
3068 | % Hint: edit controls usually have a white background on Windows. |
---|
3069 | % See ISPC and COMPUTER. |
---|
3070 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3071 | set(hObject,'BackgroundColor','white'); |
---|
3072 | end |
---|
3073 | |
---|
3074 | |
---|
3075 | |
---|
3076 | function edit_rlt1_Callback(hObject, eventdata, handles) |
---|
3077 | % hObject handle to edit_rlt1 (see GCBO) |
---|
3078 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3079 | % handles structure with handles and user data (see GUIDATA) |
---|
3080 | |
---|
3081 | % Hints: get(hObject,'String') returns contents of edit_rlt1 as text |
---|
3082 | % str2double(get(hObject,'String')) returns contents of edit_rlt1 as a double |
---|
3083 | |
---|
3084 | |
---|
3085 | % --- Executes during object creation, after setting all properties. |
---|
3086 | function edit_rlt1_CreateFcn(hObject, eventdata, handles) |
---|
3087 | % hObject handle to edit_rlt1 (see GCBO) |
---|
3088 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3089 | % handles empty - handles not created until after all CreateFcns called |
---|
3090 | |
---|
3091 | % Hint: edit controls usually have a white background on Windows. |
---|
3092 | % See ISPC and COMPUTER. |
---|
3093 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3094 | set(hObject,'BackgroundColor','white'); |
---|
3095 | end |
---|
3096 | |
---|
3097 | |
---|
3098 | |
---|
3099 | function edit_rboo_Callback(hObject, eventdata, handles) |
---|
3100 | % hObject handle to edit_rboo (see GCBO) |
---|
3101 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3102 | % handles structure with handles and user data (see GUIDATA) |
---|
3103 | |
---|
3104 | % Hints: get(hObject,'String') returns contents of edit_rboo as text |
---|
3105 | % str2double(get(hObject,'String')) returns contents of edit_rboo as a double |
---|
3106 | |
---|
3107 | |
---|
3108 | % --- Executes during object creation, after setting all properties. |
---|
3109 | function edit_rboo_CreateFcn(hObject, eventdata, handles) |
---|
3110 | % hObject handle to edit_rboo (see GCBO) |
---|
3111 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3112 | % handles empty - handles not created until after all CreateFcns called |
---|
3113 | |
---|
3114 | % Hint: edit controls usually have a white background on Windows. |
---|
3115 | % See ISPC and COMPUTER. |
---|
3116 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3117 | set(hObject,'BackgroundColor','white'); |
---|
3118 | end |
---|
3119 | |
---|
3120 | |
---|
3121 | |
---|
3122 | function edit_rans_Callback(hObject, eventdata, handles) |
---|
3123 | % hObject handle to edit_rans (see GCBO) |
---|
3124 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3125 | % handles structure with handles and user data (see GUIDATA) |
---|
3126 | |
---|
3127 | % Hints: get(hObject,'String') returns contents of edit_rans as text |
---|
3128 | % str2double(get(hObject,'String')) returns contents of edit_rans as a double |
---|
3129 | |
---|
3130 | |
---|
3131 | % --- Executes during object creation, after setting all properties. |
---|
3132 | function edit_rans_CreateFcn(hObject, eventdata, handles) |
---|
3133 | % hObject handle to edit_rans (see GCBO) |
---|
3134 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3135 | % handles empty - handles not created until after all CreateFcns called |
---|
3136 | |
---|
3137 | % Hint: edit controls usually have a white background on Windows. |
---|
3138 | % See ISPC and COMPUTER. |
---|
3139 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3140 | set(hObject,'BackgroundColor','white'); |
---|
3141 | end |
---|
3142 | |
---|
3143 | |
---|
3144 | |
---|
3145 | function edit_dians1_Callback(hObject, eventdata, handles) |
---|
3146 | % hObject handle to edit_dians1 (see GCBO) |
---|
3147 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3148 | % handles structure with handles and user data (see GUIDATA) |
---|
3149 | |
---|
3150 | % Hints: get(hObject,'String') returns contents of edit_dians1 as text |
---|
3151 | % str2double(get(hObject,'String')) returns contents of edit_dians1 as a double |
---|
3152 | |
---|
3153 | |
---|
3154 | % --- Executes during object creation, after setting all properties. |
---|
3155 | function edit_dians1_CreateFcn(hObject, eventdata, handles) |
---|
3156 | % hObject handle to edit_dians1 (see GCBO) |
---|
3157 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3158 | % handles empty - handles not created until after all CreateFcns called |
---|
3159 | |
---|
3160 | % Hint: edit controls usually have a white background on Windows. |
---|
3161 | % See ISPC and COMPUTER. |
---|
3162 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3163 | set(hObject,'BackgroundColor','white'); |
---|
3164 | end |
---|
3165 | |
---|
3166 | |
---|
3167 | |
---|
3168 | function edit_cycle_Callback(hObject, eventdata, handles) |
---|
3169 | % hObject handle to edit_cycle (see GCBO) |
---|
3170 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3171 | % handles structure with handles and user data (see GUIDATA) |
---|
3172 | |
---|
3173 | % Hints: get(hObject,'String') returns contents of edit_cycle as text |
---|
3174 | % str2double(get(hObject,'String')) returns contents of edit_cycle as a double |
---|
3175 | |
---|
3176 | |
---|
3177 | % --- Executes during object creation, after setting all properties. |
---|
3178 | function edit_cycle_CreateFcn(hObject, eventdata, handles) |
---|
3179 | % hObject handle to edit_cycle (see GCBO) |
---|
3180 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3181 | % handles empty - handles not created until after all CreateFcns called |
---|
3182 | |
---|
3183 | % Hint: edit controls usually have a white background on Windows. |
---|
3184 | % See ISPC and COMPUTER. |
---|
3185 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3186 | set(hObject,'BackgroundColor','white'); |
---|
3187 | end |
---|
3188 | |
---|
3189 | |
---|
3190 | |
---|
3191 | function edit_courant_total_Callback(hObject, eventdata, handles) |
---|
3192 | % hObject handle to edit_courant_total (see GCBO) |
---|
3193 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3194 | % handles structure with handles and user data (see GUIDATA) |
---|
3195 | |
---|
3196 | % Hints: get(hObject,'String') returns contents of edit_courant_total as text |
---|
3197 | % str2double(get(hObject,'String')) returns contents of edit_courant_total as a double |
---|
3198 | |
---|
3199 | |
---|
3200 | % --- Executes during object creation, after setting all properties. |
---|
3201 | function edit_courant_total_CreateFcn(hObject, eventdata, handles) |
---|
3202 | % hObject handle to edit_courant_total (see GCBO) |
---|
3203 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3204 | % handles empty - handles not created until after all CreateFcns called |
---|
3205 | |
---|
3206 | % Hint: edit controls usually have a white background on Windows. |
---|
3207 | % See ISPC and COMPUTER. |
---|
3208 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3209 | set(hObject,'BackgroundColor','white'); |
---|
3210 | end |
---|
3211 | |
---|
3212 | |
---|
3213 | |
---|
3214 | function lin_canon_spm_Callback(hObject, eventdata, handles) |
---|
3215 | % hObject handle to lin_alim_canon_spm (see GCBO) |
---|
3216 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3217 | % handles structure with handles and user data (see GUIDATA) |
---|
3218 | |
---|
3219 | % Hints: get(hObject,'String') returns contents of lin_alim_canon_spm as text |
---|
3220 | % str2double(get(hObject,'String')) returns contents of lin_alim_canon_spm as a double |
---|
3221 | |
---|
3222 | inj_offset=str2double(get(handles.inj_offset,'String')); |
---|
3223 | delay=str2double(get(hObject,'String'))+inj_offset; |
---|
3224 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacTimeDelay',delay); |
---|
3225 | |
---|
3226 | |
---|
3227 | % --- Executes during object creation, after setting all properties. |
---|
3228 | function lin_canon_spm_CreateFcn(hObject, eventdata, handles) |
---|
3229 | % hObject handle to lin_alim_canon_spm (see GCBO) |
---|
3230 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3231 | % handles empty - handles not created until after all CreateFcns called |
---|
3232 | |
---|
3233 | % Hint: edit controls usually have a white background on Windows. |
---|
3234 | % See ISPC and COMPUTER. |
---|
3235 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3236 | set(hObject,'BackgroundColor','white'); |
---|
3237 | end |
---|
3238 | |
---|
3239 | |
---|
3240 | function uipanel_mode_CreateFcn(hObject, eventdata, handles) |
---|
3241 | % hObject handle to lin_alim_canon_spm (see GCBO) |
---|
3242 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3243 | % handles empty - handles not created until after all CreateFcns called |
---|
3244 | |
---|
3245 | |
---|
3246 | % % % -------------------------------------------------------------------- |
---|
3247 | % function uipanel_mode_SelectionChangeFcn(hObject, eventdata, handles) |
---|
3248 | % % % hObject handle to uipanel_mode (see GCBO) |
---|
3249 | % % % eventdata reserved - to be defined in a future version of MATLAB |
---|
3250 | % % % handles structure with handles and user data (see GUIDATA) |
---|
3251 | % |
---|
3252 | % set(handles.button_injection_soft,'Enable','Off') |
---|
3253 | % set(handles.edit_modes,'String','Please WAIT !!!!') |
---|
3254 | % mode=get(get(handles.uipanel_mode,'SelectedObject'),'Tag'); |
---|
3255 | % |
---|
3256 | % switch mode % Get Tag of selected object |
---|
3257 | % case 'togglebutton_soft' |
---|
3258 | % % switch to soft (load golden) |
---|
3259 | % |
---|
3260 | % Directory=handles.Directory; |
---|
3261 | % DirName=handles.DirName; |
---|
3262 | % file='golden_rafale_soft.mat'; |
---|
3263 | % load_synchro_rafale(Directory,file,DirName) |
---|
3264 | % |
---|
3265 | % |
---|
3266 | % % special septum actif boo et ans |
---|
3267 | % r=(1-0.0004); |
---|
3268 | % try |
---|
3269 | % temp=tango_read_attribute2('BOO-C12/EP/AL_SEP_A.Ext','voltage');boo=temp.value(2)*r |
---|
3270 | % tango_write_attribute2('BOO-C12/EP/AL_SEP_A.Ext','voltage',boo); |
---|
3271 | % temp=tango_read_attribute2('ANS-C01/EP/AL_SEP_A','voltage');ans=temp.value(2)*r |
---|
3272 | % tango_write_attribute2('ANS-C01/EP/AL_SEP_A','voltage',ans); |
---|
3273 | % catch |
---|
3274 | % display('Erreur ajustement tension septa passif') |
---|
3275 | % end |
---|
3276 | % set(handles.edit_Ncoup,'Enable','off'); |
---|
3277 | % tango_command_inout('ANS/SY/CENTRAL','SetTables',handles.table0); |
---|
3278 | % |
---|
3279 | % case 'togglebutton_3Hz' |
---|
3280 | % % switch to 3Hz(load golden) |
---|
3281 | % |
---|
3282 | % Directory=handles.Directory; |
---|
3283 | % DirName=handles.DirName; |
---|
3284 | % file='golden_rafale_3Hz.mat'; |
---|
3285 | % load_synchro_rafale(Directory,file,DirName) |
---|
3286 | % |
---|
3287 | % % special septum actif boo et ans |
---|
3288 | % r=(1+0.0004); |
---|
3289 | % try |
---|
3290 | % temp=tango_read_attribute2('BOO-C12/EP/AL_SEP_A.Ext','voltage');boo=temp.value(2)*r |
---|
3291 | % tango_write_attribute2('BOO-C12/EP/AL_SEP_A.Ext','voltage',boo); |
---|
3292 | % temp=tango_read_attribute2('ANS-C01/EP/AL_SEP_A','voltage'); ans=temp.value(2)*r |
---|
3293 | % tango_write_attribute2('ANS-C01/EP/AL_SEP_A','voltage',ans); |
---|
3294 | % catch |
---|
3295 | % display('Erreur ajustement tension septa passif') |
---|
3296 | % end |
---|
3297 | % set(handles.edit_Ncoup,'Enable','on'); |
---|
3298 | % tango_command_inout('ANS/SY/CENTRAL','SetTables',handles.table); |
---|
3299 | % end |
---|
3300 | % |
---|
3301 | % set(handles.button_injection_soft,'Enable','On') |
---|
3302 | % test_modes(handles); |
---|
3303 | % display('ok change address') |
---|
3304 | |
---|
3305 | |
---|
3306 | |
---|
3307 | function edit_filling_entrer_bunch1_Callback(hObject, eventdata, handles) |
---|
3308 | % hObject handle to edit_filling_entrer_bunch1 (see GCBO) |
---|
3309 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3310 | % handles structure with handles and user data (see GUIDATA) |
---|
3311 | |
---|
3312 | % Hints: get(hObject,'String') returns contents of edit_filling_entrer_bunch1 as text |
---|
3313 | % str2double(get(hObject,'String')) returns contents of edit_filling_entrer_bunch1 as a double |
---|
3314 | |
---|
3315 | |
---|
3316 | |
---|
3317 | |
---|
3318 | % --- Executes during object creation, after setting all properties. |
---|
3319 | function edit_filling_entrer_bunch1_CreateFcn(hObject, eventdata, handles) |
---|
3320 | % hObject handle to edit_filling_entrer_bunch1 (see GCBO) |
---|
3321 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3322 | % handles empty - handles not created until after all CreateFcns called |
---|
3323 | |
---|
3324 | % Hint: edit controls usually have a white background on Windows. |
---|
3325 | % See ISPC and COMPUTER. |
---|
3326 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3327 | set(hObject,'BackgroundColor','white'); |
---|
3328 | end |
---|
3329 | |
---|
3330 | |
---|
3331 | |
---|
3332 | function edit_Imin_Callback(hObject, eventdata, handles) |
---|
3333 | % hObject handle to edit_Imin (see GCBO) |
---|
3334 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3335 | % handles structure with handles and user data (see GUIDATA) |
---|
3336 | |
---|
3337 | % Hints: get(hObject,'String') returns contents of edit_Imin as text |
---|
3338 | % str2double(get(hObject,'String')) returns contents of edit_Imin as a double |
---|
3339 | |
---|
3340 | |
---|
3341 | % --- Executes during object creation, after setting all properties. |
---|
3342 | function edit_Imin_CreateFcn(hObject, eventdata, handles) |
---|
3343 | % hObject handle to edit_Imin (see GCBO) |
---|
3344 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3345 | % handles empty - handles not created until after all CreateFcns called |
---|
3346 | |
---|
3347 | % Hint: edit controls usually have a white background on Windows. |
---|
3348 | % See ISPC and COMPUTER. |
---|
3349 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3350 | set(hObject,'BackgroundColor','white'); |
---|
3351 | end |
---|
3352 | |
---|
3353 | |
---|
3354 | % -------------------------------------------------------------------- |
---|
3355 | function uipanel_spm_mode_SelectionChangeFcn(hObject, eventdata, handles) |
---|
3356 | % hObject handle to uipanel_spm_mode (see GCBO) |
---|
3357 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3358 | % handles structure with handles and user data (see GUIDATA) |
---|
3359 | |
---|
3360 | %h=get(handles.uipanel_spm_mode); |
---|
3361 | %get(h.Children) |
---|
3362 | |
---|
3363 | mode=get(get(handles.uipanel_spm_mode,'SelectedObject'),'Tag'); |
---|
3364 | |
---|
3365 | switch mode % Get Tag of selected object |
---|
3366 | case 'spm_mode_1' |
---|
3367 | display('spm_mode_1') |
---|
3368 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'mode',int16(1)); |
---|
3369 | case 'spm_mode_2' |
---|
3370 | display('spm_mode_2') |
---|
3371 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'mode',int16(2)); |
---|
3372 | case 'spm_mode_2p' |
---|
3373 | display('spm_mode_2p') |
---|
3374 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'mode',int16(3)); |
---|
3375 | case 'spm_mode_3' |
---|
3376 | display('spm_mode_3') |
---|
3377 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'mode',int16(4)); |
---|
3378 | end |
---|
3379 | |
---|
3380 | test_modes(handles); |
---|
3381 | |
---|
3382 | % -------------------------------------------------------------------- |
---|
3383 | function uipanel_lpm_spm_mode_SelectionChangeFcn(hObject, eventdata, handles) |
---|
3384 | % hObject handle to uipanel_lpm_spm_mode (see GCBO) |
---|
3385 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3386 | % handles structure with handles and user data (see GUIDATA) |
---|
3387 | |
---|
3388 | |
---|
3389 | mode=get(get(handles.uipanel_lpm_spm_mode,'SelectedObject'),'Tag'); |
---|
3390 | %modeinj=get(get(handles.uipanel_mode,'SelectedObject'),'Tag'); |
---|
3391 | modeinj='togglebutton_3Hz'; |
---|
3392 | event0=int32(0); |
---|
3393 | if strcmp(modeinj,'togglebutton_soft') |
---|
3394 | event=int32(5); |
---|
3395 | elseif strcmp(modeinj,'togglebutton_3Hz') |
---|
3396 | event=int32(2); |
---|
3397 | else |
---|
3398 | %%% |
---|
3399 | end |
---|
3400 | |
---|
3401 | switch mode % Get Tag of selected object |
---|
3402 | case 'no_mode' |
---|
3403 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent',event0); |
---|
3404 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacEvent',event0); |
---|
3405 | |
---|
3406 | case 'lpm_mode' |
---|
3407 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent',event); |
---|
3408 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacEvent',event0); |
---|
3409 | |
---|
3410 | % tango_write_attribute('LT1/AE/CV.2', 'current', 0.058 ); |
---|
3411 | % tango_write_attribute('LT1/AE/CV.3', 'current', -0.119 ); |
---|
3412 | |
---|
3413 | case 'spm_mode' |
---|
3414 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent',event0); |
---|
3415 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacEvent',event); |
---|
3416 | |
---|
3417 | % tango_write_attribute('LT1/AE/CV.2', 'current', 0.058 ); |
---|
3418 | % tango_write_attribute('LT1/AE/CV.3', 'current', -0.119 ); |
---|
3419 | |
---|
3420 | end |
---|
3421 | test_modes(handles); |
---|
3422 | |
---|
3423 | |
---|
3424 | |
---|
3425 | |
---|
3426 | |
---|
3427 | |
---|
3428 | % -------------------------------------------------------------------- |
---|
3429 | function uipanel_central_mode_SelectionChangeFcn(hObject, eventdata, handles) |
---|
3430 | % hObject handle to uipanel_central_mode (see GCBO) |
---|
3431 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3432 | % handles structure with handles and user data (see GUIDATA) |
---|
3433 | |
---|
3434 | mode=get(get(handles.uipanel_central_mode,'SelectedObject'),'Tag'); |
---|
3435 | %modeinj=get(get(handles.uipanel_mode,'SelectedObject'),'Tag'); |
---|
3436 | modeinj='togglebutton_3Hz'; |
---|
3437 | |
---|
3438 | h='Yes'; |
---|
3439 | if strcmp(mode,'continuous_mode') |
---|
3440 | if strcmp(modeinj,'togglebutton_3Hz') |
---|
3441 | h = questdlg('Attention, déclenchement continu des équipements sur adresses 1 2 3'); |
---|
3442 | end |
---|
3443 | end |
---|
3444 | |
---|
3445 | if strcmp(h,'Yes') |
---|
3446 | switch mode % Get Tag of selected object |
---|
3447 | case 'burst_mode' |
---|
3448 | tango_command_inout2('ANS/SY/CENTRAL', 'SetBurstMode'); |
---|
3449 | case 'continuous_mode' |
---|
3450 | tango_command_inout2('ANS/SY/CENTRAL', 'SetContinuousMode'); |
---|
3451 | end |
---|
3452 | end |
---|
3453 | pause(1) |
---|
3454 | test_modes(handles); |
---|
3455 | |
---|
3456 | % [etat_central]=test_central_mode(handles); |
---|
3457 | % h='Yes'; |
---|
3458 | % if strcmp(etat_central,'Continu') |
---|
3459 | % h = questdlg('Attention, Trigger en mode continu'); |
---|
3460 | % end |
---|
3461 | % if strcmp(h,'Yes') |
---|
3462 | % set(handles.button_injection_soft,'Enable','Off') |
---|
3463 | % set(handles.edit_modes,'String','Please WAIT !!!!') |
---|
3464 | % file='golden_rafale_3Hz.mat'; |
---|
3465 | % load_synchro_rafale(file) |
---|
3466 | % set(handles.button_injection_soft,'Enable','On') |
---|
3467 | % test_modes(handles); |
---|
3468 | % end |
---|
3469 | |
---|
3470 | |
---|
3471 | function [etat]=test_central_mode(handles) |
---|
3472 | % Verifie le mode central selectionné : rafale ou continue |
---|
3473 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'currentMode'); |
---|
3474 | mode=temp.value; |
---|
3475 | h=get(handles.uipanel_central_mode); |
---|
3476 | switch mode % Get Tag of selected object |
---|
3477 | case 'BURST' |
---|
3478 | set(handles.uipanel_central_mode,'SelectedObject',h.Children(2)) |
---|
3479 | etat='Rafale'; |
---|
3480 | case 'CONTINUOUS' |
---|
3481 | set(handles.uipanel_central_mode,'SelectedObject',h.Children(1)) |
---|
3482 | etat='Continu'; |
---|
3483 | end |
---|
3484 | |
---|
3485 | function [etat]=test_injection_mode(handles) |
---|
3486 | % Verifie le mode d'injection selectionné : soft ou 3Hz |
---|
3487 | %temp=tango_read_attribute2('lin_alim/SY/LOCAL.LPM.1', 'spareEvent'); |
---|
3488 | etat='3Hz'; |
---|
3489 | |
---|
3490 | |
---|
3491 | function [etat]=test_lpm_spm_mode(handles) |
---|
3492 | % Verifie le mode selectionné en SPM ou LPM |
---|
3493 | temp=tango_read_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent'); |
---|
3494 | modelpm=temp.value(1); |
---|
3495 | temp=tango_read_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacEvent'); |
---|
3496 | modespm=temp.value(1); |
---|
3497 | h=get(handles.uipanel_lpm_spm_mode); |
---|
3498 | if (modelpm==5)&(modespm==0) | (modelpm==2)&(modespm==0) |
---|
3499 | set(handles.uipanel_lpm_spm_mode,'SelectedObject',h.Children(2)) |
---|
3500 | etat='LPM'; |
---|
3501 | elseif (modelpm==0)&(modespm==5) | (modelpm==0)&(modespm==2) |
---|
3502 | set(handles.uipanel_lpm_spm_mode,'SelectedObject',h.Children(1)) |
---|
3503 | etat='SPM'; |
---|
3504 | else |
---|
3505 | set(handles.uipanel_lpm_spm_mode,'SelectedObject',h.Children(3)) |
---|
3506 | etat='NONE'; |
---|
3507 | end |
---|
3508 | |
---|
3509 | function [etat]=test_spm_mode(handles) |
---|
3510 | % Verifie le mode selectionné en SPM : 1 2 ou 3 paquets |
---|
3511 | temp=tango_read_attribute2('LIN/SY/LOCAL.SPM.1', 'mode'); |
---|
3512 | mode=temp.value(1); |
---|
3513 | h=get(handles.uipanel_spm_mode); |
---|
3514 | select=h.Children(5-mode); |
---|
3515 | set(handles.uipanel_spm_mode,'SelectedObject',select) |
---|
3516 | etat=num2str(5-mode); |
---|
3517 | |
---|
3518 | function [etat]=test_cond_inj(handles) |
---|
3519 | % Verifie si tir autorise (Grp fonctionnement) |
---|
3520 | try temp=tango_read_attribute2('ANS/FC/INJ_COND', 'COND_INJ'); % 0 no injection, 1 injection |
---|
3521 | val=temp.value; catch val=1 ; end; if val~=0 ; val=1; end; |
---|
3522 | if (val==1) |
---|
3523 | etat='TIR AUTORISE'; |
---|
3524 | else |
---|
3525 | etat='TIR NON AUTORISE'; |
---|
3526 | end |
---|
3527 | |
---|
3528 | |
---|
3529 | function test_modes(handles) |
---|
3530 | % Verifie le mode central selectionné : rafale ou continue |
---|
3531 | [etat_central]=test_central_mode(handles); |
---|
3532 | % Verifie le mode d'injection selectionné : soft ou 3Hz |
---|
3533 | [etat_injection]=test_injection_mode(handles); |
---|
3534 | % Verifie le mode selectionné en SPM ou LPM |
---|
3535 | [etat_linac]=test_lpm_spm_mode(handles); |
---|
3536 | % Verifie le mode selectionné en SPM : 1 2 ou 3 paquets |
---|
3537 | [etat_linac_spm]=test_spm_mode(handles); |
---|
3538 | % Vérifie si injectio autorisee |
---|
3539 | %[etat_inj]=test_cond_inj(handles); |
---|
3540 | |
---|
3541 | |
---|
3542 | % txt=[etat_inj,' #### ', ... |
---|
3543 | % 'CENTRAL : ',etat_central,' # INJECTION : ',etat_injection,' # LINAC : ',etat_linac]; |
---|
3544 | txt=['CENTRAL : ',etat_central,' # INJECTION : ',etat_injection,' # LINAC : ',etat_linac]; |
---|
3545 | set(handles.edit_modes,'String',txt) |
---|
3546 | |
---|
3547 | |
---|
3548 | |
---|
3549 | function edit_modes_Callback(hObject, eventdata, handles) |
---|
3550 | % hObject handle to edit_modes (see GCBO) |
---|
3551 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3552 | % handles structure with handles and user data (see GUIDATA) |
---|
3553 | |
---|
3554 | % Hints: get(hObject,'String') returns contents of edit_modes as text |
---|
3555 | % str2double(get(hObject,'String')) returns contents of edit_modes as a double |
---|
3556 | |
---|
3557 | |
---|
3558 | % --- Executes during object creation, after setting all properties. |
---|
3559 | function edit_modes_CreateFcn(hObject, eventdata, handles) |
---|
3560 | % hObject handle to edit_modes (see GCBO) |
---|
3561 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3562 | % handles empty - handles not created until after all CreateFcns called |
---|
3563 | |
---|
3564 | % Hint: edit controls usually have a white background on Windows. |
---|
3565 | % See ISPC and COMPUTER. |
---|
3566 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3567 | set(hObject,'BackgroundColor','white'); |
---|
3568 | end |
---|
3569 | |
---|
3570 | function ans_k_pc_Callback(hObject, eventdata, handles) |
---|
3571 | % hObject handle to ans_k_pc (see GCBO) |
---|
3572 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3573 | % handles structure with handles and user data (see GUIDATA) |
---|
3574 | |
---|
3575 | % Hints: get(hObject,'String') returns contents of ans_k_pc as text |
---|
3576 | % str2double(get(hObject,'String')) returns contents of ans_k_pc as a double |
---|
3577 | |
---|
3578 | |
---|
3579 | % --- Executes during object creation, after setting all properties. |
---|
3580 | function ans_k_pc_CreateFcn(hObject, eventdata, handles) |
---|
3581 | % hObject handle to ans_k_pc (see GCBO) |
---|
3582 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3583 | % handles empty - handles not created until after all CreateFcns called |
---|
3584 | |
---|
3585 | % Hint: edit controls usually have a white background on Windows. |
---|
3586 | % See ISPC and COMPUTER. |
---|
3587 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3588 | set(hObject,'BackgroundColor','white'); |
---|
3589 | end |
---|
3590 | |
---|
3591 | |
---|
3592 | |
---|
3593 | function ans_k_h_Callback(hObject, eventdata, handles) |
---|
3594 | % hObject handle to ans_k_h (see GCBO) |
---|
3595 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3596 | % handles structure with handles and user data (see GUIDATA) |
---|
3597 | |
---|
3598 | % Hints: get(hObject,'String') returns contents of ans_k_h as text |
---|
3599 | % str2double(get(hObject,'String')) returns contents of ans_k_h as a double |
---|
3600 | |
---|
3601 | |
---|
3602 | % --- Executes during object creation, after setting all properties. |
---|
3603 | function ans_k_h_CreateFcn(hObject, eventdata, handles) |
---|
3604 | % hObject handle to ans_k_h (see GCBO) |
---|
3605 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3606 | % handles empty - handles not created until after all CreateFcns called |
---|
3607 | |
---|
3608 | % Hint: edit controls usually have a white background on Windows. |
---|
3609 | % See ISPC and COMPUTER. |
---|
3610 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3611 | set(hObject,'BackgroundColor','white'); |
---|
3612 | end |
---|
3613 | |
---|
3614 | |
---|
3615 | |
---|
3616 | function ans_k_v_Callback(hObject, eventdata, handles) |
---|
3617 | % hObject handle to ans_k_v (see GCBO) |
---|
3618 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3619 | % handles structure with handles and user data (see GUIDATA) |
---|
3620 | |
---|
3621 | % Hints: get(hObject,'String') returns contents of ans_k_v as text |
---|
3622 | % str2double(get(hObject,'String')) returns contents of ans_k_v as a double |
---|
3623 | |
---|
3624 | |
---|
3625 | % --- Executes during object creation, after setting all properties. |
---|
3626 | function ans_k_v_CreateFcn(hObject, eventdata, handles) |
---|
3627 | % hObject handle to ans_k_v (see GCBO) |
---|
3628 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3629 | % handles empty - handles not created until after all CreateFcns called |
---|
3630 | |
---|
3631 | % Hint: edit controls usually have a white background on Windows. |
---|
3632 | % See ISPC and COMPUTER. |
---|
3633 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3634 | set(hObject,'BackgroundColor','white'); |
---|
3635 | end |
---|
3636 | |
---|
3637 | |
---|
3638 | % --- Executes on button press in button_kicker. |
---|
3639 | function button_kicker_Callback(hObject, eventdata, handles) |
---|
3640 | % hObject handle to button_kicker (see GCBO) |
---|
3641 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3642 | % handles structure with handles and user data (see GUIDATA) |
---|
3643 | |
---|
3644 | % Hint: get(hObject,'Value') returns toggle state of button_kicker |
---|
3645 | |
---|
3646 | bpm=get(hObject,'Value'); |
---|
3647 | |
---|
3648 | if (bpm==0) |
---|
3649 | set(handles.uipanel_kicker_machine,'Visible','off'); |
---|
3650 | elseif (bpm==1) |
---|
3651 | set(handles.uipanel_kicker_machine,'Visible','on'); |
---|
3652 | end |
---|
3653 | |
---|
3654 | |
---|
3655 | % --- Executes on button press in button_save_golden_soft. |
---|
3656 | function button_save_golden_soft_Callback(hObject, eventdata, handles) |
---|
3657 | % hObject handle to button_save_golden_soft (see GCBO) |
---|
3658 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3659 | % handles structure with handles and user data (see GUIDATA) |
---|
3660 | h = questdlg('Attention, sauvegarde nouvelle golden !!!'); |
---|
3661 | |
---|
3662 | if strcmp(h,'Yes') |
---|
3663 | |
---|
3664 | DirName=handles.DirName; |
---|
3665 | [timing]=get_synchro_rafale(DirName); |
---|
3666 | % sauvegarde |
---|
3667 | file='golden_rafale_soft.mat'; |
---|
3668 | %Directory = [getfamilydata('Directory','DataRoot') 'Datatemp']; |
---|
3669 | Directory=handles.Directory; |
---|
3670 | pwdold = pwd; |
---|
3671 | cd(Directory); |
---|
3672 | save(file, 'timing'); |
---|
3673 | cd(pwdold); |
---|
3674 | |
---|
3675 | end |
---|
3676 | |
---|
3677 | |
---|
3678 | % --- Executes on button press in button_load_golden_soft. |
---|
3679 | function button_load_golden_soft_Callback(hObject, eventdata, handles) |
---|
3680 | % hObject handle to button_load_golden_soft (see GCBO) |
---|
3681 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3682 | % handles structure with handles and user data (see GUIDATA) |
---|
3683 | |
---|
3684 | set(handles.button_injection_soft,'Enable','Off') |
---|
3685 | set(handles.edit_modes,'String','Please WAIT !!!!') |
---|
3686 | Directory=handles.Directory; |
---|
3687 | DirName=handles.DirName; |
---|
3688 | file='golden_rafale_soft.mat'; |
---|
3689 | load_synchro_rafale(Directory,file,DirName) |
---|
3690 | set(handles.button_injection_soft,'Enable','On') |
---|
3691 | test_modes(handles); |
---|
3692 | |
---|
3693 | |
---|
3694 | % --- Executes on button press in button_load_golden_3Hz. |
---|
3695 | function button_load_golden_3Hz_Callback(hObject, eventdata, handles) |
---|
3696 | % hObject handle to button_load_golden_3Hz (see GCBO) |
---|
3697 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3698 | % handles structure with handles and user data (see GUIDATA) |
---|
3699 | |
---|
3700 | [etat_central]=test_central_mode(handles); |
---|
3701 | h='Yes'; |
---|
3702 | if strcmp(etat_central,'Continu') |
---|
3703 | h = questdlg('Attention, Trigger en mode continu'); |
---|
3704 | end |
---|
3705 | if strcmp(h,'Yes') |
---|
3706 | set(handles.button_injection_soft,'Enable','Off') |
---|
3707 | set(handles.edit_modes,'String','Please WAIT !!!!') |
---|
3708 | Directory=handles.Directory; |
---|
3709 | DirName=handles.DirName; |
---|
3710 | file='golden_rafale_3Hz.mat'; |
---|
3711 | load_synchro_rafale(Directory,file,DirName) |
---|
3712 | set(handles.button_injection_soft,'Enable','On') |
---|
3713 | test_modes(handles); |
---|
3714 | end |
---|
3715 | |
---|
3716 | % --- Executes on button press in button_save_golden_3Hz. |
---|
3717 | function button_save_golden_3Hz_Callback(hObject, eventdata, handles) |
---|
3718 | % hObject handle to button_save_golden_3Hz (see GCBO) |
---|
3719 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3720 | % handles structure with handles and user data (see GUIDATA) |
---|
3721 | h = questdlg('Attention, sauvegarde nouvelle golden !!!'); |
---|
3722 | |
---|
3723 | if strcmp(h,'Yes') |
---|
3724 | |
---|
3725 | DirName=handles.DirName; |
---|
3726 | [timing]=get_synchro_rafale(DirName); |
---|
3727 | % sauvegarde |
---|
3728 | file='golden_rafale_3Hz.mat'; |
---|
3729 | %Directory = [getfamilydata('Directory','DataRoot') 'Datatemp']; |
---|
3730 | Directory=handles.Directory; |
---|
3731 | pwdold = pwd; |
---|
3732 | cd(Directory); |
---|
3733 | save(file, 'timing'); |
---|
3734 | cd(pwdold); |
---|
3735 | |
---|
3736 | end |
---|
3737 | |
---|
3738 | % --- Executes on button press in button_load_golden_3Hz_66MeV. |
---|
3739 | function button_load_golden_3Hz_66MeV_Callback(hObject, eventdata, handles) |
---|
3740 | % hObject handle to button_load_golden_3Hz_66MeV (see GCBO) |
---|
3741 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3742 | % handles structure with handles and user data (see GUIDATA) |
---|
3743 | [etat_central]=test_central_mode(handles); |
---|
3744 | h='Yes'; |
---|
3745 | if strcmp(etat_central,'Continu') |
---|
3746 | h = questdlg('Attention, Trigger en mode continu'); |
---|
3747 | end |
---|
3748 | if strcmp(h,'Yes') |
---|
3749 | set(handles.button_injection_soft,'Enable','Off') |
---|
3750 | set(handles.edit_modes,'String','Please WAIT !!!!') |
---|
3751 | Directory=handles.Directory; |
---|
3752 | DirName=handles.DirName; |
---|
3753 | file='golden_rafale_3Hz_66MeV.mat'; |
---|
3754 | load_synchro_rafale(Directory,file,DirName) |
---|
3755 | set(handles.button_injection_soft,'Enable','On') |
---|
3756 | test_modes(handles); |
---|
3757 | end |
---|
3758 | |
---|
3759 | |
---|
3760 | % --- Executes on button press in button_save_golden_66MeV. |
---|
3761 | function button_save_golden_66MeV_Callback(hObject, eventdata, handles) |
---|
3762 | % hObject handle to button_save_golden_66MeV (see GCBO) |
---|
3763 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3764 | % handles structure with handles and user data (see GUIDATA) |
---|
3765 | h = questdlg('Attention, sauvegarde nouvelle golden 66 MeV!!!'); |
---|
3766 | |
---|
3767 | if strcmp(h,'Yes') |
---|
3768 | |
---|
3769 | DirName=handles.DirName; |
---|
3770 | [timing]=get_synchro_rafale(DirName); |
---|
3771 | % sauvegarde |
---|
3772 | file='golden_rafale_3Hz_66MeV.mat'; |
---|
3773 | %Directory = [getfamilydata('Directory','DataRoot') 'Datatemp']; |
---|
3774 | Directory=handles.Directory; |
---|
3775 | pwdold = pwd; |
---|
3776 | cd(Directory); |
---|
3777 | save(file, 'timing'); |
---|
3778 | cd(pwdold); |
---|
3779 | |
---|
3780 | end |
---|
3781 | |
---|
3782 | |
---|
3783 | |
---|
3784 | function boo_mrsv_Callback(hObject, eventdata, handles) |
---|
3785 | % hObject handle to boo_mrsv (see GCBO) |
---|
3786 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3787 | % handles structure with handles and user data (see GUIDATA) |
---|
3788 | |
---|
3789 | % Hints: get(hObject,'String') returns contents of boo_mrsv as text |
---|
3790 | % str2double(get(hObject,'String')) returns contents of boo_mrsv as a double |
---|
3791 | |
---|
3792 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
3793 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
3794 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceTimeDelay',delay); |
---|
3795 | |
---|
3796 | % --- Executes during object creation, after setting all properties. |
---|
3797 | function boo_mrsv_CreateFcn(hObject, eventdata, handles) |
---|
3798 | % hObject handle to boo_mrsv (see GCBO) |
---|
3799 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3800 | % handles empty - handles not created until after all CreateFcns called |
---|
3801 | |
---|
3802 | % Hint: edit controls usually have a white background on Windows. |
---|
3803 | % See ISPC and COMPUTER. |
---|
3804 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3805 | set(hObject,'BackgroundColor','white'); |
---|
3806 | end |
---|
3807 | |
---|
3808 | |
---|
3809 | |
---|
3810 | function central_pc_Callback(hObject, eventdata, handles) |
---|
3811 | % hObject handle to central_pc (see GCBO) |
---|
3812 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3813 | % handles structure with handles and user data (see GUIDATA) |
---|
3814 | |
---|
3815 | % Hints: get(hObject,'String') returns contents of central_pc as text |
---|
3816 | % str2double(get(hObject,'String')) returns contents of central_pc as a double |
---|
3817 | |
---|
3818 | |
---|
3819 | delay=str2double(get(hObject,'String')); |
---|
3820 | tango_write_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay',delay); |
---|
3821 | |
---|
3822 | |
---|
3823 | % --- Executes during object creation, after setting all properties. |
---|
3824 | function central_pc_CreateFcn(hObject, eventdata, handles) |
---|
3825 | % hObject handle to central_pc (see GCBO) |
---|
3826 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3827 | % handles empty - handles not created until after all CreateFcns called |
---|
3828 | |
---|
3829 | % Hint: edit controls usually have a white background on Windows. |
---|
3830 | % See ISPC and COMPUTER. |
---|
3831 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3832 | set(hObject,'BackgroundColor','white'); |
---|
3833 | end |
---|
3834 | |
---|
3835 | |
---|
3836 | |
---|
3837 | function lin_alim_Callback(hObject, eventdata, handles) |
---|
3838 | % hObject handle to lin_alim (see GCBO) |
---|
3839 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3840 | % handles structure with handles and user data (see GUIDATA) |
---|
3841 | |
---|
3842 | % Hints: get(hObject,'String') returns contents of lin_alim as text |
---|
3843 | % str2double(get(hObject,'String')) returns contents of lin_alim as a double |
---|
3844 | |
---|
3845 | |
---|
3846 | delay=str2double(get(hObject,'String')); |
---|
3847 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'libre.1TimeDelay',delay); |
---|
3848 | |
---|
3849 | |
---|
3850 | % --- Executes during object creation, after setting all properties. |
---|
3851 | function lin_alim_CreateFcn(hObject, eventdata, handles) |
---|
3852 | % hObject handle to lin_alim (see GCBO) |
---|
3853 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3854 | % handles empty - handles not created until after all CreateFcns called |
---|
3855 | |
---|
3856 | % Hint: edit controls usually have a white background on Windows. |
---|
3857 | % See ISPC and COMPUTER. |
---|
3858 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3859 | set(hObject,'BackgroundColor','white'); |
---|
3860 | end |
---|
3861 | |
---|
3862 | |
---|
3863 | |
---|
3864 | function ans_nod_Callback(hObject, eventdata, handles) |
---|
3865 | % hObject handle to ans_nod (see GCBO) |
---|
3866 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3867 | % handles structure with handles and user data (see GUIDATA) |
---|
3868 | |
---|
3869 | % Hints: get(hObject,'String') returns contents of ans_nod as text |
---|
3870 | % str2double(get(hObject,'String')) returns contents of ans_nod as a double |
---|
3871 | |
---|
3872 | ext_offset=str2double(get(handles.ext_offset,'String')); |
---|
3873 | delay=str2double(get(hObject,'String'))+ext_offset; |
---|
3874 | tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'perteTimeDelay',delay); |
---|
3875 | |
---|
3876 | |
---|
3877 | % --- Executes during object creation, after setting all properties. |
---|
3878 | function ans_nod_CreateFcn(hObject, eventdata, handles) |
---|
3879 | % hObject handle to ans_nod (see GCBO) |
---|
3880 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3881 | % handles empty - handles not created until after all CreateFcns called |
---|
3882 | |
---|
3883 | % Hint: edit controls usually have a white background on Windows. |
---|
3884 | % See ISPC and COMPUTER. |
---|
3885 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3886 | set(hObject,'BackgroundColor','white'); |
---|
3887 | end |
---|
3888 | |
---|
3889 | |
---|
3890 | |
---|
3891 | function boo_alim_cp_Callback(hObject, eventdata, handles) |
---|
3892 | % hObject handle to boo_alim_cp (see GCBO) |
---|
3893 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3894 | % handles structure with handles and user data (see GUIDATA) |
---|
3895 | |
---|
3896 | % Hints: get(hObject,'String') returns contents of boo_alim_cp as text |
---|
3897 | % str2double(get(hObject,'String')) returns contents of boo_alim_cp as a double |
---|
3898 | |
---|
3899 | |
---|
3900 | % --- Executes during object creation, after setting all properties. |
---|
3901 | function boo_alim_cp_CreateFcn(hObject, eventdata, handles) |
---|
3902 | % hObject handle to boo_alim_cp (see GCBO) |
---|
3903 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
3904 | % handles empty - handles not created until after all CreateFcns called |
---|
3905 | |
---|
3906 | % Hint: edit controls usually have a white background on Windows. |
---|
3907 | % See ISPC and COMPUTER. |
---|
3908 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
3909 | set(hObject,'BackgroundColor','white'); |
---|
3910 | end |
---|