Subversion Repositories OpenFresco

Rev

Rev 285 | Rev 287 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
264 aschellenberg 1
function GUI_Template(varargin)
2
 
3
%%%%%%%%%%%%%%%%%%%%%
4
%Create GUI Template%
5
%%%%%%%%%%%%%%%%%%%%%
6
 
7
% Check if window already exists
8
if ~isempty(findobj('Tag','OpenFresco Quick Start'))
9
   figure(findobj('Tag','OpenFresco Quick Start'));
10
   return
11
end
12
 
265 cmisra 13
%Check for .tcl and report files and delete if found
286 aschellenberg 14
fclose('all');
15
if exist('OPFAnalysis.tcl','file')
16
    delete(which('OPFAnalysis.tcl'));
264 aschellenberg 17
end
286 aschellenberg 18
if exist('OPFReport.txt','file')
19
    delete(which('OPFReport.txt'));
265 cmisra 20
end
264 aschellenberg 21
 
265 cmisra 22
 
264 aschellenberg 23
%Get window size
24
SS = get(0,'screensize');
25
 
26
%Pre-allocate colors and fonts
27
fig_color = [0 0.45 1.0];
28
panel_color = [0.3 0.5 0.7];
29
panelDefault = [0.941176 0.941176 0.941176];
30
font = 'Lucinda Sans';
31
 
32
%Load Buttons
33
%Sidebar
34
DIR = pwd;
35
sideButWidth  = 0.8*SS(3)*0.1*0.84;
36
sideButHeight = 0.8*SS(4)*0.5*0.16;
37
Analysis0     = imresize(imread(which('Analysis0.png')), [(sideButHeight) (sideButWidth)]);
38
Analysis1     = imresize(imread(which('Analysis1.png')), [(sideButHeight) (sideButWidth)]);
39
ExpControl0   = imresize(imread(which('ExpControl0.png')), [(sideButHeight) (sideButWidth)]);
40
ExpControl1   = imresize(imread(which('ExpControl1.png')), [(sideButHeight) (sideButWidth)]);
41
ExpSetup0     = imresize(imread(which('ExpSetup0.png')), [(sideButHeight) (sideButWidth)]);
42
ExpSetup1     = imresize(imread(which('ExpSetup1.png')), [(sideButHeight) (sideButWidth)]);
43
Loading0      = imresize(imread(which('Loading0.png')), [(sideButHeight) (sideButWidth)]);
44
Loading1      = imresize(imread(which('Loading1.png')), [(sideButHeight) (sideButWidth)]);
45
Structure0    = imresize(imread(which('Structure0.png')), [(sideButHeight) (sideButWidth)]);
46
Structure1    = imresize(imread(which('Structure1.png')), [(sideButHeight) (sideButWidth)]);
47
 
48
%Structure Images
49
% height = SS(4)*0.8*0.8*0.44;
50
% width = SS(3)*0.8*0.81*0.315;
51
% height = SS(4)*0.8*0.8*0.45;
52
% width = SS(3)*0.8*0.81*0.32;
53
% height = SS(4)*0.8*0.8*0.445;
54
% width = SS(3)*0.8*0.81*0.318;
55
structureWidth  = 0.8*SS(3)*0.81*0.318;
56
structureHeight = 0.8*SS(4)*0.9*0.445;
57
Model1A0 = imresize(imread(which('Model1A0.png')), [structureHeight structureWidth]);
58
Model1A1 = imresize(imread(which('Model1A1.png')), [structureHeight structureWidth]);
59
Model2A0 = imresize(imread(which('Model2A0.png')), [structureHeight structureWidth]);
60
Model2A1 = imresize(imread(which('Model2A1.png')), [structureHeight structureWidth]);
61
Model2B0 = imresize(imread(which('Model2B0.png')), [structureHeight structureWidth]);
62
Model2B1 = imresize(imread(which('Model2B1.png')), [structureHeight structureWidth]);
63
 
64
%Loading Page
65
loadingWidth  = 0.8*SS(3)*0.81*0.1;
66
loadingHeight = 0.8*SS(4)*0.9*0.08;
67
GM0 = imresize(imread(which('GroundMotions0.png')), [loadingHeight loadingWidth]);
68
GM1 = imresize(imread(which('GroundMotions1.png')), [loadingHeight loadingWidth]);
69
IC0 = imresize(imread(which('InitialConditions0.png')), [loadingHeight loadingWidth]);
70
IC1 = imresize(imread(which('InitialConditions1.png')), [loadingHeight loadingWidth]);
71
 
72
%Experimental Control Page
73
ECWidth  = 0.8*SS(3)*0.81*0.1;
74
ECHeight = 0.8*SS(4)*0.9*0.08;
75
CP0   = imresize(imread(which('ControlPoint0.png')), [ECHeight ECWidth]);
76
CP1   = imresize(imread(which('ControlPoint1.png')), [ECHeight ECWidth]);
77
Sim0  = imresize(imread(which('Simulation0.png')), [ECHeight ECWidth]);
78
Sim1  = imresize(imread(which('Simulation1.png')), [ECHeight ECWidth]);
79
Real0 = imresize(imread(which('RealController0.png')), [ECHeight ECWidth]);
80
Real1 = imresize(imread(which('RealController1.png')), [ECHeight ECWidth]);
81
 
82
 
83
%Analysis Page
84
analysisWidth1  = 0.8*SS(3)*0.81*0.5*0.3;
85
analysisHeight1 = 0.8*SS(4)*0.9*0.197*0.627;
86
Start0a = imresize(imread(which('Start0.png')), [analysisHeight1 analysisWidth1]);
87
Start1a = imresize(imread(which('Start1.png')), [analysisHeight1 analysisWidth1]);
88
Pause0a = imresize(imread(which('Pause0.png')), [analysisHeight1 analysisWidth1]);
89
Pause1a = imresize(imread(which('Pause1.png')), [analysisHeight1 analysisWidth1]);
90
Stop0a  = imresize(imread(which('Stop0.png')), [analysisHeight1 analysisWidth1]);
91
Stop1a  = imresize(imread(which('Stop1.png')), [analysisHeight1 analysisWidth1]);
92
 
93
%Analysis Controls
94
analysisWidth2 = 0.1*SS(3)*0.94*0.835;
95
analysisHeight2 = 0.265*SS(4)*0.94*0.3;
96
Start0b = imresize(imread(which('Start0.png')), [analysisHeight2 analysisWidth2]);
97
Start1b = imresize(imread(which('Start1.png')), [analysisHeight2 analysisWidth2]);
98
Pause0b = imresize(imread(which('Pause0.png')), [analysisHeight2 analysisWidth2]);
99
Pause1b = imresize(imread(which('Pause1.png')), [analysisHeight2 analysisWidth2]);
100
Stop0b  = imresize(imread(which('Stop0.png')), [analysisHeight2 analysisWidth2]);
101
Stop1b  = imresize(imread(which('Stop1.png')), [analysisHeight2 analysisWidth2]);
102
 
103
%Question Button
104
questWidth = SS(4)*0.8*0.81*0.32*0.1;
105
questHeight = SS(3)*0.8*0.9*0.28*0.07;
106
Question0 = imresize(imread(which('Question0.png')),[questHeight questWidth]);
107
Question1 = imresize(imread(which('Question1.png')),[questHeight questWidth]);
108
 
109
 
110
%Main Figure
111
f = figure('Visible','off',...
112
           'Name','OpenFresco Quick Start',...
113
           'NumberTitle','off',...
114
           'MenuBar','none',...
115
           'Tag','OpenFresco Quick Start',...
116
           'Color',fig_color,...
117
           'Position',[0.1*SS(3) 0.1*SS(4) 0.8*SS(3) 0.8*SS(4)],...
118
           'Resize','off',...
119
           'KeyPressFcn',@shortcutKeys,...
120
           'CloseRequestFcn',@Quit_Program);
121
 
122
Background = axes('Parent',f,'Position',[0 0 1 1]);
123
imagesc(imread(which('Metal.jpg')));
124
set(Background,'XTick',[],'YTick',[]);
125
 
126
%Menubar
127
Menu(1) = uimenu('Position',1,'Label','File');
128
Menu(2) = uimenu(Menu(1),'Position',1,'Label','Load        Ctrl+L', ...
129
   'Callback','MenuBar(''load'')');
130
Menu(3) = uimenu(Menu(1),'Position',2,'Label','Save        Ctrl+S', ...
131
   'Callback','MenuBar(''save'')');
132
Menu(4) = uimenu(Menu(1),'Position',3,'Label','Quit        Ctrl+Q',...
133
   'Callback',@Quit_Program);
134
 
135
 
136
%Sidebar Tabs
137
Sidebar(1) = uibuttongroup('Parent',f,...
138
    'BackgroundColor',panel_color,...
139
    'Position',[0.03 .45 .1 .5]);
140
         Sidebar(7) = uicontrol(Sidebar(1),'Style','togglebutton',...
141
             'Tag','Structure',...
142
             'Units','normalized',...
143
             'FontName',font,...
271 cmisra 144
             'Position',[0.08 0.8 0.84 0.16],...
264 aschellenberg 145
             'CData',Structure0);
146
         Sidebar(8) = uicontrol(Sidebar(1),'Style','togglebutton',...
147
             'Tag','Loading',...
148
             'Units','normalized',...
149
             'FontName',font,...
271 cmisra 150
             'Position',[0.08 0.61 0.84 0.16],...
264 aschellenberg 151
             'CData',Loading0);
152
         Sidebar(9) = uicontrol(Sidebar(1),'Style','togglebutton',...
153
             'Tag','Experimental Setup',...
154
             'Units','normalized',...
155
             'FontName',font,...
271 cmisra 156
             'Position',[0.08 0.42 0.84 0.16],...
264 aschellenberg 157
             'CData',ExpSetup0);
158
         Sidebar(10) = uicontrol(Sidebar(1),'Style','togglebutton',...
159
             'Tag','Experimental Control',...
160
             'Units','normalized',...
161
             'FontName',font,...
271 cmisra 162
             'Position',[0.08 0.23 0.84 0.16],...
264 aschellenberg 163
             'CData',ExpControl0);
164
         Sidebar(11) = uicontrol(Sidebar(1),'Style','togglebutton',...
165
             'Tag','Analysis',...
166
             'Units','normalized',...
167
             'FontName',font,...
271 cmisra 168
             'Position',[0.08 0.04 0.84 0.16],...
264 aschellenberg 169
             'CData',Analysis0);
170
         set(Sidebar(1),'SelectionChangeFcn',@template_toggle_Callback);
171
         set(Sidebar(1),'SelectedObject',[]);
172
 
173
Sidebar(2) = uicontrol('Parent',f,...
174
    'Style','pushbutton',...
175
    'String','User Tips',...
176
    'Units','normalized',...
177
    'BackgroundColor',panel_color,...
178
    'Callback','Links(''User Tips'')',...
179
    'Position',[0.03 0.36 0.1 0.04]);
180
 
181
 
182
%Main Display Panel
183
ph_Main = uipanel('Parent',f,...
184
    'BackgroundColor',panel_color,...
185
    'Position',[0.16 0.05 0.81 0.9]);
186
 
187
 
188
 
189
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
190
 
191
%%%%%%%%%%%%%%%%%%%%%%%         
192
%Create Structure Page%
193
%%%%%%%%%%%%%%%%%%%%%%%
194
 
195
%Title       
196
Struct(1) = uicontrol(ph_Main,'Style','text',...
197
    'String','Structural Properties',...
284 cmisra 198
    'FontSize',18,...
264 aschellenberg 199
    'Units','normalized',...
200
    'ForegroundColor',[1 1 1],...
201
    'BackgroundColor',panel_color,...
284 cmisra 202
    'Position',[0.3 0.945 0.4 0.055],...
264 aschellenberg 203
    'FontName',font,...
204
    'Visible','off');                      
205
 
206
 
207
BackgroundPanel = uipanel('Parent',ph_Main,...
208
    'Position',[0.04 0.06 0.92 0.88],...
209
    'Visible','on');
210
Background = axes('Parent',BackgroundPanel,'Position',[0 0 1 1]);
211
imagesc(imread(which('greyGradient.png')));
212
set(Background,'XTick',[],'YTick',[]);
213
 
214
 
215
Struct(2) = uibuttongroup('Parent',ph_Main,...
216
    'BackgroundColor',panel_color,...
217
    'Position',[0.34 .45 .32 .45],...
218
    'Visible','off');
219
         Struct(3) = uicontrol(Struct(2),'Style','togglebutton',...
220
             'Tag','1 DOF',...
221
             'Units','normalized',...
222
             'Position',[0 0 1 1],...
271 cmisra 223
             'CData',Model1A1);
264 aschellenberg 224
         Struct(4) = uicontrol(Struct(2),'Style','togglebutton',...
225
             'Tag','2 DOF A',...
226
             'Units','normalized',...
227
             'Position',[0 0 1 1],...
228
             'CData',Model2A0);
229
         Struct(5) = uicontrol(Struct(2),'Style','togglebutton',...
230
             'Tag','2 DOF B',...
231
             'Units','normalized',...
232
             'Position',[0 0 1 1],...
233
             'CData',Model2B0);
234
         set(Struct(2),'SelectionChangeFcn','Structure(''choose DOF'')');
271 cmisra 235
%          set(Struct(2),'SelectedObject',[]);
264 aschellenberg 236
 
237
 
238
Struct(30) = uicontrol('Parent',ph_Main,...
239
    'Style','slider',...
240
   'Units','normalized',...
241
   'Position',[0.34 0.42 0.32 0.02],...
242
   'BackgroundColor',panelDefault,...
243
   'ForegroundColor',panelDefault,...
244
   'Min',0,'Max',1, ...
245
   'SliderStep',[0.5 0.5],...
246
   'Value',0,...
285 cmisra 247
   'ToolTipString',sprintf('Move the slider to access\ndifferent structure types'),...
264 aschellenberg 248
   'Visible','off',...
249
   'Callback','Structure(''scroll'')');
250
 
251
 
252
%1 DOF Options                    
253
Struct(6) = uipanel('Parent',ph_Main,...
254
    'Position',[0.34 0.35 0.32 0.05],...
255
    'Visible','off');
256
Struct(8) = uipanel('Parent',ph_Main,...
257
    'Position',[0.34 0.1 0.32 0.3],...
258
    'BackgroundColor',panelDefault,...
259
    'Visible','off');    
260
 
261
%          Background = axes('Parent',Struct(8),'Position',[0 0 1 1]);
262
%          imagesc(imread(which('greyGradient.png')));
263
%          % imagesc(imread(which('Metal.jpg')));
264
%          set(Background,'XTick',[],'YTick',[]);
265
 
266
         st_Struct_m1 = uicontrol(Struct(8),'Style','text',...
267
             'Units','normalized',...
268
             'FontSize',10,...
269
             'String','m',...
270
             'BackgroundColor',panelDefault,...
271
             'Position',[0.025 0.8 0.05 0.1]);
271 cmisra 272
         Struct(7) = uicontrol(Struct(8),'Style','edit',...
264 aschellenberg 273
             'Units','normalized',...
274
             'FontSize',10,...
286 aschellenberg 275
             'String','',...
271 cmisra 276
             'BackgroundColor',[1 1 1],...
264 aschellenberg 277
             'Position',[0.1 0.8 0.8 0.1],...
278
             'Tag','Mass',...
279
             'Callback','Structure(''mass_input'')');
