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