0001 function varargout = synchro_injecteur3(varargin)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 gui_Singleton = 1;
0029 gui_State = struct('gui_Name', mfilename, ...
0030 'gui_Singleton', gui_Singleton, ...
0031 'gui_OpeningFcn', @synchro_injecteur3_OpeningFcn, ...
0032 'gui_OutputFcn', @synchro_injecteur3_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
0045
0046
0047
0048 function synchro_injecteur3_OpeningFcn(hObject, eventdata, handles, varargin)
0049
0050
0051
0052
0053
0054
0055
0056 handles.output = hObject;
0057 load('synchro_offset', 'inj_offset' , 'ext_offset')
0058 set(handles.inj_offset,'String',num2str(inj_offset));
0059 set(handles.ext_offset,'String',num2str(ext_offset));
0060
0061
0062 handles.periode = 1.36;
0063 set(handles.periode_edit,'String',num2str(handles.periode));
0064
0065 handles.mode = 'Mode=???';
0066 set(handles.edit_filling_relecture_tables,'Enable','off');
0067 set(handles.edit_filling_relecture_bunch,'Enable','off');
0068
0069 set(handles.panel_bpm,'Visible','off');
0070
0071 timer1=timer('StartDelay',1,...
0072 'ExecutionMode','fixedRate','Period',handles.periode,'TasksToExecute',Inf);
0073 timer1.TimerFcn = {@fonction_alex, hObject,eventdata, handles};
0074 setappdata(handles.figure1,'Timer',timer1);
0075
0076
0077 h = uibuttongroup('visible','off','Position',[0.1485 0.29 0.10 0.12],...
0078 'Title','','TitlePosition','centertop',...
0079 'BackgroundColor',[1 0.3 0 ]);
0080 u1 = uicontrol('Style','Radio','String','OFF','Tag','radiobutton1',...
0081 'pos',[45 20 40 25],'parent',h,'HandleVisibility','off',...
0082 'BackgroundColor',[1 0.3 0 ]);
0083 u2 = uicontrol('Style','Radio','String','ON','Tag','radiobutton2',...
0084 'pos',[45 50 40 25],'parent',h,'HandleVisibility','off',...
0085 'BackgroundColor',[1 0.3 0 ]);
0086 set(h,'SelectionChangeFcn',...
0087 {@uibuttongroup_SelectionChangeFcn,handles});
0088
0089 handles.off = u1;
0090 handles.on = u2;
0091
0092 set(h,'SelectedObject',u1);
0093 set(h,'Visible','on');
0094
0095
0096 set(handles.figure1,'CloseRequestFcn',{@Closinggui,timer1,handles.figure1});
0097
0098
0099 guidata(hObject, handles);
0100
0101
0102
0103
0104
0105
0106 function varargout = synchro_injecteur3_OutputFcn(hObject, eventdata, handles)
0107
0108
0109
0110
0111
0112
0113 varargout{1} = handles.output;
0114
0115
0116
0117 function alim_dipole_Callback(hObject, eventdata, handles)
0118
0119
0120
0121
0122
0123
0124 h=gcf
0125 delay=str2double(get(hObject,'String'));
0126 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay',delay);
0127
0128
0129 function alim_dipole_CreateFcn(hObject, eventdata, handles)
0130
0131
0132
0133
0134
0135
0136 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0137 set(hObject,'BackgroundColor','white');
0138 end
0139
0140
0141 function alim_qf_Callback(hObject, eventdata, handles)
0142
0143
0144
0145
0146
0147
0148
0149 delay=str2double(get(hObject,'String'));
0150 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay',delay);
0151
0152
0153 function alim_qf_CreateFcn(hObject, eventdata, handles)
0154
0155
0156
0157
0158
0159
0160 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0161 set(hObject,'BackgroundColor','white');
0162 end
0163
0164
0165
0166 function alim_qd_Callback(hObject, eventdata, handles)
0167
0168
0169
0170
0171
0172
0173
0174 delay=str2double(get(hObject,'String'));
0175 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay',delay);
0176
0177
0178 function alim_qd_CreateFcn(hObject, eventdata, handles)
0179
0180
0181
0182
0183
0184
0185 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0186 set(hObject,'BackgroundColor','white');
0187 end
0188
0189
0190
0191 function alim_sf_Callback(hObject, eventdata, handles)
0192
0193
0194
0195
0196
0197
0198
0199 delay=str2double(get(hObject,'String'));
0200 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay',delay);
0201
0202
0203 function alim_sf_CreateFcn(hObject, eventdata, handles)
0204
0205
0206
0207
0208
0209
0210 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0211 set(hObject,'BackgroundColor','white');
0212 end
0213
0214
0215
0216 function alim_sd_Callback(hObject, eventdata, handles)
0217
0218
0219
0220
0221
0222
0223
0224 delay=str2double(get(hObject,'String'));
0225 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay',delay);
0226
0227
0228
0229 function alim_sd_CreateFcn(hObject, eventdata, handles)
0230
0231
0232
0233
0234
0235
0236 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0237 set(hObject,'BackgroundColor','white');
0238 end
0239
0240
0241
0242 function boo_rf_Callback(hObject, eventdata, handles)
0243
0244
0245
0246
0247
0248
0249
0250 delay=str2double(get(hObject,'String'));
0251 tango_write_attribute2('BOO/SY/LOCAL.RF.1', 'rfTimeDelay',delay);
0252
0253
0254 function boo_rf_CreateFcn(hObject, eventdata, handles)
0255
0256
0257
0258
0259
0260
0261 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0262 set(hObject,'BackgroundColor','white');
0263 end
0264
0265
0266
0267 function lin_canon_Callback(hObject, eventdata, handles)
0268
0269
0270
0271
0272
0273
0274 inj_offset=str2double(get(handles.inj_offset,'String'));
0275 delay=str2double(get(hObject,'String'))+inj_offset;
0276 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay',delay);
0277
0278
0279
0280 function lin_canon_CreateFcn(hObject, eventdata, handles)
0281
0282
0283
0284
0285
0286
0287 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0288 set(hObject,'BackgroundColor','white');
0289 end
0290
0291
0292
0293 function lt1_emittance_Callback(hObject, eventdata, handles)
0294
0295
0296
0297
0298
0299
0300 inj_offset=str2double(get(handles.inj_offset,'String'));
0301 delay=str2double(get(hObject,'String'))+inj_offset;
0302 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay',delay);
0303
0304
0305 function lt1_emittance_CreateFcn(hObject, eventdata, handles)
0306
0307
0308
0309
0310
0311
0312 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0313 set(hObject,'BackgroundColor','white');
0314 end
0315
0316
0317
0318 function lt1_MC1_Callback(hObject, eventdata, handles)
0319
0320
0321
0322
0323
0324
0325 inj_offset=str2double(get(handles.inj_offset,'String'));
0326 delay=str2double(get(hObject,'String'))+inj_offset;
0327 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay',delay);
0328
0329
0330 function lt1_MC1_CreateFcn(hObject, eventdata, handles)
0331
0332
0333
0334
0335
0336
0337 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0338 set(hObject,'BackgroundColor','white');
0339 end
0340
0341
0342
0343 function lt1_MC2_Callback(hObject, eventdata, handles)
0344
0345
0346
0347
0348
0349
0350 inj_offset=str2double(get(handles.inj_offset,'String'));
0351 delay=str2double(get(hObject,'String'))+inj_offset;
0352 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay',delay);
0353
0354
0355 function lt1_MC2_CreateFcn(hObject, eventdata, handles)
0356
0357
0358
0359
0360
0361
0362 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0363 set(hObject,'BackgroundColor','white');
0364 end
0365
0366
0367
0368 function lt1_osc_Callback(hObject, eventdata, handles)
0369
0370
0371
0372
0373
0374
0375 inj_offset=str2double(get(handles.inj_offset,'String'));
0376 delay=str2double(get(hObject,'String'))+inj_offset;
0377 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay',delay);
0378
0379
0380
0381 function lt1_osc_CreateFcn(hObject, eventdata, handles)
0382
0383
0384
0385
0386
0387
0388 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0389 set(hObject,'BackgroundColor','white');
0390 end
0391
0392
0393
0394 function sdc1_Callback(hObject, eventdata, handles)
0395
0396
0397
0398
0399
0400
0401 inj_offset=str2double(get(handles.inj_offset,'String'));
0402 delay=str2double(get(hObject,'String'))+inj_offset;
0403 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay',delay);
0404
0405
0406 function sdc1_CreateFcn(hObject, eventdata, handles)
0407
0408
0409
0410
0411
0412
0413 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0414 set(hObject,'BackgroundColor','white');
0415 end
0416
0417
0418
0419 function boo_inj_septum_Callback(hObject, eventdata, handles)
0420
0421
0422
0423
0424
0425
0426 inj_offset=str2double(get(handles.inj_offset,'String'));
0427 delay=str2double(get(hObject,'String'))+inj_offset;
0428 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay',delay);
0429
0430
0431 function boo_inj_septum_CreateFcn(hObject, eventdata, handles)
0432
0433
0434
0435
0436
0437
0438 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0439 set(hObject,'BackgroundColor','white');
0440 end
0441
0442
0443
0444 function boo_inj_kicker_Callback(hObject, eventdata, handles)
0445
0446
0447
0448
0449
0450
0451 inj_offset=str2double(get(handles.inj_offset,'String'));
0452 delay=str2double(get(hObject,'String'))+inj_offset;
0453 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay',delay);
0454
0455
0456 function boo_inj_kicker_CreateFcn(hObject, eventdata, handles)
0457
0458
0459
0460
0461
0462
0463 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0464 set(hObject,'BackgroundColor','white');
0465 end
0466
0467
0468
0469 function boo_bpm_Callback(hObject, eventdata, handles)
0470
0471
0472
0473
0474
0475
0476
0477 inj_offset=str2double(get(handles.inj_offset,'String'));
0478 delay=str2double(get(hObject,'String'))+inj_offset;
0479 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay',delay);
0480 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigTimeDelay',delay);
0481 tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigTimeDelay',delay);
0482 tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigTimeDelay',delay);
0483
0484
0485
0486 function boo_bpm_CreateFcn(hObject, eventdata, handles)
0487
0488
0489
0490
0491
0492
0493 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0494 set(hObject,'BackgroundColor','white');
0495 end
0496
0497
0498
0499 function boo_nod_Callback(hObject, eventdata, handles)
0500
0501
0502
0503
0504
0505
0506 inj_offset=str2double(get(handles.inj_offset,'String'));
0507 delay=str2double(get(hObject,'String'))+inj_offset;
0508 tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigTimeDelay',delay);
0509
0510
0511 function boo_nod_CreateFcn(hObject, eventdata, handles)
0512
0513
0514
0515
0516
0517
0518 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0519 set(hObject,'BackgroundColor','white');
0520 end
0521
0522
0523
0524 function boo_dcct_Callback(hObject, eventdata, handles)
0525
0526
0527
0528
0529
0530
0531 inj_offset=str2double(get(handles.inj_offset,'String'));
0532 delay=str2double(get(hObject,'String'))+inj_offset;
0533 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay',delay);
0534
0535
0536 function boo_dcct_CreateFcn(hObject, eventdata, handles)
0537
0538
0539
0540
0541
0542
0543 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0544 set(hObject,'BackgroundColor','white');
0545 end
0546
0547
0548
0549 function boo_hall_Callback(hObject, eventdata, handles)
0550
0551
0552
0553
0554
0555
0556
0557
0558
0559 function boo_hall_CreateFcn(hObject, eventdata, handles)
0560
0561
0562
0563
0564
0565
0566 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0567 set(hObject,'BackgroundColor','white');
0568 end
0569
0570
0571
0572 function pc_address_Callback(hObject, eventdata, handles)
0573
0574
0575
0576
0577
0578
0579
0580 delay=str2double(get(hObject,'String'));
0581 tango_write_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay',delay);
0582
0583
0584 function pc_address_CreateFcn(hObject, eventdata, handles)
0585
0586
0587
0588
0589
0590
0591 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0592 set(hObject,'BackgroundColor','white');
0593 end
0594
0595
0596
0597 function inj_address_Callback(hObject, eventdata, handles)
0598
0599
0600
0601
0602
0603
0604
0605 delay=str2double(get(hObject,'String'));
0606 tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',delay);
0607
0608
0609 function inj_address_CreateFcn(hObject, eventdata, handles)
0610
0611
0612
0613
0614
0615
0616 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0617 set(hObject,'BackgroundColor','white');
0618 end
0619
0620
0621
0622 function edit21_Callback(hObject, eventdata, handles)
0623
0624
0625
0626
0627
0628
0629
0630
0631
0632 function edit21_CreateFcn(hObject, eventdata, handles)
0633
0634
0635
0636
0637
0638
0639 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0640 set(hObject,'BackgroundColor','white');
0641 end
0642
0643
0644
0645 function soft_address_Callback(hObject, eventdata, handles)
0646
0647
0648
0649
0650
0651
0652
0653 delay=str2double(get(hObject,'String'));
0654 tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',delay);
0655
0656
0657 function soft_address_CreateFcn(hObject, eventdata, handles)
0658
0659
0660
0661
0662
0663
0664 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0665 set(hObject,'BackgroundColor','white');
0666 end
0667
0668
0669
0670 function acquisition1_Callback(hObject, eventdata, handles)
0671
0672
0673
0674
0675 set(handles.inj_offset,'Enable','off');
0676 set(handles.sdc1,'Enable','off');
0677 set(handles.lin_canon,'Enable','off');
0678 set(handles.boo_bpm,'Enable','off');
0679 set(handles.lt1_emittance,'Enable','off');
0680 set(handles.lt1_MC1,'Enable','off');
0681 set(handles.lt1_MC2,'Enable','off');
0682 set(handles.lt1_osc,'Enable','off');
0683 set(handles.boo_dcct,'Enable','off');
0684 set(handles.boo_nod,'Enable','off');
0685 set(handles.boo_inj_septum,'Enable','off');
0686 set(handles.boo_inj_kicker,'Enable','off');
0687 set(handles.alim_dipole,'Enable','off');
0688 set(handles.alim_qf,'Enable','off');
0689 set(handles.alim_qd,'Enable','off');
0690 set(handles.alim_sf,'Enable','off');
0691 set(handles.alim_sd,'Enable','off');
0692 set(handles.boo_rf,'Enable','off');
0693 set(handles.lin_modulateur,'Enable','off');
0694 set(handles.ext_offset,'Enable','off');
0695 set(handles.boo_ext_dof,'Enable','off');
0696 set(handles.boo_ext_sept_p,'Enable','off');
0697 set(handles.boo_ext_sept_a,'Enable','off');
0698 set(handles.boo_ext_kicker,'Enable','off');
0699 set(handles.sdc2,'Enable','off');
0700 set(handles.lt2_emittance,'Enable','off');
0701 set(handles.lt2_osc,'Enable','off');
0702 set(handles.lt2_bpm,'Enable','off');
0703 set(handles.ans_inj_k1,'Enable','off');
0704 set(handles.ans_inj_k2,'Enable','off');
0705 set(handles.ans_inj_k3,'Enable','off');
0706 set(handles.ans_inj_k4,'Enable','off');
0707 set(handles.ans_inj_sept_p,'Enable','off');
0708 set(handles.ans_inj_sept_a,'Enable','off');
0709 set(handles.ans_bpm,'Enable','off');
0710 set(handles.ans_dcct,'Enable','off');
0711 set(handles.ans_bpm_c01,'Enable','off');
0712 set(handles.ans_bpm_c02,'Enable','off');
0713 set(handles.ans_bpm_c03,'Enable','off');
0714 set(handles.ans_bpm_c04,'Enable','off');
0715 set(handles.ans_bpm_c05,'Enable','off');
0716 set(handles.ans_bpm_c06,'Enable','off');
0717 set(handles.ans_bpm_c07,'Enable','off');
0718 set(handles.ans_bpm_c08,'Enable','off');
0719 set(handles.ans_bpm_c09,'Enable','off');
0720 set(handles.ans_bpm_c10,'Enable','off');
0721 set(handles.ans_bpm_c11,'Enable','off');
0722 set(handles.ans_bpm_c12,'Enable','off');
0723 set(handles.ans_bpm_c13,'Enable','off');
0724 set(handles.ans_bpm_c14,'Enable','off');
0725 set(handles.ans_bpm_c15,'Enable','off');
0726 set(handles.ans_bpm_c16,'Enable','off');
0727
0728
0729 n=1;
0730
0731 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay');
0732 set(handles.pc_address,'String',num2str(temp.value(n)));
0733
0734 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
0735 set(handles.inj_address,'String',num2str(temp.value(n)));
0736
0737 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
0738 set(handles.soft_address,'String',num2str(temp.value(n)));
0739
0740 temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue');
0741 set(handles.ext_address,'String',num2str(temp.value(n)));
0742
0743
0744 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay');
0745 set(handles.sdc1,'String',num2str(temp.value(n)));
0746
0747 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay');
0748 set(handles.lin_canon,'String',num2str(temp.value(n)));
0749
0750 temp=tango_read_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay');
0751 set(handles.boo_bpm,'String',num2str(temp.value(n)));
0752
0753 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay');
0754 set(handles.lt1_emittance,'String',num2str(temp.value(n)));
0755
0756 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay');
0757 set(handles.lt1_MC1,'String',num2str(temp.value(n)));
0758
0759 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay');
0760 set(handles.lt1_MC2,'String',num2str(temp.value(n)));
0761
0762 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay');
0763 set(handles.lt1_osc,'String',num2str(temp.value(n)));
0764
0765 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay');
0766 set(handles.boo_dcct,'String',num2str(temp.value(n)));
0767
0768 temp=tango_read_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigTimeDelay');
0769 set(handles.boo_nod,'String',num2str(temp.value(n)));
0770
0771 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay');
0772 set(handles.boo_inj_septum,'String',num2str(temp.value(n)));
0773
0774 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay');
0775 set(handles.boo_inj_kicker,'String',num2str(temp.value(n)));
0776
0777 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay');
0778 set(handles.alim_dipole,'String',num2str(temp.value(n)));
0779
0780 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay');
0781 set(handles.alim_qf,'String',num2str(temp.value(n)));
0782
0783 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay');
0784 set(handles.alim_qd,'String',num2str(temp.value(n)));
0785
0786 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay');
0787 set(handles.alim_sf,'String',num2str(temp.value(n)));
0788
0789 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay');
0790 set(handles.alim_sd,'String',num2str(temp.value(n)));
0791
0792 temp=tango_read_attribute2('BOO/SY/LOCAL.RF.1', 'rfTimeDelay');
0793 set(handles.boo_rf,'String',num2str(temp.value(n)));
0794
0795 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay');
0796 set(handles.lin_modulateur,'String',num2str(temp.value(n)));
0797
0798
0799
0800
0801
0802 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigTimeDelay');
0803 set(handles.boo_ext_dof,'String',num2str(temp.value(n)));
0804
0805 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigTimeDelay');
0806 set(handles.boo_ext_sept_p,'String',num2str(temp.value(n)));
0807
0808 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigTimeDelay');
0809 set(handles.boo_ext_sept_a,'String',num2str(temp.value(n)));
0810
0811 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigTimeDelay');
0812 set(handles.boo_ext_kicker,'String',num2str(temp.value(n)));
0813
0814
0815 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'spareTimeDelay');
0816 set(handles.sdc2,'String',num2str(temp.value(n)));
0817
0818 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvTimeDelay');
0819 set(handles.lt2_emittance,'String',num2str(temp.value(n)));
0820
0821 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctTimeDelay');
0822 set(handles.lt2_osc,'String',num2str(temp.value(n)));
0823
0824 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigTimeDelay');
0825 set(handles.lt2_bpm,'String',num2str(temp.value(n)));
0826
0827
0828
0829 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigTimeDelay');
0830 set(handles.ans_inj_k1,'String',num2str(temp.value(n)));
0831
0832 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigTimeDelay');
0833 set(handles.ans_inj_k2,'String',num2str(temp.value(n)));
0834
0835 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigTimeDelay');
0836 set(handles.ans_inj_k3,'String',num2str(temp.value(n)));
0837
0838 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigTimeDelay');
0839 set(handles.ans_inj_k4,'String',num2str(temp.value(n)));
0840
0841 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigTimeDelay');
0842 set(handles.ans_inj_sept_p,'String',num2str(temp.value(n)));
0843
0844 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigTimeDelay');
0845 set(handles.ans_inj_sept_a,'String',num2str(temp.value(n)));
0846
0847 temp=tango_read_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctTimeDelay');
0848 set(handles.ans_dcct,'String',num2str(temp.value(n)));
0849
0850 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigTimeDelay');
0851 set(handles.ans_bpm,'String',num2str(temp.value(n)));
0852 set(handles.ans_bpm_c01,'String',num2str(temp.value(n)));
0853
0854
0855 temp=tango_read_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0856 set(handles.ans_bpm_c02,'String',num2str(temp.value(n)));
0857 temp=tango_read_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0858 set(handles.ans_bpm_c03,'String',num2str(temp.value(n)));
0859 temp=tango_read_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0860 set(handles.ans_bpm_c04,'String',num2str(temp.value(n)));
0861 temp=tango_read_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0862 set(handles.ans_bpm_c05,'String',num2str(temp.value(n)));
0863 temp=tango_read_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0864 set(handles.ans_bpm_c06,'String',num2str(temp.value(n)));
0865 temp=tango_read_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0866 set(handles.ans_bpm_c07,'String',num2str(temp.value(n)));
0867 temp=tango_read_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0868 set(handles.ans_bpm_c08,'String',num2str(temp.value(n)));
0869 temp=tango_read_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0870 set(handles.ans_bpm_c09,'String',num2str(temp.value(n)));
0871 temp=tango_read_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0872 set(handles.ans_bpm_c10,'String',num2str(temp.value(n)));
0873 temp=tango_read_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0874 set(handles.ans_bpm_c11,'String',num2str(temp.value(n)));
0875 temp=tango_read_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0876 set(handles.ans_bpm_c12,'String',num2str(temp.value(n)));
0877 temp=tango_read_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0878 set(handles.ans_bpm_c13,'String',num2str(temp.value(n)));
0879 temp=tango_read_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0880 set(handles.ans_bpm_c14,'String',num2str(temp.value(n)));
0881 temp=tango_read_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0882 set(handles.ans_bpm_c15,'String',num2str(temp.value(n)));
0883 temp=tango_read_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
0884 set(handles.ans_bpm_c16,'String',num2str(temp.value(n)));
0885
0886
0887
0888
0889 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent');
0890 if (temp.value(n)==2)
0891 set(handles.soft_button,'Value',0);
0892 elseif (temp.value(n)==5)
0893 set(handles.soft_button,'Value',1);
0894 end
0895
0896
0897 temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue');
0898 offset=temp.value(1)*52;
0899 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TablesCurrentDepth');
0900 n=temp.value;
0901 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionDelayTable');
0902 table=temp.value(1:n)-offset;
0903 set(handles.edit_filling_relecture_tables,'String',[handles.mode, ' T=' , num2str(table)]);
0904
0905
0906
0907
0908 function acquisition2_Callback(hObject, eventdata, handles)
0909
0910
0911
0912
0913
0914 set(handles.inj_offset,'Enable','on');
0915 set(handles.sdc1,'Enable','on');
0916 set(handles.lin_canon,'Enable','on');
0917 set(handles.boo_bpm,'Enable','on');
0918 set(handles.lt1_emittance,'Enable','on');
0919 set(handles.lt1_MC1,'Enable','on');
0920 set(handles.lt1_MC2,'Enable','on');
0921 set(handles.lt1_osc,'Enable','on');
0922 set(handles.boo_dcct,'Enable','on');
0923 set(handles.boo_nod,'Enable','on');
0924 set(handles.boo_inj_septum,'Enable','on');
0925 set(handles.boo_inj_kicker,'Enable','on');
0926 set(handles.alim_dipole,'Enable','on');
0927 set(handles.alim_qf,'Enable','on');
0928 set(handles.alim_qd,'Enable','on');
0929 set(handles.alim_sf,'Enable','on');
0930 set(handles.alim_sd,'Enable','on');
0931 set(handles.boo_rf,'Enable','on');
0932 set(handles.lin_modulateur,'Enable','on');
0933 set(handles.ext_offset,'Enable','on');
0934 set(handles.boo_ext_dof,'Enable','on');
0935 set(handles.boo_ext_sept_p,'Enable','on');
0936 set(handles.boo_ext_sept_a,'Enable','on');
0937 set(handles.boo_ext_kicker,'Enable','on');
0938 set(handles.sdc2,'Enable','on');
0939 set(handles.lt2_emittance,'Enable','on');
0940 set(handles.lt2_osc,'Enable','on');
0941 set(handles.lt2_bpm,'Enable','on');
0942 set(handles.ans_inj_k1,'Enable','on');
0943 set(handles.ans_inj_k2,'Enable','on');
0944 set(handles.ans_inj_k3,'Enable','on');
0945 set(handles.ans_inj_k4,'Enable','on');
0946 set(handles.ans_inj_sept_p,'Enable','on');
0947 set(handles.ans_inj_sept_a,'Enable','on');
0948 set(handles.ans_bpm,'Enable','on');
0949 set(handles.ans_dcct,'Enable','on');
0950 set(handles.ans_bpm_c01,'Enable','on');
0951 set(handles.ans_bpm_c02,'Enable','on');
0952 set(handles.ans_bpm_c03,'Enable','on');
0953 set(handles.ans_bpm_c04,'Enable','on');
0954 set(handles.ans_bpm_c05,'Enable','on');
0955 set(handles.ans_bpm_c06,'Enable','on');
0956 set(handles.ans_bpm_c07,'Enable','on');
0957 set(handles.ans_bpm_c08,'Enable','on');
0958 set(handles.ans_bpm_c09,'Enable','on');
0959 set(handles.ans_bpm_c10,'Enable','on');
0960 set(handles.ans_bpm_c11,'Enable','on');
0961 set(handles.ans_bpm_c12,'Enable','on');
0962 set(handles.ans_bpm_c13,'Enable','on');
0963 set(handles.ans_bpm_c14,'Enable','on');
0964 set(handles.ans_bpm_c15,'Enable','on');
0965 set(handles.ans_bpm_c16,'Enable','on');
0966
0967
0968 n=1;
0969
0970 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay');
0971 set(handles.pc_address,'String',num2str(temp.value(n)));
0972
0973 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
0974 set(handles.inj_address,'String',num2str(temp.value(n)));
0975
0976 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
0977 set(handles.soft_address,'String',num2str(temp.value(n)));
0978 set(handles.soft_address1,'String',num2str(temp.value(n)));
0979
0980 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue');
0981 set(handles.ext_address,'String',num2str(temp.value(n)));
0982
0983
0984
0985 inj_offset=str2double(get(handles.inj_offset,'String'));
0986
0987 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay');
0988 set(handles.sdc1,'String',num2str(temp.value(n)-inj_offset));
0989
0990 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay');
0991 set(handles.lin_canon,'String',num2str(temp.value(n)-inj_offset));
0992
0993 temp=tango_read_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay');
0994 set(handles.boo_bpm,'String',num2str(temp.value(n)-inj_offset));
0995
0996 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay');
0997 set(handles.lt1_emittance,'String',num2str(temp.value(n)-inj_offset));
0998
0999 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay');
1000 set(handles.lt1_MC1,'String',num2str(temp.value(n)-inj_offset));
1001
1002 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay');
1003 set(handles.lt1_MC2,'String',num2str(temp.value(n)-inj_offset));
1004
1005 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay');
1006 set(handles.lt1_osc,'String',num2str(temp.value(n)-inj_offset));
1007
1008 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay');
1009 set(handles.boo_dcct,'String',num2str(temp.value(n)-inj_offset));
1010
1011 temp=tango_read_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigTimeDelay');
1012 set(handles.boo_nod,'String',num2str(temp.value(n)-inj_offset));
1013
1014 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay');
1015 set(handles.boo_inj_septum,'String',num2str(temp.value(n)-inj_offset));
1016
1017 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay');
1018 set(handles.boo_inj_kicker,'String',num2str(temp.value(n)-inj_offset));
1019
1020
1021
1022
1023 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay');
1024 set(handles.alim_dipole,'String',num2str(temp.value(n)));
1025
1026 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay');
1027 set(handles.alim_qf,'String',num2str(temp.value(n)));
1028
1029 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay');
1030 set(handles.alim_qd,'String',num2str(temp.value(n)));
1031
1032 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay');
1033 set(handles.alim_sf,'String',num2str(temp.value(n)));
1034
1035 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay');
1036 set(handles.alim_sd,'String',num2str(temp.value(n)));
1037
1038 temp=tango_read_attribute2('BOO/SY/LOCAL.RF.1', 'rfTimeDelay');
1039 set(handles.boo_rf,'String',num2str(temp.value(n)));
1040
1041 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay');
1042 set(handles.lin_modulateur,'String',num2str(temp.value(n)-inj_offset));
1043
1044
1045
1046 ext_offset=str2double(get(handles.ext_offset,'String'));
1047
1048
1049 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigTimeDelay');
1050 set(handles.boo_ext_dof,'String',num2str(temp.value(n)-ext_offset));
1051
1052 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigTimeDelay');
1053 set(handles.boo_ext_sept_p,'String',num2str(temp.value(n)-ext_offset));
1054
1055 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigTimeDelay');
1056 set(handles.boo_ext_sept_a,'String',num2str(temp.value(n)-ext_offset));
1057
1058 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigTimeDelay');
1059 set(handles.boo_ext_kicker,'String',num2str(temp.value(n)-ext_offset));
1060
1061 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'spareTimeDelay');
1062 set(handles.sdc2,'String',num2str(temp.value(n)-ext_offset));
1063
1064 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvTimeDelay');
1065 set(handles.lt2_emittance,'String',num2str(temp.value(n)-ext_offset));
1066
1067 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctTimeDelay');
1068 set(handles.lt2_osc,'String',num2str(temp.value(n)-ext_offset));
1069
1070 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigTimeDelay');
1071 set(handles.lt2_bpm,'String',num2str(temp.value(n)-ext_offset));
1072
1073
1074 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigTimeDelay');
1075 set(handles.ans_inj_k1,'String',num2str(temp.value(n)-ext_offset));
1076
1077 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigTimeDelay');
1078 set(handles.ans_inj_k2,'String',num2str(temp.value(n)-ext_offset));
1079
1080 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigTimeDelay');
1081 set(handles.ans_inj_k3,'String',num2str(temp.value(n)-ext_offset));
1082
1083 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigTimeDelay');
1084 set(handles.ans_inj_k4,'String',num2str(temp.value(n)-ext_offset));
1085
1086 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigTimeDelay');
1087 set(handles.ans_inj_sept_p,'String',num2str(temp.value(n)-ext_offset));
1088
1089 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigTimeDelay');
1090 set(handles.ans_inj_sept_a,'String',num2str(temp.value(n)-ext_offset));
1091
1092 temp=tango_read_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctTimeDelay');
1093 set(handles.ans_dcct,'String',num2str(temp.value(n)-ext_offset));
1094
1095 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigTimeDelay');
1096 set(handles.ans_bpm,'String',num2str(temp.value(n)-ext_offset));
1097 set(handles.ans_bpm_c01,'String',num2str(temp.value(n)-ext_offset));
1098 temp=tango_read_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1099 set(handles.ans_bpm_c02,'String',num2str(temp.value(n)-ext_offset));
1100 temp=tango_read_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1101 set(handles.ans_bpm_c03,'String',num2str(temp.value(n)-ext_offset));
1102 temp=tango_read_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1103 set(handles.ans_bpm_c04,'String',num2str(temp.value(n)-ext_offset));
1104 temp=tango_read_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1105 set(handles.ans_bpm_c05,'String',num2str(temp.value(n)-ext_offset));
1106 temp=tango_read_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1107 set(handles.ans_bpm_c06,'String',num2str(temp.value(n)-ext_offset));
1108 temp=tango_read_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1109 set(handles.ans_bpm_c07,'String',num2str(temp.value(n)-ext_offset));
1110 temp=tango_read_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1111 set(handles.ans_bpm_c08,'String',num2str(temp.value(n)-ext_offset));
1112 temp=tango_read_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1113 set(handles.ans_bpm_c09,'String',num2str(temp.value(n)-ext_offset));
1114 temp=tango_read_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1115 set(handles.ans_bpm_c10,'String',num2str(temp.value(n)-ext_offset));
1116 temp=tango_read_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1117 set(handles.ans_bpm_c11,'String',num2str(temp.value(n)-ext_offset));
1118 temp=tango_read_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1119 set(handles.ans_bpm_c12,'String',num2str(temp.value(n)-ext_offset));
1120 temp=tango_read_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1121 set(handles.ans_bpm_c13,'String',num2str(temp.value(n)-ext_offset));
1122 temp=tango_read_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1123 set(handles.ans_bpm_c14,'String',num2str(temp.value(n)-ext_offset));
1124 temp=tango_read_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1125 set(handles.ans_bpm_c15,'String',num2str(temp.value(n)-ext_offset));
1126 temp=tango_read_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigTimeDelay');
1127 set(handles.ans_bpm_c16,'String',num2str(temp.value(n)-ext_offset));
1128
1129
1130 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent');
1131 if (temp.value(n)==2)
1132 set(handles.soft_button,'Value',0);
1133 elseif (temp.value(n)==5)
1134 set(handles.soft_button,'Value',1);
1135 end
1136
1137
1138 temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue');
1139 offset=temp.value(1)*52;
1140 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TablesCurrentDepth');
1141 n=temp.value;
1142 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionDelayTable');
1143 table=temp.value(1:n)-offset;
1144 set(handles.edit_filling_relecture_tables,'String',[handles.mode, ' T=' , num2str(table)]);
1145
1146
1147 function soft_button_Callback(hObject, eventdata, handles)
1148
1149
1150
1151
1152
1153
1154 etat=get(hObject,'Value');
1155 tout=0.;
1156 if (etat==0)
1157 event=int32(2) ;
1158 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent',event); pause(tout);
1159 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent',event); pause(tout);
1160 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareEvent',event); pause(tout);
1161 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigEvent',event); pause(tout);
1162 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigEvent',event); pause(tout);
1163 tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigEvent',event); pause(tout);
1164 tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigEvent',event); pause(tout);
1165 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent',event); pause(tout);
1166 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event',event); pause(tout);
1167 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event',event); pause(tout);
1168 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent',event); pause(tout);
1169 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent',event); pause(tout);
1170 tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigEvent',event);pause(tout);
1171 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent',event); pause(tout);
1172 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent',event);
1173 event=int32(3) ;
1174 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent',event);pause(tout);
1175 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent',event);pause(tout);
1176 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent',event);pause(tout);
1177 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent',event);pause(tout);
1178 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent',event);pause(tout);
1179 tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigEvent',event);pause(tout);
1180 tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctEvent',event);pause(tout);
1181 tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvEvent',event);pause(tout);
1182 tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceEvent',event);pause(tout);
1183 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigEvent',event);pause(tout);
1184 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigEvent',event);pause(tout);
1185 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigEvent',event);pause(tout);
1186 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigEvent',event);pause(tout);
1187 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigEvent',event);pause(tout);
1188 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigEvent',event);pause(tout);
1189 tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctEvent',event);pause(tout);
1190 tango_write_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigEvent',event);pause(tout);
1191 tango_write_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1192 tango_write_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1193 tango_write_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1194 tango_write_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1195 tango_write_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1196 tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1197 tango_write_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1198 tango_write_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1199 tango_write_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1200 tango_write_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1201 tango_write_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1202 tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1203 tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1204 tango_write_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1205 tango_write_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1206
1207
1208
1209 inj=str2double(get(handles.inj_address,'String'));
1210 soft=str2double(get(handles.soft_address,'String'));
1211 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay');
1212 delay=temp.value(1)-(soft)+0.00568;
1213 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay',delay);
1214
1215
1216 elseif (etat==1)
1217 event=int32(5) ;
1218 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent',event); pause(tout);
1219 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent',event); pause(tout);
1220 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigEvent',event); pause(tout);
1221 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigEvent',event); pause(tout);
1222 tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigEvent',event); pause(tout);
1223 tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigEvent',event); pause(tout);
1224 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent',event); pause(tout);
1225 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event',event); pause(tout);
1226 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event',event); pause(tout);
1227 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent',event); pause(tout);
1228 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent',event); pause(tout);
1229 tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigEvent',event);pause(tout);
1230 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent',event); pause(tout);
1231 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent',event);
1232 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent',event);pause(tout);
1233 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent',event);pause(tout);
1234 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent',event);pause(tout);
1235 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent',event);pause(tout);
1236 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent',event);pause(tout);
1237 tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigEvent',event);pause(tout);
1238 tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctEvent',event);pause(tout);
1239 tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvEvent',event);pause(tout);
1240 tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceEvent',event);pause(tout);
1241 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigEvent',event);pause(tout);
1242 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigEvent',event);pause(tout);
1243 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigEvent',event);pause(tout);
1244 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigEvent',event);pause(tout);
1245 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigEvent',event);pause(tout);
1246 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigEvent',event);pause(tout);
1247 tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctEvent',event);pause(tout);
1248 tango_write_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigEvent',event);pause(tout);
1249 tango_write_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1250 tango_write_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1251 tango_write_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1252 tango_write_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1253 tango_write_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1254 tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1255 tango_write_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1256 tango_write_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1257 tango_write_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1258 tango_write_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1259 tango_write_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1260 tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1261 tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1262 tango_write_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1263 tango_write_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigEvent',event);pause(tout);
1264
1265
1266 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareEvent',int32(1)); pause(tout);
1267 inj=str2double(get(handles.inj_address,'String'));
1268 soft=str2double(get(handles.soft_address,'String'));
1269 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay');
1270 delay=temp.value(1)+(soft);
1271 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay',delay);
1272 end
1273 display('ok change address')
1274
1275
1276
1277 function push_soft_Callback(hObject, eventdata, handles)
1278
1279
1280
1281 disp('ça marche !!')
1282 tango_command_inout('ANS/SY/CENTRAL','FireSoftEvent');
1283
1284
1285
1286 function periode_edit_Callback(hObject, eventdata, handles)
1287
1288
1289
1290
1291
1292
1293
1294 val_multishot = get(handles.on,'Value');
1295
1296 if val_multishot
1297 errordlg('positionner le trigger a OFF !','Attention');
1298 return
1299 else
1300 handles.periode = str2double(get(hObject,'String'));
1301
1302
1303 timer1=timer('StartDelay',1,...
1304 'ExecutionMode','fixedRate','Period',handles.periode,'TasksToExecute',Inf);
1305 timer1.TimerFcn = {@fonction_alex, hObject,eventdata, handles};
1306 setappdata(handles.figure1,'Timer',timer1);
1307
1308
1309 guidata(hObject, handles);
1310 end
1311
1312
1313
1314 function periode_edit_CreateFcn(hObject, eventdata, handles)
1315
1316
1317
1318
1319
1320
1321 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1322 set(hObject,'BackgroundColor','white');
1323 end
1324
1325 function uibuttongroup_SelectionChangeFcn(hObject,eventdata,handles)
1326
1327
1328
1329
1330
1331 timer1 = getappdata(handles.figure1,'Timer');
1332 switch get(get(hObject,'SelectedObject'),'Tag')
1333 case 'radiobutton1'
1334
1335 stop(timer1);
1336
1337 case 'radiobutton2'
1338
1339 start(timer1);
1340
1341 end
1342
1343 function fonction_alex(arg1,arg2,hObject,eventdata,handles)
1344
1345
1346
1347
1348
1349 disp(datestr(clock))
1350 tango_command_inout('ANS/SY/CENTRAL','FireSoftEvent');
1351
1352
1353
1354
1355
1356
1357
1358
1359 function Closinggui(obj, event, handles, figure1)
1360
1361
1362 answer = questdlg('Fermer softsynchro ?',...
1363 'Exit softsynchro',...
1364 'Yes','No','Yes');
1365
1366 switch answer
1367 case 'Yes'
1368 delete(handles);
1369 delete(figure1);
1370 otherwise
1371 disp('Closing aborted')
1372 end
1373
1374
1375
1376
1377 function button_softmoins_Callback(hObject, eventdata, handles)
1378
1379
1380
1381
1382 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
1383 step=temp.value(1)-0.52243;
1384 tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',step);
1385 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
1386 set(handles.soft_address,'String',num2str(temp.value(1)));
1387
1388
1389 function button_softplus_Callback(hObject, eventdata, handles)
1390
1391
1392
1393
1394 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
1395 step=temp.value(1)+0.52243;
1396 tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',step);
1397 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
1398 set(handles.soft_address,'String',num2str(temp.value(1)));
1399
1400
1401
1402 function button_injmoins_Callback(hObject, eventdata, handles)
1403
1404
1405
1406 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
1407 step=temp.value(1)-0.52243;
1408 tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',step);
1409 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
1410 set(handles.inj_address,'String',num2str(temp.value(1)));
1411
1412
1413 function button_injplus_Callback(hObject, eventdata, handles)
1414
1415
1416
1417
1418 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
1419 step=temp.value(1)+0.52243;
1420 tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',step);
1421 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
1422 set(handles.inj_address,'String',num2str(temp.value(1)));
1423
1424
1425
1426 function boo_ext_dof_Callback(hObject, eventdata, handles)
1427
1428
1429
1430
1431
1432
1433 ext_offset=str2double(get(handles.ext_offset,'String'));
1434 delay=str2double(get(hObject,'String'))+ext_offset;
1435 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigTimeDelay',delay);
1436
1437
1438 function boo_ext_dof_CreateFcn(hObject, eventdata, handles)
1439
1440
1441
1442
1443
1444
1445 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1446 set(hObject,'BackgroundColor','white');
1447 end
1448
1449
1450
1451 function boo_ext_sept_p_Callback(hObject, eventdata, handles)
1452
1453
1454
1455
1456
1457
1458 ext_offset=str2double(get(handles.ext_offset,'String'));
1459 delay=str2double(get(hObject,'String'))+ext_offset;
1460 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigTimeDelay',delay);
1461
1462
1463 function boo_ext_sept_p_CreateFcn(hObject, eventdata, handles)
1464
1465
1466
1467
1468
1469
1470 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1471 set(hObject,'BackgroundColor','white');
1472 end
1473
1474
1475
1476 function boo_ext_sept_a_Callback(hObject, eventdata, handles)
1477
1478
1479
1480
1481
1482
1483 ext_offset=str2double(get(handles.ext_offset,'String'));
1484 delay=str2double(get(hObject,'String'))+ext_offset;
1485 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigTimeDelay',delay);
1486
1487
1488 function boo_ext_sept_a_CreateFcn(hObject, eventdata, handles)
1489
1490
1491
1492
1493
1494
1495 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1496 set(hObject,'BackgroundColor','white');
1497 end
1498
1499
1500
1501 function boo_ext_kicker_Callback(hObject, eventdata, handles)
1502
1503
1504
1505
1506
1507
1508 ext_offset=str2double(get(handles.ext_offset,'String'));
1509 delay=str2double(get(hObject,'String'))+ext_offset;
1510 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigTimeDelay',delay);
1511
1512
1513
1514 function boo_ext_kicker_CreateFcn(hObject, eventdata, handles)
1515
1516
1517
1518
1519
1520
1521 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1522 set(hObject,'BackgroundColor','white');
1523 end
1524
1525
1526
1527 function ans_inj_sept_p_Callback(hObject, eventdata, handles)
1528
1529
1530
1531
1532
1533
1534
1535 ext_offset=str2double(get(handles.ext_offset,'String'));
1536 delay=str2double(get(hObject,'String'))+ext_offset;
1537 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigTimeDelay',delay);
1538
1539
1540 function ans_inj_sept_p_CreateFcn(hObject, eventdata, handles)
1541
1542
1543
1544
1545
1546
1547 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1548 set(hObject,'BackgroundColor','white');
1549 end
1550
1551
1552
1553 function ans_inj_sept_a_Callback(hObject, eventdata, handles)
1554
1555
1556
1557
1558
1559
1560
1561 ext_offset=str2double(get(handles.ext_offset,'String'));
1562 delay=str2double(get(hObject,'String'))+ext_offset;
1563 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigTimeDelay',delay);
1564
1565
1566 function ans_inj_sept_a_CreateFcn(hObject, eventdata, handles)
1567
1568
1569
1570
1571
1572
1573 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1574 set(hObject,'BackgroundColor','white');
1575 end
1576
1577
1578
1579 function ans_inj_k1_Callback(hObject, eventdata, handles)
1580
1581
1582
1583
1584
1585
1586
1587 ext_offset=str2double(get(handles.ext_offset,'String'));
1588 delay=str2double(get(hObject,'String'))+ext_offset;
1589 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigTimeDelay',delay);
1590
1591
1592
1593
1594 function ans_inj_k1_CreateFcn(hObject, eventdata, handles)
1595
1596
1597
1598
1599
1600
1601 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1602 set(hObject,'BackgroundColor','white');
1603 end
1604
1605
1606
1607 function ans_inj_k2_Callback(hObject, eventdata, handles)
1608
1609
1610
1611
1612
1613
1614
1615 ext_offset=str2double(get(handles.ext_offset,'String'));
1616 delay=str2double(get(hObject,'String'))+ext_offset;
1617 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigTimeDelay',delay);
1618
1619
1620 function ans_inj_k2_CreateFcn(hObject, eventdata, handles)
1621
1622
1623
1624
1625
1626
1627 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1628 set(hObject,'BackgroundColor','white');
1629 end
1630
1631
1632
1633 function ans_inj_k3_Callback(hObject, eventdata, handles)
1634
1635
1636
1637
1638
1639
1640
1641 ext_offset=str2double(get(handles.ext_offset,'String'));
1642 delay=str2double(get(hObject,'String'))+ext_offset;
1643 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigTimeDelay',delay);
1644
1645
1646 function ans_inj_k3_CreateFcn(hObject, eventdata, handles)
1647
1648
1649
1650
1651
1652
1653 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1654 set(hObject,'BackgroundColor','white');
1655 end
1656
1657
1658
1659 function ans_inj_k4_Callback(hObject, eventdata, handles)
1660
1661
1662
1663
1664
1665
1666
1667 ext_offset=str2double(get(handles.ext_offset,'String'));
1668 delay=str2double(get(hObject,'String'))+ext_offset;
1669 tango_write_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigTimeDelay',delay);
1670
1671
1672 function ans_inj_k4_CreateFcn(hObject, eventdata, handles)
1673
1674
1675
1676
1677
1678
1679 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1680 set(hObject,'BackgroundColor','white');
1681 end
1682
1683
1684
1685 function ans_dcct_Callback(hObject, eventdata, handles)
1686
1687
1688
1689
1690
1691
1692
1693 ext_offset=str2double(get(handles.ext_offset,'String'));
1694 delay=str2double(get(hObject,'String'))+ext_offset;
1695 tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctTimeDelay',delay);
1696
1697
1698
1699 function ans_dcct_CreateFcn(hObject, eventdata, handles)
1700
1701
1702
1703
1704
1705
1706 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1707 set(hObject,'BackgroundColor','white');
1708 end
1709
1710
1711
1712 function ans_bpm_Callback(hObject, eventdata, handles)
1713
1714
1715
1716
1717
1718
1719
1720 ext_offset=str2double(get(handles.ext_offset,'String'));
1721 delay=str2double(get(hObject,'String'))+ext_offset;
1722 tango_write_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',delay);
1723 tango_write_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1724 tango_write_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1725 tango_write_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1726 tango_write_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1727 tango_write_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1728 tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1729 tango_write_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1730 tango_write_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1731 tango_write_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1732 tango_write_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1733 tango_write_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1734 tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1735 tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1736 tango_write_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1737 tango_write_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
1738
1739
1740
1741
1742 function ans_bpm_CreateFcn(hObject, eventdata, handles)
1743
1744
1745
1746
1747
1748
1749 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1750 set(hObject,'BackgroundColor','white');
1751 end
1752
1753
1754
1755 function ext_address_Callback(hObject, eventdata, handles)
1756
1757
1758
1759
1760
1761
1762
1763
1764 delay=str2double(get(hObject,'String'));
1765 tango_write_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue',delay);
1766
1767
1768 function ext_address_CreateFcn(hObject, eventdata, handles)
1769
1770
1771
1772
1773
1774
1775 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1776 set(hObject,'BackgroundColor','white');
1777 end
1778
1779
1780
1781 function soft_address1_Callback(hObject, eventdata, handles)
1782
1783
1784
1785
1786
1787
1788
1789 delay=str2double(get(hObject,'String'));
1790 tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',delay);
1791
1792
1793 function soft_address1_CreateFcn(hObject, eventdata, handles)
1794
1795
1796
1797
1798
1799
1800 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1801 set(hObject,'BackgroundColor','white');
1802 end
1803
1804
1805
1806 function radiobutton6_Callback(hObject, eventdata, handles)
1807
1808
1809
1810
1811
1812
1813
1814
1815 function pushbutton8_Callback(hObject, eventdata, handles)
1816
1817
1818
1819
1820
1821
1822 function pushbutton9_Callback(hObject, eventdata, handles)
1823
1824
1825
1826
1827
1828
1829 function button_extmoins_Callback(hObject, eventdata, handles)
1830
1831
1832
1833
1834 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue');
1835 step=temp.value(1)-52*0.52243;
1836 tango_write_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue',step);
1837 temp=tango_read_attribute2('ANS/SY/CENTRAL','ExtractionOffsetTimeValue');
1838 set(handles.ext_address,'String',num2str(temp.value(1)));
1839
1840
1841 function button_extplus_Callback(hObject, eventdata, handles)
1842
1843
1844
1845
1846 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue');
1847 step=temp.value(1)+52*0.52243;
1848 tango_write_attribute2('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue',step);
1849 temp=tango_read_attribute2('ANS/SY/CENTRAL','ExtractionOffsetTimeValue');
1850 set(handles.ext_address,'String',num2str(temp.value(1)));
1851
1852 function sdc2_Callback(hObject, eventdata, handles)
1853
1854
1855
1856
1857
1858
1859 ext_offset=str2double(get(handles.ext_offset,'String'));
1860 delay=str2double(get(hObject,'String'))+ext_offset;
1861 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareTimeDelay',delay);
1862
1863
1864 function sdc2_CreateFcn(hObject, eventdata, handles)
1865
1866
1867
1868
1869
1870
1871 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1872 set(hObject,'BackgroundColor','white');
1873 end
1874
1875
1876
1877 function lt2_emittance_Callback(hObject, eventdata, handles)
1878
1879
1880
1881
1882
1883
1884 ext_offset=str2double(get(handles.ext_offset,'String'));
1885 delay=str2double(get(hObject,'String'))+ext_offset;
1886 tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvTimeDelay',delay);
1887 tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'emittanceTimeDelay',delay);
1888
1889
1890
1891 function lt2_emittance_CreateFcn(hObject, eventdata, handles)
1892
1893
1894
1895
1896
1897
1898 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1899 set(hObject,'BackgroundColor','white');
1900 end
1901
1902
1903
1904 function lt2_bpm_Callback(hObject, eventdata, handles)
1905
1906
1907
1908
1909
1910
1911 ext_offset=str2double(get(handles.ext_offset,'String'));
1912 delay=str2double(get(hObject,'String'))+ext_offset;
1913 tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',delay);
1914
1915
1916 function lt2_bpm_CreateFcn(hObject, eventdata, handles)
1917
1918
1919
1920
1921
1922
1923 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1924 set(hObject,'BackgroundColor','white');
1925 end
1926
1927
1928
1929 function lt2_osc_Callback(hObject, eventdata, handles)
1930
1931
1932
1933
1934
1935
1936 ext_offset=str2double(get(handles.ext_offset,'String'));
1937 delay=str2double(get(hObject,'String'))+ext_offset;
1938 tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctTimeDelay',delay);
1939
1940
1941 function lt2_osc_CreateFcn(hObject, eventdata, handles)
1942
1943
1944
1945
1946
1947
1948 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1949 set(hObject,'BackgroundColor','white');
1950 end
1951
1952
1953
1954 function lin_modulateur_Callback(hObject, eventdata, handles)
1955
1956
1957
1958
1959
1960
1961 inj_offset=str2double(get(handles.inj_offset,'String'));
1962 delay=str2double(get(hObject,'String'))+inj_offset;
1963 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay',delay);
1964
1965
1966 function lin_modulateur_CreateFcn(hObject, eventdata, handles)
1967
1968
1969
1970
1971
1972
1973 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1974 set(hObject,'BackgroundColor','white');
1975 end
1976
1977
1978
1979 function inj_offset_Callback(hObject, eventdata, handles)
1980
1981
1982
1983
1984
1985
1986
1987 inj_offset=str2double(get(hObject,'String'));
1988 ext_offset=str2double(get(handles.ext_offset,'String'));
1989 save('synchro_offset', 'inj_offset' , 'ext_offset')
1990
1991
1992 delay=str2double(get(handles.lin_canon,'String'))+inj_offset;
1993 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay',delay);
1994
1995 delay=str2double(get(handles.lin_modulateur,'String'))+inj_offset;
1996 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTimeDelay',delay);
1997
1998 delay=str2double(get(handles.sdc1,'String'))+inj_offset;
1999 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay',delay);
2000
2001
2002
2003 delay=str2double(get(handles.lt1_MC2,'String'))+inj_offset;
2004 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay',delay);
2005
2006 delay=str2double(get(handles.lt1_MC1,'String'))+inj_offset;
2007 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay',delay);
2008
2009 delay=str2double(get(handles.lt1_emittance,'String'))+inj_offset;
2010 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay',delay);
2011
2012 delay=str2double(get(handles.lt1_osc,'String'))+inj_offset;
2013 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay',delay);
2014
2015
2016
2017 delay=str2double(get(handles.boo_inj_septum,'String'))+inj_offset;
2018 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay',delay);
2019
2020 delay=str2double(get(handles.boo_inj_kicker,'String'))+inj_offset;
2021 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay',delay);
2022
2023 delay=str2double(get(handles.boo_bpm,'String'))+inj_offset;
2024 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay',delay);
2025 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigTimeDelay',delay);
2026 tango_write_attribute2('BOO/SY/LOCAL.DG.2', 'bpm-btb.trigTimeDelay',delay);
2027 tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-btc.trigTimeDelay',delay);
2028
2029
2030 delay=str2double(get(handles.boo_nod,'String'))+inj_offset;
2031 tango_write_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigTimeDelay',delay);
2032
2033 delay=str2double(get(handles.boo_dcct,'String'))+inj_offset;
2034 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay',delay);
2035
2036
2037
2038
2039 function inj_offset_CreateFcn(hObject, eventdata, handles)
2040
2041
2042
2043
2044
2045
2046 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2047 set(hObject,'BackgroundColor','white');
2048 end
2049
2050
2051
2052 function ext_offset_Callback(hObject, eventdata, handles)
2053
2054
2055
2056
2057
2058
2059
2060 ext_offset=str2double(get(hObject,'String'));
2061 inj_offset=str2double(get(handles.inj_offset,'String'));
2062 save('synchro_offset', 'inj_offset' , 'ext_offset')
2063
2064
2065 delay=str2double(get(handles.boo_ext_dof,'String'))+ext_offset;
2066 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigTimeDelay',delay);
2067
2068 delay=str2double(get(handles.boo_ext_sept_p,'String'))+ext_offset;
2069 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigTimeDelay',delay);
2070
2071 delay=str2double(get(handles.boo_ext_sept_a,'String'))+ext_offset;
2072 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigTimeDelay',delay);
2073
2074 delay=str2double(get(handles.boo_ext_kicker,'String'))+ext_offset;
2075 tango_write_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigTimeDelay',delay);
2076
2077 delay=str2double(get(handles.sdc2,'String'))+ext_offset;
2078 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'spareTimeDelay',delay);
2079
2080
2081 delay=str2double(get(handles.lt2_bpm,'String'))+ext_offset;
2082 tango_write_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',delay);
2083
2084 delay=str2double(get(handles.lt2_osc,'String'))+ext_offset;
2085 tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctTimeDelay',delay);
2086
2087 delay=str2double(get(handles.lt2_emittance,'String'))+ext_offset;
2088 tango_write_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvTimeDelay',delay);
2089
2090
2091
2092 function ext_offset_CreateFcn(hObject, eventdata, handles)
2093
2094
2095
2096
2097
2098
2099 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2100 set(hObject,'BackgroundColor','white');
2101 end
2102
2103
2104
2105 function Acquisition_address_Callback(hObject, eventdata, handles)
2106
2107
2108
2109
2110 set(handles.inj_offset,'Enable','off');
2111 set(handles.sdc1,'Enable','off');
2112 set(handles.lin_canon,'Enable','off');
2113 set(handles.boo_bpm,'Enable','off');
2114 set(handles.lt1_emittance,'Enable','off');
2115 set(handles.lt1_MC1,'Enable','off');
2116 set(handles.lt1_MC2,'Enable','off');
2117 set(handles.lt1_osc,'Enable','off');
2118 set(handles.boo_dcct,'Enable','off');
2119 set(handles.boo_nod,'Enable','off');
2120 set(handles.boo_inj_septum,'Enable','off');
2121 set(handles.boo_inj_kicker,'Enable','off');
2122 set(handles.alim_dipole,'Enable','off');
2123 set(handles.alim_qf,'Enable','off');
2124 set(handles.alim_qd,'Enable','off');
2125 set(handles.alim_sf,'Enable','off');
2126 set(handles.alim_sd,'Enable','off');
2127 set(handles.boo_rf,'Enable','off');
2128 set(handles.lin_modulateur,'Enable','off');
2129 set(handles.ext_offset,'Enable','off');
2130 set(handles.boo_ext_dof,'Enable','off');
2131 set(handles.boo_ext_sept_p,'Enable','off');
2132 set(handles.boo_ext_sept_a,'Enable','off');
2133 set(handles.boo_ext_kicker,'Enable','off');
2134 set(handles.sdc2,'Enable','off');
2135 set(handles.lt2_emittance,'Enable','off');
2136 set(handles.lt2_osc,'Enable','off');
2137 set(handles.lt2_bpm,'Enable','off');
2138 set(handles.ans_inj_k1,'Enable','off');
2139 set(handles.ans_inj_k2,'Enable','off');
2140 set(handles.ans_inj_k3,'Enable','off');
2141 set(handles.ans_inj_k4,'Enable','off');
2142 set(handles.ans_inj_sept_p,'Enable','off');
2143 set(handles.ans_inj_sept_a,'Enable','off');
2144 set(handles.ans_bpm,'Enable','off');
2145 set(handles.ans_dcct,'Enable','off');
2146 set(handles.ans_bpm_c01,'Enable','off');
2147 set(handles.ans_bpm_c02,'Enable','off');
2148 set(handles.ans_bpm_c03,'Enable','off');
2149 set(handles.ans_bpm_c04,'Enable','off');
2150 set(handles.ans_bpm_c05,'Enable','off');
2151 set(handles.ans_bpm_c06,'Enable','off');
2152 set(handles.ans_bpm_c07,'Enable','off');
2153 set(handles.ans_bpm_c08,'Enable','off');
2154 set(handles.ans_bpm_c09,'Enable','off');
2155 set(handles.ans_bpm_c10,'Enable','off');
2156 set(handles.ans_bpm_c11,'Enable','off');
2157 set(handles.ans_bpm_c12,'Enable','off');
2158 set(handles.ans_bpm_c13,'Enable','off');
2159 set(handles.ans_bpm_c14,'Enable','off');
2160 set(handles.ans_bpm_c15,'Enable','off');
2161 set(handles.ans_bpm_c16,'Enable','off');
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171 n=1;
2172
2173 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay');
2174 set(handles.pc_address,'String',num2str(temp.value(n)));
2175
2176 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
2177 set(handles.inj_address,'String',num2str(temp.value(n)));
2178
2179 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
2180 set(handles.soft_address,'String',num2str(temp.value(n)));
2181
2182 temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue');
2183 set(handles.ext_address,'String',num2str(temp.value(n)));
2184
2185
2186 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent');
2187 set(handles.sdc1,'String',num2str(temp.value(n)));
2188
2189 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent');
2190 set(handles.lin_canon,'String',num2str(temp.value(n)));
2191
2192 temp=tango_read_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigEvent');
2193 set(handles.boo_bpm,'String',num2str(temp.value(n)));
2194
2195 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent');
2196 set(handles.lt1_emittance,'String',num2str(temp.value(n)));
2197
2198 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event');
2199 set(handles.lt1_MC1,'String',num2str(temp.value(n)));
2200
2201 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event');
2202 set(handles.lt1_MC2,'String',num2str(temp.value(n)));
2203
2204 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent');
2205 set(handles.lt1_osc,'String',num2str(temp.value(n)));
2206
2207 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent');
2208 set(handles.boo_dcct,'String',num2str(temp.value(n)));
2209
2210 temp=tango_read_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigEvent');
2211 set(handles.boo_nod,'String',num2str(temp.value(n)));
2212
2213 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent');
2214 set(handles.boo_inj_septum,'String',num2str(temp.value(n)));
2215
2216 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent');
2217 set(handles.boo_inj_kicker,'String',num2str(temp.value(n)));
2218
2219 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpEvent');
2220 set(handles.alim_dipole,'String',num2str(temp.value(n)));
2221
2222 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfEvent');
2223 set(handles.alim_qf,'String',num2str(temp.value(n)));
2224
2225 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdEvent');
2226 set(handles.alim_qd,'String',num2str(temp.value(n)));
2227
2228 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfEvent');
2229 set(handles.alim_sf,'String',num2str(temp.value(n)));
2230
2231 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdEvent');
2232 set(handles.alim_sd,'String',num2str(temp.value(n)));
2233
2234 temp=tango_read_attribute2('BOO/SY/LOCAL.RF.1', 'rfEvent');
2235 set(handles.boo_rf,'String',num2str(temp.value(n)));
2236
2237 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareEvent');
2238 set(handles.lin_modulateur,'String',num2str(temp.value(n)));
2239
2240
2241
2242
2243
2244 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigEvent');
2245 set(handles.boo_ext_dof,'String',num2str(temp.value(n)));
2246
2247 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigEvent');
2248 set(handles.boo_ext_sept_p,'String',num2str(temp.value(n)));
2249
2250 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigEvent');
2251 set(handles.boo_ext_sept_a,'String',num2str(temp.value(n)));
2252
2253 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigEvent');
2254 set(handles.boo_ext_kicker,'String',num2str(temp.value(n)));
2255
2256
2257
2258 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'spareEvent');
2259 set(handles.sdc2,'String',num2str(temp.value(n)));
2260
2261 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvEvent');
2262 set(handles.lt2_emittance,'String',num2str(temp.value(n)));
2263
2264 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctEvent');
2265 set(handles.lt2_osc,'String',num2str(temp.value(n)));
2266
2267 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigEvent');
2268 set(handles.lt2_bpm,'String',num2str(temp.value(n)));
2269
2270 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigEvent');
2271 set(handles.ans_inj_k1,'String',num2str(temp.value(n)));
2272
2273 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigEvent');
2274 set(handles.ans_inj_k2,'String',num2str(temp.value(n)));
2275
2276 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigEvent');
2277 set(handles.ans_inj_k3,'String',num2str(temp.value(n)));
2278
2279 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigEvent');
2280 set(handles.ans_inj_k4,'String',num2str(temp.value(n)));
2281
2282 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigEvent');
2283 set(handles.ans_inj_sept_p,'String',num2str(temp.value(n)));
2284
2285 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigEvent');
2286 set(handles.ans_inj_sept_a,'String',num2str(temp.value(n)));
2287
2288 temp=tango_read_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctEvent');
2289 set(handles.ans_dcct,'String',num2str(temp.value(n)));
2290
2291 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigEvent');
2292 set(handles.ans_bpm,'String',num2str(temp.value(n)));
2293 set(handles.ans_bpm_c01,'String',num2str(temp.value(n)));
2294
2295 temp=tango_read_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigEvent');
2296 set(handles.ans_bpm_c02,'String',num2str(temp.value(n)));
2297 temp=tango_read_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigEvent');
2298 set(handles.ans_bpm_c03,'String',num2str(temp.value(n)));
2299 temp=tango_read_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigEvent');
2300 set(handles.ans_bpm_c04,'String',num2str(temp.value(n)));
2301 temp=tango_read_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigEvent');
2302 set(handles.ans_bpm_c05,'String',num2str(temp.value(n)));
2303 temp=tango_read_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigEvent');
2304 set(handles.ans_bpm_c06,'String',num2str(temp.value(n)));
2305 temp=tango_read_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigEvent');
2306 set(handles.ans_bpm_c07,'String',num2str(temp.value(n)));
2307 temp=tango_read_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigEvent');
2308 set(handles.ans_bpm_c08,'String',num2str(temp.value(n)));
2309 temp=tango_read_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigEvent');
2310 set(handles.ans_bpm_c09,'String',num2str(temp.value(n)));
2311 temp=tango_read_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigEvent');
2312 set(handles.ans_bpm_c10,'String',num2str(temp.value(n)));
2313 temp=tango_read_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigEvent');
2314 set(handles.ans_bpm_c11,'String',num2str(temp.value(n)));
2315 temp=tango_read_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigEvent');
2316 set(handles.ans_bpm_c12,'String',num2str(temp.value(n)));
2317 temp=tango_read_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigEvent');
2318 set(handles.ans_bpm_c13,'String',num2str(temp.value(n)));
2319 temp=tango_read_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigEvent');
2320 set(handles.ans_bpm_c14,'String',num2str(temp.value(n)));
2321 temp=tango_read_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigEvent');
2322 set(handles.ans_bpm_c15,'String',num2str(temp.value(n)));
2323 temp=tango_read_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigEvent');
2324 set(handles.ans_bpm_c16,'String',num2str(temp.value(n)));
2325
2326
2327
2328
2329 function button_offinj_moins_Callback(hObject, eventdata, handles)
2330
2331
2332
2333
2334 temp=str2double(get(handles.inj_offset,'String'));
2335 step=temp-52*0.52243;
2336 set(handles.inj_offset,'String',step);
2337 inj_offset_Callback(handles.inj_offset, eventdata, handles);
2338
2339
2340 function button_offinj_plus_Callback(hObject, eventdata, handles)
2341
2342
2343
2344
2345 temp=str2double(get(handles.inj_offset,'String'));
2346 step=temp+52*0.52243;
2347 set(handles.inj_offset,'String',step);
2348 inj_offset_Callback(handles.inj_offset, eventdata, handles);
2349
2350
2351 function button_offext_moins_Callback(hObject, eventdata, handles)
2352
2353
2354
2355
2356 temp=str2double(get(handles.ext_offset,'String'));
2357 step=temp-52*0.52243;
2358 set(handles.ext_offset,'String',step);
2359 ext_offset_Callback(handles.ext_offset, eventdata, handles);
2360
2361
2362 function button_offext_plus_Callback(hObject, eventdata, handles)
2363
2364
2365
2366
2367 temp=str2double(get(handles.ext_offset,'String'));
2368 step=temp+52*0.52243;
2369 set(handles.ext_offset,'String',step);
2370 ext_offset_Callback(handles.ext_offset, eventdata, handles);
2371
2372
2373
2374 function button_bpm_Callback(hObject, eventdata, handles)
2375
2376
2377
2378
2379
2380
2381 bpm=get(hObject,'Value');
2382
2383 if (bpm==0)
2384 set(handles.panel_bpm,'Visible','off');
2385 elseif (bpm==1)
2386 set(handles.panel_bpm,'Visible','on');
2387 end
2388
2389
2390
2391 function ans_bpm_c01_Callback(hObject, eventdata, handles)
2392
2393
2394
2395
2396
2397
2398
2399 ext_offset=str2double(get(handles.ext_offset,'String'));
2400 delay=str2double(get(hObject,'String'))+ext_offset;
2401 tango_write_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigTimeDelay',delay);
2402
2403
2404 function ans_bpm_c01_CreateFcn(hObject, eventdata, handles)
2405
2406
2407
2408
2409
2410
2411 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2412 set(hObject,'BackgroundColor','white');
2413 end
2414
2415
2416 function ans_bpm_c02_Callback(hObject, eventdata, handles)
2417
2418
2419
2420
2421
2422
2423 ext_offset=str2double(get(handles.ext_offset,'String'));
2424 delay=str2double(get(hObject,'String'))+ext_offset;
2425 tango_write_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2426
2427
2428
2429 function ans_bpm_c02_CreateFcn(hObject, eventdata, handles)
2430
2431
2432
2433
2434
2435
2436 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2437 set(hObject,'BackgroundColor','white');
2438 end
2439
2440
2441
2442 function ans_bpm_c03_Callback(hObject, eventdata, handles)
2443
2444
2445
2446
2447
2448
2449 ext_offset=str2double(get(handles.ext_offset,'String'));
2450 delay=str2double(get(hObject,'String'))+ext_offset;
2451 tango_write_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2452
2453
2454
2455 function ans_bpm_c03_CreateFcn(hObject, eventdata, handles)
2456
2457
2458
2459
2460
2461
2462 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2463 set(hObject,'BackgroundColor','white');
2464 end
2465
2466
2467
2468 function ans_bpm_c04_Callback(hObject, eventdata, handles)
2469
2470
2471
2472
2473
2474
2475 ext_offset=str2double(get(handles.ext_offset,'String'));
2476 delay=str2double(get(hObject,'String'))+ext_offset;
2477 tango_write_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2478
2479
2480
2481 function ans_bpm_c04_CreateFcn(hObject, eventdata, handles)
2482
2483
2484
2485
2486
2487
2488 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2489 set(hObject,'BackgroundColor','white');
2490 end
2491
2492
2493
2494 function ans_bpm_c05_Callback(hObject, eventdata, handles)
2495
2496
2497
2498
2499
2500
2501 ext_offset=str2double(get(handles.ext_offset,'String'));
2502 delay=str2double(get(hObject,'String'))+ext_offset;
2503 tango_write_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2504
2505
2506
2507 function ans_bpm_c05_CreateFcn(hObject, eventdata, handles)
2508
2509
2510
2511
2512
2513
2514 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2515 set(hObject,'BackgroundColor','white');
2516 end
2517
2518
2519
2520 function ans_bpm_c06_Callback(hObject, eventdata, handles)
2521
2522
2523
2524
2525
2526
2527 ext_offset=str2double(get(handles.ext_offset,'String'));
2528 delay=str2double(get(hObject,'String'))+ext_offset;
2529 tango_write_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2530
2531
2532
2533 function ans_bpm_c06_CreateFcn(hObject, eventdata, handles)
2534
2535
2536
2537
2538
2539
2540 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2541 set(hObject,'BackgroundColor','white');
2542 end
2543
2544
2545
2546 function ans_bpm_c07_Callback(hObject, eventdata, handles)
2547
2548
2549
2550
2551
2552
2553 ext_offset=str2double(get(handles.ext_offset,'String'));
2554 delay=str2double(get(hObject,'String'))+ext_offset;
2555 tango_write_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2556
2557
2558
2559 function ans_bpm_c07_CreateFcn(hObject, eventdata, handles)
2560
2561
2562
2563
2564
2565
2566 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2567 set(hObject,'BackgroundColor','white');
2568 end
2569
2570
2571
2572 function ans_bpm_c08_Callback(hObject, eventdata, handles)
2573
2574
2575
2576
2577
2578
2579 ext_offset=str2double(get(handles.ext_offset,'String'));
2580 delay=str2double(get(hObject,'String'))+ext_offset;
2581 tango_write_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2582
2583
2584
2585 function ans_bpm_c08_CreateFcn(hObject, eventdata, handles)
2586
2587
2588
2589
2590
2591
2592 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2593 set(hObject,'BackgroundColor','white');
2594 end
2595
2596
2597
2598 function ans_bpm_c09_Callback(hObject, eventdata, handles)
2599
2600
2601
2602
2603
2604
2605 ext_offset=str2double(get(handles.ext_offset,'String'));
2606 delay=str2double(get(hObject,'String'))+ext_offset;
2607 tango_write_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2608
2609
2610
2611 function ans_bpm_c09_CreateFcn(hObject, eventdata, handles)
2612
2613
2614
2615
2616
2617
2618 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2619 set(hObject,'BackgroundColor','white');
2620 end
2621
2622
2623
2624 function ans_bpm_c10_Callback(hObject, eventdata, handles)
2625
2626
2627
2628
2629
2630
2631 ext_offset=str2double(get(handles.ext_offset,'String'));
2632 delay=str2double(get(hObject,'String'))+ext_offset;
2633 tango_write_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2634
2635
2636
2637 function ans_bpm_c10_CreateFcn(hObject, eventdata, handles)
2638
2639
2640
2641
2642
2643
2644 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2645 set(hObject,'BackgroundColor','white');
2646 end
2647
2648
2649
2650 function ans_bpm_c11_Callback(hObject, eventdata, handles)
2651
2652
2653
2654
2655
2656
2657 ext_offset=str2double(get(handles.ext_offset,'String'));
2658 delay=str2double(get(hObject,'String'))+ext_offset;
2659 tango_write_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2660
2661
2662
2663 function ans_bpm_c11_CreateFcn(hObject, eventdata, handles)
2664
2665
2666
2667
2668
2669
2670 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2671 set(hObject,'BackgroundColor','white');
2672 end
2673
2674
2675
2676 function ans_bpm_c12_Callback(hObject, eventdata, handles)
2677
2678
2679
2680
2681
2682
2683 ext_offset=str2double(get(handles.ext_offset,'String'));
2684 delay=str2double(get(hObject,'String'))+ext_offset;
2685 tango_write_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2686
2687
2688
2689 function ans_bpm_c12_CreateFcn(hObject, eventdata, handles)
2690
2691
2692
2693
2694
2695
2696 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2697 set(hObject,'BackgroundColor','white');
2698 end
2699
2700
2701
2702 function ans_bpm_c13_Callback(hObject, eventdata, handles)
2703
2704
2705
2706
2707
2708
2709 ext_offset=str2double(get(handles.ext_offset,'String'));
2710 delay=str2double(get(hObject,'String'))+ext_offset;
2711 tango_write_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2712
2713
2714
2715 function ans_bpm_c13_CreateFcn(hObject, eventdata, handles)
2716
2717
2718
2719
2720
2721
2722 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2723 set(hObject,'BackgroundColor','white');
2724 end
2725
2726
2727
2728 function ans_bpm_c14_Callback(hObject, eventdata, handles)
2729
2730
2731
2732
2733
2734
2735 ext_offset=str2double(get(handles.ext_offset,'String'));
2736 delay=str2double(get(hObject,'String'))+ext_offset;
2737 tango_write_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2738
2739
2740
2741 function ans_bpm_c14_CreateFcn(hObject, eventdata, handles)
2742
2743
2744
2745
2746
2747
2748 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2749 set(hObject,'BackgroundColor','white');
2750 end
2751
2752
2753
2754 function ans_bpm_c15_Callback(hObject, eventdata, handles)
2755
2756
2757
2758
2759
2760
2761 ext_offset=str2double(get(handles.ext_offset,'String'));
2762 delay=str2double(get(hObject,'String'))+ext_offset;
2763 tango_write_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2764
2765
2766
2767 function ans_bpm_c15_CreateFcn(hObject, eventdata, handles)
2768
2769
2770
2771
2772
2773
2774 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2775 set(hObject,'BackgroundColor','white');
2776 end
2777
2778
2779
2780 function ans_bpm_c16_Callback(hObject, eventdata, handles)
2781
2782
2783
2784
2785
2786
2787 ext_offset=str2double(get(handles.ext_offset,'String'));
2788 delay=str2double(get(hObject,'String'))+ext_offset;
2789 tango_write_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigTimeDelay',delay);
2790
2791
2792
2793 function ans_bpm_c16_CreateFcn(hObject, eventdata, handles)
2794
2795
2796
2797
2798
2799
2800 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2801 set(hObject,'BackgroundColor','white');
2802 end
2803
2804
2805
2806 function button_filling_14_Callback(hObject, eventdata, handles)
2807
2808
2809
2810 temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue');
2811 offset=temp.value(1)*52;
2812 bunch=[1];
2813 [dtour,dpaquet]=bucketnumber(bunch);
2814 table=int32([length(bunch) dtour dpaquet]);
2815 tango_command_inout('ANS/SY/CENTRAL','SetTables',table)
2816 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TablesCurrentDepth');
2817 n=temp.value;
2818 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionDelayTable');
2819 table=temp.value(1:n)-offset;
2820 handles.mode='Mode=1/4';
2821 set(handles.edit_filling_relecture_tables,'String',[handles.mode, ' T=' , num2str(table)]);
2822 set(handles.edit_filling_relecture_bunch,'String',[handles.mode, ' B=' , num2str(bunch)]);
2823 guidata(hObject, handles);
2824
2825
2826 function button_filling_24_Callback(hObject, eventdata, handles)
2827
2828
2829
2830 temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue');
2831 offset=temp.value(1)*52;
2832 bunch=[1 105];
2833 [dtour,dpaquet]=bucketnumber(bunch);
2834 table=int32([length(bunch) dtour dpaquet]);
2835 tango_command_inout('ANS/SY/CENTRAL','SetTables',table)
2836 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TablesCurrentDepth');
2837 n=temp.value;
2838 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionDelayTable');
2839 table=temp.value(1:n)-offset;
2840 handles.mode='Mode=1/2';
2841 set(handles.edit_filling_relecture_tables,'String',[handles.mode, ' T=' , num2str(table)]);
2842 set(handles.edit_filling_relecture_bunch,'String',[handles.mode, ' B=' , num2str(bunch)]);
2843 guidata(hObject, handles);
2844
2845
2846 function button_filling_34_Callback(hObject, eventdata, handles)
2847
2848
2849
2850 temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue');
2851 offset=temp.value(1)*52;
2852 bunch=[1 105 209];
2853 [dtour,dpaquet]=bucketnumber(bunch);
2854 table=int32([length(bunch) dtour dpaquet]);
2855 tango_command_inout('ANS/SY/CENTRAL','SetTables',table)
2856 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TablesCurrentDepth');
2857 n=temp.value;
2858 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionDelayTable');
2859 table=temp.value(1:n)-offset;
2860 handles.mode='Mode=3/4';
2861 set(handles.edit_filling_relecture_tables,'String',[handles.mode, ' T=' , num2str(table)]);
2862 set(handles.edit_filling_relecture_bunch,'String',[handles.mode, ' B=' , num2str(bunch)]);
2863 guidata(hObject, handles);
2864
2865
2866 function button_filling_11_Callback(hObject, eventdata, handles)
2867
2868
2869
2870 temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetClkStepValue');
2871 offset=temp.value(1)*52;
2872 bunch=[1 105 209 313];
2873 [dtour,dpaquet]=bucketnumber(bunch);
2874 table=int32([length(bunch) dtour dpaquet]);
2875 tango_command_inout('ANS/SY/CENTRAL','SetTables',table)
2876 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TablesCurrentDepth');
2877 n=temp.value;
2878 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'ExtractionDelayTable');
2879 table=temp.value(1:n)-offset;
2880 handles.mode='Mode=100%';
2881 set(handles.edit_filling_relecture_tables,'String',[handles.mode, ' T=' , num2str(table)]);
2882 set(handles.edit_filling_relecture_bunch,'String',[handles.mode, ' B=' , num2str(bunch)]);
2883 guidata(hObject, handles);
2884
2885
2886 function edit_filling_relecture_tables_Callback(hObject, eventdata, handles)
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896 function edit_filling_relecture_tables_CreateFcn(hObject, eventdata, handles)
2897
2898
2899
2900
2901
2902
2903 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2904 set(hObject,'BackgroundColor','white');
2905 end
2906
2907
2908
2909 function edit72_Callback(hObject, eventdata, handles)
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919 function edit72_CreateFcn(hObject, eventdata, handles)
2920
2921
2922
2923
2924
2925
2926 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2927 set(hObject,'BackgroundColor','white');
2928 end
2929
2930
2931
2932 function edit_filling_relecture_bunch_Callback(hObject, eventdata, handles)
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942 function edit_filling_relecture_bunch_CreateFcn(hObject, eventdata, handles)
2943
2944
2945
2946
2947
2948
2949 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2950 set(hObject,'BackgroundColor','white');
2951 end
2952
2953
2954
2955 function edit_filling_entrer_bunch_Callback(hObject, eventdata, handles)
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965 function edit_filling_entrer_bunch_CreateFcn(hObject, eventdata, handles)
2966
2967
2968
2969
2970
2971
2972 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
2973 set(hObject,'BackgroundColor','white');
2974 end
2975
2976
2977
2978 function button_update_Callback(hObject, eventdata, handles)
2979
2980
2981
2982
2983 tango_command_inout('LT1/SY/LOCAL.LINAC.1','Update')
2984
2985 tango_command_inout('BOO/SY/LOCAL.DG.3', 'Update');
2986 tango_command_inout('BOO/SY/LOCAL.Binj.1', 'Update');
2987 tango_command_inout('BOO/SY/LOCAL.Bext.1', 'Update');
2988 tango_command_inout('BOO/SY/LOCAL.Alim.1', 'Update');
2989
2990 tango_command_inout('LT2/SY/LOCAL.DG.2', 'Update');
2991 tango_command_inout('LT2/SY/LOCAL.DG.1', 'Update');
2992
2993 tango_command_inout('ANS/SY/LOCAL.SDC.1', 'Update');
2994 tango_command_inout('ANS-C01/SY/LOCAL.Ainj.1', 'Update');
2995 tango_command_inout('ANS-C01/SY/LOCAL.Ainj.2', 'Update');
2996 tango_command_inout('ANS-C01/SY/LOCAL.DG.2', 'Update');
2997 tango_command_inout('ANS-C02/SY/LOCAL.DG.1', 'Update');
2998 tango_command_inout('ANS-C03/SY/LOCAL.DG.1', 'Update');
2999 tango_command_inout('ANS-C04/SY/LOCAL.DG.1', 'Update');
3000 tango_command_inout('ANS-C05/SY/LOCAL.DG.1', 'Update');
3001 tango_command_inout('ANS-C06/SY/LOCAL.DG.1', 'Update');
3002 tango_command_inout('ANS-C07/SY/LOCAL.DG.1', 'Update');
3003 tango_command_inout('ANS-C08/SY/LOCAL.DG.1', 'Update');
3004 tango_command_inout('ANS-C09/SY/LOCAL.DG.1', 'Update');
3005 tango_command_inout('ANS-C10/SY/LOCAL.DG.1', 'Update');
3006 tango_command_inout('ANS-C11/SY/LOCAL.DG.1', 'Update');
3007 tango_command_inout('ANS-C12/SY/LOCAL.DG.1', 'Update');
3008 tango_command_inout('ANS-C13/SY/LOCAL.DG.1', 'Update');
3009 tango_command_inout('ANS-C14/SY/LOCAL.DG.1', 'Update');
3010 tango_command_inout('ANS-C15/SY/LOCAL.DG.1', 'Update');
3011 tango_command_inout('ANS-C16/SY/LOCAL.DG.1', 'Update');
3012
3013
3014
3015 function button_trigstatus_Callback(hObject, eventdata, handles)
3016
3017
3018
3019
3020 set(handles.inj_offset,'Enable','off');
3021 set(handles.sdc1,'Enable','off');
3022 set(handles.lin_canon,'Enable','off');
3023 set(handles.boo_bpm,'Enable','off');
3024 set(handles.lt1_emittance,'Enable','off');
3025 set(handles.lt1_MC1,'Enable','off');
3026 set(handles.lt1_MC2,'Enable','off');
3027 set(handles.lt1_osc,'Enable','off');
3028 set(handles.boo_dcct,'Enable','off');
3029 set(handles.boo_nod,'Enable','off');
3030 set(handles.boo_inj_septum,'Enable','off');
3031 set(handles.boo_inj_kicker,'Enable','off');
3032 set(handles.alim_dipole,'Enable','off');
3033 set(handles.alim_qf,'Enable','off');
3034 set(handles.alim_qd,'Enable','off');
3035 set(handles.alim_sf,'Enable','off');
3036 set(handles.alim_sd,'Enable','off');
3037 set(handles.boo_rf,'Enable','off');
3038 set(handles.lin_modulateur,'Enable','off');
3039 set(handles.ext_offset,'Enable','off');
3040 set(handles.boo_ext_dof,'Enable','off');
3041 set(handles.boo_ext_sept_p,'Enable','off');
3042 set(handles.boo_ext_sept_a,'Enable','off');
3043 set(handles.boo_ext_kicker,'Enable','off');
3044 set(handles.sdc2,'Enable','off');
3045 set(handles.lt2_emittance,'Enable','off');
3046 set(handles.lt2_osc,'Enable','off');
3047 set(handles.lt2_bpm,'Enable','off');
3048 set(handles.ans_inj_k1,'Enable','off');
3049 set(handles.ans_inj_k2,'Enable','off');
3050 set(handles.ans_inj_k3,'Enable','off');
3051 set(handles.ans_inj_k4,'Enable','off');
3052 set(handles.ans_inj_sept_p,'Enable','off');
3053 set(handles.ans_inj_sept_a,'Enable','off');
3054 set(handles.ans_bpm,'Enable','off');
3055 set(handles.ans_dcct,'Enable','off');
3056 set(handles.ans_bpm_c01,'Enable','off');
3057 set(handles.ans_bpm_c02,'Enable','off');
3058 set(handles.ans_bpm_c03,'Enable','off');
3059 set(handles.ans_bpm_c04,'Enable','off');
3060 set(handles.ans_bpm_c05,'Enable','off');
3061 set(handles.ans_bpm_c06,'Enable','off');
3062 set(handles.ans_bpm_c07,'Enable','off');
3063 set(handles.ans_bpm_c08,'Enable','off');
3064 set(handles.ans_bpm_c09,'Enable','off');
3065 set(handles.ans_bpm_c10,'Enable','off');
3066 set(handles.ans_bpm_c11,'Enable','off');
3067 set(handles.ans_bpm_c12,'Enable','off');
3068 set(handles.ans_bpm_c13,'Enable','off');
3069 set(handles.ans_bpm_c14,'Enable','off');
3070 set(handles.ans_bpm_c15,'Enable','off');
3071 set(handles.ans_bpm_c16,'Enable','off');
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081 n=1;
3082
3083 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay');
3084 set(handles.pc_address,'String',num2str(temp.value(n)));
3085
3086 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
3087 set(handles.inj_address,'String',num2str(temp.value(n)));
3088
3089 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
3090 set(handles.soft_address,'String',num2str(temp.value(n)));
3091
3092 temp=tango_read_attribute('ANS/SY/CENTRAL', 'ExtractionOffsetTimeValue');
3093 set(handles.ext_address,'String',num2str(temp.value(n)));
3094
3095
3096
3097 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTrigStatus');
3098 set(handles.sdc1,'String',num2str(temp.value(n)));
3099
3100 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTrigStatus');
3101 set(handles.lin_canon,'String',num2str(temp.value(n)));
3102
3103 temp=tango_read_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTrigStatus');
3104 set(handles.boo_bpm,'String',num2str(temp.value(n)));
3105
3106 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTrigStatus');
3107 set(handles.lt1_emittance,'String',num2str(temp.value(n)));
3108
3109 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TrigStatus');
3110 set(handles.lt1_MC1,'String',num2str(temp.value(n)));
3111
3112 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TrigStatus');
3113 set(handles.lt1_MC2,'String',num2str(temp.value(n)));
3114
3115 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'oscTrigStatus');
3116 set(handles.lt1_osc,'String',num2str(temp.value(n)));
3117
3118 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTrigStatus');
3119 set(handles.boo_dcct,'String',num2str(temp.value(n)));
3120
3121 temp=tango_read_attribute2('BOO/SY/LOCAL.DG.3', 'bpm-onde.trigTrigStatus');
3122 set(handles.boo_nod,'String',num2str(temp.value(n)));
3123
3124 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTrigStatus');
3125 set(handles.boo_inj_septum,'String',num2str(temp.value(n)));
3126
3127 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTrigStatus');
3128 set(handles.boo_inj_kicker,'String',num2str(temp.value(n)));
3129
3130 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTrigStatus');
3131 set(handles.alim_dipole,'String',num2str(temp.value(n)));
3132
3133 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTrigStatus');
3134 set(handles.alim_qf,'String',num2str(temp.value(n)));
3135
3136 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTrigStatus');
3137 set(handles.alim_qd,'String',num2str(temp.value(n)));
3138
3139 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTrigStatus');
3140 set(handles.alim_sf,'String',num2str(temp.value(n)));
3141
3142 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTrigStatus');
3143 set(handles.alim_sd,'String',num2str(temp.value(n)));
3144
3145 temp=tango_read_attribute2('BOO/SY/LOCAL.RF.1', 'rfTrigStatus');
3146 set(handles.boo_rf,'String',num2str(temp.value(n)));
3147
3148 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'spareTrigStatus');
3149 set(handles.lin_modulateur,'String',num2str(temp.value(n)));
3150
3151
3152
3153
3154
3155 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'dof.trigTrigStatus');
3156 set(handles.boo_ext_dof,'String',num2str(temp.value(n)));
3157
3158 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-p.trigTrigStatus');
3159 set(handles.boo_ext_sept_p,'String',num2str(temp.value(n)));
3160
3161 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'sep-a.trigTrigStatus');
3162 set(handles.boo_ext_sept_a,'String',num2str(temp.value(n)));
3163
3164 temp=tango_read_attribute2('BOO/SY/LOCAL.Bext.1', 'k.trigTrigStatus');
3165 set(handles.boo_ext_kicker,'String',num2str(temp.value(n)));
3166
3167
3168
3169 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'spareTrigStatus');
3170 set(handles.sdc2,'String',num2str(temp.value(n)));
3171
3172 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'mrsvTrigStatus');
3173 set(handles.lt2_emittance,'String',num2str(temp.value(n)));
3174
3175 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.1', 'osc-fctTrigStatus');
3176 set(handles.lt2_osc,'String',num2str(temp.value(n)));
3177
3178 temp=tango_read_attribute2('LT2/SY/LOCAL.DG.2', 'bpm.trigTrigStatus');
3179 set(handles.lt2_bpm,'String',num2str(temp.value(n)));
3180
3181 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k1.trigTrigStatus');
3182 set(handles.ans_inj_k1,'String',num2str(temp.value(n)));
3183
3184 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k2.trigTrigStatus');
3185 set(handles.ans_inj_k2,'String',num2str(temp.value(n)));
3186
3187 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k3.trigTrigStatus');
3188 set(handles.ans_inj_k3,'String',num2str(temp.value(n)));
3189
3190 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.1', 'k4.trigTrigStatus');
3191 set(handles.ans_inj_k4,'String',num2str(temp.value(n)));
3192
3193 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-p.trigTrigStatus');
3194 set(handles.ans_inj_sept_p,'String',num2str(temp.value(n)));
3195
3196 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.Ainj.2', 'sep-a.trigTrigStatus');
3197 set(handles.ans_inj_sept_a,'String',num2str(temp.value(n)));
3198
3199 temp=tango_read_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctTrigStatus');
3200 set(handles.ans_dcct,'String',num2str(temp.value(n)));
3201
3202 temp=tango_read_attribute2('ANS-C01/SY/LOCAL.DG.2', 'bpm.trigTrigStatus');
3203 set(handles.ans_bpm,'String',num2str(temp.value(n)));
3204 set(handles.ans_bpm_c01,'String',num2str(temp.value(n)));
3205
3206 temp=tango_read_attribute2('ANS-C02/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3207 set(handles.ans_bpm_c02,'String',num2str(temp.value(n)));
3208 temp=tango_read_attribute2('ANS-C03/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3209 set(handles.ans_bpm_c03,'String',num2str(temp.value(n)));
3210 temp=tango_read_attribute2('ANS-C04/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3211 set(handles.ans_bpm_c04,'String',num2str(temp.value(n)));
3212 temp=tango_read_attribute2('ANS-C05/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3213 set(handles.ans_bpm_c05,'String',num2str(temp.value(n)));
3214 temp=tango_read_attribute2('ANS-C06/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3215 set(handles.ans_bpm_c06,'String',num2str(temp.value(n)));
3216 temp=tango_read_attribute2('ANS-C07/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3217 set(handles.ans_bpm_c07,'String',num2str(temp.value(n)));
3218 temp=tango_read_attribute2('ANS-C08/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3219 set(handles.ans_bpm_c08,'String',num2str(temp.value(n)));
3220 temp=tango_read_attribute2('ANS-C09/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3221 set(handles.ans_bpm_c09,'String',num2str(temp.value(n)));
3222 temp=tango_read_attribute2('ANS-C10/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3223 set(handles.ans_bpm_c10,'String',num2str(temp.value(n)));
3224 temp=tango_read_attribute2('ANS-C11/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3225 set(handles.ans_bpm_c11,'String',num2str(temp.value(n)));
3226 temp=tango_read_attribute2('ANS-C12/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3227 set(handles.ans_bpm_c12,'String',num2str(temp.value(n)));
3228 temp=tango_read_attribute2('ANS-C13/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3229 set(handles.ans_bpm_c13,'String',num2str(temp.value(n)));
3230 temp=tango_read_attribute2('ANS-C14/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3231 set(handles.ans_bpm_c14,'String',num2str(temp.value(n)));
3232 temp=tango_read_attribute2('ANS-C15/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3233 set(handles.ans_bpm_c15,'String',num2str(temp.value(n)));
3234 temp=tango_read_attribute2('ANS-C16/SY/LOCAL.DG.1', 'bpm.trigTrigStatus');
3235 set(handles.ans_bpm_c16,'String',num2str(temp.value(n)));
3236
3237
3238
3239 function button_filling_16_Callback(hObject, eventdata, handles)
3240
3241
3242
3243
3244
3245
3246 function button_filling_26_Callback(hObject, eventdata, handles)
3247
3248
3249
3250
3251
3252
3253 function button_filling_36_Callback(hObject, eventdata, handles)
3254
3255
3256
3257
3258
3259
3260 function button_filling_46_Callback(hObject, eventdata, handles)
3261
3262
3263
3264
3265
3266
3267 function button_filling_15_Callback(hObject, eventdata, handles)
3268
3269
3270
3271
3272
3273
3274 function button_filling_25_Callback(hObject, eventdata, handles)
3275
3276
3277
3278
3279
3280
3281 function button_filling_35_Callback(hObject, eventdata, handles)
3282
3283
3284
3285
3286
3287
3288 function button_filling_45_Callback(hObject, eventdata, handles)
3289
3290
3291
3292
3293
3294
3295 function button_filling_55_Callback(hObject, eventdata, handles)
3296
3297
3298
3299
3300
3301
3302 function button_filling_56_Callback(hObject, eventdata, handles)
3303
3304
3305
3306
3307
3308
3309 function button_filling_66_Callback(hObject, eventdata, handles)
3310
3311
3312
3313
3314
3315
3316 function togglebutton2_Callback(hObject, eventdata, handles)
3317
3318
3319
3320
3321
3322
3323