280
 
281
         m1_help = uicontrol(Struct(8),'Style','pushbutton',...
282
             'Units','normalized',...
283
             'FontSize',10,...
284
             'Tag','help1',...
265 cmisra 285
             'ToolTipString','Input a positive mass value',...
264 aschellenberg 286
             'Position',[0.92 0.8 0.064 0.104],...
287
             'Visible','on',...
271 cmisra 288
             'CData',Question1,...
264 aschellenberg 289
             'Callback',@helpCallback);
290
 
291
         st_Struct_k1 = uicontrol(Struct(8),'Style','text',...
292
             'Units','normalized',...
293
             'FontSize',10,...
294
             'String','k',...
295
             'BackgroundColor',panelDefault,...
296
             'Position',[0.025 0.6 0.05 0.1]);
271 cmisra 297
         Struct(9) = uicontrol(Struct(8),'Style','edit',...
264 aschellenberg 298
             'Units','normalized',...
299
             'FontSize',10,...
286 aschellenberg 300
             'String','',...
271 cmisra 301
             'BackgroundColor',[1 1 1],...
264 aschellenberg 302
             'Position',[0.1 0.6 0.8 0.1],...
303
             'Tag','Stiffness',...
304
             'Callback','Structure(''stiffness_input'')');
305
         k1_help = uicontrol(Struct(8),'Style','pushbutton',...
306
             'Units','normalized',...
307
             'FontSize',10,...
308
             'Tag','help1',...
309
             'ToolTipString','Input a positive stiffness value',...
310
             'Position',[0.92 0.6 0.064 0.104],...
271 cmisra 311
             'CData',Question1,...
264 aschellenberg 312
             'Callback',@helpCallback);
313
         Struct(10) = uicontrol(Struct(8),'Style','pushbutton',...
314
             'String','Calculate T',...
315
             'Units','normalized',...
316
             'FontSize',10,...
265 cmisra 317
             'BackgroundColor',panelDefault,...
264 aschellenberg 318
             'Position',[0.1 0.55 0.8 0.1],...
319
             'Callback','Structure(''period_calc'')');
320
         Struct(11) = uicontrol(Struct(8),'Style','text',...
321
             'Units','normalized',...
322
             'String','Period',...
323
             'FontSize',10,...
324
             'Position',[0.1 0.4 0.8 0.1],...
325
             'BackgroundColor',panelDefault,...
326
             'Tag','Period');
327
         Struct(12) = uicontrol(Struct(8),'Style','popupmenu',...
328
             'String',{'Damping Type: ','Stiffness Proportional','Mass Proportional'},...
329
             'Value',1,...
330
             'Units','normalized',...
271 cmisra 331
             'BackgroundColor',[1 1 1],...
264 aschellenberg 332
             'FontSize',10,...
333
             'Position',[0.1 0.23 0.8 0.1],...
334
             'Callback','Structure(''choose damping'')');
271 cmisra 335
         Struct(13) = uicontrol(Struct(8),'Style','edit',...
264 aschellenberg 336
             'Units','normalized',...
337
             'FontSize',10,...
338
             'String','zeta',...
271 cmisra 339
             'BackgroundColor',[1 1 1],...
264 aschellenberg 340
             'Position',[0.1 0.05 0.8 0.1],...
341
             'Callback','Structure(''damping_input'')');
342
         Damp1_help = uicontrol(Struct(8),'Style','pushbutton',...
343
             'Units','normalized',...
344
             'FontSize',10,...
345
             'Tag','help1',...
346
             'ToolTipString',sprintf('Input damping value as a decimal. For\nexample type 0.05 for 5%% damping.'),...
347
             'Position',[0.92 0.05 0.064 0.104],...
271 cmisra 348
             'CData',Question1,...
264 aschellenberg 349
             'Callback',@helpCallback);
350
 
351
%2 DOF A Options                      
352
Struct(14) = uipanel('Parent',ph_Main,...
353
    'Position',[0.34 0.35 0.32 0.05],...
354
    'Visible','off');        
355
Struct(16) = uipanel('Parent',ph_Main,...
356
    'Position',[0.34 0.1 0.32 0.3],...
357
    'BackgroundColor',panelDefault,...
358
    'Visible','off');
277 cmisra 359
         st_Struct_m2A1 = uicontrol(Struct(16),'Style','text',...
264 aschellenberg 360
             'Units','normalized',...
361
             'FontSize',10,...
277 cmisra 362
             'String','m1',...
264 aschellenberg 363
             'BackgroundColor',panelDefault,...
277 cmisra 364
             'Position',[0.015 0.8 0.07 0.1]);
264 aschellenberg 365
         Struct(15) = uicontrol(Struct(16),'Style','text',...
366
             'Units','normalized',...
367
             'FontSize',10,...
277 cmisra 368
             'String','',...
265 cmisra 369
             'BackgroundColor',panelDefault,...
277 cmisra 370
             'Tag','m1A',...
371
             'Position',[0.1 0.8 0.35 0.1],...
264 aschellenberg 372
             'Callback','Structure(''mass_input'')');
277 cmisra 373
         st_Struct_m2A2 = uicontrol(Struct(16),'Style','text',...
374
             'Units','normalized',...
375
             'FontSize',10,...
376
             'String','m2',...
377
             'BackgroundColor',panelDefault,...
378
             'Position',[0.465 0.8 0.07 0.1]);
379
         Struct(31) = uicontrol(Struct(16),'Style','text',...
380
             'Units','normalized',...
381
             'FontSize',10,...
382
             'String','',...
383
             'BackgroundColor',panelDefault,...
384
             'Tag','m2A',...
385
             'Position',[0.55 0.8 0.35 0.1],...
386
             'Callback','Structure(''mass_input'')');
264 aschellenberg 387
         m2_help = uicontrol(Struct(16),'Style','pushbutton',...
388
             'Units','normalized',...
389
             'FontSize',10,...
390
             'Tag','help2A',...
277 cmisra 391
             'ToolTipString',sprintf('Input the nodal mass values\nto form the mass matrix\nM = [m1 0; 0 m2]'),...
264 aschellenberg 392
             'Position',[0.92 0.8 0.064 0.104],...
393
             'CData',Question0,...
394
             'Callback',@helpCallback);
395
 
396
 
277 cmisra 397
         st_Struct_k2A1 = uicontrol(Struct(16),'Style','text',...
264 aschellenberg 398
             'Units','normalized',...
399
             'FontSize',10,...
277 cmisra 400
             'String','k1',...
264 aschellenberg 401
             'BackgroundColor',panelDefault,...
277 cmisra 402
             'Tag','k1A',...
403
             'Position',[0.015 0.6 0.07 0.1]);
264 aschellenberg 404
         Struct(17) = uicontrol(Struct(16),'Style','text',...
405
             'Units','normalized',...
406
             'FontSize',10,...
277 cmisra 407
             'String','',...
265 cmisra 408
             'BackgroundColor',panelDefault,...
277 cmisra 409
             'Tag','k1A',...
410
             'Position',[0.1 0.6 0.35 0.1],...
264 aschellenberg 411
             'Callback','Structure(''stiffness_input'')');
277 cmisra 412
         st_Struct_k2A2 = uicontrol(Struct(16),'Style','text',...
413
             'Units','normalized',...
414
             'FontSize',10,...
415
             'String','k2',...
416
             'BackgroundColor',panelDefault,...
417
             'Position',[0.465 0.6 0.07 0.1]);
418
         Struct(32) = uicontrol(Struct(16),'Style','text',...
419
             'Units','normalized',...
420
             'FontSize',10,...
421
             'String','',...
422
             'BackgroundColor',panelDefault,...
423
             'Tag','k2A',...
424
             'Position',[0.55 0.6 0.35 0.1],...
425
             'Callback','Structure(''stiffness_input'')');
264 aschellenberg 426
         k2_help = uicontrol(Struct(16),'Style','pushbutton',...
427
             'Units','normalized',...
428
             'FontSize',10,...
429
             'Tag','help2A',...
277 cmisra 430
             'ToolTipString',sprintf('Enter k1 and k2 to form\nthe stiffness matrix K = \n[k1+k2 -k2; -k2 k2]'),...
264 aschellenberg 431
             'Position',[0.92 0.6 0.064 0.104],...
432
             'CData',Question0,...
433
             'Callback',@helpCallback);
434
         Struct(18) = uicontrol(Struct(16),'Style','pushbutton',...
435
             'String','Calculate T',...
436
             'Units','normalized',...
437
             'FontSize',10,...
438
             'Position',[0.1 0.55 0.8 0.1],...
439
             'Callback','Structure(''period_calc'')');
440
         Struct(19) = uicontrol(Struct(16),'Style','text',...
441
             'Units','normalized',...
442
             'FontSize',10,...
443
             'String','Period',...
444
             'BackgroundColor',panelDefault,...
445
             'Position',[0.1 0.4 0.8 0.1]);
446
         Struct(20) = uicontrol(Struct(16),'Style','popupmenu',...
447
             'String',{'Damping Type: ','Stiffness Proportional','Mass Proportional','Rayleigh'},...
448
             'Value',1,...
449
             'Units','normalized',...
450
             'FontSize',10,...
265 cmisra 451
             'BackgroundColor',panelDefault,...
264 aschellenberg 452
             'Position',[0.1 0.23 0.8 0.1],...
453
             'Callback','Structure(''choose damping'')');
454
         Struct(21) = uicontrol(Struct(16),'Style','text',...
455
             'Units','normalized',...
456
             'FontSize',10,...
457
             'String','zeta',...
265 cmisra 458
             'BackgroundColor',panelDefault,...
264 aschellenberg 459
             'Position',[0.1 0.05 0.8 0.1],...
460
             'Callback','Structure(''damping_input'')');
461
         Damp2_help = uicontrol(Struct(16),'Style','pushbutton',...
462
             'Units','normalized',...
463
             'FontSize',10,...
464
             'Tag','help2A',...
465
             'ToolTipString',sprintf('Input damping value as a decimal. For\nexample type 0.05 for 5%% damping.\nFor Rayleigh damping, two values\nare required in the form [zeta1 zeta2]'),...
466
             'Position',[0.92 0.05 0.064 0.104],...
467
             'CData',Question0,...
468
             'Callback',@helpCallback);
469
 
470
%2 DOF B Options                      
471
Struct(22) = uipanel('Parent',ph_Main,...
472
    'Position',[0.34 0.35 0.32 0.05],...
473
    'Visible','off');
474
 
475
Struct(24) = uipanel('Parent',ph_Main,...
476
    'Position',[0.34 0.1 0.32 0.3],...
477
    'BackgroundColor',panelDefault,...
478
    'Visible','off');
277 cmisra 479
       st_Struct_m2Ba = uicontrol(Struct(24),'Style','text',...
264 aschellenberg 480
           'Units','normalized',...
481
           'FontSize',10,...
277 cmisra 482
           'String','m1',...
264 aschellenberg 483
           'BackgroundColor',panelDefault,...
277 cmisra 484
           'Position',[0.015 0.8 0.07 0.1]);
264 aschellenberg 485
       Struct(23) = uicontrol(Struct(24),'Style','text',...
486
           'Units','normalized',...
487
           'FontSize',10,...
277 cmisra 488
           'String','',...
265 cmisra 489
           'BackgroundColor',panelDefault,...
277 cmisra 490
           'Tag','m1B',...
491
           'Position',[0.1 0.8 0.35 0.1],...
264 aschellenberg 492
           'Callback','Structure(''mass_input'')');
277 cmisra 493
       st_Struct_m2Bb = uicontrol(Struct(24),'Style','text',...
494
           'Units','normalized',...
495
           'FontSize',10,...
496
           'String','m2',...
497
           'BackgroundColor',panelDefault,...
498
           'Position',[0.465 0.8 0.07 0.1]);
499
       Struct(33) = uicontrol(Struct(24),'Style','text',...
500
           'Units','normalized',...
501
           'FontSize',10,...
502
           'String','',...
503
           'BackgroundColor',panelDefault,...
504
           'Tag','m2B',...
505
           'Position',[0.55 0.8 0.35 0.1],...
506
           'Callback','Structure(''mass_input'')');
264 aschellenberg 507
       m3_help = uicontrol(Struct(24),'Style','pushbutton',...
508
             'Units','normalized',...
509
             'FontSize',10,...
510
             'Tag','help2B',...
277 cmisra 511
             'ToolTipString',sprintf('Input the nodal mass values\nto form the mass matrix\nM = [m1 0; 0 m2]'),...
264 aschellenberg 512
             'Position',[0.92 0.8 0.064 0.104],...
513
             'CData',Question0,...
514
             'Callback',@helpCallback);
515
 
277 cmisra 516
       st_Struct_k2Ba = uicontrol(Struct(24),'Style','text',...
264 aschellenberg 517
           'Units','normalized',...
518
           'FontSize',10,...
277 cmisra 519
           'String','k1',...
264 aschellenberg 520
           'BackgroundColor',panelDefault,...
277 cmisra 521
           'Position',[0.015 0.6 0.07 0.1]);
264 aschellenberg 522
       Struct(25) = uicontrol(Struct(24),'Style','text',...
523
           'Units','normalized',...
524
           'FontSize',10,...
277 cmisra 525
           'String','',...
265 cmisra 526
           'BackgroundColor',panelDefault,...
277 cmisra 527
           'Tag','k1B',...
528
           'Position',[0.1 0.6 0.35 0.1],...
264 aschellenberg 529
           'Callback','Structure(''stiffness_input'')');
277 cmisra 530
       st_Struct_k2Bb = uicontrol(Struct(24),'Style','text',...
531
           'Units','normalized',...
532
           'FontSize',10,...
533
           'String','k2',...
534
           'BackgroundColor',panelDefault,...
535
           'Position',[0.465 0.6 0.07 0.1]);
536
       Struct(34) = uicontrol(Struct(24),'Style','text',...
537
           'Units','normalized',...
538
           'FontSize',10,...
539
           'String','',...
540
           'BackgroundColor',panelDefault,...
541
           'Tag','k2B',...
542
           'Position',[0.55 0.6 0.35 0.1],...
543
           'Callback','Structure(''stiffness_input'')');
264 aschellenberg 544
       k3_help = uicontrol(Struct(24),'Style','pushbutton',...
545
             'Units','normalized',...
546
             'FontSize',10,...
547
             'Tag','help2B',...
277 cmisra 548
             'ToolTipString',sprintf('Enter k1 and k2 to form\nthe stiffness matrix K = \n[k1 0; 0 k2]'),...
264 aschellenberg 549
             'Position',[0.92 0.6 0.064 0.104],...
550
             'CData',Question0,...
551
             'Callback',@helpCallback);
552
       Struct(26) = uicontrol(Struct(24),'Style','pushbutton',...
553
           'String','Calculate T',...
554
           'FontSize',10,...
555
           'Units','normalized',...
556
           'Position',[0.1 0.55 0.8 0.1],...
557
           'Callback','Structure(''period_calc'')');
558
       Struct(27) = uicontrol(Struct(24),'Style','text',...
559
           'Units','normalized',...
560
           'FontSize',10,...
561
           'String','Period',...
562
           'BackgroundColor',panelDefault,...
563
           'Position',[0.1 0.4 0.8 0.1]);
