1 | function KEMgui |
---|
2 | %KEMgui - GUI for KEM controling. Usefull for FAM |
---|
3 | |
---|
4 | % |
---|
5 | % Written by Laurent S. Nadolski |
---|
6 | |
---|
7 | %Clear previous ORBIT figure |
---|
8 | orbfig = findobj(allchild(0),'tag','kemgui'); |
---|
9 | |
---|
10 | if ~isempty(orbfig), delete(orbfig); end |
---|
11 | |
---|
12 | kmax = 2; % button number |
---|
13 | |
---|
14 | height = 10 + kmax*30 + 30; %670; |
---|
15 | a = figure('Color',[0.8 0.8 0.8], ... |
---|
16 | 'Interruptible', 'on', ... |
---|
17 | 'HandleVisibility','off', ... |
---|
18 | 'MenuBar','none', ... |
---|
19 | 'Name', 'KEM gui', ... |
---|
20 | 'NumberTitle','off', ... |
---|
21 | 'Units','pixels', ... |
---|
22 | 'Position',[5 70 210*4 height], ... |
---|
23 | 'Resize','off', ... |
---|
24 | 'Tag','kemgui'); |
---|
25 | |
---|
26 | height = height - 35; |
---|
27 | |
---|
28 | for k = 1:kmax, |
---|
29 | b1(k) = uicontrol('Parent',a, ... |
---|
30 | 'Position',[3 height-(k-1)*30 204 27], ... |
---|
31 | 'Interruptible', 'off', ... |
---|
32 | 'Tag','button22'); |
---|
33 | end |
---|
34 | |
---|
35 | for k = 1:kmax, |
---|
36 | b2(k) = uicontrol('Parent',a, ... |
---|
37 | 'Position',[3 + 210 height-(k-1)*30 204 27], ... |
---|
38 | 'Interruptible', 'off', ... |
---|
39 | 'Tag','button22'); |
---|
40 | end |
---|
41 | |
---|
42 | for k = 1:kmax, |
---|
43 | b3(k) = uicontrol('Parent',a, ... |
---|
44 | 'Position',[3 + 210*2 height-(k-1)*30 204 27], ... |
---|
45 | 'Interruptible', 'off', ... |
---|
46 | 'Tag','button22'); |
---|
47 | end |
---|
48 | |
---|
49 | for k = 1:kmax, |
---|
50 | b4(k) = uicontrol('Parent',a, ... |
---|
51 | 'Position',[3 + 210*3 height-(k-1)*30 204 27], ... |
---|
52 | 'Interruptible', 'off', ... |
---|
53 | 'Tag','button22'); |
---|
54 | end |
---|
55 | |
---|
56 | bn = uicontrol('Parent',a, ... |
---|
57 | 'Position',[3+310 height-(kmax)*30+5 204 27/2], ... |
---|
58 | 'Interruptible', 'off', ... |
---|
59 | 'Style','text', 'String', 'Interface for turn by turn measurements', 'ForegroundColor', 'r'); |
---|
60 | |
---|
61 | set(b1(1), 'Callback','switchsynchro(''Injection''); disp(''injection'');', 'String','Synchro : injection'); |
---|
62 | set(b1(2), 'Callback','switchsynchro(''KEM''); disp(''KEM'');', 'String','Synchro KEM'); |
---|
63 | |
---|
64 | set(b2(1), 'Callback','switchbpm(''Injection''); disp(''BPM: normal'')', 'String','BPM Normal'); |
---|
65 | set(b2(2), 'Callback','switchbpm(''KEM''); disp(''BPM: KEM'') ', 'String','BPM: KEM'); |
---|
66 | |
---|
67 | set(b3(1), 'Callback','soft_trigger; getdcct', 'String','Trigger Soft'); |
---|
68 | set(b3(2), 'Callback','burst_trigger; getdcct', 'String','Injection'); |
---|
69 | |
---|