source: MML/trunk/machine/SOLEIL/LT2/LT2setup.m @ 5

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

Initial import--MML version from SOLEIL@2013

File size: 2.2 KB
Line 
1function LT2setup
2%LT2SETUP - GUI for doing LT2 setup
3
4%
5% Written by Laurent S. Nadolski
6
7AD = getad;
8
9if isempty(AD)
10    LT2init;
11elseif ~strcmpi(AD.SubMachine,'LT2')
12    LT2init;
13end
14
15orbfig = findobj(allchild(0),'tag','LT2setup');
16
17if ~isempty(orbfig), delete(orbfig); end
18orbfig = findobj(allchild(0),'tag','LT2setup');
19
20
21kmax = 4; % button number
22
23height = 10 + kmax*30 + 30; %670;
24a = figure('Color',[0.8 0.8 0.8], ...
25    'Interruptible', 'on', ...   
26    'HandleVisibility','off', ...
27    'MenuBar','none', ...
28    'Name', 'LT2 Command Launcher', ...
29    'NumberTitle','off', ...
30    'Units','pixels', ...
31    'Position',[5 70 210*2 height], ...
32    'Resize','off', ...
33    'Tag','LT2setup');
34
35height = height - 35;
36
37for k = 1:kmax,
38    b1(k) = uicontrol('Parent',a, ...
39        'Position',[3 height-(k-1)*30 204 27], ...
40        'Interruptible', 'off', ...
41        'Tag','button22');
42end
43
44for k = 1:kmax,
45    b2(k) = uicontrol('Parent',a, ...
46        'Position',[3 + 210 height-(k-1)*30 204 27], ...
47        'Interruptible', 'off', ...
48        'Tag','button22');
49end
50
51set(b1(1), 'Callback','disp([''   LT2init;'']); cd(getenv(''MLROOT'')); setpathsoleil(''LT2'');', 'String','LT2init');
52set(b1(2), 'Callback','disp([''   Fichiers de Consignes;'']); configgui;;', 'String','Fichiers de Consignes');
53% same programme for LT1 and LT2 cycling
54set(b1(3), 'Callback','disp([''   LT2cycling;'']);LT1cycling', 'String','Cyclage');
55set(b1(4), 'Callback','disp([''   Timing;'']); synchro_injecteur7;', 'String','Synchronisation définitive');
56set(b2(1), 'Callback','optics_LT1_LT2;', 'String','OPTIQUE');
57set(b2(2), 'Callback','disp([''   Emittance'']);emittance_v15;', 'String','Emittance');
58
59b = uicontrol('Parent',a, ...
60    'Callback','close all', ...
61    'String','Close All Figures', ...
62    'Position',[3 height-kmax*30 204 27], ...
63    'Userdata',[], ...
64    'Interruptible', 'off', ...   
65    'Tag','button2');
66
67b = uicontrol('Parent',a, ...
68    'Callback','diary off; close(get(findobj(gcbf,''Tag'',''button1''),''Userdata''));', ...
69    'Position',[3 + 210 height-kmax*30 204 27], ...
70    'String','CLOSE', ...
71    'Userdata',a, ...
72    'Interruptible', 'off', ...   
73    'Tag','button1');
74
Note: See TracBrowser for help on using the repository browser.