564
       Struct(28) = uicontrol(Struct(24),'Style','popupmenu',...
565
           'String',{'Damping Type: ','Stiffness Proportional','Mass Proportional','Rayleigh'},...
566
           'Value',1,...
567
           'Units','normalized',...
568
           'FontSize',10,...
265 cmisra 569
           'BackgroundColor',panelDefault,...
264 aschellenberg 570
           'Position',[0.1 0.23 0.8 0.1],...
571
           'Callback','Structure(''choose damping'')');
572
       Struct(29) = uicontrol(Struct(24),'Style','text',...
573
           'Units','normalized',...
574
           'FontSize',10,...
575
           'String','zeta',...
265 cmisra 576
           'BackgroundColor',panelDefault,...
264 aschellenberg 577
           'Position',[0.1 0.05 0.8 0.1],...
578
           'Callback','Structure(''damping_input'')');
579
       Damp3_help = uicontrol(Struct(24),'Style','pushbutton',...
580
             'Units','normalized',...
581
             'FontSize',10,...
582
             'Tag','help2B',...
583
             'ToolTipString',sprintf('Input damping value as a decimal. For\nexample type 0.05 for 5%% damping.\nFor Rayleigh damping, two values\nare required in the form [zeta1 zeta2]'),...
584
             'Position',[0.92 0.05 0.064 0.104],...
585
             'CData',Question0,...
586
             'Callback',@helpCallback);
587
 
588
 
589
 
590
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
591
 
592
%%%%%%%%%%%%%%%%%%%%%%%%%%%%         
593
%Create Ground Motions Page%
594
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
595
 
596
%Title
597
GM(1) = uicontrol(ph_Main,'Style','text',...
598
    'String','Loading',...
284 cmisra 599
    'FontSize',18,...
264 aschellenberg 600
    'ForegroundColor',[1 1 1],...
601
    'BackgroundColor',panel_color,...
602
    'Units','normalized',...
284 cmisra 603
    'Position',[0.3 0.945 0.4 0.055],...
264 aschellenberg 604
    'FontName',font,...
605
    'Visible','off');
606
 
607
GM(18) = uipanel('Parent',ph_Main,...
608
    'Visible','off',...
609
    'BackgroundColor',panelDefault,...
610
    'Position',[0.15 0.1 0.7 0.72]);
611
 
612
%Tab Buttons       
613
GM(19) = uicontrol(ph_Main,'Style','togglebutton',...
614
    'Tag','Ground Motions',...
615
    'Units','normalized',...
616
    'Value',1,...
617
    'Position',[0.15 0.82 0.1 0.08],...
618
    'Visible','off',...
619
    'Callback','GroundMotions(''tab toggle'')',...
620
    'CData',GM1);
621
GM(20) = uicontrol(ph_Main,'Style','togglebutton',...
622
    'Tag','Initial Conditions',...
623
    'Units','normalized',...
624
    'Value',0,...
625
    'Position',[0.25 0.82 0.1 0.08],...
626
    'Visible','off',...
627
    'Callback','GroundMotions(''tab toggle'')',...
628
    'CData',IC0);
629
 
630
%Ground Motion Options
631
%DOF 1                     
632
GM(2) = uipanel('Parent',GM(18),...
633
    'Position',[0.2 0.64 0.35 0.33],...
634
    'Tag','Direction 1',...
635
    'BackgroundColor',panelDefault,...
636
    'Visible','off');
637
         st_GM_Xlabel = uicontrol(GM(2),'Style','text',...
638
             'Units','normalized',...
639
             'String','DOF 1',...
640
             'FontSize',10,...
641
             'FontWeight','bold',...
642
             'BackgroundColor',panelDefault,...
271 cmisra 643
             'Position',[0.45 0.88 0.15 0.1]);
264 aschellenberg 644
         st_GM_Xfile = uicontrol(GM(2),'Style','text',...
645
             'Units','normalized',...
271 cmisra 646
             'String','File',...
264 aschellenberg 647
             'BackgroundColor',panelDefault,...
271 cmisra 648
             'Position',[0.03 0.75 0.1 0.1]);
264 aschellenberg 649
         GM(3) = uicontrol(GM(2),'Style','edit',...
650
             'Units','normalized',...
651
             'String','...',...
652
             'BackgroundColor',[1 1 1],...
653
             'Tag','GM(3)',...
271 cmisra 654
             'Position',[0.25 0.72 0.43 0.15],...
264 aschellenberg 655
             'Callback','GroundMotions(''manual load'')');
656
         pbh_GM_Xbrowse = uicontrol(GM(2),'Style','pushbutton',...
657
             'Units','normalized',...
658
             'String','...',...
659
             'Tag','pbh_GM_Xbrowse',...
271 cmisra 660
             'Position',[0.71 0.72 0.1 0.15],...
264 aschellenberg 661
             'Callback','GroundMotions(''load'')');
662
         GM_help = uicontrol(GM(2),'Style','pushbutton',...
663
             'Units','normalized',...
664
             'FontSize',10,...
665
             'Tag','GMhelp',...
284 cmisra 666
             'ToolTipString',sprintf('You can click on this button to find\nground motions from PEER or CESMD,\nor you can upload your own file.\nNote that unrecognized formats require\nthe time step to be input manually.'),...
271 cmisra 667
             'Position',[0.85 0.72 0.083 0.132],...
264 aschellenberg 668
             'CData',Question1,...
279 cmisra 669
             'Callback','Links(''GM'')');
271 cmisra 670
         st_dt = uicontrol(GM(2),'Style','text',...
671
             'Units','normalized',...
672
             'String','dt',...
673
             'BackgroundColor',panelDefault,...
674
             'Position',[0.03 0.56 0.1 0.1]);
675
         GM(28) = uicontrol(GM(2),'Style','text',...
676
             'Units','normalized',...
677
             'String','...',...
678
             'BackgroundColor',panelDefault,...
679
             'Tag','dt1',...
680
             'Position',[0.25 0.53 0.43 0.15],...
681
             'Callback','GroundMotions(''manual dt'')');
682
 
264 aschellenberg 683
         %Divide Frame
684
         Height = 0.005;
685
         uicontrol(GM(2),'Style','frame', ...
686
             'Units','normalized', ...
687
             'BackgroundColor',[0 0 0],...
688
             'ForegroundColor',[0 0 0],...
271 cmisra 689
             'Position',[0.00 0.5 1.00 Height]);
264 aschellenberg 690
         st_GM_Xscale = uicontrol(GM(2),'Style','text',...
691
             'Units','normalized',...
692
             'String','Scale Factors',...
693
             'FontSize',10,...
694
             'FontWeight','bold',...
695
             'BackgroundColor',panelDefault,...
271 cmisra 696
             'Position',[0.15 0.35 0.8 0.1]);
264 aschellenberg 697
         st_GM_Xamp = uicontrol(GM(2),'Style','text',...
698
             'Units','normalized',...
699
             'String','Amplitude',...
700
             'BackgroundColor',panelDefault,...
271 cmisra 701
             'Position',[0.01 0.2 0.2 0.1]);
264 aschellenberg 702
         GM(4) = uicontrol(GM(2),'Style','edit',...
703
             'Units','normalized',...
286 aschellenberg 704
             'String','1.0',...
264 aschellenberg 705
             'BackgroundColor',[1 1 1],...
706
             'Tag','edit_amp1',...
271 cmisra 707
             'Position',[0.25 0.2 0.56 0.15],...
264 aschellenberg 708
             'Callback','GroundMotions(''scale'')');
709
         agScale_help = uicontrol(GM(2),'Style','pushbutton',...
710
             'Units','normalized',...
711
             'FontSize',10,...
712
             'Tag','Scalehelp',...
286 aschellenberg 713
             'ToolTipString',sprintf('The ground motion record can be scaled\nin amplitude and time if required.'),...
271 cmisra 714
             'Position',[0.85 0.2 0.083 0.132],...
264 aschellenberg 715
             'CData',Question1,...
716
             'Callback',@helpCallback);
717
         st_GM_Xdt = uicontrol(GM(2),'Style','text',...
718
             'Units','normalized',...
719
             'String','Time',...
720
             'BackgroundColor',panelDefault,...
271 cmisra 721
             'Position',[0.03 0.02 0.125 0.1]);
264 aschellenberg 722
         GM(5) = uicontrol(GM(2),'Style','edit',...
723
             'Units','normalized',...
286 aschellenberg 724
             'String','1.0',...
264 aschellenberg 725
             'BackgroundColor',[1 1 1],...
726
             'Tag','edit_time1',...
271 cmisra 727
             'Position',[0.25 0.02 0.56 0.15],...
264 aschellenberg 728
             'Callback','GroundMotions(''scale'')');
271 cmisra 729
%          GM(6) = uicontrol(GM(2),'Style','pushbutton',...
730
%              'Units','normalized',...
731
%              'String','Apply Scale Factors',...
732
%              'Tag','scale_1',...
733
%              'Position',[0.33 0.01 0.4 0.15],...
734
%              'Callback','GroundMotions(''scale'')');
264 aschellenberg 735
         GM(7) = axes('Parent',GM(18),'Position',[0.12 0.47 0.35 0.15],'Box','on',...
736
             'Tag','a_GM_Xag','Visible','off','NextPlot','replacechildren',...
286 aschellenberg 737
             'ButtonDownFcn','displayAxes(''ag1'')','FontWeight','bold');
264 aschellenberg 738
             grid('on');
739
             xlabel(GM(7),'Time [sec]');
740
             ylabel(GM(7),'ag [L/sec^2]');
741
         GM(8) = axes('Parent',GM(18),'Position',[0.12 0.25 0.35 0.15],'Box','on',...
742
             'Tag','a_GM_XSa','Visible','off','NextPlot','replacechildren','XTickLabel',[],...
286 aschellenberg 743
             'ButtonDownFcn','displayAxes(''Sa1'')','FontWeight','bold');
264 aschellenberg 744
             grid('on');
745
             ylabel(GM(8),'Sa [L/sec^2]');        
746
         GM(9) = axes('Parent',GM(18),'Position',[0.12 0.08 0.35 0.15],'Box','on',...
747
             'Tag','a_GM_XSd','Visible','off','NextPlot','replacechildren',...
286 aschellenberg 748
             'ButtonDownFcn','displayAxes(''Sd1'')','FontWeight','bold');
264 aschellenberg 749
             grid('on');
750
             xlabel(GM(9),'Period [sec]');
751
             ylabel(GM(9),'Sd [L]');        
752
 
753
%DOF 2
754
GM(10) = uipanel('Parent',GM(18),...
755
    'Position',[0.56 0.64 0.35 0.33],...
756
    'Tag','Direction 2',...
757
    'BackgroundColor',panelDefault,...
758
    'Visible','off');
759
         sty = uicontrol(GM(10),'Style','text',...
760
             'Units','normalized',...
761
             'String','DOF 2',...
762
             'FontSize',10,...
763
             'FontWeight','bold',...
764
             'BackgroundColor',panelDefault,...
271 cmisra 765
             'Position',[0.45 0.88 0.15 0.1]);
264 aschellenberg 766
         st_GM_Yfile = uicontrol(GM(10),'Style','text',...
767
             'Units','normalized',...
271 cmisra 768
             'String','File',...
264 aschellenberg 769
             'BackgroundColor',panelDefault,...
271 cmisra 770
             'Position',[0.03 0.75 0.1 0.1]);
264 aschellenberg 771
         GM(11) = uicontrol(GM(10),'Style','edit',...
772
             'Units','normalized',...
773
             'String','...',...
774
             'BackgroundColor',[1 1 1],...
775
             'Tag','GM(10)',...
271 cmisra 776
             'Position',[0.25 0.72 0.43 0.15],...
264 aschellenberg 777
             'Callback','GroundMotions(''manual load'')');
778
         pbh_GM_Ybrowse = uicontrol(GM(10),'Style','pushbutton',...
779
             'Units','normalized',...
780
             'String','...',...
781
             'Tag','pbh_GM_Ybrowse',...
271 cmisra 782
             'Position',[0.71 0.72 0.1 0.15],...
264 aschellenberg 783
             'Callback','GroundMotions(''load'')');
784
         GM_help = uicontrol(GM(10),'Style','pushbutton',...
785
             'Units','normalized',...
786
             'FontSize',10,...
787
             'Tag','GMhelp',...
284 cmisra 788
             'ToolTipString',sprintf('You can click on this button to find\nground motions from PEER or CESMD,\nor you can upload your own file.\nNote that unrecognized formats require\nthe time step to be input manually.'),...
271 cmisra 789
             'Position',[0.85 0.72 0.083 0.132],...
264 aschellenberg 790
             'CData',Question1,...
279 cmisra 791
             'Callback','Links(''GM'')');
271 cmisra 792
         st_dty = uicontrol(GM(10),'Style','text',...
793
             'Units','normalized',...
794
             'String','dt',...
795
             'BackgroundColor',panelDefault,...
796
             'Position',[0.03 0.56 0.1 0.1]);
797
         GM(29) = uicontrol(GM(10),'Style','text',...
798
             'Units','normalized',...
799
             'String','...',...
800
             'BackgroundColor',panelDefault,...
801
             'Tag','dt2',...
802
             'Position',[0.25 0.53 0.43 0.15],...
803
             'Callback','GroundMotions(''manual dt'')');
264 aschellenberg 804
         %Divide Frame
805
         Height = 0.005;
806
         uicontrol(GM(10),'Style','frame', ...
807
             'Units','normalized', ...
808
             'BackgroundColor',[0 0 0],...
809
             'ForegroundColor',[0 0 0],...
271 cmisra 810
             'Position',[0.00 0.5 1.00 Height]);
264 aschellenberg 811
         st_GM_Yscale = uicontrol(GM(10),'Style','text',...
812
             'Units','normalized',...
813
             'String','Scale Factors',...
814
             'FontSize',10,...
815
             'FontWeight','bold',...
816
             'BackgroundColor',panelDefault,...
271 cmisra 817
             'Position',[0.15 0.35 0.8 0.1]);
264 aschellenberg 818
         st_GM_Yamp = uicontrol(GM(10),'Style','text',...
819
             'Units','normalized',...
820
             'String','Amplitude',...
821
             'BackgroundColor',panelDefault,...
271 cmisra 822
             'Position',[0.01 0.2 0.2 0.1]);
264 aschellenberg 823
         GM(12) = uicontrol(GM(10),'Style','edit',...
824
             'Units','normalized',...
286 aschellenberg 825
             'String','1.0',...
264 aschellenberg 826
             'BackgroundColor',[1 1 1],...
827
             'Tag','edit_amp2',...
271 cmisra 828
             'Position',[0.25 0.2 0.56 0.15],...
264 aschellenberg 829
             'Callback','GroundMotions(''scale'')');
830
         agScale_help = uicontrol(GM(10),'Style','pushbutton',...
831
             'Units','normalized',...
832
             'FontSize',10,...
833
             'Tag','Scalehelp',...
834
             'ToolTipString',sprintf('The ground motion record is automatically\nsclaed by gravity in units of in/s^2.'),...
271 cmisra 835
             'Position',[0.85 0.2 0.083 0.132],...
264 aschellenberg 836
             'CData',Question1,...
837
             'Callback',@helpCallback);
