source: MML/trunk/machine/SOLEIL/StorageRing/diagnostics/Config_FOFB.m @ 17

Last change on this file since 17 was 17, checked in by zhangj, 10 years ago

To have a stable version on the server.

  • Property svn:executable set to *
File size: 66.0 KB
Line 
1function varargout = Config_FOFB(varargin)
2% CONFIG_FOFB M-file for Config_FOFB.fig
3%      CONFIG_FOFB, by itself, creates a new CONFIG_FOFB or raises the existing
4%      singleton*.
5%
6%      H = CONFIG_FOFB returns the handle to a new CONFIG_FOFB or the handle to
7%      the existing singleton*.
8%
9%      CONFIG_FOFB('CALLBACK',hObject,eventData,handles,...) calls the local
10%      function named CALLBACK in CONFIG_FOFB.M with the given input arguments.
11%
12%      CONFIG_FOFB('Property','Value',...) creates a new CONFIG_FOFB or raises the
13%      existing singleton*.  Starting from the left, property value pairs are
14%      applied to the GUI before Config_FOFB_OpeningFunction gets called.  An
15%      unrecognized property name or invalid value makes property application
16%      stop.  All inputs are passed to Config_FOFB_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 Config_FOFB
24
25% Last Modified by GUIDE v2.5 15-Jul-2011 10:42:55
26
27% Begin initialization code - DO NOT EDIT
28gui_Singleton = 1;
29gui_State = struct('gui_Name',       mfilename, ...
30                   'gui_Singleton',  gui_Singleton, ...
31                   'gui_OpeningFcn', @Config_FOFB_OpeningFcn, ...
32                   'gui_OutputFcn',  @Config_FOFB_OutputFcn, ...
33                   'gui_LayoutFcn',  [] , ...
34                   'gui_Callback',   []);
35if nargin && ischar(varargin{1})
36    gui_State.gui_Callback = str2func(varargin{1});
37end
38
39if nargout
40    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
41else
42    gui_mainfcn(gui_State, varargin{:});
43end
44% End initialization code - DO NOT EDIT
45
46
47% --- Executes just before Config_FOFB is made visible.
48function Config_FOFB_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 Config_FOFB (see VARARGIN)
54
55% Choose default command line output for Config_FOFB
56handles.output = hObject;
57
58% Update handles structure
59guidata(hObject, handles);
60
61% UIWAIT makes Config_FOFB wait for user response (see UIRESUME)
62% uiwait(handles.figure1);
63
64
65% --- Outputs from this function are returned to the command line.
66function varargout = Config_FOFB_OutputFcn(hObject, eventdata, handles)
67% varargout  cell array for returning output args (see VARARGOUT);
68% hObject    handle to figure
69% eventdata  reserved - to be defined in a future version of MATLAB
70% handles    structure with handles and user data (see GUIDATA)
71
72% Get default command line output from handles structure
73varargout{1} = handles.output;
74
75
76% --- Executes on selection change in Device_name.
77function Device_name_Callback(hObject, eventdata, handles)
78% hObject    handle to Device_name (see GCBO)
79% eventdata  reserved - to be defined in a future version of MATLAB
80% handles    structure with handles and user data (see GUIDATA)
81
82% Hints: contents = get(hObject,'String') returns Device_name contents as cell array
83%        contents{get(hObject,'Value')} returns selected item from Device_name
84
85
86% --- Executes during object creation, after setting all properties.
87function Device_name_CreateFcn(hObject, eventdata, handles)
88% hObject    handle to Device_name (see GCBO)
89% eventdata  reserved - to be defined in a future version of MATLAB
90% handles    empty - handles not created until after all CreateFcns called
91
92% Hint: popupmenu controls usually have a white background on Windows.
93%       See ISPC and COMPUTER.
94if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
95    set(hObject,'BackgroundColor','white');
96end
97
98
99% --- Executes on button press in Read_fofb_status.
100function Read_fofb_status_Callback(hObject, eventdata, handles)
101% hObject    handle to Read_fofb_status (see GCBO)
102% eventdata  reserved - to be defined in a future version of MATLAB
103% handles    structure with handles and user data (see GUIDATA)
104dev=get(handles.Device_name,'String');
105val_dev=get(handles.Device_name,'value');
106device_name=dev{val_dev}
107[CC_conf_reg,CC_Status_reg,RAM_X,RAM_Z]=fofb_read_cfg_memory(device_name)
108set(handles.CC_version,'string',CC_Status_reg.CC_version)
109set(handles.CC_status,'string',CC_Status_reg.CC_status)
110set(handles.Partner_1,'string',CC_Status_reg.lp1)
111set(handles.Partner_2,'string',CC_Status_reg.lp2)
112set(handles.Partner_3,'string',CC_Status_reg.lp3)
113set(handles.Partner_4,'string',CC_Status_reg.lp4)
114set(handles.Link_RX_1,'value',str2num(CC_Status_reg.status_RX1))
115set(handles.Link_RX_2,'value',str2num(CC_Status_reg.status_RX2))
116set(handles.Link_RX_3,'value',str2num(CC_Status_reg.status_RX3))
117set(handles.Link_RX_4,'value',str2num(CC_Status_reg.status_RX4))
118set(handles.Link_TX_1,'value',str2num(CC_Status_reg.status_TX1))
119set(handles.Link_TX_2,'value',str2num(CC_Status_reg.status_TX2))
120set(handles.Link_TX_3,'value',str2num(CC_Status_reg.status_TX3))
121set(handles.Link_TX_4,'value',str2num(CC_Status_reg.status_TX4))
122set(handles.Time_frame_cnt,'string',CC_Status_reg.time_frame_count)
123set(handles.H_error_1,'string',CC_Status_reg.hard_error_cnt_1)
124set(handles.H_error_2,'string',CC_Status_reg.hard_error_cnt_2)
125set(handles.H_error_3,'string',CC_Status_reg.hard_error_cnt_3)
126set(handles.H_error_4,'string',CC_Status_reg.hard_error_cnt_4)
127set(handles.S_error_1,'string',CC_Status_reg.soft_error_cnt_1)
128set(handles.S_error_2,'string',CC_Status_reg.soft_error_cnt_2)
129set(handles.S_error_3,'string',CC_Status_reg.soft_error_cnt_3)
130set(handles.S_error_4,'string',CC_Status_reg.soft_error_cnt_4)
131set(handles.F_error_1,'string',CC_Status_reg.frame_error_cnt_1)
132set(handles.F_error_2,'string',CC_Status_reg.frame_error_cnt_2)
133set(handles.F_error_3,'string',CC_Status_reg.frame_error_cnt_3)
134set(handles.F_error_4,'string',CC_Status_reg.frame_error_cnt_4)
135set(handles.RX_cnt_1,'string',CC_Status_reg.rx_pck_cnt_1)
136set(handles.RX_cnt_2,'string',CC_Status_reg.rx_pck_cnt_2)
137set(handles.RX_cnt_3,'string',CC_Status_reg.rx_pck_cnt_3)
138set(handles.RX_cnt_4,'string',CC_Status_reg.rx_pck_cnt_4)
139set(handles.TX_cnt_1,'string',CC_Status_reg.tx_pck_cnt_1)
140set(handles.TX_cnt_2,'string',CC_Status_reg.tx_pck_cnt_2)
141set(handles.TX_cnt_3,'string',CC_Status_reg.tx_pck_cnt_3)
142set(handles.TX_cnt_4,'string',CC_Status_reg.tx_pck_cnt_4)
143set(handles.process_time,'string',CC_Status_reg.process_time)
144set(handles.bpm_involved,'string',CC_Status_reg.bpm_involved)
145
146CC_conf_reg
147set(handles.BPM_id,'String',num2str(CC_conf_reg.bpm_id))
148set(handles.time_frame_length,'String',num2str(CC_conf_reg.time_frame_length))
149set(handles.MGT_powerdown,'String',num2str(CC_conf_reg.MGT_powerdown))
150set(handles.MGT_loopback,'String',num2str(CC_conf_reg.MGT_loopback))
151set(handles.Buf_clr_dly,'String',num2str(CC_conf_reg.buf_clr_dly))
152set(handles.Golden_X,'String',num2str(CC_conf_reg.Golden_X))
153set(handles.Golden_Z,'String',num2str(CC_conf_reg.Golden_Z))
154
155
156for j=1:1:256
157    size_addr=size(num2str(j-1),2);
158    size_X=size(num2str(RAM_X(j)),2);
159    size_Z=size(num2str(RAM_Z(j)),2);
160    switch size_addr
161        case 1
162            addr(j,:)=['00',num2str(j-1)];
163        case 2
164            addr(j,:)=['0',num2str(j-1)];
165        case 3
166            addr(j,:)=num2str(j-1);
167    end
168    switch size_X
169        case 1
170            X(j,:)=['         ',num2str(RAM_X(j))];
171        case 2
172             X(j,:)=['        ',num2str(RAM_X(j))];
173        case 3
174             X(j,:)=['       ',num2str(RAM_X(j))];
175         case 4
176             X(j,:)=['      ',num2str(RAM_X(j))];
177         case 5
178             X(j,:)=['     ',num2str(RAM_X(j))];
179         case 6
180             X(j,:)=['    ',num2str(RAM_X(j))];
181         case 7
182             X(j,:)=['   ',num2str(RAM_X(j))];
183          case 8
184             X(j,:)=['  ',num2str(RAM_X(j))];
185           case 9
186             X(j,:)=[' ',num2str(RAM_X(j))];
187          case 10
188             X(j,:)=['',num2str(RAM_X(j))];
189    end
190
191    switch size_Z
192        case 1
193            Z(j,:)=['         ',num2str(RAM_Z(j))];
194        case 2
195             Z(j,:)=['        ',num2str(RAM_Z(j))];
196        case 3
197             Z(j,:)=['       ',num2str(RAM_Z(j))];
198         case 4
199             Z(j,:)=['      ',num2str(RAM_Z(j))];
200         case 5
201             Z(j,:)=['     ',num2str(RAM_Z(j))];
202         case 6
203             Z(j,:)=['    ',num2str(RAM_Z(j))];
204         case 7
205             Z(j,:)=['   ',num2str(RAM_Z(j))];
206         case 8
207             Z(j,:)=['  ',num2str(RAM_Z(j))];
208          case 9
209             Z(j,:)=[' ',num2str(RAM_Z(j))];
210         case 10
211             Z(j,:)=['',num2str(RAM_Z(j))];
212    end
213 
214    aff_RAM_X(j,:)=[addr(j,:),'     ',X(j,:)];
215    aff_RAM_Z(j,:)=[addr(j,:),'     ',Z(j,:)];
216   
217end
218set(handles.RAM_X,'string',aff_RAM_X);
219set(handles.RAM_Z,'string',aff_RAM_Z);
220
221
222% --- Executes on button press in Init_CC.
223function Init_CC_Callback(hObject, eventdata, handles)
224% hObject    handle to Init_CC (see GCBO)
225% eventdata  reserved - to be defined in a future version of MATLAB
226% handles    structure with handles and user data (see GUIDATA)
227% handles    structure with handles and user data (see GUIDATA)
228dev=get(handles.Device_name,'String');
229val_dev=get(handles.Device_name,'value');
230device_name=dev{val_dev}
231answer=(inputdlg('choose BPM id'))
232id=str2num(answer{1})
233set(handles.BPM_id,'String',answer)
234time_frame_lenght=str2num(get(handles.time_frame_length,'String'))
235MGT_powerdown=str2num(get(handles.MGT_powerdown,'String'))
236MGT_loopback=str2num(get(handles.MGT_loopback,'String'))
237buf_clr_dly=str2num(get(handles.Buf_clr_dly,'String'))
238Golden_X=str2num(get(handles.Golden_X,'String'))
239Golden_Z=str2num(get(handles.Golden_Z,'String'))
240
241fofb_init_CC(device_name,id,time_frame_lenght,MGT_powerdown,MGT_loopback,buf_clr_dly,Golden_X,Golden_Z)
242
243%configure_fofb('write',device_name,'init_CC',id,time_frame_lenght,MGT_powerdown,MGT_loopback,buf_clr_dly,Golden_X,Golden_Z)
244
245% --- Executes on button press in Stop_CC.
246function Stop_CC_Callback(hObject, eventdata, handles)
247% hObject    handle to Stop_CC (see GCBO)
248% eventdata  reserved - to be defined in a future version of MATLAB
249% handles    structure with handles and user data (see GUIDATA)
250dev=get(handles.Device_name,'String');
251val_dev=get(handles.Device_name,'value');
252device_alim_list=dev(val_dev,:)
253groupe=create_group_from_list(device_alim_list);
254fofb_stop_CC(groupe)
255tango_group_kill(groupe)
256
257% --- Executes on button press in Arm_CC.
258function Arm_CC_Callback(hObject, eventdata, handles)
259% hObject    handle to Arm_CC (see GCBO)
260% eventdata  reserved - to be defined in a future version of MATLAB
261% handles    structure with handles and user data (see GUIDATA)
262dev=get(handles.Device_name,'String');
263val_dev=get(handles.Device_name,'value');
264device_alim_list=dev(val_dev,:)
265groupe=create_group_from_list(device_alim_list);
266data_selection=get(handles.radiobutton2,'value');
267time_frame_cnt_limit_value=str2num(get(handles.time_frame_count_limit_value,'String'))
268fofb_arm_CC(groupe,time_frame_cnt_limit_value,data_selection)
269tango_group_kill(groupe)
270
271
272
273function CC_version_Callback(hObject, eventdata, handles)
274% hObject    handle to CC_version (see GCBO)
275% eventdata  reserved - to be defined in a future version of MATLAB
276% handles    structure with handles and user data (see GUIDATA)
277
278% Hints: get(hObject,'String') returns contents of CC_version as text
279%        str2double(get(hObject,'String')) returns contents of CC_version as a double
280
281
282% --- Executes during object creation, after setting all properties.
283function CC_version_CreateFcn(hObject, eventdata, handles)
284% hObject    handle to CC_version (see GCBO)
285% eventdata  reserved - to be defined in a future version of MATLAB
286% handles    empty - handles not created until after all CreateFcns called
287
288% Hint: edit controls usually have a white background on Windows.
289%       See ISPC and COMPUTER.
290if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
291    set(hObject,'BackgroundColor','white');
292end
293
294
295
296
297
298function CC_status_Callback(hObject, eventdata, handles)
299% hObject    handle to CC_status (see GCBO)
300% eventdata  reserved - to be defined in a future version of MATLAB
301% handles    structure with handles and user data (see GUIDATA)
302
303% Hints: get(hObject,'String') returns contents of CC_status as text
304%        str2double(get(hObject,'String')) returns contents of CC_status as a double
305
306
307% --- Executes during object creation, after setting all properties.
308function CC_status_CreateFcn(hObject, eventdata, handles)
309% hObject    handle to CC_status (see GCBO)
310% eventdata  reserved - to be defined in a future version of MATLAB
311% handles    empty - handles not created until after all CreateFcns called
312
313% Hint: edit controls usually have a white background on Windows.
314%       See ISPC and COMPUTER.
315if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
316    set(hObject,'BackgroundColor','white');
317end
318
319
320
321function Partner_1_Callback(hObject, eventdata, handles)
322% hObject    handle to Partner_1 (see GCBO)
323% eventdata  reserved - to be defined in a future version of MATLAB
324% handles    structure with handles and user data (see GUIDATA)
325
326% Hints: get(hObject,'String') returns contents of Partner_1 as text
327%        str2double(get(hObject,'String')) returns contents of Partner_1 as a double
328
329
330% --- Executes during object creation, after setting all properties.
331function Partner_1_CreateFcn(hObject, eventdata, handles)
332% hObject    handle to Partner_1 (see GCBO)
333% eventdata  reserved - to be defined in a future version of MATLAB
334% handles    empty - handles not created until after all CreateFcns called
335
336% Hint: edit controls usually have a white background on Windows.
337%       See ISPC and COMPUTER.
338if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
339    set(hObject,'BackgroundColor','white');
340end
341
342
343
344function Partner_2_Callback(hObject, eventdata, handles)
345% hObject    handle to Partner_2 (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% Hints: get(hObject,'String') returns contents of Partner_2 as text
350%        str2double(get(hObject,'String')) returns contents of Partner_2 as a double
351
352
353% --- Executes during object creation, after setting all properties.
354function Partner_2_CreateFcn(hObject, eventdata, handles)
355% hObject    handle to Partner_2 (see GCBO)
356% eventdata  reserved - to be defined in a future version of MATLAB
357% handles    empty - handles not created until after all CreateFcns called
358
359% Hint: edit controls usually have a white background on Windows.
360%       See ISPC and COMPUTER.
361if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
362    set(hObject,'BackgroundColor','white');
363end
364
365
366
367function Partner_3_Callback(hObject, eventdata, handles)
368% hObject    handle to Partner_3 (see GCBO)
369% eventdata  reserved - to be defined in a future version of MATLAB
370% handles    structure with handles and user data (see GUIDATA)
371
372% Hints: get(hObject,'String') returns contents of Partner_3 as text
373%        str2double(get(hObject,'String')) returns contents of Partner_3 as a double
374
375
376% --- Executes during object creation, after setting all properties.
377function Partner_3_CreateFcn(hObject, eventdata, handles)
378% hObject    handle to Partner_3 (see GCBO)
379% eventdata  reserved - to be defined in a future version of MATLAB
380% handles    empty - handles not created until after all CreateFcns called
381
382% Hint: edit controls usually have a white background on Windows.
383%       See ISPC and COMPUTER.
384if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
385    set(hObject,'BackgroundColor','white');
386end
387
388
389
390function Partner_4_Callback(hObject, eventdata, handles)
391% hObject    handle to Partner_4 (see GCBO)
392% eventdata  reserved - to be defined in a future version of MATLAB
393% handles    structure with handles and user data (see GUIDATA)
394
395% Hints: get(hObject,'String') returns contents of Partner_4 as text
396%        str2double(get(hObject,'String')) returns contents of Partner_4 as a double
397
398
399% --- Executes during object creation, after setting all properties.
400function Partner_4_CreateFcn(hObject, eventdata, handles)
401% hObject    handle to Partner_4 (see GCBO)
402% eventdata  reserved - to be defined in a future version of MATLAB
403% handles    empty - handles not created until after all CreateFcns called
404
405% Hint: edit controls usually have a white background on Windows.
406%       See ISPC and COMPUTER.
407if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
408    set(hObject,'BackgroundColor','white');
409end
410
411
412
413function H_error_1_Callback(hObject, eventdata, handles)
414% hObject    handle to H_error_1 (see GCBO)
415% eventdata  reserved - to be defined in a future version of MATLAB
416% handles    structure with handles and user data (see GUIDATA)
417
418% Hints: get(hObject,'String') returns contents of H_error_1 as text
419%        str2double(get(hObject,'String')) returns contents of H_error_1 as a double
420
421
422% --- Executes during object creation, after setting all properties.
423function H_error_1_CreateFcn(hObject, eventdata, handles)
424% hObject    handle to H_error_1 (see GCBO)
425% eventdata  reserved - to be defined in a future version of MATLAB
426% handles    empty - handles not created until after all CreateFcns called
427
428% Hint: edit controls usually have a white background on Windows.
429%       See ISPC and COMPUTER.
430if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
431    set(hObject,'BackgroundColor','white');
432end
433
434
435
436function H_error_2_Callback(hObject, eventdata, handles)
437% hObject    handle to H_error_2 (see GCBO)
438% eventdata  reserved - to be defined in a future version of MATLAB
439% handles    structure with handles and user data (see GUIDATA)
440
441% Hints: get(hObject,'String') returns contents of H_error_2 as text
442%        str2double(get(hObject,'String')) returns contents of H_error_2 as a double
443
444
445% --- Executes during object creation, after setting all properties.
446function H_error_2_CreateFcn(hObject, eventdata, handles)
447% hObject    handle to H_error_2 (see GCBO)
448% eventdata  reserved - to be defined in a future version of MATLAB
449% handles    empty - handles not created until after all CreateFcns called
450
451% Hint: edit controls usually have a white background on Windows.
452%       See ISPC and COMPUTER.
453if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
454    set(hObject,'BackgroundColor','white');
455end
456
457
458
459function H_error_3_Callback(hObject, eventdata, handles)
460% hObject    handle to H_error_3 (see GCBO)
461% eventdata  reserved - to be defined in a future version of MATLAB
462% handles    structure with handles and user data (see GUIDATA)
463
464% Hints: get(hObject,'String') returns contents of H_error_3 as text
465%        str2double(get(hObject,'String')) returns contents of H_error_3 as a double
466
467
468% --- Executes during object creation, after setting all properties.
469function H_error_3_CreateFcn(hObject, eventdata, handles)
470% hObject    handle to H_error_3 (see GCBO)
471% eventdata  reserved - to be defined in a future version of MATLAB
472% handles    empty - handles not created until after all CreateFcns called
473
474% Hint: edit controls usually have a white background on Windows.
475%       See ISPC and COMPUTER.
476if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
477    set(hObject,'BackgroundColor','white');
478end
479
480
481
482function H_error_4_Callback(hObject, eventdata, handles)
483% hObject    handle to H_error_4 (see GCBO)
484% eventdata  reserved - to be defined in a future version of MATLAB
485% handles    structure with handles and user data (see GUIDATA)
486
487% Hints: get(hObject,'String') returns contents of H_error_4 as text
488%        str2double(get(hObject,'String')) returns contents of H_error_4 as a double
489
490
491% --- Executes during object creation, after setting all properties.
492function H_error_4_CreateFcn(hObject, eventdata, handles)
493% hObject    handle to H_error_4 (see GCBO)
494% eventdata  reserved - to be defined in a future version of MATLAB
495% handles    empty - handles not created until after all CreateFcns called
496
497% Hint: edit controls usually have a white background on Windows.
498%       See ISPC and COMPUTER.
499if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
500    set(hObject,'BackgroundColor','white');
501end
502
503
504
505function S_error_1_Callback(hObject, eventdata, handles)
506% hObject    handle to S_error_1 (see GCBO)
507% eventdata  reserved - to be defined in a future version of MATLAB
508% handles    structure with handles and user data (see GUIDATA)
509
510% Hints: get(hObject,'String') returns contents of S_error_1 as text
511%        str2double(get(hObject,'String')) returns contents of S_error_1 as a double
512
513
514% --- Executes during object creation, after setting all properties.
515function S_error_1_CreateFcn(hObject, eventdata, handles)
516% hObject    handle to S_error_1 (see GCBO)
517% eventdata  reserved - to be defined in a future version of MATLAB
518% handles    empty - handles not created until after all CreateFcns called
519
520% Hint: edit controls usually have a white background on Windows.
521%       See ISPC and COMPUTER.
522if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
523    set(hObject,'BackgroundColor','white');
524end
525
526
527
528function S_error_2_Callback(hObject, eventdata, handles)
529% hObject    handle to S_error_2 (see GCBO)
530% eventdata  reserved - to be defined in a future version of MATLAB
531% handles    structure with handles and user data (see GUIDATA)
532
533% Hints: get(hObject,'String') returns contents of S_error_2 as text
534%        str2double(get(hObject,'String')) returns contents of S_error_2 as a double
535
536
537% --- Executes during object creation, after setting all properties.
538function S_error_2_CreateFcn(hObject, eventdata, handles)
539% hObject    handle to S_error_2 (see GCBO)
540% eventdata  reserved - to be defined in a future version of MATLAB
541% handles    empty - handles not created until after all CreateFcns called
542
543% Hint: edit controls usually have a white background on Windows.
544%       See ISPC and COMPUTER.
545if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
546    set(hObject,'BackgroundColor','white');
547end
548
549
550
551function S_error_3_Callback(hObject, eventdata, handles)
552% hObject    handle to S_error_3 (see GCBO)
553% eventdata  reserved - to be defined in a future version of MATLAB
554% handles    structure with handles and user data (see GUIDATA)
555
556% Hints: get(hObject,'String') returns contents of S_error_3 as text
557%        str2double(get(hObject,'String')) returns contents of S_error_3 as a double
558
559
560% --- Executes during object creation, after setting all properties.
561function S_error_3_CreateFcn(hObject, eventdata, handles)
562% hObject    handle to S_error_3 (see GCBO)
563% eventdata  reserved - to be defined in a future version of MATLAB
564% handles    empty - handles not created until after all CreateFcns called
565
566% Hint: edit controls usually have a white background on Windows.
567%       See ISPC and COMPUTER.
568if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
569    set(hObject,'BackgroundColor','white');
570end
571
572
573
574function S_error_4_Callback(hObject, eventdata, handles)
575% hObject    handle to S_error_4 (see GCBO)
576% eventdata  reserved - to be defined in a future version of MATLAB
577% handles    structure with handles and user data (see GUIDATA)
578
579% Hints: get(hObject,'String') returns contents of S_error_4 as text
580%        str2double(get(hObject,'String')) returns contents of S_error_4 as a double
581
582
583% --- Executes during object creation, after setting all properties.
584function S_error_4_CreateFcn(hObject, eventdata, handles)
585% hObject    handle to S_error_4 (see GCBO)
586% eventdata  reserved - to be defined in a future version of MATLAB
587% handles    empty - handles not created until after all CreateFcns called
588
589% Hint: edit controls usually have a white background on Windows.
590%       See ISPC and COMPUTER.
591if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
592    set(hObject,'BackgroundColor','white');
593end
594
595
596
597function F_error_1_Callback(hObject, eventdata, handles)
598% hObject    handle to F_error_1 (see GCBO)
599% eventdata  reserved - to be defined in a future version of MATLAB
600% handles    structure with handles and user data (see GUIDATA)
601
602% Hints: get(hObject,'String') returns contents of F_error_1 as text
603%        str2double(get(hObject,'String')) returns contents of F_error_1 as a double
604
605
606% --- Executes during object creation, after setting all properties.
607function F_error_1_CreateFcn(hObject, eventdata, handles)
608% hObject    handle to F_error_1 (see GCBO)
609% eventdata  reserved - to be defined in a future version of MATLAB
610% handles    empty - handles not created until after all CreateFcns called
611
612% Hint: edit controls usually have a white background on Windows.
613%       See ISPC and COMPUTER.
614if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
615    set(hObject,'BackgroundColor','white');
616end
617
618
619
620function F_error_2_Callback(hObject, eventdata, handles)
621% hObject    handle to F_error_2 (see GCBO)
622% eventdata  reserved - to be defined in a future version of MATLAB
623% handles    structure with handles and user data (see GUIDATA)
624
625% Hints: get(hObject,'String') returns contents of F_error_2 as text
626%        str2double(get(hObject,'String')) returns contents of F_error_2 as a double
627
628
629% --- Executes during object creation, after setting all properties.
630function F_error_2_CreateFcn(hObject, eventdata, handles)
631% hObject    handle to F_error_2 (see GCBO)
632% eventdata  reserved - to be defined in a future version of MATLAB
633% handles    empty - handles not created until after all CreateFcns called
634
635% Hint: edit controls usually have a white background on Windows.
636%       See ISPC and COMPUTER.
637if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
638    set(hObject,'BackgroundColor','white');
639end
640
641
642
643function F_error_3_Callback(hObject, eventdata, handles)
644% hObject    handle to F_error_3 (see GCBO)
645% eventdata  reserved - to be defined in a future version of MATLAB
646% handles    structure with handles and user data (see GUIDATA)
647
648% Hints: get(hObject,'String') returns contents of F_error_3 as text
649%        str2double(get(hObject,'String')) returns contents of F_error_3 as a double
650
651
652% --- Executes during object creation, after setting all properties.
653function F_error_3_CreateFcn(hObject, eventdata, handles)
654% hObject    handle to F_error_3 (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.
660if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
661    set(hObject,'BackgroundColor','white');
662end
663
664
665
666function F_error_4_Callback(hObject, eventdata, handles)
667% hObject    handle to F_error_4 (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 F_error_4 as text
672%        str2double(get(hObject,'String')) returns contents of F_error_4 as a double
673
674
675% --- Executes during object creation, after setting all properties.
676function F_error_4_CreateFcn(hObject, eventdata, handles)
677% hObject    handle to F_error_4 (see GCBO)
678% eventdata  reserved - to be defined in a future version of MATLAB
679% handles    empty - handles not created until after all CreateFcns called
680
681% Hint: edit controls usually have a white background on Windows.
682%       See ISPC and COMPUTER.
683if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
684    set(hObject,'BackgroundColor','white');
685end
686
687
688
689function RX_cnt_1_Callback(hObject, eventdata, handles)
690% hObject    handle to RX_cnt_1 (see GCBO)
691% eventdata  reserved - to be defined in a future version of MATLAB
692% handles    structure with handles and user data (see GUIDATA)
693
694% Hints: get(hObject,'String') returns contents of RX_cnt_1 as text
695%        str2double(get(hObject,'String')) returns contents of RX_cnt_1 as a double
696
697
698% --- Executes during object creation, after setting all properties.
699function RX_cnt_1_CreateFcn(hObject, eventdata, handles)
700% hObject    handle to RX_cnt_1 (see GCBO)
701% eventdata  reserved - to be defined in a future version of MATLAB
702% handles    empty - handles not created until after all CreateFcns called
703
704% Hint: edit controls usually have a white background on Windows.
705%       See ISPC and COMPUTER.
706if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
707    set(hObject,'BackgroundColor','white');
708end
709
710
711
712function RX_cnt_2_Callback(hObject, eventdata, handles)
713% hObject    handle to RX_cnt_2 (see GCBO)
714% eventdata  reserved - to be defined in a future version of MATLAB
715% handles    structure with handles and user data (see GUIDATA)
716
717% Hints: get(hObject,'String') returns contents of RX_cnt_2 as text
718%        str2double(get(hObject,'String')) returns contents of RX_cnt_2 as a double
719
720
721% --- Executes during object creation, after setting all properties.
722function RX_cnt_2_CreateFcn(hObject, eventdata, handles)
723% hObject    handle to RX_cnt_2 (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.
729if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
730    set(hObject,'BackgroundColor','white');
731end
732
733
734
735function RX_cnt_3_Callback(hObject, eventdata, handles)
736% hObject    handle to RX_cnt_3 (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 RX_cnt_3 as text
741%        str2double(get(hObject,'String')) returns contents of RX_cnt_3 as a double
742
743
744% --- Executes during object creation, after setting all properties.
745function RX_cnt_3_CreateFcn(hObject, eventdata, handles)
746% hObject    handle to RX_cnt_3 (see GCBO)
747% eventdata  reserved - to be defined in a future version of MATLAB
748% handles    empty - handles not created until after all CreateFcns called
749
750% Hint: edit controls usually have a white background on Windows.
751%       See ISPC and COMPUTER.
752if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
753    set(hObject,'BackgroundColor','white');
754end
755
756
757
758function RX_cnt_4_Callback(hObject, eventdata, handles)
759% hObject    handle to RX_cnt_4 (see GCBO)
760% eventdata  reserved - to be defined in a future version of MATLAB
761% handles    structure with handles and user data (see GUIDATA)
762
763% Hints: get(hObject,'String') returns contents of RX_cnt_4 as text
764%        str2double(get(hObject,'String')) returns contents of RX_cnt_4 as a double
765
766
767% --- Executes during object creation, after setting all properties.
768function RX_cnt_4_CreateFcn(hObject, eventdata, handles)
769% hObject    handle to RX_cnt_4 (see GCBO)
770% eventdata  reserved - to be defined in a future version of MATLAB
771% handles    empty - handles not created until after all CreateFcns called
772
773% Hint: edit controls usually have a white background on Windows.
774%       See ISPC and COMPUTER.
775if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
776    set(hObject,'BackgroundColor','white');
777end
778
779
780
781function TX_cnt_1_Callback(hObject, eventdata, handles)
782% hObject    handle to TX_cnt_1 (see GCBO)
783% eventdata  reserved - to be defined in a future version of MATLAB
784% handles    structure with handles and user data (see GUIDATA)
785
786% Hints: get(hObject,'String') returns contents of TX_cnt_1 as text
787%        str2double(get(hObject,'String')) returns contents of TX_cnt_1 as a double
788
789
790% --- Executes during object creation, after setting all properties.
791function TX_cnt_1_CreateFcn(hObject, eventdata, handles)
792% hObject    handle to TX_cnt_1 (see GCBO)
793% eventdata  reserved - to be defined in a future version of MATLAB
794% handles    empty - handles not created until after all CreateFcns called
795
796% Hint: edit controls usually have a white background on Windows.
797%       See ISPC and COMPUTER.
798if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
799    set(hObject,'BackgroundColor','white');
800end
801
802
803
804function TX_cnt_2_Callback(hObject, eventdata, handles)
805% hObject    handle to TX_cnt_2 (see GCBO)
806% eventdata  reserved - to be defined in a future version of MATLAB
807% handles    structure with handles and user data (see GUIDATA)
808
809% Hints: get(hObject,'String') returns contents of TX_cnt_2 as text
810%        str2double(get(hObject,'String')) returns contents of TX_cnt_2 as a double
811
812
813% --- Executes during object creation, after setting all properties.
814function TX_cnt_2_CreateFcn(hObject, eventdata, handles)
815% hObject    handle to TX_cnt_2 (see GCBO)
816% eventdata  reserved - to be defined in a future version of MATLAB
817% handles    empty - handles not created until after all CreateFcns called
818
819% Hint: edit controls usually have a white background on Windows.
820%       See ISPC and COMPUTER.
821if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
822    set(hObject,'BackgroundColor','white');
823end
824
825
826
827function TX_cnt_3_Callback(hObject, eventdata, handles)
828% hObject    handle to TX_cnt_3 (see GCBO)
829% eventdata  reserved - to be defined in a future version of MATLAB
830% handles    structure with handles and user data (see GUIDATA)
831
832% Hints: get(hObject,'String') returns contents of TX_cnt_3 as text
833%        str2double(get(hObject,'String')) returns contents of TX_cnt_3 as a double
834
835
836% --- Executes during object creation, after setting all properties.
837function TX_cnt_3_CreateFcn(hObject, eventdata, handles)
838% hObject    handle to TX_cnt_3 (see GCBO)
839% eventdata  reserved - to be defined in a future version of MATLAB
840% handles    empty - handles not created until after all CreateFcns called
841
842% Hint: edit controls usually have a white background on Windows.
843%       See ISPC and COMPUTER.
844if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
845    set(hObject,'BackgroundColor','white');
846end
847
848
849
850function TX_cnt_4_Callback(hObject, eventdata, handles)
851% hObject    handle to TX_cnt_4 (see GCBO)
852% eventdata  reserved - to be defined in a future version of MATLAB
853% handles    structure with handles and user data (see GUIDATA)
854
855% Hints: get(hObject,'String') returns contents of TX_cnt_4 as text
856%        str2double(get(hObject,'String')) returns contents of TX_cnt_4 as a double
857
858
859% --- Executes during object creation, after setting all properties.
860function TX_cnt_4_CreateFcn(hObject, eventdata, handles)
861% hObject    handle to TX_cnt_4 (see GCBO)
862% eventdata  reserved - to be defined in a future version of MATLAB
863% handles    empty - handles not created until after all CreateFcns called
864
865% Hint: edit controls usually have a white background on Windows.
866%       See ISPC and COMPUTER.
867if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
868    set(hObject,'BackgroundColor','white');
869end
870
871
872% --- Executes on button press in Link_RX_1.
873function Link_RX_1_Callback(hObject, eventdata, handles)
874% hObject    handle to Link_RX_1 (see GCBO)
875% eventdata  reserved - to be defined in a future version of MATLAB
876% handles    structure with handles and user data (see GUIDATA)
877
878% Hint: get(hObject,'Value') returns toggle state of Link_RX_1
879
880
881% --- Executes on button press in Link_RX_2.
882function Link_RX_2_Callback(hObject, eventdata, handles)
883% hObject    handle to Link_RX_2 (see GCBO)
884% eventdata  reserved - to be defined in a future version of MATLAB
885% handles    structure with handles and user data (see GUIDATA)
886
887% Hint: get(hObject,'Value') returns toggle state of Link_RX_2
888
889
890% --- Executes on button press in Link_RX_3.
891function Link_RX_3_Callback(hObject, eventdata, handles)
892% hObject    handle to Link_RX_3 (see GCBO)
893% eventdata  reserved - to be defined in a future version of MATLAB
894% handles    structure with handles and user data (see GUIDATA)
895
896% Hint: get(hObject,'Value') returns toggle state of Link_RX_3
897
898
899% --- Executes on button press in Link_RX_4.
900function Link_RX_4_Callback(hObject, eventdata, handles)
901% hObject    handle to Link_RX_4 (see GCBO)
902% eventdata  reserved - to be defined in a future version of MATLAB
903% handles    structure with handles and user data (see GUIDATA)
904
905% Hint: get(hObject,'Value') returns toggle state of Link_RX_4
906
907
908% --- Executes on button press in checkbox5.
909function checkbox5_Callback(hObject, eventdata, handles)
910% hObject    handle to checkbox5 (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
914% Hint: get(hObject,'Value') returns toggle state of checkbox5
915
916
917% --- Executes on button press in checkbox6.
918function checkbox6_Callback(hObject, eventdata, handles)
919% hObject    handle to checkbox6 (see GCBO)
920% eventdata  reserved - to be defined in a future version of MATLAB
921% handles    structure with handles and user data (see GUIDATA)
922
923% Hint: get(hObject,'Value') returns toggle state of checkbox6
924
925
926% --- Executes on button press in checkbox7.
927function checkbox7_Callback(hObject, eventdata, handles)
928% hObject    handle to checkbox7 (see GCBO)
929% eventdata  reserved - to be defined in a future version of MATLAB
930% handles    structure with handles and user data (see GUIDATA)
931
932% Hint: get(hObject,'Value') returns toggle state of checkbox7
933
934
935% --- Executes on button press in checkbox8.
936function checkbox8_Callback(hObject, eventdata, handles)
937% hObject    handle to checkbox8 (see GCBO)
938% eventdata  reserved - to be defined in a future version of MATLAB
939% handles    structure with handles and user data (see GUIDATA)
940
941% Hint: get(hObject,'Value') returns toggle state of checkbox8
942
943
944
945function Time_frame_cnt_Callback(hObject, eventdata, handles)
946% hObject    handle to Time_frame_cnt (see GCBO)
947% eventdata  reserved - to be defined in a future version of MATLAB
948% handles    structure with handles and user data (see GUIDATA)
949
950% Hints: get(hObject,'String') returns contents of Time_frame_cnt as text
951%        str2double(get(hObject,'String')) returns contents of Time_frame_cnt as a double
952
953
954% --- Executes during object creation, after setting all properties.
955function Time_frame_cnt_CreateFcn(hObject, eventdata, handles)
956% hObject    handle to Time_frame_cnt (see GCBO)
957% eventdata  reserved - to be defined in a future version of MATLAB
958% handles    empty - handles not created until after all CreateFcns called
959
960% Hint: edit controls usually have a white background on Windows.
961%       See ISPC and COMPUTER.
962if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
963    set(hObject,'BackgroundColor','white');
964end
965
966
967% --- Executes on button press in Link_TX_1.
968function Link_TX_1_Callback(hObject, eventdata, handles)
969% hObject    handle to Link_TX_1 (see GCBO)
970% eventdata  reserved - to be defined in a future version of MATLAB
971% handles    structure with handles and user data (see GUIDATA)
972
973% Hint: get(hObject,'Value') returns toggle state of Link_TX_1
974
975
976% --- Executes on button press in Link_TX_2.
977function Link_TX_2_Callback(hObject, eventdata, handles)
978% hObject    handle to Link_TX_2 (see GCBO)
979% eventdata  reserved - to be defined in a future version of MATLAB
980% handles    structure with handles and user data (see GUIDATA)
981
982% Hint: get(hObject,'Value') returns toggle state of Link_TX_2
983
984
985% --- Executes on button press in Link_TX_3.
986function Link_TX_3_Callback(hObject, eventdata, handles)
987% hObject    handle to Link_TX_3 (see GCBO)
988% eventdata  reserved - to be defined in a future version of MATLAB
989% handles    structure with handles and user data (see GUIDATA)
990
991% Hint: get(hObject,'Value') returns toggle state of Link_TX_3
992
993
994% --- Executes on button press in Link_TX_4.
995function Link_TX_4_Callback(hObject, eventdata, handles)
996% hObject    handle to Link_TX_4 (see GCBO)
997% eventdata  reserved - to be defined in a future version of MATLAB
998% handles    structure with handles and user data (see GUIDATA)
999
1000% Hint: get(hObject,'Value') returns toggle state of Link_TX_4
1001
1002
1003% --- Executes on button press in init_CC_all.
1004function init_CC_all_Callback(hObject, eventdata, handles)
1005% hObject    handle to init_CC_all (see GCBO)
1006% eventdata  reserved - to be defined in a future version of MATLAB
1007% handles    structure with handles and user data (see GUIDATA)
1008
1009time_frame_lenght=str2num(get(handles.time_frame_length,'String'))
1010MGT_powerdown=str2num(get(handles.MGT_powerdown,'String'))
1011MGT_loopback=str2num(get(handles.MGT_loopback,'String'))
1012buf_clr_dly=str2num(get(handles.Buf_clr_dly,'String'))
1013
1014dev=get(handles.Device_name,'String');
1015%clear new_goldenX
1016%clear new_goldenZ
1017clear last_goldenX
1018clear last_goldenZ
1019uiopen('load')
1020h = waitbar(0,'Please wait...');
1021for (i=1:1:120)
1022device_name=dev{i}
1023id=Get_index(device_name)
1024fofb_init_CC(device_name,id,time_frame_lenght,MGT_powerdown,MGT_loopback,buf_clr_dly,new_goldenX(id),new_goldenZ(id));
1025waitbar(i/120,h);
1026end
1027last_goldenX=new_goldenX;
1028last_goldenZ=new_goldenZ;
1029
1030variables(1)={'last_goldenX'}
1031variables(2)={'last_goldenZ'}
1032
1033save('golden/last_golden','last_goldenX','last_goldenZ')
1034
1035close(h);
1036
1037% --- Executes on button press in Stop_CC_all.
1038function Stop_CC_all_Callback(hObject, eventdata, handles)
1039% hObject    handle to Stop_CC_all (see GCBO)
1040% eventdata  reserved - to be defined in a future version of MATLAB
1041% handles    structure with handles and user data (see GUIDATA)
1042h=waitbar(0,'please wait.....');
1043dev=get(handles.Device_name,'String');
1044device_alim_list=dev(1:120,:);
1045groupe=create_group_from_list(device_alim_list);
1046waitbar(1/2,h);
1047fofb_stop_CC(groupe);
1048tango_group_kill(groupe);
1049waitbar(1,h);
1050close(h)
1051
1052% --- Executes on button press in Arm_CC_all.
1053function Arm_CC_all_Callback(hObject, eventdata, handles)
1054% hObject    handle to Arm_CC_all (see GCBO)
1055% eventdata  reserved - to be defined in a future version of MATLAB
1056% handles    structure with handles and user data (see GUIDATA)
1057h=waitbar(0,'please wait.....');
1058dev=get(handles.Device_name,'String');
1059device_alim_list=dev(1:120,:)
1060groupe=create_group_from_list(device_alim_list);
1061waitbar(1/2,h);
1062data_selection=get(handles.radiobutton2,'value')
1063time_frame_cnt_limit_value=str2num(get(handles.time_frame_count_limit_value,'String'));
1064fofb_arm_CC(groupe,time_frame_cnt_limit_value,data_selection);
1065tango_group_kill(groupe);
1066waitbar(1,h);
1067close(h)
1068
1069function BPM_id_Callback(hObject, eventdata, handles)
1070% hObject    handle to BPM_id (see GCBO)
1071% eventdata  reserved - to be defined in a future version of MATLAB
1072% handles    structure with handles and user data (see GUIDATA)
1073
1074% Hints: get(hObject,'String') returns contents of BPM_id as text
1075%        str2double(get(hObject,'String')) returns contents of BPM_id as a double
1076
1077
1078% --- Executes during object creation, after setting all properties.
1079function BPM_id_CreateFcn(hObject, eventdata, handles)
1080% hObject    handle to BPM_id (see GCBO)
1081% eventdata  reserved - to be defined in a future version of MATLAB
1082% handles    empty - handles not created until after all CreateFcns called
1083
1084% Hint: edit controls usually have a white background on Windows.
1085%       See ISPC and COMPUTER.
1086if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1087    set(hObject,'BackgroundColor','white');
1088end
1089
1090
1091% --- Executes on selection change in RAM_X.
1092function RAM_X_Callback(hObject, eventdata, handles)
1093% hObject    handle to RAM_X (see GCBO)
1094% eventdata  reserved - to be defined in a future version of MATLAB
1095% handles    structure with handles and user data (see GUIDATA)
1096
1097% Hints: contents = get(hObject,'String') returns RAM_X contents as cell array
1098%        contents{get(hObject,'Value')} returns selected item from RAM_X
1099
1100
1101% --- Executes during object creation, after setting all properties.
1102function RAM_X_CreateFcn(hObject, eventdata, handles)
1103% hObject    handle to RAM_X (see GCBO)
1104% eventdata  reserved - to be defined in a future version of MATLAB
1105% handles    empty - handles not created until after all CreateFcns called
1106
1107% Hint: listbox controls usually have a white background on Windows.
1108%       See ISPC and COMPUTER.
1109if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1110    set(hObject,'BackgroundColor','white');
1111end
1112
1113
1114% --- Executes on selection change in RAM_Z.
1115function RAM_Z_Callback(hObject, eventdata, handles)
1116% hObject    handle to RAM_Z (see GCBO)
1117% eventdata  reserved - to be defined in a future version of MATLAB
1118% handles    structure with handles and user data (see GUIDATA)
1119
1120% Hints: contents = get(hObject,'String') returns RAM_Z contents as cell array
1121%        contents{get(hObject,'Value')} returns selected item from RAM_Z
1122
1123
1124% --- Executes during object creation, after setting all properties.
1125function RAM_Z_CreateFcn(hObject, eventdata, handles)
1126% hObject    handle to RAM_Z (see GCBO)
1127% eventdata  reserved - to be defined in a future version of MATLAB
1128% handles    empty - handles not created until after all CreateFcns called
1129
1130% Hint: listbox controls usually have a white background on Windows.
1131%       See ISPC and COMPUTER.
1132if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1133    set(hObject,'BackgroundColor','white');
1134end
1135
1136
1137
1138function time_frame_length_Callback(hObject, eventdata, handles)
1139% hObject    handle to time_frame_length (see GCBO)
1140% eventdata  reserved - to be defined in a future version of MATLAB
1141% handles    structure with handles and user data (see GUIDATA)
1142
1143% Hints: get(hObject,'String') returns contents of time_frame_length as text
1144%        str2double(get(hObject,'String')) returns contents of time_frame_length as a double
1145
1146
1147% --- Executes during object creation, after setting all properties.
1148function time_frame_length_CreateFcn(hObject, eventdata, handles)
1149% hObject    handle to time_frame_length (see GCBO)
1150% eventdata  reserved - to be defined in a future version of MATLAB
1151% handles    empty - handles not created until after all CreateFcns called
1152
1153% Hint: edit controls usually have a white background on Windows.
1154%       See ISPC and COMPUTER.
1155if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1156    set(hObject,'BackgroundColor','white');
1157end
1158
1159
1160
1161function MGT_powerdown_Callback(hObject, eventdata, handles)
1162% hObject    handle to MGT_powerdown (see GCBO)
1163% eventdata  reserved - to be defined in a future version of MATLAB
1164% handles    structure with handles and user data (see GUIDATA)
1165
1166% Hints: get(hObject,'String') returns contents of MGT_powerdown as text
1167%        str2double(get(hObject,'String')) returns contents of MGT_powerdown as a double
1168
1169
1170% --- Executes during object creation, after setting all properties.
1171function MGT_powerdown_CreateFcn(hObject, eventdata, handles)
1172% hObject    handle to MGT_powerdown (see GCBO)
1173% eventdata  reserved - to be defined in a future version of MATLAB
1174% handles    empty - handles not created until after all CreateFcns called
1175
1176% Hint: edit controls usually have a white background on Windows.
1177%       See ISPC and COMPUTER.
1178if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1179    set(hObject,'BackgroundColor','white');
1180end
1181
1182
1183
1184function MGT_loopback_Callback(hObject, eventdata, handles)
1185% hObject    handle to MGT_loopback (see GCBO)
1186% eventdata  reserved - to be defined in a future version of MATLAB
1187% handles    structure with handles and user data (see GUIDATA)
1188
1189% Hints: get(hObject,'String') returns contents of MGT_loopback as text
1190%        str2double(get(hObject,'String')) returns contents of MGT_loopback as a double
1191
1192
1193% --- Executes during object creation, after setting all properties.
1194function MGT_loopback_CreateFcn(hObject, eventdata, handles)
1195% hObject    handle to MGT_loopback (see GCBO)
1196% eventdata  reserved - to be defined in a future version of MATLAB
1197% handles    empty - handles not created until after all CreateFcns called
1198
1199% Hint: edit controls usually have a white background on Windows.
1200%       See ISPC and COMPUTER.
1201if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1202    set(hObject,'BackgroundColor','white');
1203end
1204
1205
1206
1207function Buf_clr_dly_Callback(hObject, eventdata, handles)
1208% hObject    handle to Buf_clr_dly (see GCBO)
1209% eventdata  reserved - to be defined in a future version of MATLAB
1210% handles    structure with handles and user data (see GUIDATA)
1211
1212% Hints: get(hObject,'String') returns contents of Buf_clr_dly as text
1213%        str2double(get(hObject,'String')) returns contents of Buf_clr_dly as a double
1214
1215
1216% --- Executes during object creation, after setting all properties.
1217function Buf_clr_dly_CreateFcn(hObject, eventdata, handles)
1218% hObject    handle to Buf_clr_dly (see GCBO)
1219% eventdata  reserved - to be defined in a future version of MATLAB
1220% handles    empty - handles not created until after all CreateFcns called
1221
1222% Hint: edit controls usually have a white background on Windows.
1223%       See ISPC and COMPUTER.
1224if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1225    set(hObject,'BackgroundColor','white');
1226end
1227
1228
1229
1230function Golden_X_Callback(hObject, eventdata, handles)
1231% hObject    handle to Golden_X (see GCBO)
1232% eventdata  reserved - to be defined in a future version of MATLAB
1233% handles    structure with handles and user data (see GUIDATA)
1234
1235% Hints: get(hObject,'String') returns contents of Golden_X as text
1236%        str2double(get(hObject,'String')) returns contents of Golden_X as a double
1237
1238
1239% --- Executes during object creation, after setting all properties.
1240function Golden_X_CreateFcn(hObject, eventdata, handles)
1241% hObject    handle to Golden_X (see GCBO)
1242% eventdata  reserved - to be defined in a future version of MATLAB
1243% handles    empty - handles not created until after all CreateFcns called
1244
1245% Hint: edit controls usually have a white background on Windows.
1246%       See ISPC and COMPUTER.
1247if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1248    set(hObject,'BackgroundColor','white');
1249end
1250
1251
1252
1253function Golden_Z_Callback(hObject, eventdata, handles)
1254% hObject    handle to Golden_Z (see GCBO)
1255% eventdata  reserved - to be defined in a future version of MATLAB
1256% handles    structure with handles and user data (see GUIDATA)
1257
1258% Hints: get(hObject,'String') returns contents of Golden_Z as text
1259%        str2double(get(hObject,'String')) returns contents of Golden_Z as a double
1260
1261
1262% --- Executes during object creation, after setting all properties.
1263function Golden_Z_CreateFcn(hObject, eventdata, handles)
1264% hObject    handle to Golden_Z (see GCBO)
1265% eventdata  reserved - to be defined in a future version of MATLAB
1266% handles    empty - handles not created until after all CreateFcns called
1267
1268% Hint: edit controls usually have a white background on Windows.
1269%       See ISPC and COMPUTER.
1270if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1271    set(hObject,'BackgroundColor','white');
1272end
1273
1274
1275
1276function time_frame_count_limit_value_Callback(hObject, eventdata, handles)
1277% hObject    handle to time_frame_count_limit_value (see GCBO)
1278% eventdata  reserved - to be defined in a future version of MATLAB
1279% handles    structure with handles and user data (see GUIDATA)
1280
1281% Hints: get(hObject,'String') returns contents of time_frame_count_limit_value as text
1282%        str2double(get(hObject,'String')) returns contents of time_frame_count_limit_value as a double
1283
1284
1285% --- Executes during object creation, after setting all properties.
1286function time_frame_count_limit_value_CreateFcn(hObject, eventdata, handles)
1287% hObject    handle to time_frame_count_limit_value (see GCBO)
1288% eventdata  reserved - to be defined in a future version of MATLAB
1289% handles    empty - handles not created until after all CreateFcns called
1290
1291% Hint: edit controls usually have a white background on Windows.
1292%       See ISPC and COMPUTER.
1293if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1294    set(hObject,'BackgroundColor','white');
1295end
1296
1297
1298% --- Executes on button press in Synchronize_all.
1299function Synchronize_all_Callback(hObject, eventdata, handles)
1300% hObject    handle to Synchronize_all (see GCBO)
1301% eventdata  reserved - to be defined in a future version of MATLAB
1302% handles    structure with handles and user data (see GUIDATA)
1303h=waitbar(0,'please wait.....');
1304dev=get(handles.Device_name,'String');
1305device_alim_list=dev(1:120,:)
1306groupe=create_group_from_list(device_alim_list);
1307waitbar(1/2,h);
1308tango_group_command_inout2(groupe,'SetTimeOnNextTrigger',1,1)
1309tango_group_kill(groupe);
1310waitbar(1,h);
1311close(h)
1312
1313
1314% --- Executes on button press in Trig_all.
1315function Trig_all_Callback(hObject, eventdata, handles)
1316% hObject    handle to Trig_all (see GCBO)
1317% eventdata  reserved - to be defined in a future version of MATLAB
1318% handles    structure with handles and user data (see GUIDATA)
1319h=waitbar(0,'please wait.....');
1320dev=get(handles.Device_name,'String');
1321device_alim_list=dev(1:120,:)
1322groupe=create_group_from_list(device_alim_list);
1323waitbar(1/2,h);
1324soft_trig_bpm;
1325tango_group_kill(groupe);
1326waitbar(1,h);
1327close(h)
1328
1329
1330% --- Executes on button press in RX_all.
1331function RX_all_Callback(hObject, eventdata, handles)
1332% hObject    handle to RX_all (see GCBO)
1333% eventdata  reserved - to be defined in a future version of MATLAB
1334% handles    structure with handles and user data (see GUIDATA)
1335dev=get(handles.Device_name,'String');
1336val_dev=get(handles.Device_name,'value');
1337h=waitbar(0,'please wait.....')
1338for i=1:1:120
1339    waitbar(i/120,h);
1340    device_name=dev{i};
1341    [CC_conf_reg,CC_Status_reg,RAM_X,RAM_Z]=fofb_read_cfg_memory(device_name);
1342    RX_array(i,1)=CC_conf_reg.bpm_id;
1343    RX_array(i,2)=CC_Status_reg.rx_pck_cnt_1;
1344    RX_array(i,3)=CC_Status_reg.rx_pck_cnt_2;
1345    RX_array(i,4)=CC_Status_reg.tx_pck_cnt_1;
1346    RX_array(i,5)=CC_Status_reg.tx_pck_cnt_2;
1347    RX_array(i,6)=CC_Status_reg.process_time;
1348    RX_array(i,7)=CC_Status_reg.frame_error_cnt_1;
1349    RX_array(i,8)=CC_Status_reg.frame_error_cnt_2;
1350    RX_array(i,9)=CC_Status_reg.soft_error_cnt_1;
1351    RX_array(i,10)=CC_Status_reg.soft_error_cnt_2;
1352   
1353end
1354%msgbox(num2str(RX_array),'toto')
1355RX_array
1356max(RX_array(:,6))
1357close(h)
1358
1359
1360
1361function X_value_Callback(hObject, eventdata, handles)
1362% hObject    handle to X_value (see GCBO)
1363% eventdata  reserved - to be defined in a future version of MATLAB
1364% handles    structure with handles and user data (see GUIDATA)
1365
1366% Hints: get(hObject,'String') returns contents of X_value as text
1367%        str2double(get(hObject,'String')) returns contents of X_value as a double
1368
1369
1370% --- Executes during object creation, after setting all properties.
1371function X_value_CreateFcn(hObject, eventdata, handles)
1372% hObject    handle to X_value (see GCBO)
1373% eventdata  reserved - to be defined in a future version of MATLAB
1374% handles    empty - handles not created until after all CreateFcns called
1375
1376% Hint: edit controls usually have a white background on Windows.
1377%       See ISPC and COMPUTER.
1378if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1379    set(hObject,'BackgroundColor','white');
1380end
1381
1382
1383
1384function Z_value_Callback(hObject, eventdata, handles)
1385% hObject    handle to Z_value (see GCBO)
1386% eventdata  reserved - to be defined in a future version of MATLAB
1387% handles    structure with handles and user data (see GUIDATA)
1388
1389% Hints: get(hObject,'String') returns contents of Z_value as text
1390%        str2double(get(hObject,'String')) returns contents of Z_value as a double
1391
1392
1393% --- Executes during object creation, after setting all properties.
1394function Z_value_CreateFcn(hObject, eventdata, handles)
1395% hObject    handle to Z_value (see GCBO)
1396% eventdata  reserved - to be defined in a future version of MATLAB
1397% handles    empty - handles not created until after all CreateFcns called
1398
1399% Hint: edit controls usually have a white background on Windows.
1400%       See ISPC and COMPUTER.
1401if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1402    set(hObject,'BackgroundColor','white');
1403end
1404
1405
1406% --- Executes on button press in Xon.
1407function Xon_Callback(hObject, eventdata, handles)
1408% hObject    handle to Xon (see GCBO)
1409% eventdata  reserved - to be defined in a future version of MATLAB
1410% handles    structure with handles and user data (see GUIDATA)
1411
1412% Hint: get(hObject,'Value') returns toggle state of Xon
1413
1414
1415% --- Executes on button press in Zon.
1416function Zon_Callback(hObject, eventdata, handles)
1417% hObject    handle to Zon (see GCBO)
1418% eventdata  reserved - to be defined in a future version of MATLAB
1419% handles    structure with handles and user data (see GUIDATA)
1420
1421% Hint: get(hObject,'Value') returns toggle state of Zon
1422
1423
1424% --- Executes on button press in apply_ram.
1425function apply_ram_Callback(hObject, eventdata, handles)
1426% hObject    handle to apply_ram (see GCBO)
1427% eventdata  reserved - to be defined in a future version of MATLAB
1428% handles    structure with handles and user data (see GUIDATA)
1429
1430coeff_X=str2num(get(handles.X_value,'string'))
1431coeff_Z=str2num(get(handles.Z_value,'string'))
1432on_X=(get(handles.Xon,'value'))
1433on_Z=(get(handles.Zon,'value'))
1434
1435dev=get(handles.Device_name,'String');
1436val_dev=get(handles.Device_name,'value');
1437device_name=dev{val_dev}
1438all_bpm=get(handles.all_bpm,'value');
1439if all_bpm==1
1440    device_alim_list=dev(1:120,:);
1441else
1442    device_alim_list=dev(val_dev,:);
1443end;
1444groupe=create_group_from_list(device_alim_list);
1445fofb_write_matrix(groupe,coeff_X,coeff_Z,on_X,on_Z);
1446% k=1
1447% for i=1:1:10000
1448%     fofb_write_matrix(groupe,1000,0,on_X,on_Z);
1449%     i
1450%     pause(k)
1451%     fofb_write_matrix(groupe,1000,10,on_X,on_Z);
1452%     pause(k)
1453% end
1454tango_group_kill(groupe);
1455% --- Executes on button press in all_bpm.
1456function all_bpm_Callback(hObject, eventdata, handles)
1457% hObject    handle to all_bpm (see GCBO)
1458% eventdata  reserved - to be defined in a future version of MATLAB
1459% handles    structure with handles and user data (see GUIDATA)
1460
1461% Hint: get(hObject,'Value') returns toggle state of all_bpm
1462
1463
1464% --- Executes on button press in load_matrix.
1465function load_matrix_Callback(hObject, eventdata, handles)
1466% hObject    handle to load_matrix (see GCBO)
1467% eventdata  reserved - to be defined in a future version of MATLAB
1468% handles    structure with handles and user data (see GUIDATA)
1469dev=get(handles.dev_list_for_matrix,'String')
1470clear matrixX
1471clear matrixZ
1472uiopen('load')
1473h = waitbar(0,'Please wait...');
1474
1475for (i=1:1:48)
1476device_name=dev{i};
1477fofb_load_matrix(device_name,matrixX(i,:),matrixZ(i,:));
1478waitbar(i/48,h);
1479id=Get_index(device_name)
1480end
1481close(h);
1482
1483
1484% --- Executes on button press in fofb_config.
1485function fofb_config_Callback(hObject, eventdata, handles)
1486% hObject    handle to fofb_config (see GCBO)
1487% eventdata  reserved - to be defined in a future version of MATLAB
1488% handles    structure with handles and user data (see GUIDATA)
1489
1490comm_X=(get(handles.comm_x,'value'))
1491comm_Z=(get(handles.comm_z,'value'))
1492bypass_fir_X=(get(handles.enable_fofb_x,'value'))
1493bypass_fir_Z=(get(handles.enable_fofb_z,'value'))
1494trig_enable_X=(get(handles.trig_enable_x,'value'))
1495trig_enable_Z=(get(handles.trig_enable_z,'value'))
1496mux_conf0_X=(get(handles.mux_conf0_x,'value'))
1497mux_conf0_Z=(get(handles.mux_conf0_z,'value'))
1498mux_conf1_X=(get(handles.mux_conf1_x,'value'))
1499mux_conf1_Z=(get(handles.mux_conf1_z,'value'))
1500
1501coeff1_x=int32(str2num(get(handles.coeff1_x,'string'))*2^14)
1502coeff1_z=int32(str2num(get(handles.coeff1_z,'string'))*2^14)
1503
1504coeff1_x*(2^16)
1505X_conf=comm_X+2*bypass_fir_X+4*trig_enable_X+8*mux_conf0_X+16*mux_conf1_X+2^16*coeff1_x
1506Z_conf=comm_Z+2*bypass_fir_Z+4*trig_enable_Z+8*mux_conf0_Z+16*mux_conf1_Z+2^16*coeff1_z
1507
1508
1509dev=get(handles.dev_list_for_matrix,'String');
1510val_dev=get(handles.dev_list_for_matrix,'value');
1511device_name=dev{val_dev};
1512all_bpm=get(handles.all_bpm,'value');
1513if all_bpm==1
1514    device_alim_list=dev(1:48,:);
1515else
1516    device_alim_list=dev(val_dev,:);
1517end;
1518groupe=create_group_from_list(device_alim_list);
1519
1520
1521fofb_config(groupe,X_conf,Z_conf);
1522
1523tango_group_kill(groupe);
1524
1525% --- Executes on selection change in dev_list_for_matrix.
1526function dev_list_for_matrix_Callback(hObject, eventdata, handles)
1527% hObject    handle to dev_list_for_matrix (see GCBO)
1528% eventdata  reserved - to be defined in a future version of MATLAB
1529% handles    structure with handles and user data (see GUIDATA)
1530
1531% Hints: contents = get(hObject,'String') returns dev_list_for_matrix contents as cell array
1532%        contents{get(hObject,'Value')} returns selected item from dev_list_for_matrix
1533
1534
1535% --- Executes during object creation, after setting all properties.
1536function dev_list_for_matrix_CreateFcn(hObject, eventdata, handles)
1537% hObject    handle to dev_list_for_matrix (see GCBO)
1538% eventdata  reserved - to be defined in a future version of MATLAB
1539% handles    empty - handles not created until after all CreateFcns called
1540
1541% Hint: popupmenu controls usually have a white background on Windows.
1542%       See ISPC and COMPUTER.
1543if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1544    set(hObject,'BackgroundColor','white');
1545end
1546
1547
1548% --- Executes on button press in comm_x.
1549function comm_x_Callback(hObject, eventdata, handles)
1550% hObject    handle to comm_x (see GCBO)
1551% eventdata  reserved - to be defined in a future version of MATLAB
1552% handles    structure with handles and user data (see GUIDATA)
1553
1554% Hint: get(hObject,'Value') returns toggle state of comm_x
1555
1556
1557% --- Executes on button press in comm_z.
1558function comm_z_Callback(hObject, eventdata, handles)
1559% hObject    handle to comm_z (see GCBO)
1560% eventdata  reserved - to be defined in a future version of MATLAB
1561% handles    structure with handles and user data (see GUIDATA)
1562
1563% Hint: get(hObject,'Value') returns toggle state of comm_z
1564
1565
1566% --- Executes on button press in enable_fofb_x.
1567function enable_fofb_x_Callback(hObject, eventdata, handles)
1568% hObject    handle to enable_fofb_x (see GCBO)
1569% eventdata  reserved - to be defined in a future version of MATLAB
1570% handles    structure with handles and user data (see GUIDATA)
1571
1572% Hint: get(hObject,'Value') returns toggle state of enable_fofb_x
1573
1574
1575% --- Executes on button press in enable_fofb_z.
1576function enable_fofb_z_Callback(hObject, eventdata, handles)
1577% hObject    handle to enable_fofb_z (see GCBO)
1578% eventdata  reserved - to be defined in a future version of MATLAB
1579% handles    structure with handles and user data (see GUIDATA)
1580
1581% Hint: get(hObject,'Value') returns toggle state of enable_fofb_z
1582
1583
1584% --- Executes on button press in trig_enable_x.
1585function trig_enable_x_Callback(hObject, eventdata, handles)
1586% hObject    handle to trig_enable_x (see GCBO)
1587% eventdata  reserved - to be defined in a future version of MATLAB
1588% handles    structure with handles and user data (see GUIDATA)
1589
1590% Hint: get(hObject,'Value') returns toggle state of trig_enable_x
1591
1592
1593% --- Executes on button press in trig_enable_z.
1594function trig_enable_z_Callback(hObject, eventdata, handles)
1595% hObject    handle to trig_enable_z (see GCBO)
1596% eventdata  reserved - to be defined in a future version of MATLAB
1597% handles    structure with handles and user data (see GUIDATA)
1598
1599% Hint: get(hObject,'Value') returns toggle state of trig_enable_z
1600
1601
1602% --- Executes on button press in mux_conf0_x.
1603function mux_conf0_x_Callback(hObject, eventdata, handles)
1604% hObject    handle to mux_conf0_x (see GCBO)
1605% eventdata  reserved - to be defined in a future version of MATLAB
1606% handles    structure with handles and user data (see GUIDATA)
1607
1608% Hint: get(hObject,'Value') returns toggle state of mux_conf0_x
1609
1610
1611% --- Executes on button press in mux_conf0_z.
1612function mux_conf0_z_Callback(hObject, eventdata, handles)
1613% hObject    handle to mux_conf0_z (see GCBO)
1614% eventdata  reserved - to be defined in a future version of MATLAB
1615% handles    structure with handles and user data (see GUIDATA)
1616
1617% Hint: get(hObject,'Value') returns toggle state of mux_conf0_z
1618
1619
1620% --- Executes on button press in mux_conf1_x.
1621function mux_conf1_x_Callback(hObject, eventdata, handles)
1622% hObject    handle to mux_conf1_x (see GCBO)
1623% eventdata  reserved - to be defined in a future version of MATLAB
1624% handles    structure with handles and user data (see GUIDATA)
1625
1626% Hint: get(hObject,'Value') returns toggle state of mux_conf1_x
1627
1628
1629% --- Executes on button press in mux_conf1_z.
1630function mux_conf1_z_Callback(hObject, eventdata, handles)
1631% hObject    handle to mux_conf1_z (see GCBO)
1632% eventdata  reserved - to be defined in a future version of MATLAB
1633% handles    structure with handles and user data (see GUIDATA)
1634
1635% Hint: get(hObject,'Value') returns toggle state of mux_conf1_z
1636
1637
1638
1639function coeff1_x_Callback(hObject, eventdata, handles)
1640% hObject    handle to coeff1_x (see GCBO)
1641% eventdata  reserved - to be defined in a future version of MATLAB
1642% handles    structure with handles and user data (see GUIDATA)
1643
1644% Hints: get(hObject,'String') returns contents of coeff1_x as text
1645%        str2double(get(hObject,'String')) returns contents of coeff1_x as a double
1646
1647
1648% --- Executes during object creation, after setting all properties.
1649function coeff1_x_CreateFcn(hObject, eventdata, handles)
1650% hObject    handle to coeff1_x (see GCBO)
1651% eventdata  reserved - to be defined in a future version of MATLAB
1652% handles    empty - handles not created until after all CreateFcns called
1653
1654% Hint: edit controls usually have a white background on Windows.
1655%       See ISPC and COMPUTER.
1656if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1657    set(hObject,'BackgroundColor','white');
1658end
1659
1660
1661
1662function coeff1_z_Callback(hObject, eventdata, handles)
1663% hObject    handle to coeff1_z (see GCBO)
1664% eventdata  reserved - to be defined in a future version of MATLAB
1665% handles    structure with handles and user data (see GUIDATA)
1666
1667% Hints: get(hObject,'String') returns contents of coeff1_z as text
1668%        str2double(get(hObject,'String')) returns contents of coeff1_z as a double
1669
1670
1671% --- Executes during object creation, after setting all properties.
1672function coeff1_z_CreateFcn(hObject, eventdata, handles)
1673% hObject    handle to coeff1_z (see GCBO)
1674% eventdata  reserved - to be defined in a future version of MATLAB
1675% handles    empty - handles not created until after all CreateFcns called
1676
1677% Hint: edit controls usually have a white background on Windows.
1678%       See ISPC and COMPUTER.
1679if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1680    set(hObject,'BackgroundColor','white');
1681end
1682
1683
1684% --- Executes on button press in LP_Delay.
1685function LP_Delay_Callback(hObject, eventdata, handles)
1686% hObject    handle to LP_Delay (see GCBO)
1687% eventdata  reserved - to be defined in a future version of MATLAB
1688% handles    structure with handles and user data (see GUIDATA)
1689LP_ComDly
Note: See TracBrowser for help on using the repository browser.