source: MML/trunk/mml/doc_html/mml/switchunits.html @ 4

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

Initial import--MML version from SOLEIL@2013

File size: 5.7 KB
Line 
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 &copy; 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> &gt;  <a href="index.html">mml</a> &gt; switchunits.m</div>
16
17<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
18<td align="right"><a href="index.html">Index for mml&nbsp;<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>
42This 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>
45This 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>
530002 <span class="comment">%SWITCHUNITS - Change the units field  for all families in the MML</span>
540003 <span class="comment">%  Units = switchunits(Command)</span>
550004 <span class="comment">%</span>
560005 <span class="comment">%  INPUTS</span>
570006 <span class="comment">%  1. Command - 'Hardware' or 'Physics'</span>
580007 <span class="comment">%</span>
590008 <span class="comment">%  See also switchmode, switch2hw, switch2physics</span>
600009 <span class="comment">%</span>
610010 <span class="comment">%  Written by Greg Portmann</span>
620011
630012 <span class="keyword">if</span> length(varargin) == 0
640013     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>);
650014     <span class="keyword">switch</span> ButtonName,
660015         <span class="keyword">case</span> <span class="string">'Hardware'</span>
670016             <a href="switch2hw.html" class="code" title="function ErrorFlag = switch2hw(varargin)">switch2hw</a>;
680017             Units = <span class="string">'Hardware'</span>;
690018         <span class="keyword">case</span> <span class="string">'Physics'</span>
700019             Units = <span class="string">'Physics'</span>;
710020             <a href="switch2physics.html" class="code" title="function ErrorFlag = switch2physics(Family)">switch2physics</a>;
720021     <span class="keyword">end</span>
730022 <span class="keyword">else</span>
740023     <span class="keyword">if</span> strcmpi(varargin{1},<span class="string">'hardware'</span>) | strcmpi(varargin{1},<span class="string">'hw'</span>)
750024         <a href="switch2hw.html" class="code" title="function ErrorFlag = switch2hw(varargin)">switch2hw</a>;
760025         Units = <span class="string">'Hardware'</span>;
770026     <span class="keyword">elseif</span> strcmpi(varargin{1},<span class="string">'physics'</span>)
780027         <a href="switch2physics.html" class="code" title="function ErrorFlag = switch2physics(Family)">switch2physics</a>;
790028         Units = <span class="string">'Physics'</span>;
800029     <span class="keyword">else</span>
810030         error(<span class="string">'Units type unknown.'</span>);
820031     <span class="keyword">end</span>
830032 <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> &copy; 2003</address>
85</body>
86</html>
Note: See TracBrowser for help on using the repository browser.