838
         st_GM_Ydt = uicontrol(GM(10),'Style','text',...
839
             'Units','normalized',...
840
             'String','Time',...
841
             'BackgroundColor',panelDefault,...
271 cmisra 842
             'Position',[0.03 0.02 0.125 0.1]);
264 aschellenberg 843
         GM(13) = uicontrol(GM(10),'Style','edit',...
844
             'Units','normalized',...
286 aschellenberg 845
             'String','1.0',...
264 aschellenberg 846
             'BackgroundColor',[1 1 1],...
847
             'Tag','edit_time2',...
271 cmisra 848
             'Position',[0.25 0.02 0.56 0.15],...
264 aschellenberg 849
             'Callback','GroundMotions(''scale'')');
271 cmisra 850
%          GM(14) = uicontrol(GM(10),'Style','pushbutton',...
851
%              'Units','normalized',...
852
%              'String','Apply Scale Factors',...
853
%              'Tag','scale_2',...
854
%              'Position',[0.33 0.01 0.4 0.15],...
855
%              'Callback','GroundMotions(''scale'')');
264 aschellenberg 856
         GM(15) = axes('Parent',GM(18),'Position',[0.56 0.47 0.35 0.15],'Box','on',...
857
             'Tag','a_GM_Yag','Visible','off','NextPlot','replacechildren',...
858
             'ButtonDownFcn','displayAxes(''ag2'')');
859
             grid('on');
860
             xlabel(GM(15),'Time [sec]');
861
             ylabel(GM(15),'ag [L/sec^2]');
862
         GM(16) = axes('Parent',GM(18),'Position',[0.56 0.25 0.35 0.15],'Box','on',...
863
             'Tag','a_GM_YSa','Visible','off','XTickLabel',[],'NextPlot','replacechildren',...
864
             'ButtonDownFcn','displayAxes(''Sa2'')');
865
             grid('on');
866
             ylabel(GM(16),'Sa [L/sec^2]');        
867
         GM(17) = axes('Parent',GM(18),'Position',[0.56 0.08 0.35 0.15],'Box','on',...
868
             'Tag','a_GM_YSd','Visible','off','NextPlot','replacechildren',...
869
             'ButtonDownFcn','displayAxes(''Sd2'')');
870
             grid('on');
871
             xlabel(GM(17),'Period [sec]');
872
             ylabel(GM(17),'Sd [L]');  
873
 
874
%Initial Conditions
875
GM(21) = uipanel('Parent',ph_Main,...
876
    'Visible','off',...
877
    'BackgroundColor',panelDefault,...
878
    'Position',[0.15 0.1 0.7 0.72]);
879
GM(22) = uipanel('Parent',GM(21),...
880
    'Position',[0.2 0.64 0.6 0.33],...
881
    'Tag','Initial Conditions',...
882
    'BackgroundColor',panelDefault,...
883
    'Visible','off');
884
         stID = uicontrol(GM(22),'Style','text',...
885
             'Units','normalized',...
271 cmisra 886
             'String','Initial Displacement',...
264 aschellenberg 887
             'BackgroundColor',panelDefault,...
271 cmisra 888
             'Position',[0.03 0.67 0.23 0.13]);
265 cmisra 889
         GM(27) = uicontrol(GM(22),'Style','popupmenu',...
890
             'Units','normalized',...
891
             'String',{'Choose Mode...','Mode 1','User Defined'},...
892
             'Value',1,...
893
             'FontSize',10,...
894
             'BackgroundColor',[1 1 1],...
895
             'Tag','GM(27)',...
271 cmisra 896
             'Position',[0.30 0.7 0.27 0.15],...
265 cmisra 897
             'Callback','GroundMotions(''initialDispType'')');
264 aschellenberg 898
         GM(23) = uicontrol(GM(22),'Style','edit',...
899
             'Units','normalized',...
265 cmisra 900
             'String','Enter displacement here',...
264 aschellenberg 901
             'BackgroundColor',[1 1 1],...
902
             'Tag','GM(23)',...
271 cmisra 903
             'Position',[0.59 0.7 0.27 0.15],...
264 aschellenberg 904
             'Callback','GroundMotions(''initialDisp'')');
905
         stRT = uicontrol(GM(22),'Style','text',...
906
             'Units','normalized',...
907
             'String','Ramp Time',...
908
             'BackgroundColor',panelDefault,...
909
             'Position',[0.03 0.42 0.15 0.1]);
910
         GM(24) = uicontrol(GM(22),'Style','edit',...
911
             'Units','normalized',...
912
             'String','',...
913
             'BackgroundColor',[1 1 1],...
914
             'Tag','GM(24)',...
271 cmisra 915
             'Position',[0.30 0.4 0.56 0.15],...
264 aschellenberg 916
             'Callback','GroundMotions(''rampTime'')');
917
         stVT = uicontrol(GM(22),'Style','text',...
918
             'Units','normalized',...
271 cmisra 919
             'String','Free Vibration Time',...
264 aschellenberg 920
             'BackgroundColor',panelDefault,...
271 cmisra 921
             'Position',[0.03 0.1 0.23 0.13]);
264 aschellenberg 922
         GM(25) = uicontrol(GM(22),'Style','edit',...
923
             'Units','normalized',...
924
             'String','',...
925
             'BackgroundColor',[1 1 1],...
926
             'Tag','GM(25)',...
271 cmisra 927
             'Position',[0.30 0.1 0.56 0.15],...
264 aschellenberg 928
             'Callback','GroundMotions(''vibTime'')');
929
%          GM(26) = axes('Parent',GM(21),'Position',[0.2 0.15 0.6 0.4],'Box','on',...
930
%              'Tag','ICplot','Visible','off','NextPlot','replacechildren');
931
         GM(26) = uipanel('Parent',GM(21),'Position',[0.2 0.03 0.6 0.58],...
932
             'Tag','ICplot','Visible','off');
933
         ICimage = axes('Parent',GM(26),'Position',[0 0 1 1]);
934
         imagesc(imread(which('FreeVibration.png')));
935
         set(ICimage,'XTick',[],'YTick',[]);
936
 
265 cmisra 937
         InitDispHelp = uicontrol(GM(22),'Style','pushbutton',...
938
             'Units','normalized',...
939
             'FontSize',10,...
940
             'ToolTipString',sprintf('Input initial displacement value.\nFor 2 DOF Models, two values\nare required in the form [U1 U2]'),...
271 cmisra 941
             'Position',[0.90 0.71 0.049 0.132],...
265 cmisra 942
             'CData',Question1,...
943
             'Callback',@helpCallback);
944
 
264 aschellenberg 945
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
946
 
947
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         
948
%Create Experimental Setup Page%
949
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
950
 
951
%Title
952
ExpSetup(1) = uicontrol(ph_Main,'Style','text',...
953
    'String','Experimental Setup',...
284 cmisra 954
    'FontSize',18,...
264 aschellenberg 955
    'Units','normalized',...
956
    'ForegroundColor',[1 1 1],...
957
    'BackgroundColor',panel_color,...
284 cmisra 958
    'Position',[0.3 0.945 0.4 0.055],...
264 aschellenberg 959
    'FontName',font,...
960
    'Visible','off');
961
 
962
%Image Button Group       
963
ExpSetup(2) = uibuttongroup('Parent',ph_Main,...
964
    'BackgroundColor',[0.3 0.5 0.7],...
965
    'Position',[0.25 .2 .5 .6],...
966
    'Visible','off');
967
         ExpSetup(3) = uicontrol(ExpSetup(2),'Style','togglebutton',...
968
             'Tag','1 DOF',...
969
             'Units','normalized',...
970
             'Position',[0 0 1 1]);
971
         ExpSetup(4) = uicontrol(ExpSetup(2),'Style','togglebutton',...
972
             'Tag','2 DOF A',...
973
             'Units','normalized',...
974
             'Position',[0 0 1 1]);
975
         ExpSetup(5) = uicontrol(ExpSetup(2),'Style','togglebutton',...
976
             'Tag','2 DOF B',...
977
             'Units','normalized',...
978
             'Position',[0 0 1 1]);
979
         ExpSetup(6) = uicontrol(ExpSetup(2),'Style','pushbutton',...
980
             'Units','normalized',...
981
             'String','!',...
982
             'Position',[0.8 0 0.2 0.2],...
983
             'Callback','ExpSetup(''extra options'')');
984
         set(ExpSetup(2),'SelectionChangeFcn','ExpSetup(''choose DOF'')');
985
 
986
Background = axes('Parent',ExpSetup(2),'Position',[0 0 1 1]);
987
imagesc(imread(which('greyGradient.png')));
988
% imagesc(imread(which('Metal.jpg')));
989
set(Background,'XTick',[],'YTick',[]);          
990
 
991
 
992
 
993
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
994
 
995
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         
996
%Create Experimental Control Page%
997
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
998
 
999
%Title       
1000
ExpControl(1) = uicontrol(ph_Main,'Style','text',...
1001
    'String','Experimental Control',...
284 cmisra 1002
    'FontSize',18,...
264 aschellenberg 1003
    'ForegroundColor',[1 1 1],...
1004
    'BackgroundColor',panel_color,...
1005
    'Units','normalized',...
284 cmisra 1006
    'Position',[0.3 0.945 0.4 0.055],...
264 aschellenberg 1007
    'FontName',font,...
1008
    'Visible','off');
1009
 
1010
% ExpControl(97) = uipanel('Parent',ph_Main,...
1011
%     'Position',[0.05 0.03 0.9 0.89],...
1012
%     'Visible','off');
1013
% Background = axes('Parent',ExpControl(97),'Position',[0 0 1 1]);
1014
% imagesc(imread(which('greyGradient.png')));
1015
% % imagesc(imread(which('Metal.jpg')));
1016
% set(Background,'XTick',[],'YTick',[]); 
1017
 
1018
 
1019
%Tab Buttons       
1020
ExpControl(2) = uicontrol(ph_Main,'Style','togglebutton',...
1021
    'Tag','Control Point',...
1022
    'Units','normalized',...
1023
    'Value',0,...
273 cmisra 1024
    'Position',[0.35 0.82 0.1 0.08],...
264 aschellenberg 1025
    'Visible','off',...
1026
    'Callback','ExpControl(''tab toggle'')',...
1027
    'CData',CP0);
1028
ExpControl(3) = uicontrol(ph_Main,'Style','togglebutton',...
1029
    'Tag','Simulation',...
1030
    'Units','normalized',...
1031
    'Value',1,...
273 cmisra 1032
    'Position',[0.15 0.82 0.1 0.08],...
264 aschellenberg 1033
    'Visible','off',...
1034
    'Callback','ExpControl(''tab toggle'')',...
1035
    'CData',Sim1);
1036
ExpControl(4) = uicontrol(ph_Main,'Style','togglebutton',...
1037
    'Tag','Real Controller',...
1038
    'Units','normalized',...
273 cmisra 1039
    'Position',[0.25 0.82 0.1 0.08],...
264 aschellenberg 1040
    'Visible','off',...
1041
    'Callback','ExpControl(''tab toggle'')',...
1042
    'CData',Real0);                    
1043
 
1044
%Experimental Control Option Panels
1045
%Simulation Panel
1046
ExpControl(5) = uipanel('Parent',ph_Main,...
1047
    'Visible','off',...
1048
    'BackgroundColor',panelDefault,...
1049
    'Position',[0.15 0.1 0.7 0.72]);
1050
         ExpControl(6) = uicontrol(ExpControl(5),'Style','popupmenu',...
271 cmisra 1051
             'String',{'Choose DOF...','DOF 1'},...
264 aschellenberg 1052
             'Value',1,...
1053
             'FontSize',10,...
1054
             'Units','normalized',...
1055
             'BackgroundColor',[1 1 1],...
1056
             'Position',[0.05 0.77 0.2 0.15],...
1057
             'Callback','ExpControl(''CtrlDOF'')');
1058
         ExpControl(7) = uipanel('Parent',ExpControl(5),...
1059
             'Visible','off',...
1060
             'BackgroundColor',panelDefault,...
1061
             'Position',[0.05 0.5 0.9 0.3]);
1062
                uicontrol(ExpControl(7),'Style','text',...
1063
                    'Units','normalized',...
1064
                    'FontSize',10,...
1065
                    'String','Define Control',...
1066
                    'BackgroundColor',panelDefault,...
1067
                    'Position',[0.01 0.65 0.25 0.2]);
1068
                ExpControl(8) = uicontrol(ExpControl(7),'Style','popupmenu',...
1069
                    'String',{'Control Types...','SimUniaxialMaterial'},...
1070
                    'Value',1,...
1071
                    'FontSize',10,...
1072
                    'Units','normalized',...
1073
                    'BackgroundColor',[1 1 1],...
1074
                    'Position',[0.31 0.7 0.4 0.2],...
1075
                    'Callback','ExpControl(''Sim control'')');
1076
                uicontrol(ExpControl(7),'Style','text',...
1077
                    'Units','normalized',...
1078
                    'FontSize',10,...
1079
                    'String','Number of Actuators',...
1080
                    'BackgroundColor',panelDefault,...
1081
                    'Position',[0.01 0.35 0.25 0.2]);
1082
                ExpControl(9) = uicontrol(ExpControl(7),'Style','edit',...
1083
                    'Units','normalized',...
1084
                    'FontSize',10,...
1085
                    'BackgroundColor',[1 1 1],...
1086
                    'Position',[0.31 0.40 0.4 0.2],...
271 cmisra 1087
                    'String','1',...
264 aschellenberg 1088
                    'Callback','ExpControl(''NumAct'')');
1089
                uicontrol(ExpControl(7),'Style','text',...
1090
                    'Units','normalized',...
1091
                    'FontSize',10,...
1092
                    'String','Choose Material',...
1093
                    'BackgroundColor',panelDefault,...
1094
                    'Position',[0.01 0.05 0.25 0.2]);
1095
                ExpControl(10) = uicontrol(ExpControl(7),'Style','popupmenu',...
1096
                    'Units','normalized',...
1097
                    'FontSize',10,...
1098
                    'BackgroundColor',[1 1 1],...
1099
                    'String',{'Material Type...','Elastic','Elastic-Perfectly Plastic','Steel - Bilinear','Steel - Giuffré-Menegotto-Pinto'},...
1100
                    'Position',[0.31 0.1 0.4 0.2],...
1101
                    'Callback','ExpControl(''Sim Material'')');
273 cmisra 1102
                SimMatHelp = uicontrol(ExpControl(7),'Style','pushbutton',...
1103
                    'Units','normalized',...
1104
                    'FontSize',10,...
1105
                    'Tag','SimMatHelp',...
1106
                    'ToolTipString',sprintf('Click to learn more about the material types'),...
1107
                    'Position',[0.75 0.14 0.032 0.15],...
1108
                    'CData',Question1,...
1109
                    'Callback','Links(''Sim Material'')');
264 aschellenberg 1110
 
1111
         %Simulation Material Types
1112
         %Elastic Panel
1113
         ExpControl(11) = uipanel('Parent',ExpControl(5),...
1114
             'Visible','off',...
1115
             'BackgroundColor',panelDefault,...
1116
             'Position',[0.05 0.35 0.9 0.15]);
