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