Mercurial > hg > ltpda
comparison m-toolbox/html_help/help/ug/gui_gltpda_3_content.html @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 <p> | |
2 | |
3 The parameters panel will be empty if: | |
4 <ul> | |
5 <li>No block is currently selected.<br> | |
6 <li>The currently selected Simulink model is not a valid LTPDA model.<br> | |
7 <li>The selected block it's not a valid LTPDA block (i.e., it do not contain a proper LTPDA function which answers | |
8 the call for parameters).<br> | |
9 </ul><br> | |
10 | |
11 Otherwise, the contents of the parameters panel will change accordingly to the user selection in the active LTPDA Simulink model. | |
12 <ul> | |
13 <li>If a <b>function/method</b> block is selected, the panel will show the proper corresponding parameters.<br> | |
14 <li>If a <b>Object from list</b> block is selected, the panel will show the referenced index (that is the only parameter accepted).<br> | |
15 <li>If a <b>Mux/Demux</b> block is selected, the panel will show the number of inputs/outputs.<br> | |
16 <li>If a <b>From</b> block is selected, the panel will present the 'Find origin' button.<br> | |
17 </ul><br> | |
18 | |
19 <h2>Function/method parameters</h2><hr><br> | |
20 If a valid LTPDA function or method block is selected (inside a valid LTPDA Simulink model), the GUI will first ask the inner | |
21 function or method for its required parameters; the panel then will be built accordingly.<br><br> | |
22 | |
23 <img src="images/parampanel_1.png" alt="The parameters for functions/methods" border="1"><br><br> | |
24 | |
25 The window is built automatically: <b>every line corresponds to a different parameter</b>, among those required by the selected | |
26 function.<br> | |
27 Inside every line, then, the structure is obviously similar, so different parameters can have the same fields and boxes.<br><br> | |
28 | |
29 <h2>Required or added parameters</h2> | |
30 In the construction of the panel the GUI will consider whether the parameter was among those required by the function, or | |
31 if the parameter was added by the user. In this latter case it will be passed to the function, which can use it (if someway | |
32 expected, for example if it a possible optional parameter) or ignore it, if just unexpected. The GUI won't change the | |
33 behavior of the inner function, so it's up to the user to be aware of what can be passed to be used by every function.<br><br> | |
34 In the parameters panel the difference among required and added parameters is shown on the far right: added parameters have a | |
35 small '<tt>-</tt>' button, which lets the user to remove it; required parameters have no such button, since the corresponding | |
36 parameter was automatically required by the function and not added by the user.<br><br> | |
37 Please note that a parameter can also be disabled (see 'Enable checkbox', below): since a disabled parameter won't be passed to | |
38 the function, there's no difference in removing an added parameter or just disable it. The only difference of course is a | |
39 disabled parameter can be re-enabled in a second time, while a removed parameter has to be added and set over again.<br><br> | |
40 | |
41 | |
42 <h3>Enable checkbox</h3> | |
43 On the left, at the beginning of every line/parameter, there is a checkbox which lets the user to enable or disable the | |
44 corresponding parameter. If it's enabled the parameter will be passed to the function, so it's up to the user to set the proper | |
45 value. If it's disabled, on the contrary, it won't be part of the plist passed to the function, which thus will use the default | |
46 value (if any is expected).<br><br><br> | |
47 | |
48 The central part of the window is built line by line to reflect each parameter, so it can differ a lot.<br><br> | |
49 <img src="images/parampanel_2.png" alt="A complicated parameters panel" border="1"><br><br> | |
50 | |
51 <h3>Parameter name</h3> | |
52 Wherever expected, the first element on the left, aside the Enable checkbox, is the parameter name.<br> | |
53 For <b>double/char</b> parameters this means the parameter key; note that if the parameter was required by the function, the name is | |
54 fixed (see parameter 1,3,5,6 in the previous image), while for added parameters it can be changed (see parameter 7).<br> | |
55 In case of an added parameter the GUI will show both a text '<tt>Name:</tt>' and an | |
56 edit field, where the user can type in the parameter key itself.<br><br> | |
57 For <b>specwin</b> parameters the key is fixed, so the GUI shows directly the name of the window type ('<tt>Kaiser</tt>', | |
58 '<tt>Rectangular</tt>',...).<br><br> | |
59 Similarly, for <b>Poles and Zeros</b> parameters the key is fixed, so even for added parameters '<tt>Poles</tt>' and '<tt>Zeros</tt>' | |
60 are shown and cannot be altered.<br><br> | |
61 Since the key is fixed also for <b>MIIR and PZmodel</b> parameters, the GUI shows directly the inner parameters to construct these | |
62 objects; note that this is just a way to build a MIIR object, typing in directly the plist. To build it in a different | |
63 way, for example retrieving from the Repository, must be used a proper Constructor block, setting the parameters to be | |
64 retrieved from Simulink (see 'From Simulink checkbox', below) and connection the Constructor block to the function port having | |
65 as a name the corresponding parameter's name.<br><br><br> | |
66 | |
67 | |
68 <h3>Parameter value</h3> | |
69 The following field lets the user to type in the parameters value. This is true for every '<tt>Value:</tt>' field in the | |
70 parameters panel.<br> | |
71 <b>Please note that often is possible to have a brief help text in the tooltip string, just moving the mouse pointer over | |
72 the edit field and waiting a second.</b><br> | |
73 This will explain for example the meaning for the different edit fields in a specwin parameter, or it will explain how to type | |
74 in poles and zeros into their corresponding edit fields.<br><br> | |
75 | |
76 Inside an edit field the user can type in using the traditional MATLAB syntax: | |
77 <ul> | |
78 <li><b>10</b>, will be considered a pure number. The parameter's value will be of course the number itself.<br> | |
79 <li><b>[1 2 3]</b>, among square brackets, will be converted into a vector (or matrix). Similarly, using {} will create | |
80 a cell array. The parameter's value will be a vector, a matrix or a cell array.<br> | |
81 <li><b>'Hello'</b>, among quotes, will be considered a string, and it won't be evaluated. The parameter's value will be | |
82 a string.<br> | |
83 <li><b>rand(1)</b>, without quotes, will be recognized as a command and it will be evaluated immediately. The parameter's | |
84 value will the output of the evaluated string.<br> | |
85 </ul><br><br> | |
86 | |
87 <h3>Expand edit field button</h3> | |
88 The small gray button aside each parameter's value edit field, for double/char parameters, will open up a window with a bigger | |
89 edit field, where the user can type in the value more comfortably than in the small one in the panel. This is particularly | |
90 handy for those case when the parameter's value is a long and complicated command or vector, which can't fit easily in the | |
91 small space given in the panel.<br><br> | |
92 <img src="images/parampanel_3.png" alt="The expanded edit field" border="1"><br><br><br> | |
93 | |
94 <h3>From Simulink checkbox</h3> | |
95 If the parameter is not supposed to be set in the GUI's panel but it must be retrieved from Simulink (for example, using a | |
96 Constructor block for that particular type of object), the user can click on the small '<tt>From Simulink</tt>' checkbox.<br><br> | |
97 <img src="images/parampanel_5a.png" alt="'From Simulink environment'" border="1"><br><br> | |
98 The line will be updated, showing 'From Simulink environment'. Since this parameter will be retrieved from Simulink, the user | |
99 cannot alter it anyway in the current parameters panel.<br><br> | |
100 In the LTPDA Simulink model, the block will be modified with a new inport, with the same name as the parameter's key:<br><br> | |
101 <img src="images/parampanel_5b.png" alt="'From Simulink environment'" border="1"><br><br> | |
102 While the first inport must be connected to the data coming in (if any is expected), as usual, the second port must be | |
103 connected to the constructor block providing the object which will become the parameter.<br> | |
104 In the example shown, the specwin Constructor block provide the specwin object that, inside the '<tt>pwelch</tt>' block, will | |
105 be retrieved as a parameter and passed to the function.<br><br> | |
106 | |
107 If the block had no data input, i.e. no input prior to the 'From Simulink' parameter, it will present a single inport, which | |
108 must be connected to the Constructor block providing the parameter's contents.<br><br> | |
109 | |
110 Since it's possible to set multiple parameters coming from Simulink, the user should take care of the connections to the | |
111 block, to avoid to shuffle the connected Constructor blocks - for example, inverting a specwin object and a MIIR object.<br><br><br> | |
112 | |
113 | |
114 <h3>Load button</h3> | |
115 For MIIR and PZmodel parameters the GUI will show also a '<tt>Load</tt>' button: the purpose of course is to retrieve these | |
116 objects from a file on disk. Please note that for now this will convert the loaded object into its constructive plist, if | |
117 possible, and the GUI will show again the parameters of the loaded object into the common parameters panel.<br> | |
118 <i>This will be discontinued or modified after R1</i><br><br><br> | |
119 | |
120 | |
121 <h3>Adding parameters</h3> | |
122 Immediately below the last parameter, on the left, the GUI shows a popup list containing all the parameters types which can be | |
123 added, and aside a '<tt>+</tt>' button to add a parameter of the selected type.<br> | |
124 Since it makes no sense to pass to a function 2 specwin object, PZmodels, MIIR filters, poles and zeros lists, these types won't | |
125 be available in the popup list if any object of the same type is already shown in the parameters panel.<br><br><br> | |
126 | |
127 | |
128 <h3>Reset parameter</h3> | |
129 In the lower left corner of the window the GUI draws the '<tt>Reset parameters</tt>' button: this will reset the block to its | |
130 empty initial state. If its a function/method block the GUI will then ask again for its list of required parameters, just like | |
131 the block was just added to the model from the library.<br><br><br> | |
132 | |
133 | |
134 <h3>Set name checkbox</h3> | |
135 At the bottom of the window, center line, there is the '<tt>Set name</tt>' checkbox.<br> | |
136 Enabling this the name of the output of the selected block will be assigned equal to the block's name (which can be altered freely | |
137 by the user, standing the limitations on the block's name posed by Simulink); this will let the user to set particular and | |
138 meaningful names instead of the automatically assigned ones, produced by the inner calculation functions.<br> | |
139 The plot of an object assigned a particular name, for example, will show the proper name set.<br><br><br> | |
140 | |
141 | |
142 <h3>Keep local result</h3> | |
143 Similarly to the '<tt>Maintain intermediate results</tt> checkbox in the main panel, this checkbox will mark the output of | |
144 the selected block to be maintained at the end of the analysis, instead of being deleted just like any other intermediate | |
145 result of the calculation.<br> | |
146 In the LTPDA Simulink model the block will be shown with a purple background, to mark it as a 'probe' and to make it | |
147 immediately recognizable.<br> | |
148 Disabling the checkbox the block's background will be back to its common color, and the intermediate result produced by the | |
149 block itself will be cleared at the end of the analysis.<br><br><br> | |
150 | |
151 | |
152 <h3>Help button</h3> | |
153 In the lower right corner of the window the GUI draws the '<tt>?</tt>' help button: this will recall the help associated to | |
154 the function or method contained into the selected block, and it will show it into a new window.<br> | |
155 The help shown is exactly the same available by the MATLAB command line, typing <tt>help function_name</tt>.<br><br> | |
156 | |
157 <h2>'Object from list' parameter</h2><hr><br> | |
158 If the user selected a 'Object from list' (input) block into the active LTPDA Simulink model, the GUI will show:<br><br> | |
159 <img src="images/parampanel_6.png" alt="'Object from list' parameter" border="1"><br><br> | |
160 The only parameter which can be set in this case is the reference index contained into the input block selected: the index | |
161 will be used together with the Input array, so setting '<tt>1</tt>' will send to the connected block(s) the 1st element of | |
162 the Input array.<br><br> | |
163 | |
164 <h2>Mux/Demux parameter</h2><hr><br> | |
165 Similarly to the 'Input from list' block, the GUI will answer a selected a Mux block into a valid LTPDA Simulink model with:<br><br> | |
166 <img src="images/parampanel_7.png" alt="'Object from list' parameter" border="1"><br><br> | |
167 Changing this parameter will immediately alter the mux block in Simulink; unlike the direct setting of the number of inputs | |
168 from Simulink, the GUI will change also the size of the block, in order to make it easier to connect the blocks and to be read.<br><br> | |
169 The same applies to Demux blocks.<br><br> | |
170 | |
171 <h2>'From' block parameter</h2><hr><br> | |
172 When the user selects a 'From' block into a valid LTPDA Simulink model, the GUI answers drawing the button '<tt>Find Origin</tt>', | |
173 which will provide a direct pointing to the address of the 'Goto' block source of that signal.<br><br> | |
174 <img src="images/parampanel_8.png" alt="'Object from list' parameter" border="1"><br><br> | |
175 If there's more than a single 'Goto' block, or if there's none, the GUI will show a proper warning.<br><br> | |
176 | |
177 | |
178 | |
179 </p> | |
180 |