1117
                uicontrol(ExpControl(11),'Style','text',...
1118
                    'Units','normalized',...
1119
                    'FontSize',10,...
1120
                    'String','Elastic Modulus (E)',...
1121
                    'BackgroundColor',panelDefault,...
1122
                    'Position',[0 0.15 0.25 0.45]);
1123
                ExpControl(12) = uicontrol(ExpControl(11),'Style','edit',...
1124
                    'Units','normalized',...
1125
                    'FontSize',10,...
1126
                    'BackgroundColor',[1 1 1],...
1127
                    'Position',[0.31 0.3 0.4 0.4],...
1128
                    'Callback','ExpControl(''E'')');
273 cmisra 1129
                ElasticHelp = uicontrol(ExpControl(11),'Style','pushbutton',...
1130
                    'Units','normalized',...
1131
                    'FontSize',10,...
1132
                    'Tag','ElasticHelp',...
1133
                    'ToolTipString',sprintf('Click to learn more about elastic material parameters'),...
1134
                    'Position',[0.75 0.34 0.032 0.29],...
1135
                    'CData',Question1,...
1136
                    'Callback','Links(''Sim Material'')');
264 aschellenberg 1137
         %EPP Panel
1138
         ExpControl(13) = uipanel('Parent',ExpControl(5),...
1139
             'Visible','off',...
1140
             'BackgroundColor',panelDefault,...
1141
             'Position',[0.05 0.29 0.9 0.21]);
1142
                uicontrol(ExpControl(13),'Style','text',...
1143
                    'Units','normalized',...
1144
                    'FontSize',10,...
1145
                    'String','Elastic Modulus (E)',...
1146
                    'BackgroundColor',panelDefault,...
1147
                    'Position',[0 0.48 0.25 0.3]);
1148
                ExpControl(14) = uicontrol(ExpControl(13),'Style','edit',...
1149
                    'Units','normalized',...
1150
                    'FontSize',10,...
1151
                    'BackgroundColor',[1 1 1],...
1152
                    'Position',[0.31 0.58 0.4 0.25],...
1153
                    'Callback','ExpControl(''E'')');
1154
                uicontrol(ExpControl(13),'Style','text',...
1155
                    'Units','normalized',...
1156
                    'FontSize',10,...
1157
                    'String','Plastic Strain Point (epsP)',...
1158
                    'BackgroundColor',panelDefault,...
1159
                    'Position',[0 0.03 0.25 0.3]);
1160
                ExpControl(15) = uicontrol(ExpControl(13),'Style','edit',...
1161
                    'Units','normalized',...
1162
                    'FontSize',10,...
1163
                    'BackgroundColor',[1 1 1],...
1164
                    'Position',[0.31 0.13 0.4 0.25],...
1165
                    'Callback','ExpControl(''epsP'')');
273 cmisra 1166
                EPPHelp = uicontrol(ExpControl(13),'Style','pushbutton',...
1167
                    'Units','normalized',...
1168
                    'FontSize',10,...
1169
                    'Tag','EPPHelp',...
1170
                    'ToolTipString',sprintf('Click to learn more about elastic-\nperfectly plastic material parameters'),...
1171
                    'Position',[0.75 0.6 0.032 0.2],...
1172
                    'CData',Question1,...
1173
                    'Callback','Links(''Sim Material'')');
264 aschellenberg 1174
         %Steel Bilinear Panel
1175
         ExpControl(16) = uipanel('Parent',ExpControl(5),...
1176
             'Visible','off',...
1177
             'BackgroundColor',panelDefault,...
1178
             'Position',[0.05 0.2 0.9 0.3]);
1179
                uicontrol(ExpControl(16),'Style','text',...
1180
                    'Units','normalized',...
1181
                    'FontSize',10,...
1182
                    'String','Yield Strength (Fy)',...
1183
                    'BackgroundColor',panelDefault,...
1184
                    'Position',[0 0.6 0.25 0.25]);
1185
                ExpControl(17) = uicontrol(ExpControl(16),'Style','edit',...
1186
                    'Units','normalized',...
1187
                    'FontSize',10,...
1188
                    'BackgroundColor',[1 1 1],...
1189
                    'Position',[0.31 0.7 0.4 0.2],...
1190
                    'Callback','ExpControl(''Fy'')');
1191
                uicontrol(ExpControl(16),'Style','text',...
1192
                    'Units','normalized',...
1193
                    'FontSize',10,...
1194
                    'String','Initial Elastic Modulus (E0)',...
1195
                    'BackgroundColor',panelDefault,...
1196
                    'Position',[0 0.3 0.25 0.25]);
1197
                ExpControl(18) = uicontrol(ExpControl(16),'Style','edit',...
1198
                    'Units','normalized',...
1199
                    'FontSize',10,...
1200
                    'BackgroundColor',[1 1 1],...
1201
                    'Position',[0.31 0.4 0.4 0.2],...
1202
                    'Callback','ExpControl(''E0'')');
1203
                uicontrol(ExpControl(16),'Style','text',...
1204
                    'Units','normalized',...
1205
                    'FontSize',10,...
1206
                    'String','Strain Hardening Ratio (b)',...
1207
                    'BackgroundColor',panelDefault,...
1208
                    'Position',[0 0 0.25 0.25]);
1209
                ExpControl(19) = uicontrol(ExpControl(16),'Style','edit',...
1210
                    'Units','normalized',...
1211
                    'FontSize',10,...
1212
                    'BackgroundColor',[1 1 1],...
1213
                    'Position',[0.31 0.1 0.4 0.2],...
1214
                    'Callback','ExpControl(''b'')');
273 cmisra 1215
                Steel01Help = uicontrol(ExpControl(16),'Style','pushbutton',...
1216
                    'Units','normalized',...
1217
                    'FontSize',10,...
1218
                    'Tag','Steel01Help',...
1219
                    'ToolTipString',sprintf('Click to learn more about bilinear\nsteel material parameters'),...
1220
                    'Position',[0.75 0.72 0.032 0.155],...
1221
                    'CData',Question1,...
1222
                    'Callback','Links(''Sim Material'')');
264 aschellenberg 1223
         %Steel GMP Panel
1224
         ExpControl(20) = uipanel('Parent',ExpControl(5),...
1225
             'Visible','off',...
1226
             'BackgroundColor',panelDefault,...
1227
             'Position',[0.05 0.05 0.9 0.45]);
1228
                uicontrol(ExpControl(20),'Style','text',...
1229
                    'Units','normalized',...
1230
                    'FontSize',10,...
1231
                    'String','Yield Strength (Fy)',...
1232
                    'BackgroundColor',panelDefault,...
1233
                    'Position',[0 0.77 0.25 0.15]);
1234
                ExpControl(21) = uicontrol(ExpControl(20),'Style','edit',...
1235
                    'Units','normalized',...
1236
                    'FontSize',10,...
1237
                    'BackgroundColor',[1 1 1],...
1238
                    'Position',[0.31 0.82 0.4 0.13],...
1239
                    'Callback','ExpControl(''Fy'')');
1240
                uicontrol(ExpControl(20),'Style','text',...
1241
                    'Units','normalized',...
1242
                    'FontSize',10,...
1243
                    'String','Initial Elastic Modulus (E)',...
1244
                    'BackgroundColor',panelDefault,...
1245
                    'Position',[0 0.54 0.25 0.15]);
1246
                ExpControl(22) = uicontrol(ExpControl(20),'Style','edit',...
1247
                    'Units','normalized',...
1248
                    'FontSize',10,...
1249
                    'BackgroundColor',[1 1 1],...
1250
                    'Position',[0.31 0.58 0.4 0.13],...
1251
                    'Callback','ExpControl(''E'')');
1252
                uicontrol(ExpControl(20),'Style','text',...
1253
                    'Units','normalized',...
1254
                    'FontSize',10,...
1255
                    'String','Strain Hardening Ratio (b)',...
1256
                    'BackgroundColor',panelDefault,...
1257
                    'Position',[0 0.31 0.25 0.15]);
1258
                ExpControl(23) = uicontrol(ExpControl(20),'Style','edit',...
1259
                    'Units','normalized',...
1260
                    'FontSize',10,...
1261
                    'BackgroundColor',[1 1 1],...
1262
                    'Position',[0.31 0.35 0.4 0.13],...
1263
                    'Callback','ExpControl(''b'')');
1264
                uicontrol(ExpControl(20),'Style','text',...
1265
                    'Units','normalized',...
1266
                    'FontSize',10,...
1267
                    'String','Elastic-Plastic Transition (R0)',...
1268
                    'BackgroundColor',panelDefault,...
1269
                    'Position',[0 0.08 0.25 0.15]);
1270
                ExpControl(24) = uicontrol(ExpControl(20),'Style','edit',...
1271
                    'Units','normalized',...
1272
                    'FontSize',10,...
1273
                    'BackgroundColor',[1 1 1],...
1274
                    'Position',[0.31 0.11 0.4 0.13],...
1275
                    'Callback','ExpControl(''R0'')');
274 cmisra 1276
%                 GMP_help = uicontrol(ExpControl(20),'Style','pushbutton',...
1277
%                     'Units','normalized',...
1278
%                     'FontSize',10,...
1279
%                     'Tag','GMP_help',...
1280
%                     'ToolTipString',sprintf('The variable R0 controls the elastic-plastic transition\nRecommended values range between 10 and 20'),...
1281
%                     'Position',[0.75 0.11 0.032 0.097],...
1282
%                     'CData',Question1,...
1283
%                     'Callback',@helpCallback);
273 cmisra 1284
                Steel02Help = uicontrol(ExpControl(20),'Style','pushbutton',...
1285
                    'Units','normalized',...
1286
                    'FontSize',10,...
1287
                    'Tag','Steel02Help',...
1288
                    'ToolTipString',sprintf('Click to learn more about GMP\nsteel material parameters'),...
1289
                    'Position',[0.75 0.84 0.032 0.094],...
1290
                    'CData',Question1,...
1291
                    'Callback','Links(''Sim Material'')');
264 aschellenberg 1292
 
1293
%Real Controller Panel
1294
ExpControl(25) = uipanel('Parent',ph_Main,...
1295
    'Visible','off',...
1296
    'BackgroundColor',panelDefault,...
1297
    'Position',[0.15 0.1 0.7 0.72]);
1298
         ExpControl(26) = uipanel('Parent',ExpControl(25),...
1299
             'Visible','off',...
1300
             'BackgroundColor',panelDefault,...
1301
             'Position',[0.05 0.65 0.9 0.15]);
1302
                uicontrol(ExpControl(26),'Style','text',...
1303
                    'Units','normalized',...
1304
                    'FontSize',10,...
1305
                    'String','Define Control',...
1306
                    'BackgroundColor',panelDefault,...
1307
                    'Position',[0 0.15 0.25 0.45]);
1308
                ExpControl(27) = uicontrol(ExpControl(26),'Style','popupmenu',...
1309
                    'String',{'Control Types...','LabVIEW','MTSCsi','SCRAMNet','dSpace','xPCtarget'},...
1310
                    'Value',1,...
1311
                    'FontSize',10,...
1312
                    'Units','normalized',...
1313
                    'BackgroundColor',[1 1 1],...
1314
                    'Position',[0.31 0.3 0.4 0.4],...
1315
                    'Callback','ExpControl(''Real control'')');
1316
         %LabVIEW Panels
1317
         ExpControl(28) = uipanel('Parent',ExpControl(25),...
1318
             'Visible','off',...
1319
             'Tag','LabVIEW1',...
1320
             'BackgroundColor',panelDefault,...
1321
             'Position',[0.05 0.45 0.9 0.2]);
1322
                uicontrol(ExpControl(28),'Style','text',...
1323
                    'Units','normalized',...
1324
                    'FontSize',10,...
1325
                    'String','LabVIEW IP Address',...
1326
                    'BackgroundColor',panelDefault,...
1327
                    'Position',[0 0.48 0.25 0.3]);
1328
                ExpControl(29) = uicontrol(ExpControl(28),'Style','edit',...
1329
                    'Units','normalized',...
1330
                    'FontSize',10,...
1331
                    'BackgroundColor',[1 1 1],...
1332
                    'Position',[0.31 0.58 0.4 0.25],...
1333
                    'Callback','ExpControl(''ipAddr'')');
1334
                uicontrol(ExpControl(28),'Style','text',...
1335
                    'Units','normalized',...
1336
                    'FontSize',10,...
1337
                    'String','LabVIEW IP Port',...
1338
                    'BackgroundColor',panelDefault,...
1339
                    'Position',[0 0.03 0.25 0.3]);
1340
                ExpControl(30) = uicontrol(ExpControl(28),'Style','edit',...
1341
                    'Units','normalized',...
1342
                    'FontSize',10,...
1343
                    'BackgroundColor',[1 1 1],...
1344
                    'Position',[0.31 0.13 0.4 0.25],...
1345
                    'Callback','ExpControl(''ipPort'')');
1346
         ExpControl(31) = uipanel('Parent',ExpControl(25),...
1347
             'Visible','off',...
1348
             'Tag','LabVIEW2',...
1349
             'BackgroundColor',panelDefault,...
1350
             'Position',[0.05 0.2 0.9 0.25]);
1351
                uicontrol(ExpControl(31),'Style','text',...
1352
                    'Units','normalized',...
1353
                    'FontSize',10,...
1354
                    'String','Trial CP(s)',...
1355
                    'BackgroundColor',panelDefault,...
1356
                    'Position',[0 0.48 0.25 0.3]);
1357
                ExpControl(32) = uicontrol(ExpControl(31),'Style','listbox',...
1358
                    'Units','normalized',...
1359
                    'FontSize',10,...
1360
                    'BackgroundColor',[1 1 1],...
271 cmisra 1361
                    'String',{'Control Point 1','Control Point 2'},...
264 aschellenberg 1362
                    'Max',6,...
1363
                    'Position',[0.31 0.53 0.4 0.33],...
1364
                    'Callback','ExpControl(''TrialCP'')');
1365
                uicontrol(ExpControl(31),'Style','text',...
1366
                    'Units','normalized',...
1367
                    'FontSize',10,...
1368
                    'String','Output CP(s)',...
1369
                    'BackgroundColor',panelDefault,...
1370
                    'Position',[0 0.03 0.25 0.3]);
1371
                ExpControl(33) = uicontrol(ExpControl(31),'Style','listbox',...
1372
                    'Units','normalized',...
1373
                    'FontSize',10,...
1374
                    'BackgroundColor',[1 1 1],...
271 cmisra 1375
                    'String',{'Control Point 1','Control Point 2'},...
264 aschellenberg 1376
                    'Max',6,...
1377
                    'Position',[0.31 0.08 0.4 0.33],...
1378
                    'Callback','ExpControl(''OutputCP'')');
1379
         %MTSCsi Panels
1380
         ExpControl(34) = uipanel('Parent',ExpControl(25),...
1381
             'Visible','off',...
1382
             'Tag','MTSCsi1',...
1383
             'BackgroundColor',panelDefault,...
1384
             'Position',[0.05 0.45 0.9 0.2]);
1385
                uicontrol(ExpControl(34),'Style','text',...
1386
                    'Units','normalized',...
1387
                    'FontSize',10,...
1388
                    'String','Configuration File Name',...
1389
                    'BackgroundColor',panelDefault,...
1390
                    'Position',[0 0.48 0.25 0.3]);
