source: MML/trunk/mml/doc_html/mml/setam.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: 9.4 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 setam</title>
6  <meta name="keywords" content="setam">
7  <meta name="description" content="SETAM - Sets analog monitor value">
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; setam.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>setam
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>SETAM - Sets analog monitor value</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 ErrorFlag = setam(Family, 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">SETAM - Sets analog monitor value
31 If using family name, device list method,
32 ErrorFlag = setam(Family, newAM, DeviceList)
33
34 If using common name method,
35 ErrorFlag = setam(Family, newAM, CommonNames, WaitFlag)
36
37 If using channel name method,
38 ErrorFlag = setam('ChannelName', newAM)
39
40 Inputs:  Family = Family Name
41                   Accelerator Object
42                   Cell Array of Accelerator Objects or Family Names
43                   For CommonNames Family=[], searches all families
44          ChannelName = Channel access channnel name (scalar or vector inputs)
45                        Matrix of channel names (scalar inputs only)
46                        Cell array of channel names
47          CommonName = Common name (scalar or vector inputs),
48                       Matrix of common names (scalar inputs only)
49                       Cell array of common names
50          newAM  = new &quot;monitor&quot; or cell array of new &quot;monitors&quot;
51          DeviceList ([Sector Device #] or [element #]) {default or empty list: whole family}
52          WaitFlag = 0    -&gt; return immediately
53                     1    -&gt; wait until ramping is done + BPM delay {default}
54                     else -&gt; wait until ramping is done
55                     
56 Note #1: The number of colomns of newSP and DeviceList must be equal,
57          or newSP must be a scalar.  If newSP is a scalar, then all
58          devices in DeviceList will be set to the same value.
59 Note #2: When using cell array all inputs must be the same size cell array
60          and the output will also be a cell array.
61 Note #3: For families and accelerator data structures unknown devices or elements are ignored.
62          A warning message will be printed to the screen.
63 Note #4: Channel name method is always Online!
64 Note #5: setam is an odd thing to do but it's here incase you want it.
65
66 Ex., setam(HCM',1.23)  sets the entire HCM family to 1.23
67      setam({'HCM','VCM'},{10.4,5.3})  sets the entire HCM family to 10.4 and VCM family to 5.3
68      setam(AccData, 1.5, [1 2])  if AccData is a properly formated Accelerator Data Structure
69                                  then the 1st sector, 2nd element is set to 1.5
70
71 See also <a href="getam.html" class="code" title="function [AM, tout, DataTime, ErrorFlag] = getam(varargin)">getam</a>, <a href="getsp.html" class="code" title="function [SP, tout, DataTime, ErrorFlag] = getsp(Family, varargin)">getsp</a>, <a href="setsp.html" class="code" title="function ErrorFlag = setsp(Family, varargin)">setsp</a>, <a href="getpv.html" class="code" title="function [AM, tout, DataTime, ErrorFlag] = getpv(varargin)">getpv</a>, <a href="setpv.html" class="code" title="function ErrorFlag = setpv(varargin)">setpv</a></pre></div>
72
73<!-- crossreference -->
74<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
75This function calls:
76<ul style="list-style-image:url(../matlabicon.gif)">
77<li><a href="setpv.html" class="code" title="function ErrorFlag = setpv(varargin)">setpv</a>    SETPV - Setpoint change of the online system or model</li></ul>
78This function is called by:
79<ul style="list-style-image:url(../matlabicon.gif)">
80</ul>
81<!-- crossreference -->
82
83
84<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
85<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function ErrorFlag = setam(Family, varargin)</a>
860002 <span class="comment">%SETAM - Sets analog monitor value</span>
870003 <span class="comment">% If using family name, device list method,</span>
880004 <span class="comment">% ErrorFlag = setam(Family, newAM, DeviceList)</span>
890005 <span class="comment">%</span>
900006 <span class="comment">% If using common name method,</span>
910007 <span class="comment">% ErrorFlag = setam(Family, newAM, CommonNames, WaitFlag)</span>
920008 <span class="comment">%</span>
930009 <span class="comment">% If using channel name method,</span>
940010 <span class="comment">% ErrorFlag = setam('ChannelName', newAM)</span>
950011 <span class="comment">%</span>
960012 <span class="comment">% Inputs:  Family = Family Name</span>
970013 <span class="comment">%                   Accelerator Object</span>
980014 <span class="comment">%                   Cell Array of Accelerator Objects or Family Names</span>
990015 <span class="comment">%                   For CommonNames Family=[], searches all families</span>
1000016 <span class="comment">%          ChannelName = Channel access channnel name (scalar or vector inputs)</span>
1010017 <span class="comment">%                        Matrix of channel names (scalar inputs only)</span>
1020018 <span class="comment">%                        Cell array of channel names</span>
1030019 <span class="comment">%          CommonName = Common name (scalar or vector inputs),</span>
1040020 <span class="comment">%                       Matrix of common names (scalar inputs only)</span>
1050021 <span class="comment">%                       Cell array of common names</span>
1060022 <span class="comment">%          newAM  = new &quot;monitor&quot; or cell array of new &quot;monitors&quot;</span>
1070023 <span class="comment">%          DeviceList ([Sector Device #] or [element #]) {default or empty list: whole family}</span>
1080024 <span class="comment">%          WaitFlag = 0    -&gt; return immediately</span>
1090025 <span class="comment">%                     1    -&gt; wait until ramping is done + BPM delay {default}</span>
1100026 <span class="comment">%                     else -&gt; wait until ramping is done</span>
1110027 <span class="comment">%</span>
1120028 <span class="comment">% Note #1: The number of colomns of newSP and DeviceList must be equal,</span>
1130029 <span class="comment">%          or newSP must be a scalar.  If newSP is a scalar, then all</span>
1140030 <span class="comment">%          devices in DeviceList will be set to the same value.</span>
1150031 <span class="comment">% Note #2: When using cell array all inputs must be the same size cell array</span>
1160032 <span class="comment">%          and the output will also be a cell array.</span>
1170033 <span class="comment">% Note #3: For families and accelerator data structures unknown devices or elements are ignored.</span>
1180034 <span class="comment">%          A warning message will be printed to the screen.</span>
1190035 <span class="comment">% Note #4: Channel name method is always Online!</span>
1200036 <span class="comment">% Note #5: setam is an odd thing to do but it's here incase you want it.</span>
1210037 <span class="comment">%</span>
1220038 <span class="comment">% Ex., setam(HCM',1.23)  sets the entire HCM family to 1.23</span>
1230039 <span class="comment">%      setam({'HCM','VCM'},{10.4,5.3})  sets the entire HCM family to 10.4 and VCM family to 5.3</span>
1240040 <span class="comment">%      setam(AccData, 1.5, [1 2])  if AccData is a properly formated Accelerator Data Structure</span>
1250041 <span class="comment">%                                  then the 1st sector, 2nd element is set to 1.5</span>
1260042 <span class="comment">%</span>
1270043 <span class="comment">% See also getam, getsp, setsp, getpv, setpv</span>
1280044
1290045 <span class="comment">%</span>
1300046 <span class="comment">% Written by Gregory J. Portmann</span>
1310047
1320048
1330049 <span class="comment">%          ErrorFlag = 0 -&gt; OK</span>
1340050 <span class="comment">%                     -1 -&gt; SCA error</span>
1350051 <span class="comment">%                     -2 -&gt; SP-AM warning (only if WaitFlag=1)</span>
1360052
1370053 <span class="keyword">if</span> nargin &lt; 2
1380054     error(<span class="string">'Must have at least 2 inputs (Family or Channel Name and newSP).'</span>);
1390055 <span class="keyword">end</span>
1400056
1410057 [ErrorFlag] = <a href="setpv.html" class="code" title="function ErrorFlag = setpv(varargin)">setpv</a>(Family, <span class="string">'Monitor'</span>, varargin{:});
1420058
1430059</pre></div>
144<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>
145</body>
146</html>
Note: See TracBrowser for help on using the repository browser.