1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
---|
2 | "http://www.w3.org/TR/REC-html40/loose.dtd"> |
---|
3 | <html> |
---|
4 | <head> |
---|
5 | <title>Description of switchunits</title> |
---|
6 | <meta name="keywords" content="switchunits"> |
---|
7 | <meta name="description" content="SWITCHUNITS - Change the units field for all families in the MML"> |
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
9 | <meta name="generator" content="m2html © 2003 Guillaume Flandin"> |
---|
10 | <meta name="robots" content="index, follow"> |
---|
11 | <link type="text/css" rel="stylesheet" href="../m2html.css"> |
---|
12 | </head> |
---|
13 | <body> |
---|
14 | <a name="_top"></a> |
---|
15 | <div><a href="../index.html">Home</a> > <a href="index.html">mml</a> > switchunits.m</div> |
---|
16 | |
---|
17 | <!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png"> Master index</a></td> |
---|
18 | <td align="right"><a href="index.html">Index for mml <img alt=">" border="0" src="../right.png"></a></td></tr></table>--> |
---|
19 | |
---|
20 | <h1>switchunits |
---|
21 | </h1> |
---|
22 | |
---|
23 | <h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
24 | <div class="box"><strong>SWITCHUNITS - Change the units field for all families in the MML</strong></div> |
---|
25 | |
---|
26 | <h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
27 | <div class="box"><strong>function Units = switchunits(varargin) </strong></div> |
---|
28 | |
---|
29 | <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
30 | <div class="fragment"><pre class="comment">SWITCHUNITS - Change the units field for all families in the MML |
---|
31 | Units = switchunits(Command) |
---|
32 | |
---|
33 | INPUTS |
---|
34 | 1. Command - 'Hardware' or 'Physics' |
---|
35 | |
---|
36 | See also <a href="switchmode.html" class="code" title="function Mode = switchmode(varargin)">switchmode</a>, <a href="switch2hw.html" class="code" title="function ErrorFlag = switch2hw(varargin)">switch2hw</a>, <a href="switch2physics.html" class="code" title="function ErrorFlag = switch2physics(Family)">switch2physics</a> |
---|
37 | |
---|
38 | Written by Greg Portmann</pre></div> |
---|
39 | |
---|
40 | <!-- crossreference --> |
---|
41 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
42 | This function calls: |
---|
43 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
44 | <li><a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a> GETFAMILYDATA - Gets data associated with the accelerator control</li><li><a href="switch2hw.html" class="code" title="function ErrorFlag = switch2hw(varargin)">switch2hw</a> SWITCH2HW - Switch a family to hardware units</li><li><a href="switch2physics.html" class="code" title="function ErrorFlag = switch2physics(Family)">switch2physics</a> SWITCH2PHYSICS - Switch family to physics units</li></ul> |
---|
45 | This function is called by: |
---|
46 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
47 | </ul> |
---|
48 | <!-- crossreference --> |
---|
49 | |
---|
50 | |
---|
51 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
52 | <div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function Units = switchunits(varargin)</a> |
---|
53 | 0002 <span class="comment">%SWITCHUNITS - Change the units field for all families in the MML</span> |
---|
54 | 0003 <span class="comment">% Units = switchunits(Command)</span> |
---|
55 | 0004 <span class="comment">%</span> |
---|
56 | 0005 <span class="comment">% INPUTS</span> |
---|
57 | 0006 <span class="comment">% 1. Command - 'Hardware' or 'Physics'</span> |
---|
58 | 0007 <span class="comment">%</span> |
---|
59 | 0008 <span class="comment">% See also switchmode, switch2hw, switch2physics</span> |
---|
60 | 0009 <span class="comment">%</span> |
---|
61 | 0010 <span class="comment">% Written by Greg Portmann</span> |
---|
62 | 0011 |
---|
63 | 0012 <span class="keyword">if</span> length(varargin) == 0 |
---|
64 | 0013 ButtonName = questdlg(<span class="string">'Matlab MiddleLayer Units?'</span>,<a href="getfamilydata.html" class="code" title="function [Data, ErrorFlag] = getfamilydata(Family, Field1, Field2, DeviceList)">getfamilydata</a>(<span class="string">'OperationalMode'</span>),<span class="string">'Hardware'</span>, <span class="string">'Physics'</span>, <span class="string">'Hardware'</span>); |
---|
65 | 0014 <span class="keyword">switch</span> ButtonName, |
---|
66 | 0015 <span class="keyword">case</span> <span class="string">'Hardware'</span> |
---|
67 | 0016 <a href="switch2hw.html" class="code" title="function ErrorFlag = switch2hw(varargin)">switch2hw</a>; |
---|
68 | 0017 Units = <span class="string">'Hardware'</span>; |
---|
69 | 0018 <span class="keyword">case</span> <span class="string">'Physics'</span> |
---|
70 | 0019 Units = <span class="string">'Physics'</span>; |
---|
71 | 0020 <a href="switch2physics.html" class="code" title="function ErrorFlag = switch2physics(Family)">switch2physics</a>; |
---|
72 | 0021 <span class="keyword">end</span> |
---|
73 | 0022 <span class="keyword">else</span> |
---|
74 | 0023 <span class="keyword">if</span> strcmpi(varargin{1},<span class="string">'hardware'</span>) | strcmpi(varargin{1},<span class="string">'hw'</span>) |
---|
75 | 0024 <a href="switch2hw.html" class="code" title="function ErrorFlag = switch2hw(varargin)">switch2hw</a>; |
---|
76 | 0025 Units = <span class="string">'Hardware'</span>; |
---|
77 | 0026 <span class="keyword">elseif</span> strcmpi(varargin{1},<span class="string">'physics'</span>) |
---|
78 | 0027 <a href="switch2physics.html" class="code" title="function ErrorFlag = switch2physics(Family)">switch2physics</a>; |
---|
79 | 0028 Units = <span class="string">'Physics'</span>; |
---|
80 | 0029 <span class="keyword">else</span> |
---|
81 | 0030 error(<span class="string">'Units type unknown.'</span>); |
---|
82 | 0031 <span class="keyword">end</span> |
---|
83 | 0032 <span class="keyword">end</span></pre></div> |
---|
84 | <hr><address>Generated on Mon 21-May-2007 15:29:18 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address> |
---|
85 | </body> |
---|
86 | </html> |
---|