1391
                ExpControl(35) = uicontrol(ExpControl(34),'Style','edit',...
1392
                    'Units','normalized',...
1393
                    'FontSize',10,...
1394
                    'BackgroundColor',[1 1 1],...
1395
                    'Position',[0.31 0.58 0.4 0.25],...
1396
                    'Callback','ExpControl(''ConfigName'')');
1397
                ConfigBrowse = uicontrol(ExpControl(34),'Style','pushbutton',...
1398
                    'Units','normalized',...
1399
                    'String','...',...
1400
                    'Tag','ConfigBrowse',...
1401
                    'Position',[0.74 0.58 0.08 0.25],...
1402
                    'Callback','ExpControl(''loadConfig'')');
1403
                uicontrol(ExpControl(34),'Style','text',...
1404
                    'Units','normalized',...
1405
                    'FontSize',10,...
1406
                    'String','Configuration File Path',...
1407
                    'BackgroundColor',panelDefault,...
1408
                    'Position',[0 0.03 0.25 0.3]);
1409
                ExpControl(36) = uicontrol(ExpControl(34),'Style','edit',...
1410
                    'Units','normalized',...
1411
                    'FontSize',10,...
1412
                    'BackgroundColor',[1 1 1],...
1413
                    'Position',[0.31 0.13 0.4 0.25],...
1414
                    'Callback','ExpControl(''ConfigPath'')');
1415
         ExpControl(37) = uipanel('Parent',ExpControl(25),...
1416
             'Visible','off',...
1417
             'Tag','MTSCsi2',...
1418
             'BackgroundColor',panelDefault,...
1419
             'Position',[0.05 0.3 0.9 0.15]);
1420
                uicontrol(ExpControl(37),'Style','text',...
1421
                    'Units','normalized',...
1422
                    'FontSize',10,...
1423
                    'String','Ramp Time',...
1424
                    'BackgroundColor',panelDefault,...
1425
                    'Position',[0 0.35 0.25 0.3]);
1426
                ExpControl(38) = uicontrol(ExpControl(37),'Style','edit',...
1427
                    'Units','normalized',...
1428
                    'FontSize',10,...
1429
                    'BackgroundColor',[1 1 1],...
1430
                    'Position',[0.31 0.3 0.4 0.4],...
1431
                    'Callback','ExpControl(''rampTime'')');
1432
         %SCRAMNet Panel
1433
         ExpControl(39) = uipanel('Parent',ExpControl(25),...
1434
             'Visible','off',...
1435
             'Tag','SCRAMNet',...
1436
             'BackgroundColor',panelDefault,...
1437
             'Position',[0.05 0.4 0.9 0.25]);
1438
                uicontrol(ExpControl(39),'Style','text',...
1439
                    'Units','normalized',...
1440
                    'FontSize',10,...
1441
                    'String','Memory Offset (bytes)',...
1442
                    'BackgroundColor',panelDefault,...
1443
                    'Position',[0 0.48 0.25 0.3]);
1444
                ExpControl(40) = uicontrol(ExpControl(39),'Style','edit',...
1445
                    'Units','normalized',...
1446
                    'FontSize',10,...
1447
                    'BackgroundColor',[1 1 1],...
1448
                    'Position',[0.31 0.58 0.4 0.25],...
1449
                    'Callback','ExpControl(''memOffset'')');
1450
                uicontrol(ExpControl(39),'Style','text',...
1451
                    'Units','normalized',...
1452
                    'FontSize',10,...
1453
                    'String','Number of Actuator Channels',...
1454
                    'BackgroundColor',panelDefault,...
1455
                    'Position',[0 0.1 0.25 0.3]);
1456
                ExpControl(41) = uicontrol(ExpControl(39),'Style','edit',...
1457
                    'Units','normalized',...
1458
                    'FontSize',10,...
1459
                    'BackgroundColor',[1 1 1],...
1460
                    'Position',[0.31 0.13 0.4 0.25],...
1461
                    'Callback','ExpControl(''NumActCh'')');
1462
         %dSpace Panel
1463
         ExpControl(42) = uipanel('Parent',ExpControl(25),...
1464
             'Visible','off',...
1465
             'Tag','dSpace',...
1466
             'BackgroundColor',panelDefault,...
1467
             'Position',[0.05 0.45 0.9 0.2]);
1468
                uicontrol(ExpControl(42),'Style','text',...
1469
                    'Units','normalized',...
1470
                    'FontSize',10,...
1471
                    'String','Predictor-Corrector Type',...
1472
                    'BackgroundColor',panelDefault,...
1473
                    'Position',[0 0.45 0.25 0.35]);
1474
                ExpControl(43) = uicontrol(ExpControl(42),'Style','popupmenu',...
1475
                    'Units','normalized',...
1476
                    'FontSize',10,...
1477
                    'BackgroundColor',[1 1 1],...
1478
                    'String',{'Choose Type...','Displacement','Displacement and Velocity','Displacement, Velocity and Acceleration'},...
1479
                    'Position',[0.31 0.58 0.4 0.25],...
1480
                    'Callback','ExpControl(''PCtype'')');
1481
                uicontrol(ExpControl(42),'Style','text',...
1482
                    'Units','normalized',...
1483
                    'FontSize',10,...
1484
                    'String','Board Name',...
1485
                    'BackgroundColor',panelDefault,...
1486
                    'Position',[0 0.03 0.25 0.3]);
1487
                ExpControl(44) = uicontrol(ExpControl(42),'Style','popupmenu',...
1488
                    'Units','normalized',...
1489
                    'FontSize',10,...
1490
                    'BackgroundColor',[1 1 1],...
1491
                    'String',{'Choose Board Name...','DS1103','DS1104'},...
1492
                    'Position',[0.31 0.13 0.4 0.25],...
1493
                    'Callback','ExpControl(''boardName'')');
1494
         %xPCtarget Panels
1495
         ExpControl(45) = uipanel('Parent',ExpControl(25),...
1496
             'Visible','off',...
1497
             'Tag','xPCtarget1',...
1498
             'BackgroundColor',panelDefault,...
1499
             'Position',[0.05 0.5 0.9 0.15]);
1500
                uicontrol(ExpControl(45),'Style','text',...
1501
                    'Units','normalized',...
1502
                    'FontSize',10,...
1503
                    'String','Predictor-Corrector Type',...
1504
                    'BackgroundColor',panelDefault,...
1505
                    'Position',[0 0.15 0.25 0.45]);
1506
                ExpControl(46) = uicontrol(ExpControl(45),'Style','popupmenu',...
1507
                    'Units','normalized',...
1508
                    'FontSize',10,...
1509
                    'BackgroundColor',[1 1 1],...
1510
                    'String',{'Choose Type...','Displacement','Displacement and Velocity','Displacement, Velocity and Acceleration'},...
1511
                    'Position',[0.31 0.3 0.4 0.4],...
1512
                    'Callback','ExpControl(''PCtype'')');
1513
         ExpControl(47) = uipanel('Parent',ExpControl(25),...
1514
             'Visible','off',...
1515
             'Tag','xPCtarget2',...
1516
             'BackgroundColor',panelDefault,...
1517
             'Position',[0.05 0.3 0.9 0.2]);
1518
                uicontrol(ExpControl(47),'Style','text',...
1519
                    'Units','normalized',...
1520
                    'FontSize',10,...
1521
                    'String','xPC Target IP Address',...
1522
                    'BackgroundColor',panelDefault,...
1523
                    'Position',[0 0.48 0.25 0.3]);
1524
                ExpControl(48) = uicontrol(ExpControl(47),'Style','edit',...
1525
                    'Units','normalized',...
1526
                    'FontSize',10,...
1527
                    'BackgroundColor',[1 1 1],...
1528
                    'Position',[0.31 0.58 0.4 0.25],...
1529
                    'Callback','ExpControl(''ipAddr'')');
1530
                uicontrol(ExpControl(47),'Style','text',...
1531
                    'Units','normalized',...
1532
                    'FontSize',10,...
1533
                    'String','xPC Target IP Port',...
1534
                    'BackgroundColor',panelDefault,...
1535
                    'Position',[0 0.03 0.25 0.3]);
1536
                ExpControl(49) = uicontrol(ExpControl(47),'Style','edit',...
1537
                    'Units','normalized',...
1538
                    'FontSize',10,...
1539
                    'String','22222',...
1540
                    'BackgroundColor',[1 1 1],...
1541
                    'Position',[0.31 0.13 0.4 0.25],...
1542
                    'Callback','ExpControl(''ipPort'')');
1543
         ExpControl(50) = uipanel('Parent',ExpControl(25),...
1544
             'Visible','off',...
1545
             'Tag','xPCtarget3',...
1546
             'BackgroundColor',panelDefault,...
1547
             'Position',[0.05 0.1 0.9 0.2]);
1548
                uicontrol(ExpControl(50),'Style','text',...
1549
                    'Units','normalized',...
1550
                    'FontSize',10,...
1551
                    'String','Application Name',...
1552
                    'BackgroundColor',panelDefault,...
1553
                    'Position',[0 0.48 0.25 0.3]);
1554
                ExpControl(51) = uicontrol(ExpControl(50),'Style','edit',...
1555
                    'Units','normalized',...
1556
                    'FontSize',10,...
1557
                    'BackgroundColor',[1 1 1],...
1558
                    'Position',[0.31 0.58 0.4 0.25],...
1559
                    'Callback','ExpControl(''appName'')');
1560
                AppBrowse = uicontrol(ExpControl(50),'Style','pushbutton',...
1561
                    'Units','normalized',...
1562
                    'String','...',...
1563
                    'Tag','AppBrowse',...
1564
                    'Position',[0.74 0.58 0.08 0.25],...
1565
                    'Callback','ExpControl(''loadApp'')');
1566
                uicontrol(ExpControl(50),'Style','text',...
1567
                    'Units','normalized',...
1568
                    'FontSize',10,...
1569
                    'String','Application Path',...
1570
                    'BackgroundColor',panelDefault,...
1571
                    'Position',[0 0.03 0.25 0.3]);
1572
                ExpControl(52) = uicontrol(ExpControl(50),'Style','edit',...
1573
                    'Units','normalized',...
1574
                    'FontSize',10,...
1575
                    'BackgroundColor',[1 1 1],...
1576
                    'Position',[0.31 0.13 0.4 0.25],...
1577
                    'Callback','ExpControl(''appPath'')');
1578
 
1579
%Control Points Panel
1580
ExpControl(53) = uipanel('Parent',ph_Main,...
1581
    'Visible','off',...
1582
    'BackgroundColor',panelDefault,...
1583
    'Position',[0.15 0.1 0.7 0.72]);
1584
         ExpControl(54) = uicontrol(ExpControl(53),'Style','popupmenu',...
1585
             'String',{'Existing Control Points...','Control Point 1','Control Point 2'},...
1586
             'Value',1,...
1587
             'FontSize',10,...
1588
             'Units','normalized',...
1589
             'BackgroundColor',[1 1 1],...
1590
             'Position',[0.05 0.77 0.2 0.15],...
1591
             'Callback','ExpControl(''SwitchCP'')');
1592
         ExpControl(55) = uipanel('Parent',ExpControl(53),...
1593
             'Visible','off',...
1594
             'Tag','CP1',...
1595
             'BackgroundColor',panelDefault,...
1596
             'Position',[0.05 0.53 0.9 0.27]);
1597
                uicontrol(ExpControl(55),'Style','text',...
1598
                    'Units','normalized',...
1599
                    'FontSize',10,...
1600
                    'String','Name',...
1601
                    'BackgroundColor',panelDefault,...
1602
                    'Position',[0.01 0.7 0.25 0.2]);
1603
                ExpControl(56) = uicontrol(ExpControl(55),'Style','edit',...
1604
                    'FontSize',10,...
1605
                    'Units','normalized',...
271 cmisra 1606
                    'String','',...
264 aschellenberg 1607
                    'BackgroundColor',[1 1 1],...
1608
                    'Position',[0.31 0.75 0.4 0.2]);
1609
                uicontrol(ExpControl(55),'Style','text',...
1610
                    'Units','normalized',...
1611
                    'FontSize',10,...
1612
                    'String','Node Number',...
1613
                    'BackgroundColor',panelDefault,...
1614
                    'Position',[0.01 0.4 0.25 0.2]);
1615
                ExpControl(57) = uicontrol(ExpControl(55),'Style','edit',...
1616
                    'String','1',...
1617
                    'Units','normalized',...
1618
                    'FontSize',10,...
1619
                    'BackgroundColor',[1 1 1],...
1620
                    'Position',[0.31 0.45 0.4 0.2],...
1621
                    'Callback','ExpControl(''nodeNum'')');
1622
                uicontrol(ExpControl(55),'Style','text',...
1623
                    'Units','normalized',...
1624
                    'FontSize',10,...
1625
                    'String','Response Quantities',...
1626
                    'BackgroundColor',panelDefault,...
1627
                    'Position',[0.01 0.1 0.25 0.2]);
1628
                ExpControl(58) = uicontrol(ExpControl(55),'Style','edit',...
1629
                    'Units','normalized',...
1630
                    'String','1',...
1631
                    'FontSize',10,...
1632
                    'BackgroundColor',[1 1 1],...
1633
                    'Position',[0.31 0.15 0.4 0.2],...
1634
                    'Callback','ExpControl(''RQNum'')');
1635
 
1636
         %Control Point Options
1637
         ExpControl(59) = uipanel('Parent',ExpControl(53),...
1638
             'Visible','off',...
1639
             'Tag','CP2',...
1640
             'BackgroundColor',panelDefault,...
1641
             'Position',[0.05 0.1 0.9 0.43]);
1642
                uicontrol(ExpControl(59),'Style','text',...
1643
                    'Units','normalized',...
1644
                    'FontSize',10,...
1645
                    'String','Direction',...
1646
                    'BackgroundColor',panelDefault,...
1647
                    'Position',[0.31 0.77 0.1 0.15]);
1648
                uicontrol(ExpControl(59),'Style','text',...
1649
                    'Units','normalized',...
1650
                    'FontSize',10,...
1651
                    'String','Response',...
1652
                    'BackgroundColor',panelDefault,...
1653
                    'Position',[0.43 0.77 0.1 0.15]);
1654
                uicontrol(ExpControl(59),'Style','text',...
1655
                    'Units','normalized',...
1656
                    'FontSize',10,...
1657
                    'String','Factor',...
1658
                    'BackgroundColor',panelDefault,...
1659
                    'Position',[0.55 0.77 0.1 0.15]);
1660
                uicontrol(ExpControl(59),'Style','text',...
1661
                    'Units','normalized',...
1662
                    'FontSize',10,...
1663
                    'String',sprintf('Assign\nLimits?'),...
1664
                    'BackgroundColor',panelDefault,...
1665
                    'Position',[0.67 0.78 0.1 0.2]);
1666
                uicontrol(ExpControl(59),'Style','text',...
1667
                    'Units','normalized',...
1668
                    'FontSize',10,...
1669
                    'String',sprintf('Lower\nLimit'),...
1670
                    'BackgroundColor',panelDefault,...
1671
                    'Position',[0.76 0.78 0.1 0.2]);
1672
                uicontrol(ExpControl(59),'Style','text',...
1673
                    'Units','normalized',...
1674
                    'FontSize',10,...
1675
                    'String',sprintf('Upper\nLimit'),...
1676
                    'BackgroundColor',panelDefault,...
1677
                    'Position',[0.88 0.78 0.1 0.2]);
