0001 function varargout = synchro_injecteur1(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_injecteur1_OpeningFcn, ...
0032 'gui_OutputFcn', @synchro_injecteur1_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_injecteur1_OpeningFcn(hObject, eventdata, handles, varargin)
0049
0050
0051
0052
0053
0054
0055
0056 handles.output = hObject;
0057
0058
0059
0060 handles.periode = 1.36;
0061 set(handles.periode_edit,'String',num2str(handles.periode));
0062
0063
0064 timer1=timer('StartDelay',1,...
0065 'ExecutionMode','fixedRate','Period',handles.periode,'TasksToExecute',Inf);
0066 timer1.TimerFcn = {@fonction_alex, hObject,eventdata, handles};
0067 setappdata(handles.figure1,'Timer',timer1);
0068
0069
0070 h = uibuttongroup('visible','off','Position',[0.305 0.08 0.15 0.12],...
0071 'Title','','TitlePosition','centertop',...
0072 'BackgroundColor',[1 0.3 0 ]);
0073 u1 = uicontrol('Style','Radio','String','OFF','Tag','radiobutton1',...
0074 'pos',[60 15 40 25],'parent',h,'HandleVisibility','off',...
0075 'BackgroundColor',[1 0.3 0 ]);
0076 u2 = uicontrol('Style','Radio','String','ON','Tag','radiobutton2',...
0077 'pos',[60 45 40 25],'parent',h,'HandleVisibility','off',...
0078 'BackgroundColor',[1 0.3 0 ]);
0079 set(h,'SelectionChangeFcn',...
0080 {@uibuttongroup_SelectionChangeFcn,handles});
0081
0082 handles.off = u1;
0083 handles.on = u2;
0084
0085 set(h,'SelectedObject',u1);
0086 set(h,'Visible','on');
0087
0088
0089 set(handles.figure1,'CloseRequestFcn',{@Closinggui,timer1,handles.figure1});
0090
0091
0092 guidata(hObject, handles);
0093
0094
0095
0096
0097
0098
0099 function varargout = synchro_injecteur1_OutputFcn(hObject, eventdata, handles)
0100
0101
0102
0103
0104
0105
0106 varargout{1} = handles.output;
0107
0108
0109
0110 function dipole_Callback(hObject, eventdata, handles)
0111
0112
0113
0114
0115
0116
0117
0118 delay=str2double(get(hObject,'String'));
0119 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay',delay);
0120
0121
0122 function dipole_CreateFcn(hObject, eventdata, handles)
0123
0124
0125
0126
0127
0128
0129 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0130 set(hObject,'BackgroundColor','white');
0131 end
0132
0133
0134 function qf_Callback(hObject, eventdata, handles)
0135
0136
0137
0138
0139
0140
0141
0142 delay=str2double(get(hObject,'String'));
0143 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay',delay);
0144
0145
0146 function qf_CreateFcn(hObject, eventdata, handles)
0147
0148
0149
0150
0151
0152
0153 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0154 set(hObject,'BackgroundColor','white');
0155 end
0156
0157
0158
0159 function qd_Callback(hObject, eventdata, handles)
0160
0161
0162
0163
0164
0165
0166
0167 delay=str2double(get(hObject,'String'));
0168 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay',delay);
0169
0170
0171 function qd_CreateFcn(hObject, eventdata, handles)
0172
0173
0174
0175
0176
0177
0178 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0179 set(hObject,'BackgroundColor','white');
0180 end
0181
0182
0183
0184 function sf_Callback(hObject, eventdata, handles)
0185
0186
0187
0188
0189
0190
0191
0192 delay=str2double(get(hObject,'String'));
0193 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay',delay);
0194
0195
0196 function sf_CreateFcn(hObject, eventdata, handles)
0197
0198
0199
0200
0201
0202
0203 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0204 set(hObject,'BackgroundColor','white');
0205 end
0206
0207
0208
0209 function sd_Callback(hObject, eventdata, handles)
0210
0211
0212
0213
0214
0215
0216
0217 delay=str2double(get(hObject,'String'));
0218 tango_write_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay',delay);
0219
0220
0221
0222 function sd_CreateFcn(hObject, eventdata, handles)
0223
0224
0225
0226
0227
0228
0229 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0230 set(hObject,'BackgroundColor','white');
0231 end
0232
0233
0234
0235 function rf_Callback(hObject, eventdata, handles)
0236
0237
0238
0239
0240
0241
0242
0243 delay=str2double(get(hObject,'String'));
0244 tango_write_attribute2('BOO/SY/LOCAL.RF.1', 'rfTimeDelay',delay);
0245
0246
0247 function rf_CreateFcn(hObject, eventdata, handles)
0248
0249
0250
0251
0252
0253
0254 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0255 set(hObject,'BackgroundColor','white');
0256 end
0257
0258
0259
0260 function canon_Callback(hObject, eventdata, handles)
0261
0262
0263
0264
0265
0266
0267
0268 delay=str2double(get(hObject,'String'));
0269 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay',delay);
0270
0271
0272
0273 function canon_CreateFcn(hObject, eventdata, handles)
0274
0275
0276
0277
0278
0279
0280 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0281 set(hObject,'BackgroundColor','white');
0282 end
0283
0284
0285
0286 function emittance_Callback(hObject, eventdata, handles)
0287
0288
0289
0290
0291
0292
0293 delay=str2double(get(hObject,'String'));
0294 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay',delay);
0295
0296
0297 function emittance_CreateFcn(hObject, eventdata, handles)
0298
0299
0300
0301
0302
0303
0304 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0305 set(hObject,'BackgroundColor','white');
0306 end
0307
0308
0309
0310 function MC1_Callback(hObject, eventdata, handles)
0311
0312
0313
0314
0315
0316
0317
0318 delay=str2double(get(hObject,'String'));
0319 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay',delay);
0320
0321
0322 function MC1_CreateFcn(hObject, eventdata, handles)
0323
0324
0325
0326
0327
0328
0329 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0330 set(hObject,'BackgroundColor','white');
0331 end
0332
0333
0334
0335 function MC2_Callback(hObject, eventdata, handles)
0336
0337
0338
0339
0340
0341
0342
0343 delay=str2double(get(hObject,'String'));
0344 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay',delay);
0345
0346
0347 function MC2_CreateFcn(hObject, eventdata, handles)
0348
0349
0350
0351
0352
0353
0354 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0355 set(hObject,'BackgroundColor','white');
0356 end
0357
0358
0359
0360 function osc_Callback(hObject, eventdata, handles)
0361
0362
0363
0364
0365
0366
0367
0368 delay=str2double(get(hObject,'String'));
0369 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay',delay);
0370
0371
0372
0373 function osc_CreateFcn(hObject, eventdata, handles)
0374
0375
0376
0377
0378
0379
0380 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0381 set(hObject,'BackgroundColor','white');
0382 end
0383
0384
0385
0386 function sdc_Callback(hObject, eventdata, handles)
0387
0388
0389
0390
0391
0392
0393
0394 delay=str2double(get(hObject,'String'));
0395 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay',delay);
0396
0397
0398 function sdc_CreateFcn(hObject, eventdata, handles)
0399
0400
0401
0402
0403
0404
0405 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0406 set(hObject,'BackgroundColor','white');
0407 end
0408
0409
0410
0411 function septum_Callback(hObject, eventdata, handles)
0412
0413
0414
0415
0416
0417
0418
0419 delay=str2double(get(hObject,'String'));
0420 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.inj.trigTimeDelay',delay);
0421
0422
0423 function septum_CreateFcn(hObject, eventdata, handles)
0424
0425
0426
0427
0428
0429
0430 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0431 set(hObject,'BackgroundColor','white');
0432 end
0433
0434
0435
0436 function kicker_Callback(hObject, eventdata, handles)
0437
0438
0439
0440
0441
0442
0443
0444 delay=str2double(get(hObject,'String'));
0445 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.inj.trigTimeDelay',delay);
0446
0447
0448 function kicker_CreateFcn(hObject, eventdata, handles)
0449
0450
0451
0452
0453
0454
0455 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0456 set(hObject,'BackgroundColor','white');
0457 end
0458
0459
0460
0461 function bpm_Callback(hObject, eventdata, handles)
0462
0463
0464
0465
0466
0467
0468
0469 delay=str2double(get(hObject,'String'));
0470 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay',delay);
0471 tango_write_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-btd.trigTimeDelay',delay);
0472
0473
0474
0475
0476
0477 function bpm_CreateFcn(hObject, eventdata, handles)
0478
0479
0480
0481
0482
0483
0484 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0485 set(hObject,'BackgroundColor','white');
0486 end
0487
0488
0489
0490 function nod_Callback(hObject, eventdata, handles)
0491
0492
0493
0494
0495
0496
0497
0498 delay=str2double(get(hObject,'String'));
0499 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'NODTimeDelay',delay);
0500
0501
0502 function nod_CreateFcn(hObject, eventdata, handles)
0503
0504
0505
0506
0507
0508
0509 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0510 set(hObject,'BackgroundColor','white');
0511 end
0512
0513
0514
0515 function dcct_Callback(hObject, eventdata, handles)
0516
0517
0518
0519
0520
0521
0522 delay=str2double(get(hObject,'String'));
0523 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay',delay);
0524
0525 function dcct_CreateFcn(hObject, eventdata, handles)
0526
0527
0528
0529
0530
0531
0532 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0533 set(hObject,'BackgroundColor','white');
0534 end
0535
0536
0537
0538 function hall_Callback(hObject, eventdata, handles)
0539
0540
0541
0542
0543
0544
0545
0546
0547
0548 function hall_CreateFcn(hObject, eventdata, handles)
0549
0550
0551
0552
0553
0554
0555 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0556 set(hObject,'BackgroundColor','white');
0557 end
0558
0559
0560
0561 function pc_address_Callback(hObject, eventdata, handles)
0562
0563
0564
0565
0566
0567
0568
0569 delay=str2double(get(hObject,'String'));
0570 tango_write_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay',delay);
0571
0572
0573 function pc_address_CreateFcn(hObject, eventdata, handles)
0574
0575
0576
0577
0578
0579
0580 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0581 set(hObject,'BackgroundColor','white');
0582 end
0583
0584
0585
0586 function inj_address_Callback(hObject, eventdata, handles)
0587
0588
0589
0590
0591
0592
0593
0594 delay=str2double(get(hObject,'String'));
0595 tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',delay);
0596
0597
0598 function inj_address_CreateFcn(hObject, eventdata, handles)
0599
0600
0601
0602
0603
0604
0605 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0606 set(hObject,'BackgroundColor','white');
0607 end
0608
0609
0610
0611 function edit21_Callback(hObject, eventdata, handles)
0612
0613
0614
0615
0616
0617
0618
0619
0620
0621 function edit21_CreateFcn(hObject, eventdata, handles)
0622
0623
0624
0625
0626
0627
0628 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0629 set(hObject,'BackgroundColor','white');
0630 end
0631
0632
0633
0634 function soft_address_Callback(hObject, eventdata, handles)
0635
0636
0637
0638
0639
0640
0641
0642 delay=str2double(get(hObject,'String'));
0643 tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',delay);
0644
0645
0646 function soft_address_CreateFcn(hObject, eventdata, handles)
0647
0648
0649
0650
0651
0652
0653 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0654 set(hObject,'BackgroundColor','white');
0655 end
0656
0657
0658
0659 function acquisition1_Callback(hObject, eventdata, handles)
0660
0661
0662
0663
0664
0665
0666
0667 n=2;
0668
0669 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay');
0670 set(handles.pc_address,'String',num2str(temp.value(n)));
0671
0672 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
0673 set(handles.inj_address,'String',num2str(temp.value(n)));
0674
0675 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
0676 set(handles.soft_address,'String',num2str(temp.value(n)));
0677
0678
0679
0680 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay');
0681 set(handles.sdc,'String',num2str(temp.value(n)));
0682
0683 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay');
0684 set(handles.canon,'String',num2str(temp.value(n)));
0685
0686 temp=tango_read_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay');
0687 set(handles.bpm,'String',num2str(temp.value(n)));
0688
0689 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay');
0690 set(handles.emittance,'String',num2str(temp.value(n)));
0691
0692 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay');
0693 set(handles.MC1,'String',num2str(temp.value(n)));
0694
0695 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay');
0696 set(handles.MC2,'String',num2str(temp.value(n)));
0697
0698 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay');
0699 set(handles.osc,'String',num2str(temp.value(n)));
0700
0701 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay');
0702 set(handles.dcct,'String',num2str(temp.value(n)));
0703
0704
0705
0706
0707 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay');
0708 set(handles.septum,'String',num2str(temp.value(n)));
0709
0710 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay');
0711 set(handles.kicker,'String',num2str(temp.value(n)));
0712
0713 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay');
0714 set(handles.dipole,'String',num2str(temp.value(n)));
0715
0716 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay');
0717 set(handles.qf,'String',num2str(temp.value(n)));
0718
0719 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay');
0720 set(handles.qd,'String',num2str(temp.value(n)));
0721
0722 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay');
0723 set(handles.sf,'String',num2str(temp.value(n)));
0724
0725 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay');
0726 set(handles.sd,'String',num2str(temp.value(n)));
0727
0728
0729
0730
0731
0732 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent');
0733 temp.value(n)
0734 if (temp.value(n)==2)
0735 set(handles.soft_button,'Value',0);
0736 elseif (temp.value(n)==5)
0737 set(handles.soft_button,'Value',1);
0738 end
0739
0740
0741
0742 function acquisition2_Callback(hObject, eventdata, handles)
0743
0744
0745
0746
0747 n=1;
0748
0749 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TPcTimeDelay');
0750 set(handles.pc_address,'String',num2str(temp.value(n)));
0751
0752 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
0753 set(handles.inj_address,'String',num2str(temp.value(n)));
0754
0755 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
0756 set(handles.soft_address,'String',num2str(temp.value(n)));
0757
0758
0759 temp=tango_read_attribute2('ANS/SY/LOCAL.SDC.1', 'oscTimeDelay');
0760 set(handles.sdc,'String',num2str(temp.value(n)));
0761
0762 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmTimeDelay');
0763 set(handles.canon,'String',num2str(temp.value(n)));
0764
0765 temp=tango_read_attribute2('BOO/SY/LOCAL.DG.1', 'bpm-bta.trigTimeDelay');
0766 set(handles.bpm,'String',num2str(temp.value(n)));
0767
0768 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceTimeDelay');
0769 set(handles.emittance,'String',num2str(temp.value(n)));
0770
0771 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1TimeDelay');
0772 set(handles.MC1,'String',num2str(temp.value(n)));
0773
0774 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2TimeDelay');
0775 set(handles.MC2,'String',num2str(temp.value(n)));
0776
0777 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'oscTimeDelay');
0778 set(handles.osc,'String',num2str(temp.value(n)));
0779
0780 temp=tango_read_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booTimeDelay');
0781 set(handles.dcct,'String',num2str(temp.value(n)));
0782
0783
0784
0785
0786 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigTimeDelay');
0787 set(handles.septum,'String',num2str(temp.value(n)));
0788
0789 temp=tango_read_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigTimeDelay');
0790 set(handles.kicker,'String',num2str(temp.value(n)));
0791
0792
0793 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'dpTimeDelay');
0794 set(handles.dipole,'String',num2str(temp.value(n)));
0795
0796 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qfTimeDelay');
0797 set(handles.qf,'String',num2str(temp.value(n)));
0798
0799 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'qdTimeDelay');
0800 set(handles.qd,'String',num2str(temp.value(n)));
0801
0802 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sfTimeDelay');
0803 set(handles.sf,'String',num2str(temp.value(n)));
0804
0805 temp=tango_read_attribute2('BOO/SY/LOCAL.ALIM.1', 'sdTimeDelay');
0806 set(handles.sd,'String',num2str(temp.value(n)));
0807
0808
0809
0810
0811
0812 temp=tango_read_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent');
0813 temp.value(n)
0814 if (temp.value(n)==2)
0815 set(handles.soft_button,'Value',0);
0816 elseif (temp.value(n)==5)
0817 set(handles.soft_button,'Value',1);
0818 end
0819
0820
0821
0822
0823 function soft_button_Callback(hObject, eventdata, handles)
0824
0825
0826
0827
0828
0829
0830 etat=get(hObject,'Value');
0831 tout=0.5;
0832 if (etat==0)
0833 event=int32(2) ;
0834 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent',event); pause(tout);
0835 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent',event); pause(tout);
0836
0837 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent',event); pause(tout);
0838 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event',event); pause(tout);
0839 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event',event); pause(tout);
0840 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent',event); pause(tout);
0841 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent',event); pause(tout);
0842
0843 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent',event); pause(tout);
0844 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent',event);
0845 elseif (etat==1)
0846 event=int32(5) ;
0847 tango_write_attribute2('ANS/SY/LOCAL.SDC.1', 'oscEvent',event); pause(tout);
0848 tango_write_attribute2('LT1/SY/LOCAL.LINAC.1', 'lpmEvent',event); pause(tout);
0849
0850 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'emittanceEvent',event); pause(tout);
0851 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.1Event',event); pause(tout);
0852 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'mc.2Event',event); pause(tout);
0853 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'oscEvent',event); pause(tout);
0854 tango_write_attribute2('LT1/SY/LOCAL.DG.1', 'dcct-booEvent',event); pause(tout);
0855
0856 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'sep-p.trigEvent',event); pause(tout);
0857 tango_write_attribute2('BOO/SY/LOCAL.Binj.1', 'k.trigEvent',event);
0858 end
0859 display('ok change address')
0860
0861
0862
0863 function push_soft_Callback(hObject, eventdata, handles)
0864
0865
0866
0867 disp('ça marche !!')
0868 tango_command_inout('ANS/SY/CENTRAL','FireSoftEvent');
0869
0870
0871
0872 function periode_edit_Callback(hObject, eventdata, handles)
0873
0874
0875
0876
0877
0878
0879
0880 val_multishot = get(handles.on,'Value');
0881
0882 if val_multishot
0883 errordlg('positionner le trigger a OFF !','Attention');
0884 return
0885 else
0886 handles.periode = str2double(get(hObject,'String'));
0887
0888
0889 timer1=timer('StartDelay',1,...
0890 'ExecutionMode','fixedRate','Period',handles.periode,'TasksToExecute',Inf);
0891 timer1.TimerFcn = {@fonction_alex, hObject,eventdata, handles};
0892 setappdata(handles.figure1,'Timer',timer1);
0893
0894
0895 guidata(hObject, handles);
0896 end
0897
0898
0899
0900 function periode_edit_CreateFcn(hObject, eventdata, handles)
0901
0902
0903
0904
0905
0906
0907 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0908 set(hObject,'BackgroundColor','white');
0909 end
0910
0911 function uibuttongroup_SelectionChangeFcn(hObject,eventdata,handles)
0912
0913
0914
0915
0916 timer1 = getappdata(handles.figure1,'Timer');
0917 switch get(get(hObject,'SelectedObject'),'Tag')
0918 case 'radiobutton1'
0919
0920 stop(timer1);
0921
0922 case 'radiobutton2'
0923
0924 start(timer1);
0925
0926 end
0927
0928 function fonction_alex(arg1,arg2,hObject,eventdata,handles)
0929
0930
0931
0932
0933
0934 disp(datestr(clock))
0935 tango_command_inout('ANS/SY/CENTRAL','FireSoftEvent');
0936
0937
0938
0939
0940
0941
0942
0943
0944 function Closinggui(obj, event, handles, figure1)
0945
0946
0947 answer = questdlg('Fermer softsynchro ?',...
0948 'Exit softsynchro',...
0949 'Yes','No','Yes');
0950
0951 switch answer
0952 case 'Yes'
0953 delete(handles);
0954 delete(figure1);
0955 otherwise
0956 disp('Closing aborted')
0957 end
0958
0959
0960
0961
0962 function button_softmoins_Callback(hObject, eventdata, handles)
0963
0964
0965
0966 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
0967 step=temp.value(2)-0.52243;
0968 tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',step);
0969 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
0970 set(handles.soft_address,'String',num2str(temp.value(1)));
0971
0972
0973 function button_softplus_Callback(hObject, eventdata, handles)
0974
0975
0976
0977
0978 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
0979 step=temp.value(2)+0.52243;
0980 tango_write_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay',step);
0981 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TSoftTimeDelay');
0982 set(handles.soft_address,'String',num2str(temp.value(1)));
0983
0984
0985
0986 function button_injmoins_Callback(hObject, eventdata, handles)
0987
0988
0989
0990 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
0991 step=temp.value(2)-0.52243;
0992 tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',step);
0993 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
0994 set(handles.inj_address,'String',num2str(temp.value(1)));
0995
0996
0997 function button_injplus_Callback(hObject, eventdata, handles)
0998
0999
1000
1001
1002 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
1003 step=temp.value(2)+0.52243;
1004 tango_write_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay',step);
1005 temp=tango_read_attribute2('ANS/SY/CENTRAL', 'TInjTimeDelay');
1006 set(handles.inj_address,'String',num2str(temp.value(1)));