1 | function soft_trig_bpm |
---|
2 | |
---|
3 | %tmp_adress=int32(18); |
---|
4 | tmp_adress=int32(16); |
---|
5 | |
---|
6 | |
---|
7 | %%% Store old bpm soft event adress %%%%% |
---|
8 | local='ANS-C01/SY/LOCAL.DG.2'; |
---|
9 | old_adress=tango_read_attribute2(local,'bpm.trigEvent') |
---|
10 | |
---|
11 | |
---|
12 | %%%% Change bpm soft event adress %%%%%% |
---|
13 | local='ANS-C01/SY/LOCAL.DG.2'; |
---|
14 | tango_write_attribute2(local,'bpm.trigEvent',tmp_adress); |
---|
15 | tango_read_attribute2(local,'bpm.trigEvent') |
---|
16 | for 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') |
---|
20 | end |
---|
21 | for 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') |
---|
25 | end |
---|
26 | |
---|
27 | %%%% Change Central soft event adress %%%%%% |
---|
28 | central='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 %%%%%% |
---|
38 | local='ANS-C01/SY/LOCAL.DG.2'; |
---|
39 | tango_write_attribute2(local,'bpm.trigEvent',old_adress.value(1)); |
---|
40 | tango_read_attribute2(local,'bpm.trigEvent') |
---|
41 | for 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') |
---|
45 | end |
---|
46 | for 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') |
---|
50 | end |
---|
51 | |
---|