1678
                %Divide Frame
1679
                Height = 0.005;
1680
                uicontrol(ExpControl(59),'Style','frame', ...
1681
                    'Units','normalized', ...
1682
                    'BackgroundColor',[0 0 0],...
1683
                    'ForegroundColor',[0 0 0],...
1684
                    'Position',[0.31 0.79 0.68 Height]);
1685
                uicontrol(ExpControl(59),'Style','text',...
1686
                    'Units','normalized',...
1687
                    'FontSize',10,...
1688
                    'String','Define Control Point',...
1689
                    'BackgroundColor',panelDefault,...
1690
                    'Position',[0 0.56 0.25 0.15]);
1691
                ExpControl(60) = uicontrol(ExpControl(59),'Style','popupmenu',...
1692
                    'String',{'Direction...','UX','UY','UZ','RX','RY','RZ'},...
1693
                    'Value',1,...
1694
                    'Units','normalized',...
1695
                    'FontSize',10,...
1696
                    'BackgroundColor',[1 1 1],...
1697
                    'Position',[0.31 0.56 0.1 0.15]);
1698
                ExpControl(61) = uicontrol(ExpControl(59),'Style','popupmenu',...
1699
                    'String',{'Response...','disp','vel','accel','force','time'},...
1700
                    'Value',1,...
1701
                    'Units','normalized',...
1702
                    'FontSize',10,...
1703
                    'BackgroundColor',[1 1 1],...
1704
                    'Position',[0.43 0.56 0.1 0.15]);
1705
                ExpControl(62) = uicontrol(ExpControl(59),'Style','edit',...
1706
                    'Units','normalized',...
1707
                    'FontSize',10,...
1708
                    'String','1',...
1709
                    'BackgroundColor',[1 1 1],...
1710
                    'Position',[0.56 0.59 0.08 0.1]);
1711
                ExpControl(63) = uicontrol(ExpControl(59),'Style','checkbox',...
1712
                    'Units','normalized',...
1713
                    'String','',...
1714
                    'Tag','Line1',...
1715
                    'Position',[0.71 0.59 0.2 0.1],...
1716
                    'BackgroundColor',panelDefault,...
1717
                    'Callback','ExpControl(''assign limits'')');
1718
                ExpControl(64) = uicontrol(ExpControl(59),'Style','text',...
1719
                    'Units','normalized',...
1720
                    'FontSize',10,...
1721
                    'String','',...
1722
                    'BackgroundColor',panelDefault,...
1723
                    'Position',[0.77 0.59 0.08 0.1]);
1724
                ExpControl(65) = uicontrol(ExpControl(59),'Style','text',...
1725
                    'Units','normalized',...
1726
                    'FontSize',10,...
1727
                    'String','',...
1728
                    'BackgroundColor',panelDefault,...
1729
                    'Position',[0.89 0.59 0.08 0.1]);
1730
 
1731
                ExpControl(66) = uicontrol(ExpControl(59),'Style','popupmenu',...
1732
                    'String',{'Direction...','UX','UY','UZ','RX','RY','RZ'},...
1733
                    'Value',1,...
1734
                    'Units','normalized',...
1735
                    'FontSize',10,...
1736
                    'BackgroundColor',[1 1 1],...
1737
                    'Visible','off',...
1738
                    'Position',[0.31 0.39 0.1 0.15]);
1739
                ExpControl(67) = uicontrol(ExpControl(59),'Style','popupmenu',...
1740
                    'String',{'Response...','disp','vel','accel','force','time'},...
1741
                    'Value',1,...
1742
                    'Units','normalized',...
1743
                    'FontSize',10,...
1744
                    'BackgroundColor',[1 1 1],...
1745
                    'Visible','off',...
1746
                    'Position',[0.43 0.39 0.1 0.15]);
1747
                ExpControl(68) = uicontrol(ExpControl(59),'Style','edit',...
1748
                    'Units','normalized',...
1749
                    'FontSize',10,...
1750
                    'String','1',...
1751
                    'BackgroundColor',[1 1 1],...
1752
                    'Visible','off',...
1753
                    'Position',[0.56 0.42 0.08 0.1]);
1754
                ExpControl(69) = uicontrol(ExpControl(59),'Style','checkbox',...
1755
                    'Units','normalized',...
1756
                    'String','',...
1757
                    'Tag','Line2',...
1758
                    'Position',[0.71 0.42 0.2 0.1],...
1759
                    'Visible','off',...
1760
                    'BackgroundColor',panelDefault,...
1761
                    'Callback','ExpControl(''assign limits'')');
1762
                ExpControl(70) = uicontrol(ExpControl(59),'Style','text',...
1763
                    'Units','normalized',...
1764
                    'FontSize',10,...
1765
                    'String','',...
1766
                    'BackgroundColor',panelDefault,...
1767
                    'Visible','off',...
1768
                    'Position',[0.77 0.42 0.08 0.1]);
1769
                ExpControl(71) = uicontrol(ExpControl(59),'Style','text',...
1770
                    'Units','normalized',...
1771
                    'FontSize',10,...
1772
                    'String','',...
1773
                    'BackgroundColor',panelDefault,...
1774
                    'Visible','off',...
1775
                    'Position',[0.89 0.42 0.08 0.1]);
1776
 
1777
                ExpControl(72) = uicontrol(ExpControl(59),'Style','popupmenu',...
1778
                    'String',{'Direction...','UX','UY','UZ','RX','RY','RZ'},...
1779
                    'Value',1,...
1780
                    'Units','normalized',...
1781
                    'FontSize',10,...
1782
                    'BackgroundColor',[1 1 1],...
1783
                    'Visible','off',...
1784
                    'Position',[0.31 0.22 0.1 0.15]);
1785
                ExpControl(73) = uicontrol(ExpControl(59),'Style','popupmenu',...
1786
                    'String',{'Response...','disp','vel','accel','force','time'},...
1787
                    'Value',1,...
1788
                    'Units','normalized',...
1789
                    'FontSize',10,...
1790
                    'BackgroundColor',[1 1 1],...
1791
                    'Visible','off',...
1792
                    'Position',[0.43 0.22 0.1 0.15]);
1793
                ExpControl(74) = uicontrol(ExpControl(59),'Style','edit',...
1794
                    'Units','normalized',...
1795
                    'FontSize',10,...
1796
                    'String','1',...
1797
                    'BackgroundColor',[1 1 1],...
1798
                    'Visible','off',...
1799
                    'Position',[0.56 0.25 0.08 0.1]);
1800
                ExpControl(75) = uicontrol(ExpControl(59),'Style','checkbox',...
1801
                    'Units','normalized',...
1802
                    'String','',...
1803
                    'Tag','Line3',...
1804
                    'Position',[0.71 0.25 0.2 0.1],...
1805
                    'BackgroundColor',panelDefault,...
1806
                    'Visible','off',...
1807
                    'Callback','ExpControl(''assign limits'')');
1808
                ExpControl(76) = uicontrol(ExpControl(59),'Style','text',...
1809
                    'Units','normalized',...
1810
                    'FontSize',10,...
1811
                    'String','',...
1812
                    'BackgroundColor',panelDefault,...
1813
                    'Visible','off',...
1814
                    'Position',[0.77 0.25 0.08 0.1]);
1815
                ExpControl(77) = uicontrol(ExpControl(59),'Style','text',...
1816
                    'Units','normalized',...
1817
                    'FontSize',10,...
1818
                    'String','',...
1819
                    'BackgroundColor',panelDefault,...
1820
                    'Visible','off',...
1821
                    'Position',[0.89 0.25 0.08 0.1]);
1822
 
1823
                ExpControl(78) = uicontrol(ExpControl(59),'Style','popupmenu',...
1824
                    'String',{'Direction...','UX','UY','UZ','RX','RY','RZ'},...
1825
                    'Value',1,...
1826
                    'Units','normalized',...
1827
                    'FontSize',10,...
1828
                    'BackgroundColor',[1 1 1],...
1829
                    'Visible','off',...
1830
                    'Position',[0.31 0.05 0.1 0.15]);
1831
                ExpControl(79) = uicontrol(ExpControl(59),'Style','popupmenu',...
1832
                    'String',{'Response...','disp','vel','accel','force','time'},...
1833
                    'Value',1,...
1834
                    'Units','normalized',...
1835
                    'FontSize',10,...
1836
                    'BackgroundColor',[1 1 1],...
1837
                    'Visible','off',...
1838
                    'Position',[0.43 0.05 0.1 0.15]);
1839
                ExpControl(80) = uicontrol(ExpControl(59),'Style','edit',...
1840
                    'Units','normalized',...
1841
                    'FontSize',10,...
1842
                    'String','1',...
1843
                    'BackgroundColor',[1 1 1],...
1844
                    'Visible','off',...
1845
                    'Position',[0.56 0.08 0.08 0.1]);
1846
                ExpControl(81) = uicontrol(ExpControl(59),'Style','checkbox',...
1847
                    'Units','normalized',...
1848
                    'String','',...
1849
                    'Tag','Line4',...
1850
                    'Position',[0.71 0.08 0.2 0.1],...
1851
                    'BackgroundColor',panelDefault,...
1852
                    'Visible','off',...
1853
                    'Callback','ExpControl(''assign limits'')');
1854
                ExpControl(82) = uicontrol(ExpControl(59),'Style','text',...
1855
                    'Units','normalized',...
1856
                    'FontSize',10,...
1857
                    'String','',...
1858
                    'BackgroundColor',panelDefault,...
1859
                    'Visible','off',...
1860
                    'Position',[0.77 0.08 0.08 0.1]);
1861
                ExpControl(83) = uicontrol(ExpControl(59),'Style','text',...
1862
                    'Units','normalized',...
1863
                    'FontSize',10,...
1864
                    'String','',...
1865
                    'BackgroundColor',panelDefault,...
1866
                    'Visible','off',...
1867
                    'Position',[0.89 0.08 0.08 0.1]);
1868
 
1869
                ExpControl(84) = uicontrol(ExpControl(59),'Style','popupmenu',...
1870
                    'String',{'Direction...','UX','UY','UZ','RX','RY','RZ'},...
1871
                    'Value',1,...
1872
                    'Units','normalized',...
1873
                    'FontSize',10,...
1874
                    'BackgroundColor',[1 1 1],...
1875
                    'Visible','off',...
1876
                    'Position',[0.31 0.05 0.1 0.15]);
1877
                ExpControl(85) = uicontrol(ExpControl(59),'Style','popupmenu',...
1878
                    'String',{'Response...','disp','vel','accel','force','time'},...
1879
                    'Value',1,...
1880
                    'Units','normalized',...
1881
                    'FontSize',10,...
1882
                    'BackgroundColor',[1 1 1],...
1883
                    'Visible','off',...
1884
                    'Position',[0.43 0.05 0.1 0.15]);
1885
                ExpControl(86) = uicontrol(ExpControl(59),'Style','edit',...
1886
                    'Units','normalized',...
1887
                    'FontSize',10,...
1888
                    'String','1',...
1889
                    'BackgroundColor',[1 1 1],...
1890
                    'Visible','off',...
1891
                    'Position',[0.56 0.08 0.08 0.1]);
1892
                ExpControl(87) = uicontrol(ExpControl(59),'Style','checkbox',...
1893
                    'Units','normalized',...
1894
                    'String','',...
1895
                    'Tag','Line5',...
1896
                    'Position',[0.71 0.08 0.2 0.1],...
1897
                    'BackgroundColor',panelDefault,...
1898
                    'Visible','off',...
1899
                    'Callback','ExpControl(''assign limits'')');
1900
                ExpControl(88) = uicontrol(ExpControl(59),'Style','text',...
1901
                    'Units','normalized',...
1902
                    'FontSize',10,...
1903
                    'String','',...
1904
                    'BackgroundColor',panelDefault,...
1905
                    'Visible','off',...
1906
                    'Position',[0.77 0.08 0.08 0.1]);
1907
                ExpControl(89) = uicontrol(ExpControl(59),'Style','text',...
1908
                    'Units','normalized',...
1909
                    'FontSize',10,...
1910
                    'String','',...
1911
                    'BackgroundColor',panelDefault,...
1912
                    'Visible','off',...
1913
                    'Position',[0.89 0.08 0.08 0.1]);
1914
 
1915
                ExpControl(90) = uicontrol(ExpControl(59),'Style','popupmenu',...
1916
                    'String',{'Direction...','UX','UY','UZ','RX','RY','RZ'},...
1917
                    'Value',1,...
1918
                    'Units','normalized',...
1919
                    'FontSize',10,...
1920
                    'BackgroundColor',[1 1 1],...
1921
                    'Visible','off',...
1922
                    'Position',[0.31 0.05 0.1 0.15]);
1923
                ExpControl(91) = uicontrol(ExpControl(59),'Style','popupmenu',...
1924
                    'String',{'Response...','disp','vel','accel','force','time'},...
1925
                    'Value',1,...
1926
                    'Units','normalized',...
1927
                    'FontSize',10,...
1928
                    'BackgroundColor',[1 1 1],...
1929
                    'Visible','off',...
1930
                    'Position',[0.43 0.05 0.1 0.15]);
1931
                ExpControl(92) = uicontrol(ExpControl(59),'Style','edit',...
1932
                    'Units','normalized',...
1933
                    'FontSize',10,...
1934
                    'String','1',...
1935
                    'BackgroundColor',[1 1 1],...
1936
                    'Visible','off',...
1937
                    'Position',[0.56 0.08 0.08 0.1]);
1938
                ExpControl(93) = uicontrol(ExpControl(59),'Style','checkbox',...
1939
                    'Units','normalized',...
1940
                    'String','',...
1941
                    'Tag','Line6',...
1942
                    'Position',[0.71 0.08 0.2 0.1],...
1943
                    'BackgroundColor',panelDefault,...
1944
                    'Visible','off',...
1945
                    'Callback','ExpControl(''assign limits'')');
1946
                ExpControl(94) = uicontrol(ExpControl(59),'Style','text',...
1947
                    'Units','normalized',...
1948
                    'FontSize',10,...
1949
                    'String','',...
1950
                    'BackgroundColor',panelDefault,...
1951
                    'Visible','off',...
1952
                    'Position',[0.77 0.08 0.08 0.1]);
1953
                ExpControl(95) = uicontrol(ExpControl(59),'Style','text',...
1954
                    'Units','normalized',...
1955
                    'FontSize',10,...
1956
                    'String','',...
1957
                    'BackgroundColor',panelDefault,...
1958
                    'Visible','off',...
1959
                    'Position',[0.89 0.08 0.08 0.1]);
1960
 
1961
         ExpControl(96) = uicontrol('Parent', ExpControl(53),...
1962
             'Style','pushbutton',...
1963
             'String','Save Control Point',...
1964
             'Units','normalized',...
1965
             'FontSize',10,...
1966
             'Position',[0.8 0.01 0.15 0.06],...
1967
             'Visible','off',...
1968
             'Callback','ExpControl(''saveCP'')');
1969
 
1970
 
1971
 
1972
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1973
 
1974
%%%%%%%%%%%%%%%%%%%%%%         
1975
%Create Analysis Page%
1976
%%%%%%%%%%%%%%%%%%%%%%
1977
 
