Last change
on this file since 4 was
4,
checked in by zhangj, 10 years ago
|
Initial import--MML version from SOLEIL@2013
|
File size:
647 bytes
|
Line | |
---|
1 | % affichage rampe RF |
---|
2 | |
---|
3 | n=100; |
---|
4 | V0=700; % kV |
---|
5 | V0=V0/100 ; % normalisé en V |
---|
6 | f=50/17; |
---|
7 | w=2*3.14159*f; |
---|
8 | |
---|
9 | |
---|
10 | % rampe plus courte centrée |
---|
11 | r=0.2; |
---|
12 | t1=1/f*r/2; |
---|
13 | t2=1/f*(1-r/2); |
---|
14 | w=w/(1-r) |
---|
15 | |
---|
16 | clear V |
---|
17 | |
---|
18 | for i=1:n |
---|
19 | |
---|
20 | t=(i-1)/f/(n-1); |
---|
21 | if (t<t1) |
---|
22 | V(i) = 0; |
---|
23 | elseif (t>=t1) && (t<t2) |
---|
24 | V(i) = V0*0.5*(1.-cos(w*(t-t1))); |
---|
25 | else |
---|
26 | V(i) = 0; |
---|
27 | end |
---|
28 | |
---|
29 | end |
---|
30 | |
---|
31 | plot(V) |
---|
32 | devName='BOO/RF/SAO.1'; |
---|
33 | prop.name = 'Channel0WaveForm'; |
---|
34 | for k=1:100 |
---|
35 | prop.value{k} = num2str(V(k)); |
---|
36 | end |
---|
37 | tango_command_inout2(devName, 'Stop'); |
---|
38 | tango_put_properties2(devName,prop) |
---|
39 | tango_command_inout2(devName, 'Init'); |
---|
40 | tango_command_inout2(devName, 'Start'); |
---|
41 | |
---|
Note: See
TracBrowser
for help on using the repository browser.