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

synchro_injecteur

PURPOSE ^

SYNCHRO_INJECTEUR M-file for synchro_injecteur.fig

SYNOPSIS ^

function varargout = synchro_injecteur(varargin)

DESCRIPTION ^

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

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

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

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

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

 See also: GUIDE, GUIDATA, GUIHANDLES

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function varargout = synchro_injecteur(varargin)
0002 % SYNCHRO_INJECTEUR M-file for synchro_injecteur.fig
0003 %      SYNCHRO_INJECTEUR, by itself, creates a new SYNCHRO_INJECTEUR or raises the existing
0004 %      singleton*.
0005 %
0006 %      H = SYNCHRO_INJECTEUR returns the handle to a new SYNCHRO_INJECTEUR or the handle to
0007 %      the existing singleton*.
0008 %
0009 %      SYNCHRO_INJECTEUR('CALLBACK',hObject,eventData,handles,...) calls the local
0010 %      function named CALLBACK in SYNCHRO_INJECTEUR.M with the given input arguments.
0011 %
0012 %      SYNCHRO_INJECTEUR('Property','Value',...) creates a new SYNCHRO_INJECTEUR or raises the
0013 %      existing singleton*.  Starting from the left, property value pairs are
0014 %      applied to the GUI before synchro_injecteur_OpeningFunction gets called.  An
0015 %      unrecognized property name or invalid value makes property application
0016 %      stop.  All inputs are passed to synchro_injecteur_OpeningFcn via varargin.
0017 %
0018 %      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
0019 %      instance to run (singleton)".
0020 %
0021 % See also: GUIDE, GUIDATA, GUIHANDLES
0022 
0023 % Edit the above text to modify the response to help synchro_injecteur
0024 
0025 % Last Modified by GUIDE v2.5 20-Apr-2006 21:51:28
0026 
0027 % Begin initialization code - DO NOT EDIT
0028 gui_Singleton = 1;
0029 gui_State = struct('gui_Name',       mfilename, ...
0030                    'gui_Singleton',  gui_Singleton, ...
0031                    'gui_OpeningFcn', @synchro_injecteur_OpeningFcn, ...
0032                    'gui_OutputFcn',  @synchro_injecteur_OutputFcn, ...
0033                    'gui_LayoutFcn',  [] , ...
0034                    'gui_Callback',   []);
0035 if nargin && ischar(varargin{1})
0036     gui_State.gui_Callback = str2func(varargin{1});
0037 end
0038 
0039 if nargout
0040     [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
0041 else
0042     gui_mainfcn(gui_State, varargin{:});
0043 end
0044 % End initialization code - DO NOT EDIT
0045 
0046 
0047 % --- Executes just before synchro_injecteur is made visible.
0048 function synchro_injecteur_OpeningFcn(hObject, eventdata, handles, varargin)
0049 % This function has no output args, see OutputFcn.
0050 % hObject    handle to figure
0051 % eventdata  reserved - to be defined in a future version of MATLAB
0052 % handles    structure with handles and user data (see GUIDATA)
0053 % varargin   command line arguments to synchro_injecteur (see VARARGIN)
0054 
0055 % Choose default command line output for synchro_injecteur
0056 handles.output = hObject;
0057 
0058 % Update handles structure
0059 guidata(hObject, handles);
0060 
0061 % UIWAIT makes synchro_injecteur wait for user response (see UIRESUME)
0062 % uiwait(handles.figure1);
0063 
0064 
0065 % --- Outputs from this function are returned to the command line.
0066 function varargout = synchro_injecteur_OutputFcn(hObject, eventdata, handles) 
0067 % varargout  cell array for returning output args (see VARARGOUT);
0068 % hObject    handle to figure
0069 % eventdata  reserved - to be defined in a future version of MATLAB
0070 % handles    structure with handles and user data (see GUIDATA)
0071 
0072 % Get default command line output from handles structure
0073 varargout{1} = handles.output;
0074 
0075 
0076 
0077 function dipole_Callback(hObject, eventdata, handles)
0078 % hObject    handle to dipole (see GCBO)
0079 % eventdata  reserved - to be defined in a future version of MATLAB
0080 % handles    structure with handles and user data (see GUIDATA)
0081 
0082 % Hints: get(hObject,'String') returns contents of dipole as text
0083 %        str2double(get(hObject,'String')) returns contents of dipole as a double
0084 
0085 delay=str2double(get(hObject,'String'));
0086 tango_write_attribute('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay',delay);
0087 
0088 % --- Executes during object creation, after setting all properties.
0089 function dipole_CreateFcn(hObject, eventdata, handles)
0090 % hObject    handle to dipole (see GCBO)
0091 % eventdata  reserved - to be defined in a future version of MATLAB
0092 % handles    empty - handles not created until after all CreateFcns called
0093 
0094 % Hint: edit controls usually have a white background on Windows.
0095 %       See ISPC and COMPUTER.
0096 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0097     set(hObject,'BackgroundColor','white');
0098 end
0099 
0100 
0101 function qf_Callback(hObject, eventdata, handles)
0102 % hObject    handle to qf (see GCBO)
0103 % eventdata  reserved - to be defined in a future version of MATLAB
0104 % handles    structure with handles and user data (see GUIDATA)
0105 
0106 % Hints: get(hObject,'String') returns contents of qf as text
0107 %        str2double(get(hObject,'String')) returns contents of qf as a double
0108 
0109 delay=str2double(get(hObject,'String'));
0110 tango_write_attribute('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay',delay);
0111 
0112 % --- Executes during object creation, after setting all properties.
0113 function qf_CreateFcn(hObject, eventdata, handles)
0114 % hObject    handle to qf (see GCBO)
0115 % eventdata  reserved - to be defined in a future version of MATLAB
0116 % handles    empty - handles not created until after all CreateFcns called
0117 
0118 % Hint: edit controls usually have a white background on Windows.
0119 %       See ISPC and COMPUTER.
0120 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0121     set(hObject,'BackgroundColor','white');
0122 end
0123 
0124 
0125 
0126 function qd_Callback(hObject, eventdata, handles)
0127 % hObject    handle to qd (see GCBO)
0128 % eventdata  reserved - to be defined in a future version of MATLAB
0129 % handles    structure with handles and user data (see GUIDATA)
0130 
0131 % Hints: get(hObject,'String') returns contents of qd as text
0132 %        str2double(get(hObject,'String')) returns contents of qd as a double
0133 
0134 delay=str2double(get(hObject,'String'));
0135 tango_write_attribute('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay',delay);
0136 
0137 % --- Executes during object creation, after setting all properties.
0138 function qd_CreateFcn(hObject, eventdata, handles)
0139 % hObject    handle to qd (see GCBO)
0140 % eventdata  reserved - to be defined in a future version of MATLAB
0141 % handles    empty - handles not created until after all CreateFcns called
0142 
0143 % Hint: edit controls usually have a white background on Windows.
0144 %       See ISPC and COMPUTER.
0145 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0146     set(hObject,'BackgroundColor','white');
0147 end
0148 
0149 
0150 
0151 function sf_Callback(hObject, eventdata, handles)
0152 % hObject    handle to sf (see GCBO)
0153 % eventdata  reserved - to be defined in a future version of MATLAB
0154 % handles    structure with handles and user data (see GUIDATA)
0155 
0156 % Hints: get(hObject,'String') returns contents of sf as text
0157 %        str2double(get(hObject,'String')) returns contents of sf as a double
0158 
0159 delay=str2double(get(hObject,'String'));
0160 tango_write_attribute('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay',delay);
0161 
0162 % --- Executes during object creation, after setting all properties.
0163 function sf_CreateFcn(hObject, eventdata, handles)
0164 % hObject    handle to sf (see GCBO)
0165 % eventdata  reserved - to be defined in a future version of MATLAB
0166 % handles    empty - handles not created until after all CreateFcns called
0167 
0168 % Hint: edit controls usually have a white background on Windows.
0169 %       See ISPC and COMPUTER.
0170 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0171     set(hObject,'BackgroundColor','white');
0172 end
0173 
0174 
0175 
0176 function sd_Callback(hObject, eventdata, handles)
0177 % hObject    handle to sd (see GCBO)
0178 % eventdata  reserved - to be defined in a future version of MATLAB
0179 % handles    structure with handles and user data (see GUIDATA)
0180 
0181 % Hints: get(hObject,'String') returns contents of sd as text
0182 %        str2double(get(hObject,'String')) returns contents of sd as a double
0183 
0184 delay=str2double(get(hObject,'String'));
0185 tango_write_attribute('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay',delay);
0186 
0187 
0188 % --- Executes during object creation, after setting all properties.
0189 function sd_CreateFcn(hObject, eventdata, handles)
0190 % hObject    handle to sd (see GCBO)
0191 % eventdata  reserved - to be defined in a future version of MATLAB
0192 % handles    empty - handles not created until after all CreateFcns called
0193 
0194 % Hint: edit controls usually have a white background on Windows.
0195 %       See ISPC and COMPUTER.
0196 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0197     set(hObject,'BackgroundColor','white');
0198 end
0199 
0200 
0201 
0202 function rf_Callback(hObject, eventdata, handles)
0203 % hObject    handle to rf (see GCBO)
0204 % eventdata  reserved - to be defined in a future version of MATLAB
0205 % handles    structure with handles and user data (see GUIDATA)
0206 
0207 % Hints: get(hObject,'String') returns contents of rf as text
0208 %        str2double(get(hObject,'String')) returns contents of rf as a double
0209 
0210 delay=str2double(get(hObject,'String'));
0211 tango_write_attribute('BOO/SY/LOCAL.RF.1', 'rfTimeDelay',delay);
0212 
0213 % --- Executes during object creation, after setting all properties.
0214 function rf_CreateFcn(hObject, eventdata, handles)
0215 % hObject    handle to rf (see GCBO)
0216 % eventdata  reserved - to be defined in a future version of MATLAB
0217 % handles    empty - handles not created until after all CreateFcns called
0218 
0219 % Hint: edit controls usually have a white background on Windows.
0220 %       See ISPC and COMPUTER.
0221 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0222     set(hObject,'BackgroundColor','white');
0223 end
0224 
0225 
0226 
0227 function canon_Callback(hObject, eventdata, handles)
0228 % hObject    handle to canon (see GCBO)
0229 % eventdata  reserved - to be defined in a future version of MATLAB
0230 % handles    structure with handles and user data (see GUIDATA)
0231 
0232 % Hints: get(hObject,'String') returns contents of canon as text
0233 %        str2double(get(hObject,'String')) returns contents of canon as a double
0234 
0235 delay=str2double(get(hObject,'String'));
0236 tango_write_attribute('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay',delay);
0237 
0238 
0239 % --- Executes during object creation, after setting all properties.
0240 function canon_CreateFcn(hObject, eventdata, handles)
0241 % hObject    handle to canon (see GCBO)
0242 % eventdata  reserved - to be defined in a future version of MATLAB
0243 % handles    empty - handles not created until after all CreateFcns called
0244 
0245 % Hint: edit controls usually have a white background on Windows.
0246 %       See ISPC and COMPUTER.
0247 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0248     set(hObject,'BackgroundColor','white');
0249 end
0250 
0251 
0252 
0253 function emittance_Callback(hObject, eventdata, handles)
0254 % hObject    handle to emittance (see GCBO)
0255 % eventdata  reserved - to be defined in a future version of MATLAB
0256 % handles    structure with handles and user data (see GUIDATA)
0257 
0258 % Hints: get(hObject,'String') returns contents of emittance as text
0259 %        str2double(get(hObject,'String')) returns contents of emittance as a double
0260 delay=str2double(get(hObject,'String'));
0261 tango_write_attribute('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay',delay);
0262 
0263 % --- Executes during object creation, after setting all properties.
0264 function emittance_CreateFcn(hObject, eventdata, handles)
0265 % hObject    handle to emittance (see GCBO)
0266 % eventdata  reserved - to be defined in a future version of MATLAB
0267 % handles    empty - handles not created until after all CreateFcns called
0268 
0269 % Hint: edit controls usually have a white background on Windows.
0270 %       See ISPC and COMPUTER.
0271 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0272     set(hObject,'BackgroundColor','white');
0273 end
0274 
0275 
0276 
0277 function MC1_Callback(hObject, eventdata, handles)
0278 % hObject    handle to MC1 (see GCBO)
0279 % eventdata  reserved - to be defined in a future version of MATLAB
0280 % handles    structure with handles and user data (see GUIDATA)
0281 
0282 % Hints: get(hObject,'String') returns contents of MC1 as text
0283 %        str2double(get(hObject,'String')) returns contents of MC1 as a double
0284 
0285 delay=str2double(get(hObject,'String'));
0286 tango_write_attribute('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay',delay);
0287 
0288 % --- Executes during object creation, after setting all properties.
0289 function MC1_CreateFcn(hObject, eventdata, handles)
0290 % hObject    handle to MC1 (see GCBO)
0291 % eventdata  reserved - to be defined in a future version of MATLAB
0292 % handles    empty - handles not created until after all CreateFcns called
0293 
0294 % Hint: edit controls usually have a white background on Windows.
0295 %       See ISPC and COMPUTER.
0296 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0297     set(hObject,'BackgroundColor','white');
0298 end
0299 
0300 
0301 
0302 function MC2_Callback(hObject, eventdata, handles)
0303 % hObject    handle to MC2 (see GCBO)
0304 % eventdata  reserved - to be defined in a future version of MATLAB
0305 % handles    structure with handles and user data (see GUIDATA)
0306 
0307 % Hints: get(hObject,'String') returns contents of MC2 as text
0308 %        str2double(get(hObject,'String')) returns contents of MC2 as a double
0309 
0310 delay=str2double(get(hObject,'String'));
0311 tango_write_attribute('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay',delay);
0312 
0313 % --- Executes during object creation, after setting all properties.
0314 function MC2_CreateFcn(hObject, eventdata, handles)
0315 % hObject    handle to MC2 (see GCBO)
0316 % eventdata  reserved - to be defined in a future version of MATLAB
0317 % handles    empty - handles not created until after all CreateFcns called
0318 
0319 % Hint: edit controls usually have a white background on Windows.
0320 %       See ISPC and COMPUTER.
0321 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0322     set(hObject,'BackgroundColor','white');
0323 end
0324 
0325 
0326 
0327 function osc_Callback(hObject, eventdata, handles)
0328 % hObject    handle to osc (see GCBO)
0329 % eventdata  reserved - to be defined in a future version of MATLAB
0330 % handles    structure with handles and user data (see GUIDATA)
0331 
0332 % Hints: get(hObject,'String') returns contents of osc as text
0333 %        str2double(get(hObject,'String')) returns contents of osc as a double
0334 
0335 delay=str2double(get(hObject,'String'));
0336 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay',delay);
0337 
0338 
0339 % --- Executes during object creation, after setting all properties.
0340 function osc_CreateFcn(hObject, eventdata, handles)
0341 % hObject    handle to osc (see GCBO)
0342 % eventdata  reserved - to be defined in a future version of MATLAB
0343 % handles    empty - handles not created until after all CreateFcns called
0344 
0345 % Hint: edit controls usually have a white background on Windows.
0346 %       See ISPC and COMPUTER.
0347 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0348     set(hObject,'BackgroundColor','white');
0349 end
0350 
0351 
0352 
0353 function sdc_Callback(hObject, eventdata, handles)
0354 % hObject    handle to sdc (see GCBO)
0355 % eventdata  reserved - to be defined in a future version of MATLAB
0356 % handles    structure with handles and user data (see GUIDATA)
0357 
0358 % Hints: get(hObject,'String') returns contents of sdc as text
0359 %        str2double(get(hObject,'String')) returns contents of sdc as a double
0360 
0361 delay=str2double(get(hObject,'String'));
0362 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay',delay);
0363 
0364 % --- Executes during object creation, after setting all properties.
0365 function sdc_CreateFcn(hObject, eventdata, handles)
0366 % hObject    handle to sdc (see GCBO)
0367 % eventdata  reserved - to be defined in a future version of MATLAB
0368 % handles    empty - handles not created until after all CreateFcns called
0369 
0370 % Hint: edit controls usually have a white background on Windows.
0371 %       See ISPC and COMPUTER.
0372 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0373     set(hObject,'BackgroundColor','white');
0374 end
0375 
0376 
0377 
0378 function septum_Callback(hObject, eventdata, handles)
0379 % hObject    handle to septum (see GCBO)
0380 % eventdata  reserved - to be defined in a future version of MATLAB
0381 % handles    structure with handles and user data (see GUIDATA)
0382 
0383 % Hints: get(hObject,'String') returns contents of septum as text
0384 %        str2double(get(hObject,'String')) returns contents of septum as a double
0385 
0386 %delay=str2double(get(hObject,'String'));
0387 %tango_write_attribute('BOO/SY/LOCAL.Binj.1', 'sep-p.inj.trigTimeDelay',delay);
0388 
0389 % --- Executes during object creation, after setting all properties.
0390 function septum_CreateFcn(hObject, eventdata, handles)
0391 % hObject    handle to septum (see GCBO)
0392 % eventdata  reserved - to be defined in a future version of MATLAB
0393 % handles    empty - handles not created until after all CreateFcns called
0394 
0395 % Hint: edit controls usually have a white background on Windows.
0396 %       See ISPC and COMPUTER.
0397 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0398     set(hObject,'BackgroundColor','white');
0399 end
0400 
0401 
0402 
0403 function kicker_Callback(hObject, eventdata, handles)
0404 % hObject    handle to kicker (see GCBO)
0405 % eventdata  reserved - to be defined in a future version of MATLAB
0406 % handles    structure with handles and user data (see GUIDATA)
0407 
0408 % Hints: get(hObject,'String') returns contents of kicker as text
0409 %        str2double(get(hObject,'String')) returns contents of kicker as a double
0410 
0411 %delay=str2double(get(hObject,'String'));
0412 %tango_write_attribute('BOO/SY/LOCAL.Binj.1', 'k.inj.trigTimeDelay',delay);
0413 
0414 % --- Executes during object creation, after setting all properties.
0415 function kicker_CreateFcn(hObject, eventdata, handles)
0416 % hObject    handle to kicker (see GCBO)
0417 % eventdata  reserved - to be defined in a future version of MATLAB
0418 % handles    empty - handles not created until after all CreateFcns called
0419 
0420 % Hint: edit controls usually have a white background on Windows.
0421 %       See ISPC and COMPUTER.
0422 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0423     set(hObject,'BackgroundColor','white');
0424 end
0425 
0426 
0427 
0428 function bpm_Callback(hObject, eventdata, handles)
0429 % hObject    handle to bpm (see GCBO)
0430 % eventdata  reserved - to be defined in a future version of MATLAB
0431 % handles    structure with handles and user data (see GUIDATA)
0432 
0433 % Hints: get(hObject,'String') returns contents of bpm as text
0434 %        str2double(get(hObject,'String')) returns contents of bpm as a double
0435 
0436 delay=str2double(get(hObject,'String'));
0437 tango_write_attribute('LT1/SY/LOCAL.DG.1', 'bpm-booTimeDelay',delay);
0438 
0439 % --- Executes during object creation, after setting all properties.
0440 function bpm_CreateFcn(hObject, eventdata, handles)
0441 % hObject    handle to bpm (see GCBO)
0442 % eventdata  reserved - to be defined in a future version of MATLAB
0443 % handles    empty - handles not created until after all CreateFcns called
0444 
0445 % Hint: edit controls usually have a white background on Windows.
0446 %       See ISPC and COMPUTER.
0447 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0448     set(hObject,'BackgroundColor','white');
0449 end
0450 
0451 
0452 
0453 function nod_Callback(hObject, eventdata, handles)
0454 % hObject    handle to nod (see GCBO)
0455 % eventdata  reserved - to be defined in a future version of MATLAB
0456 % handles    structure with handles and user data (see GUIDATA)
0457 
0458 % Hints: get(hObject,'String') returns contents of nod as text
0459 %        str2double(get(hObject,'String')) returns contents of nod as a double
0460 
0461 delay=str2double(get(hObject,'String'));
0462 tango_write_attribute('LT1/SY/LOCAL.DG.1', 'NODTimeDelay',delay);
0463 
0464 % --- Executes during object creation, after setting all properties.
0465 function nod_CreateFcn(hObject, eventdata, handles)
0466 % hObject    handle to nod (see GCBO)
0467 % eventdata  reserved - to be defined in a future version of MATLAB
0468 % handles    empty - handles not created until after all CreateFcns called
0469 
0470 % Hint: edit controls usually have a white background on Windows.
0471 %       See ISPC and COMPUTER.
0472 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0473     set(hObject,'BackgroundColor','white');
0474 end
0475 
0476 
0477 
0478 function dcct_Callback(hObject, eventdata, handles)
0479 % hObject    handle to dcct (see GCBO)
0480 % eventdata  reserved - to be defined in a future version of MATLAB
0481 % handles    structure with handles and user data (see GUIDATA)
0482 
0483 % Hints: get(hObject,'String') returns contents of dcct as text
0484 %        str2double(get(hObject,'String')) returns contents of dcct as a double
0485 delay=str2double(get(hObject,'String'));
0486 tango_write_attribute('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay',delay);
0487 % --- Executes during object creation, after setting all properties.
0488 function dcct_CreateFcn(hObject, eventdata, handles)
0489 % hObject    handle to dcct (see GCBO)
0490 % eventdata  reserved - to be defined in a future version of MATLAB
0491 % handles    empty - handles not created until after all CreateFcns called
0492 
0493 % Hint: edit controls usually have a white background on Windows.
0494 %       See ISPC and COMPUTER.
0495 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0496     set(hObject,'BackgroundColor','white');
0497 end
0498 
0499 
0500 
0501 function hall_Callback(hObject, eventdata, handles)
0502 % hObject    handle to hall (see GCBO)
0503 % eventdata  reserved - to be defined in a future version of MATLAB
0504 % handles    structure with handles and user data (see GUIDATA)
0505 
0506 % Hints: get(hObject,'String') returns contents of hall as text
0507 %        str2double(get(hObject,'String')) returns contents of hall as a double
0508 
0509 
0510 % --- Executes during object creation, after setting all properties.
0511 function hall_CreateFcn(hObject, eventdata, handles)
0512 % hObject    handle to hall (see GCBO)
0513 % eventdata  reserved - to be defined in a future version of MATLAB
0514 % handles    empty - handles not created until after all CreateFcns called
0515 
0516 % Hint: edit controls usually have a white background on Windows.
0517 %       See ISPC and COMPUTER.
0518 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0519     set(hObject,'BackgroundColor','white');
0520 end
0521 
0522 
0523 
0524 function pc_address_Callback(hObject, eventdata, handles)
0525 % hObject    handle to pc_address (see GCBO)
0526 % eventdata  reserved - to be defined in a future version of MATLAB
0527 % handles    structure with handles and user data (see GUIDATA)
0528 
0529 % Hints: get(hObject,'String') returns contents of pc_address as text
0530 %        str2double(get(hObject,'String')) returns contents of pc_address as a double
0531 
0532 delay=str2double(get(hObject,'String'));
0533 tango_write_attribute('ANS/SY/CENTRAL', 'TPcTimeDelay',delay);
0534 
0535 % --- Executes during object creation, after setting all properties.
0536 function pc_address_CreateFcn(hObject, eventdata, handles)
0537 % hObject    handle to pc_address (see GCBO)
0538 % eventdata  reserved - to be defined in a future version of MATLAB
0539 % handles    empty - handles not created until after all CreateFcns called
0540 
0541 % Hint: edit controls usually have a white background on Windows.
0542 %       See ISPC and COMPUTER.
0543 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0544     set(hObject,'BackgroundColor','white');
0545 end
0546 
0547 
0548 
0549 function inj_address_Callback(hObject, eventdata, handles)
0550 % hObject    handle to inj_address (see GCBO)
0551 % eventdata  reserved - to be defined in a future version of MATLAB
0552 % handles    structure with handles and user data (see GUIDATA)
0553 
0554 % Hints: get(hObject,'String') returns contents of inj_address as text
0555 %        str2double(get(hObject,'String')) returns contents of inj_address as a double
0556 
0557 delay=str2double(get(hObject,'String'));
0558 tango_write_attribute('ANS/SY/CENTRAL', 'TInjTimeDelay',delay);
0559 
0560 % --- Executes during object creation, after setting all properties.
0561 function inj_address_CreateFcn(hObject, eventdata, handles)
0562 % hObject    handle to inj_address (see GCBO)
0563 % eventdata  reserved - to be defined in a future version of MATLAB
0564 % handles    empty - handles not created until after all CreateFcns called
0565 
0566 % Hint: edit controls usually have a white background on Windows.
0567 %       See ISPC and COMPUTER.
0568 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0569     set(hObject,'BackgroundColor','white');
0570 end
0571 
0572 
0573 
0574 function edit21_Callback(hObject, eventdata, handles)
0575 % hObject    handle to pc_address (see GCBO)
0576 % eventdata  reserved - to be defined in a future version of MATLAB
0577 % handles    structure with handles and user data (see GUIDATA)
0578 
0579 % Hints: get(hObject,'String') returns contents of pc_address as text
0580 %        str2double(get(hObject,'String')) returns contents of pc_address as a double
0581 
0582 
0583 % --- Executes during object creation, after setting all properties.
0584 function edit21_CreateFcn(hObject, eventdata, handles)
0585 % hObject    handle to pc_address (see GCBO)
0586 % eventdata  reserved - to be defined in a future version of MATLAB
0587 % handles    empty - handles not created until after all CreateFcns called
0588 
0589 % Hint: edit controls usually have a white background on Windows.
0590 %       See ISPC and COMPUTER.
0591 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0592     set(hObject,'BackgroundColor','white');
0593 end
0594 
0595 
0596 
0597 function soft_address_Callback(hObject, eventdata, handles)
0598 % hObject    handle to soft_address (see GCBO)
0599 % eventdata  reserved - to be defined in a future version of MATLAB
0600 % handles    structure with handles and user data (see GUIDATA)
0601 
0602 % Hints: get(hObject,'String') returns contents of soft_address as text
0603 %        str2double(get(hObject,'String')) returns contents of soft_address as a double
0604 
0605 delay=str2double(get(hObject,'String'));
0606 tango_write_attribute('ANS/SY/CENTRAL', 'TSoftTimeDelay',delay);
0607 
0608 % --- Executes during object creation, after setting all properties.
0609 function soft_address_CreateFcn(hObject, eventdata, handles)
0610 % hObject    handle to soft_address (see GCBO)
0611 % eventdata  reserved - to be defined in a future version of MATLAB
0612 % handles    empty - handles not created until after all CreateFcns called
0613 
0614 % Hint: edit controls usually have a white background on Windows.
0615 %       See ISPC and COMPUTER.
0616 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0617     set(hObject,'BackgroundColor','white');
0618 end
0619 
0620 
0621 % --- Executes on button press in acquisition1.
0622 function acquisition1_Callback(hObject, eventdata, handles)
0623 % hObject    handle to acquisition1 (see GCBO)
0624 % eventdata  reserved - to be defined in a future version of MATLAB
0625 % handles    structure with handles and user data (see GUIDATA)
0626 
0627 
0628 
0629 
0630 n=2;
0631 
0632 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay');
0633 set(handles.pc_address,'String',num2str(temp.value(n)));
0634 
0635 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
0636 set(handles.inj_address,'String',num2str(temp.value(n)));
0637 
0638 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
0639 set(handles.soft_address,'String',num2str(temp.value(n)));
0640 
0641 
0642 
0643 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay');
0644 set(handles.sdc,'String',num2str(temp.value(n)));
0645 
0646 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay');
0647 set(handles.canon,'String',num2str(temp.value(n)));
0648 
0649 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'bpm-booTimeDelay');
0650 set(handles.bpm,'String',num2str(temp.value(n)));
0651 
0652 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay');
0653 set(handles.emittance,'String',num2str(temp.value(n)));
0654 
0655 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay');
0656 set(handles.MC1,'String',num2str(temp.value(n)));
0657 
0658 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay');
0659 set(handles.MC2,'String',num2str(temp.value(n)));
0660 
0661 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay');
0662 set(handles.osc,'String',num2str(temp.value(n)));
0663 
0664 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay');
0665 set(handles.dcct,'String',num2str(temp.value(n)));
0666 
0667 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'NODTimeDelay');
0668 set(handles.nod,'String',num2str(temp.value(n)));
0669 
0670 % temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.inj.trigTimeDelay');
0671 % set(handles.septum,'String',num2str(temp.value(n)));
0672 
0673 % temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.inj.trigTimeDelay');
0674 % set(handles.kicker,'String',num2str(temp.value(n)));
0675 
0676 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay');
0677 set(handles.dipole,'String',num2str(temp.value(n)));
0678 
0679 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay');
0680 set(handles.qf,'String',num2str(temp.value(n)));
0681 
0682 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay');
0683 set(handles.qd,'String',num2str(temp.value(n)));
0684 
0685 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay');
0686 set(handles.sf,'String',num2str(temp.value(n)));
0687 
0688 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay');
0689 set(handles.sd,'String',num2str(temp.value(n)));
0690 
0691 temp=tango_read_attribute2('BOO/SY/LOCAL.RF.1', 'rfTimeDelay');
0692 set(handles.rf,'String',num2str(temp.value(n)));
0693 
0694 
0695 % --- Executes on button press in acquisition2.
0696 function acquisition2_Callback(hObject, eventdata, handles)
0697 % hObject    handle to acquisition2 (see GCBO)
0698 % eventdata  reserved - to be defined in a future version of MATLAB
0699 % handles    structure with handles and user data (see GUIDATA)
0700 
0701 n=1;
0702 
0703 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay');
0704 set(handles.pc_address,'String',num2str(temp.value(n)));
0705 
0706 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
0707 set(handles.inj_address,'String',num2str(temp.value(n)));
0708 
0709 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
0710 set(handles.soft_address,'String',num2str(temp.value(n)));
0711 
0712 
0713 
0714 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay');
0715 set(handles.sdc,'String',num2str(temp.value(n)));
0716 
0717 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay');
0718 set(handles.canon,'String',num2str(temp.value(n)));
0719 
0720 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'bpm-booTimeDelay');
0721 set(handles.bpm,'String',num2str(temp.value(n)));
0722 
0723 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay');
0724 set(handles.emittance,'String',num2str(temp.value(n)));
0725 
0726 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay');
0727 set(handles.MC1,'String',num2str(temp.value(n)));
0728 
0729 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay');
0730 set(handles.MC2,'String',num2str(temp.value(n)));
0731 
0732 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay');
0733 set(handles.osc,'String',num2str(temp.value(n)));
0734 
0735 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay');
0736 set(handles.dcct,'String',num2str(temp.value(n)));
0737 
0738 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'NODTimeDelay');
0739 set(handles.nod,'String',num2str(temp.value(n)));
0740 
0741 % temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.injread.trigTimeDelay');
0742 % set(handles.septum,'String',num2str(temp.value(n)));
0743 
0744 % temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.inj.trigTimeDelay');
0745 % set(handles.kicker,'String',num2str(temp.value(n)));
0746 
0747 
0748 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay');
0749 set(handles.dipole,'String',num2str(temp.value(n)));
0750 
0751 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay');
0752 set(handles.qf,'String',num2str(temp.value(n)));
0753 
0754 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay');
0755 set(handles.qd,'String',num2str(temp.value(n)));
0756 
0757 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay');
0758 set(handles.sf,'String',num2str(temp.value(n)));
0759 
0760 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay');
0761 set(handles.sd,'String',num2str(temp.value(n)));
0762 
0763 temp=tango_read_attribute2('BOO/SY/LOCAL.RF.1', 'rfTimeDelay');
0764 set(handles.rf,'String',num2str(temp.value(n)));
0765 
0766 
0767 
0768 
0769 % --- Executes on button press in soft_button.
0770 function soft_button_Callback(hObject, eventdata, handles)
0771 % hObject    handle to soft_button (see GCBO)
0772 % eventdata  reserved - to be defined in a future version of MATLAB
0773 % handles    structure with handles and user data (see GUIDATA)
0774 
0775 % Hint: get(hObject,'Value') returns toggle state of soft_button
0776 
0777 etat=get(hObject,'Value');
0778 if (etat==0)
0779     event=int32(2) ;% adresse de l'injection
0780     tango_write_attribute('ANS/SY/LOCAL.SDC.1', 'oscEvent',event);
0781     tango_write_attribute('LT1/SY/LOCAL.LINAC.1', 'lpmEvent',event);
0782     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'bpm-booEvent',event);
0783     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'emittanceEvent',event);
0784     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'mc.1Event',event);
0785     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'mc.2Event',event);
0786     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'oscEvent',event);
0787     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'dcct-booEvent',event);
0788     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'NODEvent',event);
0789  %  temp=tango_write_attribute('BOO/SY/LOCAL.Binj.1', 'sep-p.inj.trigEvent',event);
0790 %   temp=tango_write_attribute('BOO/SY/LOCAL.Binj.1', 'k.inj.trigEvent',event);
0791 elseif (etat==1)
0792     event=int32(5) ;% adresse de l'injection
0793     tango_write_attribute('ANS/SY/LOCAL.SDC.1', 'oscEvent',event);
0794     tango_write_attribute('LT1/SY/LOCAL.LINAC.1', 'lpmEvent',event);
0795     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'bpm-booEvent',event);
0796     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'emittanceEvent',event);
0797     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'mc.1Event',event);
0798     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'mc.2Event',event);
0799     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'oscEvent',event);
0800     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'dcct-booEvent',event);
0801     tango_write_attribute('LT1/SY/LOCAL.DG.1', 'NODEvent',event);
0802 %   temp=tango_write_attribute('BOO/SY/LOCAL.Binj.1', 'sep-p.inj.trigEvent',event);
0803 %   temp=tango_write_attribute('BOO/SY/LOCAL.Binj.1', 'k.inj.trigEvent',event);
0804 end
0805 
0806 
0807 % --- Executes on button press in push_soft.
0808 function push_soft_Callback(hObject, eventdata, handles)
0809 % hObject    handle to push_soft (see GCBO)
0810 % eventdata  reserved - to be defined in a future version of MATLAB
0811 % handles    structure with handles and user data (see GUIDATA)
0812 
0813 tango_command_inout('ANS/SY/CENTRAL','FireSoftEvent');

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