1978
%Title       
1979
Analysis(1) = uicontrol(ph_Main,'Style','text',...
1980
    'String','Analysis',...
284 cmisra 1981
    'FontSize',18,...
264 aschellenberg 1982
    'Units','normalized',...
1983
    'ForegroundColor',[1 1 1],...
1984
    'BackgroundColor',panel_color,...
284 cmisra 1985
    'Position',[0.3 0.945 0.4 0.055],...
264 aschellenberg 1986
    'FontName',font,...
1987
    'Visible','off');
1988
 
1989
%Create Panel
1990
Analysis(2) = uipanel('Parent',ph_Main,...
1991
    'Position',[0.25 0.65 0.5 0.2],...
1992
    'Tag','AnalysisPanel',...
1993
    'BackgroundColor',panelDefault,...
1994
    'Visible','off');
1995
        uicontrol(Analysis(2),'Style','text',...
1996
            'Units','normalized',...
1997
            'FontSize',10,...
1998
            'String','dt: ',...
1999
            'BackgroundColor',panelDefault,...
2000
            'Position',[0.1 0.66 0.05 0.1]);
2001
        Analysis(3) = uicontrol(Analysis(2),'Style','edit',...
2002
            'Units','normalized',...
2003
            'BackgroundColor',[1 1 1],...
2004
            'FontSize',10,...
2005
            'String','No dt defined!',...
2006
            'Position',[0.18 0.65 0.32 0.15],...
2007
            'Callback','Analysis(''dtAnalysis'')');
2008
        Analysis(4) = uicontrol(Analysis(2),'Style','text',...
2009
            'Units','normalized',...
2010
            'String','<          ...',...
2011
            'BackgroundColor',panelDefault,...
2012
            'FontSize',10,...
284 cmisra 2013
            'Position',[0.52 0.62 0.25 0.18]);
264 aschellenberg 2014
        dt_help = uicontrol(Analysis(2),'Style','pushbutton',...
2015
             'Units','normalized',...
2016
             'FontSize',10,...
2017
             'ToolTipString',sprintf('In order to ensure stability when using the\nexplicit Newmark method, dt must be less\nthan the indicated maximum value.'),...
2018
             'Position',[0.8 0.65 0.04 0.157],...
2019
             'CData',Question1,...
2020
             'Callback',@helpCallback);
2021
        Analysis(12) = uicontrol(Analysis(2),'Style','pushbutton',...
2022
             'String','Write TCL File',...
2023
             'Units','normalized',...
2024
             'FontSize',10,...
2025
             'Position',[0.3 0.33 0.4 0.2],...
2026
             'Callback','WriteTCL');
2027
        Analysis(5) = uicontrol(Analysis(2),'Style','pushbutton',...
2028
             'String','Generate Report',...
2029
             'Units','normalized',...
2030
             'FontSize',10,...
2031
             'Position',[0.3 0.05 0.4 0.2],...
2032
             'Callback','Analysis(''generate report'')');
2033
 
2034
 
2035
 
2036
%Analysis Button Group    
2037
Analysis(6) = uibuttongroup('Parent',ph_Main,...
2038
    'BackgroundColor',[0.3 0.5 0.7],...
2039
    'Position',[0.25 .3 .5 .2],...
2040
    'Visible','off');
2041
         Analysis(7) = uicontrol(Analysis(6),'Style','togglebutton',...
2042
             'Units','normalized',...
2043
             'Tag','Start',...
2044
             'Position',[0.025 0.187 0.3 0.627],...
269 aschellenberg 2045
             'ToolTipString','Start Analysis',...
264 aschellenberg 2046
             'CData',Start0a);
2047
         Analysis(8) = uicontrol(Analysis(6),'Style','togglebutton',...
2048
             'Units','normalized',...
2049
             'Tag','Pause',...
2050
             'Position',[0.35 0.187 0.3 0.627],...
269 aschellenberg 2051
             'ToolTipString','Pause Analysis',...
264 aschellenberg 2052
             'CData',Pause0a);
2053
         Analysis(9) = uicontrol(Analysis(6),'Style','togglebutton',...
2054
             'Units','normalized',...
2055
             'Tag','Stop',...
2056
             'Position',[0.675 0.187 0.3 0.627],...
269 aschellenberg 2057
             'ToolTipString','Stop Analysis',...
264 aschellenberg 2058
             'CData',Stop0a);
2059
         %Remember to remove string
2060
         set(Analysis(6),'SelectionChangeFcn','Analysis(''choose option'')');
2061
         set(Analysis(6),'SelectedObject',[]);
2062
 
2063
Background = axes('Parent',Analysis(6),'Position',[0 0 1 1]);
2064
imagesc(imread(which('greyGradient.png')));
2065
% imagesc(imread(which('Metal.jpg')));
2066
set(Background,'XTick',[],'YTick',[]);          
2067
 
2068
Analysis(10) = uicontrol('Parent', ph_Main,...
2069
    'Style','pushbutton',...
2070
    'String','Run New Test',...
2071
    'Units','normalized',...
2072
    'FontSize',10,...
2073
    'Position',[0.8 0.15 0.1 0.04],...
2074
    'Visible','off',...
2075
    'Callback','Analysis(''new test'')');        
2076
Analysis(11) = uicontrol('Parent', ph_Main,...
2077
    'Style','pushbutton',...
2078
    'String','Quit',...
2079
    'Units','normalized',...
2080
    'FontSize',10,...
2081
    'Position',[0.8 0.1 0.1 0.04],...
2082
    'Visible','off',...
2083
    'Callback',@Quit_Program);
2084
 
2085
 
2086
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2087
 
2088
%Display the GUI
2089
set(f, 'Visible','on');
2090
 
2091
%%%%%%%%%%%%%%%
2092
% Save handles%
2093
%%%%%%%%%%%%%%%
2094
 
2095
%Create the structure of handles
2096
handles = guidata(gcf);
2097
handles.Menu = Menu;
2098
handles.Sidebar = Sidebar;
2099
handles.Structure = Struct;
2100
handles.GroundMotions = GM;
2101
handles.ES = ExpSetup;
2102
handles.EC = ExpControl;
2103
handles.Analysis = Analysis;
2104
 
2105
%%%%%%%%%%%%%%%%%%%
2106
%Initialize Fields%
2107
%%%%%%%%%%%%%%%%%%%
2108
 
2109
%Store settings and buttons
2110
handles.Store.SS = SS;
2111
handles.Store.font = font;
2112
handles.Store.BackgroundPanel = BackgroundPanel;
2113
handles.Store.sideButWidth = sideButWidth;
2114
handles.Store.sideButHeight = sideButHeight;
2115
handles.Store.Analysis0 = Analysis0;
2116
handles.Store.Analysis1 = Analysis1;
2117
handles.Store.ExpControl0 = ExpControl0;
2118
handles.Store.ExpControl1 = ExpControl1;
2119
handles.Store.ExpSetup0 = ExpSetup0;
2120
handles.Store.ExpSetup1 = ExpSetup1;
2121
handles.Store.Loading0 = Loading0;
2122
handles.Store.Loading1 = Loading1;
2123
handles.Store.Structure0 = Structure0;
2124
handles.Store.Structure1 = Structure1;
2125
 
2126
handles.Store.structureWidth = structureWidth;
2127
handles.Store.structureHeight = structureHeight;
2128
handles.Store.Model1A0 = Model1A0;
2129
handles.Store.Model1A1 = Model1A1;
2130
handles.Store.Model2A0 = Model2A0;
2131
handles.Store.Model2A1 = Model2A1;
2132
handles.Store.Model2B0 = Model2B0;
2133
handles.Store.Model2B1 = Model2B1;
2134
 
2135
handles.Store.loadingWidth = loadingWidth;
2136
handles.Store.loadingHeight = loadingHeight;
2137
handles.Store.GM0 = GM0;
2138
handles.Store.GM1 = GM1;
2139
handles.Store.IC0 = IC0;
2140
handles.Store.IC1 = IC1;
2141
 
2142
handles.Store.ECWidth  = ECWidth;
2143
handles.Store.ECHeight = ECHeight;
2144
handles.Store.CP0   = CP0;
2145
handles.Store.CP1   = CP1;
2146
handles.Store.Sim0  = Sim0;
2147
handles.Store.Sim1  = Sim1;
2148
handles.Store.Real0 = Real0;
2149
handles.Store.Real1 = Real1;
2150
 
2151
handles.Store.analysisWidth1 = analysisWidth1;
2152
handles.Store.analysisHeight1 = analysisHeight1;
2153
handles.Store.Start0a = Start0a;
2154
handles.Store.Start1a = Start1a;
2155
handles.Store.Pause0a = Pause0a;
2156
handles.Store.Pause1a = Pause1a;
2157
handles.Store.Stop0a  = Stop0a;
2158
handles.Store.Stop1a  = Stop1a;
2159
 
2160
handles.Store.analysisWidth2 = analysisWidth2;
2161
handles.Store.analysisHeight2 = analysisHeight2;
2162
handles.Store.Start0b = Start0b;
2163
handles.Store.Start1b = Start1b;
2164
handles.Store.Pause0b = Pause0b;
2165
handles.Store.Pause1b = Pause1b;
2166
handles.Store.Stop0b  = Stop0b;
2167
handles.Store.Stop1b  = Stop1b;
2168
 
2169
handles.Store.questWidth = questWidth;
2170
handles.Store.questHeight = questHeight;
2171
handles.Store.Question0 = Question0;
2172
handles.Store.Question1 = Question1;
2173
 
284 cmisra 2174
handles.Store.Structview = 0;
264 aschellenberg 2175
handles.Store.GMview = 0;
2176
 
2177
%Initialize Model Parameters
2178
handles.Model.M = [];
2179
handles.Model.K = [];
2180
handles.Model.StopFlag = 0;
2181
handles.Model.firstStart = 1;
2182
handles.Model.Zeta = [];
271 cmisra 2183
handles.Model.Type = '1 DOF';
2184
handles.Model.Mass_field = 7;
2185
handles.Model.Stiffness_field = 9;
2186
handles.Model.Period_field = 11;
2187
handles.Model.Damping_field = 13;
2188
handles.Model.ndf = 1;
2189
handles.Model.b = 1;
264 aschellenberg 2190
%Initialize Structure Display
2191
handles.Model.StructActive = [3 6:13];
2192
handles.Model.StructInactive = [4 5 14:29];
271 cmisra 2193
%Initialize Element Data
2194
handles.Model.Element{1}.tag = 1;
2195
handles.Model.Element{1}.type = 'Element_ExpGeneric';
2196
handles.Model.Element{1}.kInit = handles.Model.K;
2197
handles.Model.Element{1}.ipAddr = '127.0.0.1';
2198
handles.Model.Element{1}.ipPort = 8090;
2199
handles.Model.Element{1}.id = 1;
264 aschellenberg 2200
%Initialize Ground Motion Data
2201
handles.GM.loadType = 'Ground Motions';
2202
handles.GM.AmpFact(1) = str2num(get(handles.GroundMotions(4),'String'));
2203
handles.GM.TimeFact(1) = str2num(get(handles.GroundMotions(5),'String'));
2204
handles.GM.dt = 0;
2205
handles.GM.t = {0};
2206
handles.GM.ag = {0};
2207
handles.GM.scaledt = 0;
2208
handles.GM.scalet = {0};
2209
handles.GM.scaleag = {0};
2210
handles.GM.Spectra = {0};
2211
handles.GM.initialDisp = [];
2212
handles.GM.rampTime = [];
2213
handles.GM.vibTime = [];
2214
 
2215
%Initialize Experimental Controls
2216
handles.ExpControl.Type = 'Simulation';
2217
handles.ExpControl.DOF1.SimMaterial = [];
2218
handles.ExpControl.DOF2.SimMaterial = [];
2219
handles.ExpControl.DOF1.E = [];
2220
handles.ExpControl.DOF2.E = [];
2221
handles.ExpControl.DOF1.epsP = [];
2222
handles.ExpControl.DOF2.epsP = [];
2223
handles.ExpControl.DOF1.Fy = [];
2224
handles.ExpControl.DOF2.Fy = [];
2225
handles.ExpControl.DOF1.E0 = [];
2226
handles.ExpControl.DOF2.E0 = [];
2227
handles.ExpControl.DOF1.b = [];
2228
handles.ExpControl.DOF2.b = [];
2229
handles.ExpControl.DOF1.R0 = [];
2230
handles.ExpControl.DOF2.R0 = [];
2231
handles.ExpControl.SimControl.SimType = [];
2232
handles.ExpControl.RealControl.Controller = [];
2233
handles.ExpControl.RealControl.ipAddr = [];
2234
handles.ExpControl.RealControl.ipPort = 22222;
265 cmisra 2235
handles.ExpControl.RealControl.TrialCP = 1;
2236
handles.ExpControl.RealControl.OutputCP = 1;
264 aschellenberg 2237
handles.ExpControl.RealControl.ConfigName = [];
2238
handles.ExpControl.RealControl.ConfigPath = [];
2239
handles.ExpControl.RealControl.rampTime = [];
2240
handles.ExpControl.RealControl.memOffset = [];
2241
handles.ExpControl.RealControl.NumActCh = [];
2242
handles.ExpControl.RealControl.PCvalue = 1;
2243
handles.ExpControl.RealControl.boardName = [];
2244
handles.ExpControl.RealControl.appName = [];
2245
handles.ExpControl.RealControl.appPath = [];
2246
handles.ExpControl.RealControl.SimMaterial = [];
271 cmisra 2247
handles.ExpControl.NumAct = 1;
264 aschellenberg 2248
handles.ExpControl.store.SimActive = 6;
2249
handles.ExpControl.store.RealActive = (26:27);
2250
handles.ExpControl.store.CPActive = (60:65);
2251
handles.ExpControl.store.RQ = 1;
2252
handles.ExpControl.store.DOFOptions = get(handles.EC(6),'String');
2253
handles.ExpControl.store.MatOptions = get(handles.EC(10),'String');
2254
handles.ExpControl.store.CPOptions = get(handles.EC(54),'String');
2255
handles.ExpControl.store.NodeOptions = get(handles.EC(57),'String');
2256
handles.ExpControl.store.DirOptions = get(handles.EC(60),'String');
2257
handles.ExpControl.store.RespOptions = get(handles.EC(61),'String');
2258
 
271 cmisra 2259
%Create Preset Control Points
2260
handles.ExpControl.CP = {};
2261
handles.ExpControl.CP.Name{1} = 'Control Point 1';
2262
handles.ExpControl.CP.NumResp{1} = 1;
2263
handles.ExpControl.CP.Node{1} = 1;
2264
handles.ExpControl.CP.Dir{1,1} = 'UX';
2265
handles.ExpControl.CP.Resp{1,1} = 'disp';
2266
handles.ExpControl.CP.F{1,1} = 1;
2267
handles.ExpControl.CP.Lim{1,1} = 1;
2268
handles.ExpControl.CP.LimL{1,1} = -7.5;
2269
handles.ExpControl.CP.LimU{1,1} = 7.5;
2270
handles.ExpControl.CP.Name{2} = 'Control Point 2';
2271
handles.ExpControl.CP.NumResp{2} = 2;
2272
handles.ExpControl.CP.Node{2} = 1;
2273
handles.ExpControl.CP.Dir{1,2} = 'UX';