source: MML/trunk/machine/SOLEIL/StorageRing/diagnostics/soft_trig_bpm.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

File size: 1.7 KB
Line 
1function soft_trig_bpm
2
3%tmp_adress=int32(18);
4tmp_adress=int32(16);
5
6
7%%% Store old bpm soft event adress %%%%%
8local='ANS-C01/SY/LOCAL.DG.2';
9old_adress=tango_read_attribute2(local,'bpm.trigEvent')
10
11
12%%%% Change bpm soft event adress %%%%%%
13local='ANS-C01/SY/LOCAL.DG.2';
14tango_write_attribute2(local,'bpm.trigEvent',tmp_adress);
15tango_read_attribute2(local,'bpm.trigEvent')
16for i=2:1:9
17    local=['ANS-C0',num2str(i),'/SY/LOCAL.DG.1'];
18    tango_write_attribute2(local,'bpm.trigEvent',tmp_adress);
19    tango_read_attribute2(local,'bpm.trigEvent')
20end
21for i=10:1:16
22    local=['ANS-C',num2str(i),'/SY/LOCAL.DG.1'];
23    tango_write_attribute2(local,'bpm.trigEvent',tmp_adress);
24    tango_read_attribute2(local,'bpm.trigEvent')
25end
26
27%%%% Change Central soft event adress %%%%%%
28central='ANS/SY/CENTRAL';
29 old_adress_central=tango_read_attribute2(central,'softEventAdress');
30 tango_write_attribute2(central,'softEventAdress',tmp_adress);
31 pause(1)
32 tango_command_inout2(central,'FireSoftEvent');
33 pause(1)
34 tango_write_attribute2(central,'softEventAdress',old_adress_central.value(1));
35%tango_command_inout2(central,'FirePostMortemEvent');
36
37%%%%% Apply old bpm soft adress %%%%%%
38local='ANS-C01/SY/LOCAL.DG.2';
39tango_write_attribute2(local,'bpm.trigEvent',old_adress.value(1));
40tango_read_attribute2(local,'bpm.trigEvent')
41for i=2:1:9
42    local=['ANS-C0',num2str(i),'/SY/LOCAL.DG.1'];
43    tango_write_attribute2(local,'bpm.trigEvent',old_adress.value(1));
44    tango_read_attribute2(local,'bpm.trigEvent')
45end
46for i=10:1:16
47    local=['ANS-C',num2str(i),'/SY/LOCAL.DG.1'];
48    tango_write_attribute2(local,'bpm.trigEvent',old_adress.value(1));
49    tango_read_attribute2(local,'bpm.trigEvent')
50end
51
Note: See TracBrowser for help on using the repository browser.