source: MML/trunk/machine/SOLEIL/Booster/applications/RFrampe.m @ 4

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
3n=100;
4V0=700;     % kV
5V0=V0/100 ; % normalisé en V
6f=50/17;
7w=2*3.14159*f;
8
9
10% rampe plus courte centrée
11r=0.2;
12t1=1/f*r/2;
13t2=1/f*(1-r/2);
14w=w/(1-r)
15
16clear V
17
18for 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   
29end
30
31plot(V)
32devName='BOO/RF/SAO.1';
33prop.name = 'Channel0WaveForm';
34for k=1:100
35            prop.value{k} = num2str(V(k));
36end
37tango_command_inout2(devName, 'Stop');
38tango_put_properties2(devName,prop)
39tango_command_inout2(devName, 'Init');
40tango_command_inout2(devName, 'Start');
41
Note: See TracBrowser for help on using the repository browser.