1 | function varargout = synchro_rafale_mode_tests(varargin) |
---|
2 | % SYNCHRO_RAFALE_MODE_TESTS M-file for synchro_rafale_mode_tests.fig |
---|
3 | % SYNCHRO_RAFALE_MODE_TESTS, by itself, creates a new SYNCHRO_RAFALE_MODE_TESTS or raises the existing |
---|
4 | % singleton*. |
---|
5 | % |
---|
6 | % H = SYNCHRO_RAFALE_MODE_TESTS returns the handle to a new SYNCHRO_RAFALE_MODE_TESTS or the handle to |
---|
7 | % the existing singleton*. |
---|
8 | % |
---|
9 | % SYNCHRO_RAFALE_MODE_TESTS('CALLBACK',hObject,eventData,handles,...) calls the local |
---|
10 | % function named CALLBACK in SYNCHRO_RAFALE_MODE_TESTS.M with the given input arguments. |
---|
11 | % |
---|
12 | % SYNCHRO_RAFALE_MODE_TESTS('Property','Value',...) creates a new SYNCHRO_RAFALE_MODE_TESTS or raises the |
---|
13 | % existing singleton*. Starting from the left, property value pairs are |
---|
14 | % applied to the GUI before synchro_rafale_mode_tests_OpeningFunction gets called. An |
---|
15 | % unrecognized property name or invalid value makes property application |
---|
16 | % stop. All inputs are passed to synchro_rafale_mode_tests_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 | % Edit the above text to modify the response to help synchro_rafale_mode_tests |
---|
24 | |
---|
25 | % Last Modified by GUIDE v2.5 22-Feb-2007 16:58:02 |
---|
26 | |
---|
27 | % Begin initialization code - DO NOT EDIT |
---|
28 | gui_Singleton = 1; |
---|
29 | gui_State = struct('gui_Name', mfilename, ... |
---|
30 | 'gui_Singleton', gui_Singleton, ... |
---|
31 | 'gui_OpeningFcn', @synchro_rafale_mode_tests_OpeningFcn, ... |
---|
32 | 'gui_OutputFcn', @synchro_rafale_mode_tests_OutputFcn, ... |
---|
33 | 'gui_LayoutFcn', [] , ... |
---|
34 | 'gui_Callback', []); |
---|
35 | if nargin && ischar(varargin{1}) |
---|
36 | gui_State.gui_Callback = str2func(varargin{1}); |
---|
37 | end |
---|
38 | |
---|
39 | if nargout |
---|
40 | [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); |
---|
41 | else |
---|
42 | gui_mainfcn(gui_State, varargin{:}); |
---|
43 | end |
---|
44 | % End initialization code - DO NOT EDIT |
---|
45 | |
---|
46 | |
---|
47 | % --- Executes just before synchro_rafale_mode_tests is made visible. |
---|
48 | function synchro_rafale_mode_tests_OpeningFcn(hObject, eventdata, handles, varargin) |
---|
49 | % This function has no output args, see OutputFcn. |
---|
50 | % hObject handle to figure |
---|
51 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
52 | % handles structure with handles and user data (see GUIDATA) |
---|
53 | % varargin command line arguments to synchro_rafale_mode_tests (see VARARGIN) |
---|
54 | |
---|
55 | |
---|
56 | set(handles.edit_etat, 'String','??'); |
---|
57 | % Choose default command line output for synchro_rafale_mode_tests |
---|
58 | handles.output = hObject; |
---|
59 | |
---|
60 | % Choix des events |
---|
61 | handles.event0 =int32(0); |
---|
62 | handles.event00=int32(100); %Spéciale EP |
---|
63 | |
---|
64 | % delais fixe en pas |
---|
65 | handles.central_dec=int32(1664); |
---|
66 | handles.central_nodec=int32(95707); |
---|
67 | |
---|
68 | |
---|
69 | % Update handles structure |
---|
70 | guidata(hObject, handles); |
---|
71 | |
---|
72 | % UIWAIT makes synchro_rafale_mode_tests wait for user response (see UIRESUME) |
---|
73 | % uiwait(handles.figure1); |
---|
74 | |
---|
75 | |
---|
76 | % --- Outputs from this function are returned to the command line. |
---|
77 | function varargout = synchro_rafale_mode_tests_OutputFcn(hObject, eventdata, handles) |
---|
78 | % varargout cell array for returning output args (see VARARGOUT); |
---|
79 | % hObject handle to figure |
---|
80 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
81 | % handles structure with handles and user data (see GUIDATA) |
---|
82 | |
---|
83 | % Get default command line output from handles structure |
---|
84 | varargout{1} = handles.output; |
---|
85 | |
---|
86 | |
---|
87 | % --- Executes on button press in pushbutton_linac_3Hz. |
---|
88 | function pushbutton_linac_3Hz_Callback(hObject, eventdata, handles) |
---|
89 | % hObject handle to pushbutton_linac_3Hz (see GCBO) |
---|
90 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
91 | % handles structure with handles and user data (see GUIDATA) |
---|
92 | |
---|
93 | load('synchro_offset_lin', 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
94 | tout=0.; |
---|
95 | event0=handles.event0; |
---|
96 | |
---|
97 | % Swap delai 5 et 2 |
---|
98 | central_inj=handles.central_dec; |
---|
99 | central_soft=handles.central_nodec; |
---|
100 | tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',290010); |
---|
101 | tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',290020); |
---|
102 | |
---|
103 | % switch to 3Hz |
---|
104 | event=int32(2) ;% adresse de l'injection |
---|
105 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent', event); pause(tout); |
---|
106 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent', event); pause(tout); |
---|
107 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacEvent',event0); pause(tout); |
---|
108 | %tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareEvent', event); pause(tout); |
---|
109 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent',event); pause(tout); |
---|
110 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event', event); pause(tout); |
---|
111 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event', event); pause(tout); |
---|
112 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent', event); pause(tout); |
---|
113 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent', event); pause(tout); |
---|
114 | % pas d'injection |
---|
115 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent', event0); pause(tout); |
---|
116 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent', event0); |
---|
117 | % Pas d'extraction |
---|
118 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent', event0);pause(tout); |
---|
119 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent', event0);pause(tout); |
---|
120 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent',event0);pause(tout); |
---|
121 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent',event0);pause(tout); |
---|
122 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent', event0);pause(tout); |
---|
123 | tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigEvent', event0);pause(tout); |
---|
124 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctEvent', event0);pause(tout); |
---|
125 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvEvent', event0);pause(tout); |
---|
126 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceEvent', event0);pause(tout); |
---|
127 | arg.svalue={'k1.trig','k2.trig','k3.trig','k4.trig'}; arg.lvalue=int32([1 1 1 1])*event0; |
---|
128 | tango_command_inout('ANS-C01/SY/LOCAL.Ainj.1','SetEventsNumbers',arg);% chagement groupé address sans update |
---|
129 | tango_command_inout2('ANS-C01/SY/LOCAL.Ainj.1', 'Update'); |
---|
130 | |
---|
131 | arg.svalue={'sep-p.trig','sep-a.trig'}; arg.lvalue=int32([1 1])*event0; |
---|
132 | tango_command_inout('ANS-C01/SY/LOCAL.Ainj.2','SetEventsNumbers',arg);% chagement groupé address sans update |
---|
133 | tango_command_inout2('ANS-C01/SY/LOCAL.Ainj.2', 'Update'); |
---|
134 | |
---|
135 | pause(1) |
---|
136 | tango_write_attribute2('ANS/SY/CENTRAL', 'TInjStepDelay', central_inj); |
---|
137 | tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftStepDelay',central_soft); |
---|
138 | |
---|
139 | set(handles.edit_etat, 'String','LINAC = 3Hz'); |
---|
140 | |
---|
141 | |
---|
142 | % --- Executes on button press in pushbutton_linac_soft. |
---|
143 | function pushbutton_linac_soft_Callback(hObject, eventdata, handles) |
---|
144 | % hObject handle to pushbutton_linac_soft (see GCBO) |
---|
145 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
146 | % handles structure with handles and user data (see GUIDATA) |
---|
147 | |
---|
148 | load('synchro_offset_lin', 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
149 | tout=0.; |
---|
150 | event0=handles.event0; |
---|
151 | event00=handles.event00; |
---|
152 | |
---|
153 | % Swap delai 5 et 2 |
---|
154 | central_inj=handles.central_nodec; |
---|
155 | central_soft=handles.central_dec; |
---|
156 | tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',290010); |
---|
157 | tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',290020); |
---|
158 | |
---|
159 | % switch to soft |
---|
160 | event=int32(5) ;% adresse de l'injection |
---|
161 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent', event); pause(tout); |
---|
162 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacEvent', event0); pause(tout); |
---|
163 | %tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareEvent', int32(1)); pause(tout); |
---|
164 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent', event); pause(tout); |
---|
165 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event', event); pause(tout); |
---|
166 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event', event); pause(tout); |
---|
167 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent', event); pause(tout); |
---|
168 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent', event); pause(tout); |
---|
169 | % pas d'injection |
---|
170 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent', event0); pause(tout); |
---|
171 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent', event0); |
---|
172 | % Pas d'extraction |
---|
173 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent', event0);pause(tout); |
---|
174 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent', event0);pause(tout); |
---|
175 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent',event0);pause(tout); |
---|
176 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent',event0);pause(tout); |
---|
177 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent', event0);pause(tout); |
---|
178 | tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigEvent', event0);pause(tout); |
---|
179 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctEvent', event0);pause(tout); |
---|
180 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvEvent', event0);pause(tout); |
---|
181 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceEvent', event0);pause(tout); |
---|
182 | arg.svalue={'k1.trig','k2.trig','k3.trig','k4.trig'}; arg.lvalue=int32([1 1 1 1])*event0; |
---|
183 | tango_command_inout('ANS-C01/SY/LOCAL.Ainj.1','SetEventsNumbers',arg);% chagement groupé address sans update |
---|
184 | tango_command_inout2('ANS-C01/SY/LOCAL.Ainj.1', 'Update'); |
---|
185 | |
---|
186 | arg.svalue={'sep-p.trig','sep-a.trig'}; arg.lvalue=int32([1 1])*event0; |
---|
187 | tango_command_inout('ANS-C01/SY/LOCAL.Ainj.2','SetEventsNumbers',arg);% chagement groupé address sans update |
---|
188 | tango_command_inout2('ANS-C01/SY/LOCAL.Ainj.2', 'Update'); |
---|
189 | |
---|
190 | pause(1) |
---|
191 | tango_write_attribute2('ANS/SY/CENTRAL', 'TInjStepDelay',central_inj); |
---|
192 | tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftStepDelay',central_soft); |
---|
193 | |
---|
194 | set(handles.edit_etat, 'String','LINAC = Soft'); |
---|
195 | |
---|
196 | % --- Executes on button press in pushbutton_linac_Off. |
---|
197 | function pushbutton_linac_Off_Callback(hObject, eventdata, handles) |
---|
198 | % hObject handle to pushbutton_linac_Off (see GCBO) |
---|
199 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
200 | % handles structure with handles and user data (see GUIDATA) |
---|
201 | |
---|
202 | load('synchro_offset_lin', 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
203 | tout=0.; |
---|
204 | event0=handles.event0; |
---|
205 | |
---|
206 | % switch to Off |
---|
207 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent', event0); pause(tout); |
---|
208 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacEvent',event0); pause(tout); |
---|
209 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareEvent', event0); pause(tout); |
---|
210 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent',event0); pause(tout); |
---|
211 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event', event0); pause(tout); |
---|
212 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event', event0); pause(tout); |
---|
213 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent', event0); pause(tout); |
---|
214 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent', event0); pause(tout); |
---|
215 | |
---|
216 | set(handles.edit_etat, 'String','LINAC = Off'); |
---|
217 | |
---|
218 | |
---|
219 | % --- Executes on button press in pushbutton_boo_3Hz. |
---|
220 | function pushbutton_boo_3Hz_Callback(hObject, eventdata, handles) |
---|
221 | % hObject handle to pushbutton_boo_3Hz (see GCBO) |
---|
222 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
223 | % handles structure with handles and user data (see GUIDATA) |
---|
224 | load('synchro_offset_lin', 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
225 | tout=0.; |
---|
226 | event0=handles.event0; |
---|
227 | event00=handles.event00; |
---|
228 | load('synchro_offset_lin', 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
229 | tout=0.; |
---|
230 | event0=handles.event0; |
---|
231 | |
---|
232 | % Swap delai 5 et 2 |
---|
233 | central_inj=handles.central_dec; |
---|
234 | central_soft=handles.central_nodec; |
---|
235 | tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',290010); |
---|
236 | tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',290020); |
---|
237 | |
---|
238 | % switch to 3Hz |
---|
239 | event=int32(2) ;% adresse de l'injection |
---|
240 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent', event); pause(tout); |
---|
241 | %tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent', event0); pause(tout); |
---|
242 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent', event); pause(tout); |
---|
243 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacEvent', event0); pause(tout); |
---|
244 | %tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareEvent', event); pause(tout); |
---|
245 | tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigEvent',event); pause(tout); |
---|
246 | tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigEvent',event); pause(tout); |
---|
247 | tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigEvent',event); pause(tout); |
---|
248 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigEvent',event); pause(tout); |
---|
249 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent', event); pause(tout); |
---|
250 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event', event); pause(tout); |
---|
251 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event', event); pause(tout); |
---|
252 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent', event); pause(tout); |
---|
253 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent', event); pause(tout); |
---|
254 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigEvent',event);pause(tout); |
---|
255 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent', event); pause(tout); |
---|
256 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent', event); |
---|
257 | % pas d'extraction |
---|
258 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent', event0);pause(tout); |
---|
259 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent', event0);pause(tout); |
---|
260 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent',event0);pause(tout); |
---|
261 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent',event0);pause(tout); |
---|
262 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent', event0);pause(tout); |
---|
263 | tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigEvent', event0);pause(tout); |
---|
264 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctEvent', event0);pause(tout); |
---|
265 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvEvent', event0);pause(tout); |
---|
266 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceEvent', event0);pause(tout); |
---|
267 | arg.svalue={'k1.trig','k2.trig','k3.trig','k4.trig'}; arg.lvalue=int32([1 1 1 1])*event0; |
---|
268 | tango_command_inout('ANS-C01/SY/LOCAL.Ainj.1','SetEventsNumbers',arg);% chagement groupé address sans update |
---|
269 | tango_command_inout2('ANS-C01/SY/LOCAL.Ainj.1', 'Update'); |
---|
270 | |
---|
271 | arg.svalue={'sep-p.trig','sep-a.trig'}; arg.lvalue=int32([1 1])*event0; |
---|
272 | tango_command_inout('ANS-C01/SY/LOCAL.Ainj.2','SetEventsNumbers',arg);% chagement groupé address sans update |
---|
273 | tango_command_inout2('ANS-C01/SY/LOCAL.Ainj.2', 'Update'); |
---|
274 | |
---|
275 | pause(1) |
---|
276 | tango_write_attribute2('ANS/SY/CENTRAL', 'TInjStepDelay',central_inj); |
---|
277 | tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftStepDelay',central_soft); |
---|
278 | |
---|
279 | set(handles.edit_etat, 'String','LINAC + BOO = 3Hz'); |
---|
280 | |
---|
281 | |
---|
282 | % --- Executes on button press in pushbutton_boo_soft. |
---|
283 | function pushbutton_boo_soft_Callback(hObject, eventdata, handles) |
---|
284 | % hObject handle to pushbutton_boo_soft (see GCBO) |
---|
285 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
286 | % handles structure with handles and user data (see GUIDATA) |
---|
287 | load('synchro_offset_lin', 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
288 | tout=0.; |
---|
289 | event0=handles.event0; |
---|
290 | event00=handles.event00; |
---|
291 | |
---|
292 | % Swap delai 5 et 2 |
---|
293 | central_inj=handles.central_nodec; |
---|
294 | central_soft=handles.central_dec; |
---|
295 | tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',290010); |
---|
296 | tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',290020); |
---|
297 | |
---|
298 | % switch to soft |
---|
299 | event=int32(5) ;% adresse de l'injection |
---|
300 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent', event); pause(tout); |
---|
301 | %tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent', event0); pause(tout); |
---|
302 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent', event); pause(tout); |
---|
303 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacEvent', event0); pause(tout); |
---|
304 | %tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareEvent', int32(1)); pause(tout); |
---|
305 | tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigEvent',event); pause(tout); |
---|
306 | tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigEvent',event); pause(tout); |
---|
307 | tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigEvent',event); pause(tout); |
---|
308 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigEvent',event); pause(tout); |
---|
309 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent', event); pause(tout); |
---|
310 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event', event); pause(tout); |
---|
311 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event', event); pause(tout); |
---|
312 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent', event); pause(tout); |
---|
313 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent', event); pause(tout); |
---|
314 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigEvent',event);pause(tout); |
---|
315 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent', event); pause(tout); |
---|
316 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent', event); |
---|
317 | % Pas d'extraction |
---|
318 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent', event0);pause(tout); |
---|
319 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent', event0);pause(tout); |
---|
320 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent',event0);pause(tout); |
---|
321 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent',event0);pause(tout); |
---|
322 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent', event0);pause(tout); |
---|
323 | tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigEvent', event0);pause(tout); |
---|
324 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctEvent', event0);pause(tout); |
---|
325 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvEvent', event0);pause(tout); |
---|
326 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceEvent', event0);pause(tout); |
---|
327 | arg.svalue={'k1.trig','k2.trig','k3.trig','k4.trig'}; arg.lvalue=int32([1 1 1 1])*event0; |
---|
328 | tango_command_inout('ANS-C01/SY/LOCAL.Ainj.1','SetEventsNumbers',arg);% chagement groupé address sans update |
---|
329 | tango_command_inout2('ANS-C01/SY/LOCAL.Ainj.1', 'Update'); |
---|
330 | |
---|
331 | arg.svalue={'sep-p.trig','sep-a.trig'}; arg.lvalue=int32([1 1])*event0; |
---|
332 | tango_command_inout('ANS-C01/SY/LOCAL.Ainj.2','SetEventsNumbers',arg);% chagement groupé address sans update |
---|
333 | tango_command_inout2('ANS-C01/SY/LOCAL.Ainj.2', 'Update'); |
---|
334 | |
---|
335 | |
---|
336 | pause(1) |
---|
337 | tango_write_attribute2('ANS/SY/CENTRAL', 'TInjStepDelay',central_inj); |
---|
338 | tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftStepDelay',central_soft); |
---|
339 | |
---|
340 | set(handles.edit_etat, 'String','LINAC + BOO = Soft'); |
---|
341 | |
---|
342 | |
---|
343 | % --- Executes on button press in pushbutton_boo_off. |
---|
344 | function pushbutton_boo_off_Callback(hObject, eventdata, handles) |
---|
345 | % hObject handle to pushbutton_boo_off (see GCBO) |
---|
346 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
347 | % handles structure with handles and user data (see GUIDATA) |
---|
348 | |
---|
349 | load('synchro_offset_lin', 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
350 | tout=0.; |
---|
351 | event0=handles.event0; |
---|
352 | event00=handles.event00; |
---|
353 | |
---|
354 | % switch to Off |
---|
355 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent', event0); pause(tout); |
---|
356 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent', event0); pause(tout); |
---|
357 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacEvent', event0); pause(tout); |
---|
358 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareEvent', event0); pause(tout); |
---|
359 | tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigEvent',event0); pause(tout); |
---|
360 | tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigEvent',event0); pause(tout); |
---|
361 | tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigEvent',event0); pause(tout); |
---|
362 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigEvent',event0); pause(tout); |
---|
363 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent', event0); pause(tout); |
---|
364 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event', event0); pause(tout); |
---|
365 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event', event0); pause(tout); |
---|
366 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent', event0); pause(tout); |
---|
367 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent', event0); pause(tout); |
---|
368 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigEvent',event0); pause(tout); |
---|
369 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent',event0); pause(tout); |
---|
370 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent', event0); pause(tout); |
---|
371 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent', event0);pause(tout); |
---|
372 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent', event0);pause(tout); |
---|
373 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent',event0);pause(tout); |
---|
374 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent',event0);pause(tout); |
---|
375 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent', event0);pause(tout); |
---|
376 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceEvent', event0);pause(tout); |
---|
377 | |
---|
378 | |
---|
379 | set(handles.edit_etat, 'String','LINAC + BOO = Off'); |
---|
380 | |
---|
381 | |
---|
382 | % --- Executes on button press in pushbutton_ans_3hz. |
---|
383 | function pushbutton_ans_3hz_Callback(hObject, eventdata, handles) |
---|
384 | % hObject handle to pushbutton_ans_3hz (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 | load('synchro_offset_lin', 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
388 | tout=0.; |
---|
389 | event0=handles.event0; |
---|
390 | event00=handles.event00; |
---|
391 | |
---|
392 | % % switch to 3Hz |
---|
393 | % event=int32(2) ;% adresse de l'injection |
---|
394 | % tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent', event); pause(tout); |
---|
395 | % tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent', event0); pause(tout); |
---|
396 | % tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacEvent', event0); pause(tout); |
---|
397 | % tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareEvent', eint32(1)); pause(tout); |
---|
398 | % tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigEvent',event); pause(tout); |
---|
399 | % tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigEvent',event); pause(tout); |
---|
400 | % tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigEvent',event); pause(tout); |
---|
401 | % tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigEvent',event); pause(tout); |
---|
402 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent', event); pause(tout); |
---|
403 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event', event); pause(tout); |
---|
404 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event', event); pause(tout); |
---|
405 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent', event); pause(tout); |
---|
406 | % tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent', event); pause(tout); |
---|
407 | % tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigEvent',event);pause(tout); |
---|
408 | % tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent', event); pause(tout); |
---|
409 | % tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent', event); |
---|
410 | % event=int32(3) ;% adresse de extraction |
---|
411 | % tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent', event);pause(tout); |
---|
412 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent', event);pause(tout); |
---|
413 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent',event);pause(tout); |
---|
414 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent',event);pause(tout); |
---|
415 | % tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent', event);pause(tout); |
---|
416 | % tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigEvent', event);pause(tout); |
---|
417 | % tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctEvent', event);pause(tout); |
---|
418 | % tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvEvent', event);pause(tout); |
---|
419 | % tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceEvent', event);pause(tout); |
---|
420 | % |
---|
421 | % arg.svalue={'k1.trig','k2.trig','k3.trig','k4.trig'}; arg.lvalue=int32([3 3 3 3]); |
---|
422 | % tango_command_inout('ANS-C01/SY/LOCAL.Ainj.1','SetEventsNumbers',arg);% chagement groupé address sans update |
---|
423 | % |
---|
424 | % arg.svalue={'sep-p.trig','sep-a.trig'}; arg.lvalue=int32([3 3]); |
---|
425 | % tango_command_inout('ANS-C01/SY/LOCAL.Ainj.2','SetEventsNumbers',arg);% chagement groupé address sans update |
---|
426 | % |
---|
427 | % tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctEvent', event);pause(tout); |
---|
428 | % tango_write_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigEvent',event);pause(tout); |
---|
429 | % tango_write_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
430 | % tango_write_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
431 | % tango_write_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
432 | % tango_write_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
433 | % tango_write_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
434 | % tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
435 | % tango_write_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
436 | % tango_write_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
437 | % tango_write_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
438 | % tango_write_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
439 | % tango_write_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
440 | % tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
441 | % tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
442 | % tango_write_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
443 | % tango_write_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
444 | % |
---|
445 | % % special modulateur |
---|
446 | % delay=inj_offset+0; |
---|
447 | % tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareTimeDelay',delay); |
---|
448 | % display('ok change soft to 3Hz') |
---|
449 | |
---|
450 | % special septum actif boo et ans |
---|
451 | % r=(1+0.0004); |
---|
452 | % try |
---|
453 | % temp=tango_read_attribute2('BOO-C12/EP/AL_SEP_A.Ext','voltage');boo=temp.value(2)*r |
---|
454 | % tango_write_attribute2('BOO-C12/EP/AL_SEP_A.Ext','voltage',boo); |
---|
455 | % temp=tango_read_attribute2('ANS-C01/EP/AL_SEP_A','voltage');ans=temp.value(2)*r |
---|
456 | % tango_write_attribute2('ANS-C01/EP/AL_SEP_A','voltage',ans); |
---|
457 | % catch |
---|
458 | % display('Erreur ajustement tension septa passif') |
---|
459 | % end |
---|
460 | |
---|
461 | |
---|
462 | %display('ok change address') |
---|
463 | |
---|
464 | set(handles.edit_etat, 'String','Aucune Action'); |
---|
465 | |
---|
466 | |
---|
467 | % --- Executes on button press in pushbutton_ans_soft. |
---|
468 | function pushbutton_ans_soft_Callback(hObject, eventdata, handles) |
---|
469 | % hObject handle to pushbutton_ans_soft (see GCBO) |
---|
470 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
471 | % handles structure with handles and user data (see GUIDATA) |
---|
472 | load('synchro_offset_lin', 'inj_offset' , 'ext_offset', 'lin_fin'); |
---|
473 | tout=0.; |
---|
474 | event0=handles.event0; |
---|
475 | event00=handles.event00; |
---|
476 | |
---|
477 | % switch to soft |
---|
478 | event=int32(5) ;% adresse de l'injection |
---|
479 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent', event); pause(tout); |
---|
480 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'lpmEvent', event0); pause(tout); |
---|
481 | tango_write_attribute2('LIN/SY/LOCAL.SPM.1', 'spmLinacEvent', event0); pause(tout); |
---|
482 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareEvent', int32(1)); pause(tout); |
---|
483 | tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigEvent',event); pause(tout); |
---|
484 | tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigEvent',event); pause(tout); |
---|
485 | tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigEvent',event); pause(tout); |
---|
486 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigEvent',event); pause(tout); |
---|
487 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent', event); pause(tout); |
---|
488 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event', event); pause(tout); |
---|
489 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event', event); pause(tout); |
---|
490 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent', event); pause(tout); |
---|
491 | tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent', event); pause(tout); |
---|
492 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigEvent',event);pause(tout); |
---|
493 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent', event); pause(tout); |
---|
494 | tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent', event); |
---|
495 | |
---|
496 | tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent', event);pause(tout); |
---|
497 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent', event);pause(tout); |
---|
498 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent',event);pause(tout); |
---|
499 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent',event);pause(tout); |
---|
500 | tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent', event);pause(tout); |
---|
501 | tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigEvent', event);pause(tout); |
---|
502 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctEvent', event);pause(tout); |
---|
503 | tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvEvent', event);pause(tout); |
---|
504 | tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceEvent', event);pause(tout); |
---|
505 | arg.svalue={'k1.trig','k2.trig','k3.trig','k4.trig'}; arg.lvalue=int32([5 5 5 5]); |
---|
506 | tango_command_inout('ANS-C01/SY/LOCAL.Ainj.1','SetEventsNumbers',arg);% chagement groupé addresses sans update |
---|
507 | tango_command_inout2('ANS-C01/SY/LOCAL.Ainj.1', 'Update'); |
---|
508 | |
---|
509 | arg.svalue={'sep-p.trig','sep-a.trig'}; arg.lvalue=int32([5 5]); |
---|
510 | tango_command_inout('ANS-C01/SY/LOCAL.Ainj.2','SetEventsNumbers',arg);% chagement groupé address sans update |
---|
511 | tango_command_inout2('ANS-C01/SY/LOCAL.Ainj.2', 'Update'); |
---|
512 | |
---|
513 | tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctEvent', int32(3));pause(tout); |
---|
514 | tango_write_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigEvent',event);pause(tout); |
---|
515 | tango_write_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
516 | tango_write_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
517 | tango_write_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
518 | tango_write_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
519 | tango_write_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
520 | tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
521 | tango_write_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
522 | tango_write_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
523 | tango_write_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
524 | tango_write_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
525 | tango_write_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
526 | tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
527 | tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
528 | tango_write_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
529 | tango_write_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout); |
---|
530 | |
---|
531 | % special modulateur |
---|
532 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay');pc=temp.value(1); |
---|
533 | temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');soft=temp.value(1); |
---|
534 | delay=inj_offset+soft-pc; |
---|
535 | tango_write_attribute2('LIN/SY/LOCAL.LPM.1', 'spareTimeDelay',delay); |
---|
536 | |
---|
537 | |
---|
538 | % % special septum actif boo et ans |
---|
539 | % r=(1-0.0004); |
---|
540 | % try |
---|
541 | % temp=tango_read_attribute2('BOO-C12/EP/AL_SEP_A.Ext','voltage');boo=temp.value(2)*r |
---|
542 | % tango_write_attribute2('BOO-C12/EP/AL_SEP_A.Ext','voltage',boo); |
---|
543 | % temp=tango_read_attribute2('ANS-C01/EP/AL_SEP_A','voltage');ans=temp.value(2)*r |
---|
544 | % tango_write_attribute2('ANS-C01/EP/AL_SEP_A','voltage',ans); |
---|
545 | % catch |
---|
546 | % display('Erreur ajustement tension septa passif') |
---|
547 | % end |
---|
548 | |
---|
549 | |
---|
550 | set(handles.edit_etat, 'String','LINAC + BOO + ANS = Soft'); |
---|
551 | |
---|
552 | |
---|
553 | |
---|
554 | |
---|
555 | % --- Executes on button press in pushbutton_ans_off. |
---|
556 | function pushbutton_ans_off_Callback(hObject, eventdata, handles) |
---|
557 | % hObject handle to pushbutton_ans_off (see GCBO) |
---|
558 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
559 | % handles structure with handles and user data (see GUIDATA) |
---|
560 | |
---|
561 | set(handles.edit_etat, 'String','Aucune Action'); |
---|
562 | |
---|
563 | function edit_etat_Callback(hObject, eventdata, handles) |
---|
564 | % hObject handle to edit_etat (see GCBO) |
---|
565 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
566 | % handles structure with handles and user data (see GUIDATA) |
---|
567 | |
---|
568 | % Hints: get(hObject,'String') returns contents of edit_etat as text |
---|
569 | % str2double(get(hObject,'String')) returns contents of edit_etat as a double |
---|
570 | |
---|
571 | |
---|
572 | % --- Executes during object creation, after setting all properties. |
---|
573 | function edit_etat_CreateFcn(hObject, eventdata, handles) |
---|
574 | % hObject handle to edit_etat (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 | |
---|