1 | |
---|
2 | |
---|
3 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
---|
4 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
5 | |
---|
6 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
7 | <head> |
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
---|
9 | |
---|
10 | <title>EPICS IOC support documentation — epicsdf v1.0 documentation</title> |
---|
11 | <link rel="stylesheet" href="../_static/sphinxdoc.css" type="text/css" /> |
---|
12 | <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> |
---|
13 | <script type="text/javascript"> |
---|
14 | var DOCUMENTATION_OPTIONS = { |
---|
15 | URL_ROOT: '../', |
---|
16 | VERSION: '1.0', |
---|
17 | COLLAPSE_INDEX: false, |
---|
18 | FILE_SUFFIX: '.html', |
---|
19 | HAS_SOURCE: true |
---|
20 | }; |
---|
21 | </script> |
---|
22 | <script type="text/javascript" src="../_static/jquery.js"></script> |
---|
23 | <script type="text/javascript" src="../_static/underscore.js"></script> |
---|
24 | <script type="text/javascript" src="../_static/doctools.js"></script> |
---|
25 | <link rel="top" title="epicsdf v1.0 documentation" href="../index.html" /> |
---|
26 | <link rel="up" title="Contents" href="../contents.html" /> |
---|
27 | <link rel="next" title="Host computer support documentation" href="../host/index.html" /> |
---|
28 | <link rel="prev" title="Installation Instructions for Pilatus Detectors" href="../installation.html" /> |
---|
29 | </head> |
---|
30 | <body> |
---|
31 | <div class="related"> |
---|
32 | <h3>Navigation</h3> |
---|
33 | <ul> |
---|
34 | <li class="right" style="margin-right: 10px"> |
---|
35 | <a href="../genindex.html" title="General Index" |
---|
36 | accesskey="I">index</a></li> |
---|
37 | <li class="right" > |
---|
38 | <a href="../py-modindex.html" title="Python Module Index" |
---|
39 | >modules</a> |</li> |
---|
40 | <li class="right" > |
---|
41 | <a href="../host/index.html" title="Host computer support documentation" |
---|
42 | accesskey="N">next</a> |</li> |
---|
43 | <li class="right" > |
---|
44 | <a href="../installation.html" title="Installation Instructions for Pilatus Detectors" |
---|
45 | accesskey="P">previous</a> |</li> |
---|
46 | <li><a href="../index.html">epicsdf v1.0 documentation</a> »</li> |
---|
47 | <li><a href="../contents.html" accesskey="U">Contents</a> »</li> |
---|
48 | </ul> |
---|
49 | </div> |
---|
50 | <div class="sphinxsidebar"> |
---|
51 | <div class="sphinxsidebarwrapper"> |
---|
52 | <h3><a href="../index.html">Table Of Contents</a></h3> |
---|
53 | <ul> |
---|
54 | <li><a class="reference internal" href="#">EPICS IOC support documentation</a><ul> |
---|
55 | <li><a class="reference internal" href="#goals">goals</a></li> |
---|
56 | <li><a class="reference internal" href="#database">database</a><ul> |
---|
57 | <li><a class="reference internal" href="#macro-parameters">macro parameters</a></li> |
---|
58 | <li><a class="reference internal" href="#process-variables">process variables</a></li> |
---|
59 | </ul> |
---|
60 | </li> |
---|
61 | <li><a class="reference internal" href="#alarm-calculation">alarm calculation</a></li> |
---|
62 | <li><a class="reference internal" href="#medm-client">MEDM client</a><ul> |
---|
63 | <li><a class="reference internal" href="#id1">macro parameters</a></li> |
---|
64 | </ul> |
---|
65 | </li> |
---|
66 | </ul> |
---|
67 | </li> |
---|
68 | </ul> |
---|
69 | |
---|
70 | <h4>Previous topic</h4> |
---|
71 | <p class="topless"><a href="../installation.html" |
---|
72 | title="previous chapter">Installation Instructions for Pilatus Detectors</a></p> |
---|
73 | <h4>Next topic</h4> |
---|
74 | <p class="topless"><a href="../host/index.html" |
---|
75 | title="next chapter">Host computer support documentation</a></p> |
---|
76 | <h3>This Page</h3> |
---|
77 | <ul class="this-page-menu"> |
---|
78 | <li><a href="../_sources/epics/index.txt" |
---|
79 | rel="nofollow">Show Source</a></li> |
---|
80 | </ul> |
---|
81 | <div id="searchbox" style="display: none"> |
---|
82 | <h3>Quick search</h3> |
---|
83 | <form class="search" action="../search.html" method="get"> |
---|
84 | <input type="text" name="q" size="18" /> |
---|
85 | <input type="submit" value="Go" /> |
---|
86 | <input type="hidden" name="check_keywords" value="yes" /> |
---|
87 | <input type="hidden" name="area" value="default" /> |
---|
88 | </form> |
---|
89 | <p class="searchtip" style="font-size: 90%"> |
---|
90 | Enter search terms or a module, class or function name. |
---|
91 | </p> |
---|
92 | </div> |
---|
93 | <script type="text/javascript">$('#searchbox').show(0);</script> |
---|
94 | </div> |
---|
95 | </div> |
---|
96 | |
---|
97 | <div class="document"> |
---|
98 | <div class="documentwrapper"> |
---|
99 | <div class="bodywrapper"> |
---|
100 | <div class="body"> |
---|
101 | |
---|
102 | <div class="section" id="epics-ioc-support-documentation"> |
---|
103 | <h1>EPICS IOC support documentation<a class="headerlink" href="#epics-ioc-support-documentation" title="Permalink to this headline">¶</a></h1> |
---|
104 | <p>The EPICS IOC support package consists of an EPICS database, |
---|
105 | an autosave request file to support the database, |
---|
106 | an example EPICS softIOC to run the database, |
---|
107 | a MEDM screen, and some test code to demonstrate |
---|
108 | the routine operations.</p> |
---|
109 | <div class="section" id="goals"> |
---|
110 | <h2>goals<a class="headerlink" href="#goals" title="Permalink to this headline">¶</a></h2> |
---|
111 | <ul class="simple"> |
---|
112 | <li>uses EPICS alarms</li> |
---|
113 | <li>sends email whenever alarm PV changes</li> |
---|
114 | <li>alarm PV changes based on its calculation</li> |
---|
115 | <li>default calculation watches .SEVR of free and avail</li> |
---|
116 | <li>trip points set by user</li> |
---|
117 | <li>default trip points are 500 (minor) and 50 (major) MB remaining on either free or avail</li> |
---|
118 | <li>disk PV will be reset to previous value if new value is empty or path does not exist</li> |
---|
119 | <li>period PV will be reset if it is not a number or if it is below 1.0</li> |
---|
120 | <li>update is forced early when certain PVs change (successfully): disk and period</li> |
---|
121 | </ul> |
---|
122 | </div> |
---|
123 | <div class="section" id="database"> |
---|
124 | <h2>database<a class="headerlink" href="#database" title="Permalink to this headline">¶</a></h2> |
---|
125 | <p>Supports client-side software that watches disk space |
---|
126 | on a single partition and generates alarms as the free |
---|
127 | space grows small. EPICS Alarms are used to signal |
---|
128 | for attention. Client-side software will be used to send |
---|
129 | email when $(P)$(D)df:alarm changes its value. |
---|
130 | Trip points for the alarms are in .HIGH and .HIHI fields |
---|
131 | of the “ao” records.</p> |
---|
132 | <div class="section" id="macro-parameters"> |
---|
133 | <h3>macro parameters<a class="headerlink" href="#macro-parameters" title="Permalink to this headline">¶</a></h3> |
---|
134 | <blockquote> |
---|
135 | <div><table border="1" class="docutils"> |
---|
136 | <colgroup> |
---|
137 | <col width="9%" /> |
---|
138 | <col width="25%" /> |
---|
139 | <col width="66%" /> |
---|
140 | </colgroup> |
---|
141 | <thead valign="bottom"> |
---|
142 | <tr><th class="head">macro</th> |
---|
143 | <th class="head">typical value</th> |
---|
144 | <th class="head">meaning</th> |
---|
145 | </tr> |
---|
146 | </thead> |
---|
147 | <tbody valign="top"> |
---|
148 | <tr><td>P</td> |
---|
149 | <td>prj:</td> |
---|
150 | <td>IOC prefix</td> |
---|
151 | </tr> |
---|
152 | <tr><td>D</td> |
---|
153 | <td>p300:</td> |
---|
154 | <td>specific device supported</td> |
---|
155 | </tr> |
---|
156 | </tbody> |
---|
157 | </table> |
---|
158 | </div></blockquote> |
---|
159 | <dl class="docutils"> |
---|
160 | <dt>This database can be run in an EPICS softIoc (usually for development).</dt> |
---|
161 | <dd><p class="first">See the source project for file <tt class="docutils literal"><span class="pre">epics/start_ioc.sh</span></tt>.:</p> |
---|
162 | <div class="last highlight-python"><pre>softIoc -m P=prj:,D=p300: -d epicsdf.db</pre> |
---|
163 | </div> |
---|
164 | </dd> |
---|
165 | </dl> |
---|
166 | <table class="docutils field-list" frame="void" rules="none"> |
---|
167 | <col class="field-name" /> |
---|
168 | <col class="field-body" /> |
---|
169 | <tbody valign="top"> |
---|
170 | <tr class="field"><th class="field-name">note:</th><td class="field-body">softIoc is one of the tools built in EPICS base and |
---|
171 | can be found on the path |
---|
172 | <tt class="docutils literal"><span class="pre">${EPICS_BASE}/bin/${EPICS_HOST_ARCH}/softIoc</span></tt></td> |
---|
173 | </tr> |
---|
174 | </tbody> |
---|
175 | </table> |
---|
176 | </div> |
---|
177 | <div class="section" id="process-variables"> |
---|
178 | <h3>process variables<a class="headerlink" href="#process-variables" title="Permalink to this headline">¶</a></h3> |
---|
179 | <p>The support database creates process variables to hold various values. |
---|
180 | The waveform PVs hold string values up to 1024 characters in length.</p> |
---|
181 | <blockquote> |
---|
182 | <div><table border="1" class="docutils"> |
---|
183 | <colgroup> |
---|
184 | <col width="31%" /> |
---|
185 | <col width="19%" /> |
---|
186 | <col width="50%" /> |
---|
187 | </colgroup> |
---|
188 | <thead valign="bottom"> |
---|
189 | <tr><th class="head">name</th> |
---|
190 | <th class="head">type</th> |
---|
191 | <th class="head">meaning</th> |
---|
192 | </tr> |
---|
193 | </thead> |
---|
194 | <tbody valign="top"> |
---|
195 | <tr><td>$(P)$(D)df:disk</td> |
---|
196 | <td>waveform</td> |
---|
197 | <td>disk partition being watched</td> |
---|
198 | </tr> |
---|
199 | <tr><td>$(P)$(D)df:message</td> |
---|
200 | <td>waveform</td> |
---|
201 | <td>message to be sent by email</td> |
---|
202 | </tr> |
---|
203 | <tr><td>$(P)$(D)df:email_list</td> |
---|
204 | <td>waveform</td> |
---|
205 | <td>list of email addresses</td> |
---|
206 | </tr> |
---|
207 | <tr><td>$(P)$(D)df:total</td> |
---|
208 | <td>ao</td> |
---|
209 | <td>total space on the partition (MB)</td> |
---|
210 | </tr> |
---|
211 | <tr><td>$(P)$(D)df:free</td> |
---|
212 | <td>ao</td> |
---|
213 | <td>free space (MB)</td> |
---|
214 | </tr> |
---|
215 | <tr><td>$(P)$(D)df:avail</td> |
---|
216 | <td>ao</td> |
---|
217 | <td>available space</td> |
---|
218 | </tr> |
---|
219 | <tr><td>$(P)$(D)df:used</td> |
---|
220 | <td>ao</td> |
---|
221 | <td>disk space in use (computed)</td> |
---|
222 | </tr> |
---|
223 | <tr><td>$(P)$(D)df:free:pct</td> |
---|
224 | <td>ao</td> |
---|
225 | <td>percentage free space</td> |
---|
226 | </tr> |
---|
227 | <tr><td>$(P)$(D)df:used:pct</td> |
---|
228 | <td>ao</td> |
---|
229 | <td>percentage used space</td> |
---|
230 | </tr> |
---|
231 | <tr><td>$(P)$(D)df:avail:pct</td> |
---|
232 | <td>ao</td> |
---|
233 | <td>percentage available space</td> |
---|
234 | </tr> |
---|
235 | <tr><td>$(P)$(D)df:period</td> |
---|
236 | <td>ao</td> |
---|
237 | <td>time between updates (s)</td> |
---|
238 | </tr> |
---|
239 | <tr><td>$(P)$(D)df:alarm</td> |
---|
240 | <td>calcout</td> |
---|
241 | <td>calculated alarm condition</td> |
---|
242 | </tr> |
---|
243 | </tbody> |
---|
244 | </table> |
---|
245 | </div></blockquote> |
---|
246 | <p><strong>Note:</strong> To use either command line <tt class="docutils literal"><span class="pre">caget</span></tt> or <tt class="docutils literal"><span class="pre">caput</span></tt> with the |
---|
247 | waveform strings, it is necessary to use the <tt class="docutils literal"><span class="pre">-S</span></tt> option to |
---|
248 | indicate the use of a waveform string. Here are examples:</p> |
---|
249 | <div class="highlight-python"><pre>$ caget -S 15iddLAX:p100:df:disk |
---|
250 | /mnt/data |
---|
251 | $ caput -S 15iddLAX:p100:df:disk / |
---|
252 | Old : 15iddLAX:p100:df:disk /mnt/data |
---|
253 | New : 15iddLAX:p100:df:disk /</pre> |
---|
254 | </div> |
---|
255 | </div> |
---|
256 | </div> |
---|
257 | <div class="section" id="alarm-calculation"> |
---|
258 | <h2>alarm calculation<a class="headerlink" href="#alarm-calculation" title="Permalink to this headline">¶</a></h2> |
---|
259 | <p>The alarm calculation uses a calcout record. |
---|
260 | The calcout records allows the user to reprogram the behavior as desired. |
---|
261 | In the default configuration, |
---|
262 | if the value of the $(P)$(D)df:alarm PV is non-zero, then |
---|
263 | disk space is running low.</p> |
---|
264 | <p>The alarm calculation watches |
---|
265 | the .SEVR field on the “free: and “avail” PVs. These PVs have alarm |
---|
266 | trip points for .LOW (minor) and .LOLO (major) alarms. |
---|
267 | By default, the trip points are set at 500 MB (minor) and 50 MB (major) |
---|
268 | space remaining with a hysteresis (.HYST) field of 5 MB. All these fields |
---|
269 | can be changed by users at run-time. Any change in either the |
---|
270 | “free: or “avail” PV will trigger a recalculation of the “alarm” PV |
---|
271 | through the forward link (.FLNK) fields of the “ao” record.</p> |
---|
272 | <table class="docutils field-list" frame="void" rules="none"> |
---|
273 | <col class="field-name" /> |
---|
274 | <col class="field-body" /> |
---|
275 | <tbody valign="top"> |
---|
276 | <tr class="field"><th class="field-name">note:</th><td class="field-body">The present MEDM interface does not have entry boxes for changing the |
---|
277 | trip points now, nor for editing the calcout record. Changes to all these |
---|
278 | may be made from the command line through the caput command.</td> |
---|
279 | </tr> |
---|
280 | </tbody> |
---|
281 | </table> |
---|
282 | <p>database fragment:</p> |
---|
283 | <div class="highlight-python"><pre>record(ao, "$(P)$(D)df:free") |
---|
284 | { |
---|
285 | field(DESC, "free space") |
---|
286 | field(EGU, "MB") |
---|
287 | field(PREC, "3") |
---|
288 | field(HYST, "5") |
---|
289 | field(LOW, "500") |
---|
290 | field(LOLO, "50") |
---|
291 | field(LSV, "MINOR") |
---|
292 | field(LLSV, "MAJOR") |
---|
293 | field(FLNK, "$(P)$(D)df:alarm") |
---|
294 | } |
---|
295 | record(ao, "$(P)$(D)df:avail") |
---|
296 | { |
---|
297 | field(DESC, "available space") |
---|
298 | field(EGU, "MB") |
---|
299 | field(PREC, "3") |
---|
300 | field(HYST, "5") |
---|
301 | field(LOW, "500") |
---|
302 | field(LOLO, "50") |
---|
303 | field(LSV, "MINOR") |
---|
304 | field(LLSV, "MAJOR") |
---|
305 | field(FLNK, "$(P)$(D)df:alarm") |
---|
306 | } |
---|
307 | record(calcout, "$(P)$(D)df:alarm") |
---|
308 | { |
---|
309 | field(DESC, "any alarms will trigger this") |
---|
310 | field(CALC, "A>B?A:B") |
---|
311 | field(INPA, "$(P)$(D)df:free.SEVR NPP NMS") |
---|
312 | field(INPB, "$(P)$(D)df:avail.SEVR NPP NMS") |
---|
313 | field(EGU, "boolean") |
---|
314 | field(HOPR, "2") |
---|
315 | field(HIHI, "2") |
---|
316 | field(HIGH, "1") |
---|
317 | field(HHSV, "MAJOR") |
---|
318 | field(HSV, "MINOR") |
---|
319 | }</pre> |
---|
320 | </div> |
---|
321 | </div> |
---|
322 | <div class="section" id="medm-client"> |
---|
323 | <h2>MEDM client<a class="headerlink" href="#medm-client" title="Permalink to this headline">¶</a></h2> |
---|
324 | <p>The MEDM screen has been created to support the users and the code developer. |
---|
325 | It could be improved with user feedback.</p> |
---|
326 | <p>The macro parameters are defined the same as for the database. |
---|
327 | The support screen is typically started with a command such as:</p> |
---|
328 | <div class="highlight-python"><pre>medm -x -macro P=15iddLAX:,D=p100: epicsdf.adl &</pre> |
---|
329 | </div> |
---|
330 | <div class="section" id="id1"> |
---|
331 | <h3>macro parameters<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3> |
---|
332 | <blockquote> |
---|
333 | <div><table border="1" class="docutils"> |
---|
334 | <colgroup> |
---|
335 | <col width="9%" /> |
---|
336 | <col width="25%" /> |
---|
337 | <col width="66%" /> |
---|
338 | </colgroup> |
---|
339 | <thead valign="bottom"> |
---|
340 | <tr><th class="head">macro</th> |
---|
341 | <th class="head">example value</th> |
---|
342 | <th class="head">meaning</th> |
---|
343 | </tr> |
---|
344 | </thead> |
---|
345 | <tbody valign="top"> |
---|
346 | <tr><td>P</td> |
---|
347 | <td>15iddLAX:</td> |
---|
348 | <td>IOC prefix</td> |
---|
349 | </tr> |
---|
350 | <tr><td>D</td> |
---|
351 | <td>p100:</td> |
---|
352 | <td>specific device supported</td> |
---|
353 | </tr> |
---|
354 | </tbody> |
---|
355 | </table> |
---|
356 | </div></blockquote> |
---|
357 | <img alt="example MEDM screen for <tt>epicsdf</tt>" src="../_images/epicsdf_medm.jpg" /> |
---|
358 | </div> |
---|
359 | </div> |
---|
360 | </div> |
---|
361 | |
---|
362 | |
---|
363 | </div> |
---|
364 | </div> |
---|
365 | </div> |
---|
366 | <div class="clearer"></div> |
---|
367 | </div> |
---|
368 | <div class="related"> |
---|
369 | <h3>Navigation</h3> |
---|
370 | <ul> |
---|
371 | <li class="right" style="margin-right: 10px"> |
---|
372 | <a href="../genindex.html" title="General Index" |
---|
373 | >index</a></li> |
---|
374 | <li class="right" > |
---|
375 | <a href="../py-modindex.html" title="Python Module Index" |
---|
376 | >modules</a> |</li> |
---|
377 | <li class="right" > |
---|
378 | <a href="../host/index.html" title="Host computer support documentation" |
---|
379 | >next</a> |</li> |
---|
380 | <li class="right" > |
---|
381 | <a href="../installation.html" title="Installation Instructions for Pilatus Detectors" |
---|
382 | >previous</a> |</li> |
---|
383 | <li><a href="../index.html">epicsdf v1.0 documentation</a> »</li> |
---|
384 | <li><a href="../contents.html" >Contents</a> »</li> |
---|
385 | </ul> |
---|
386 | </div> |
---|
387 | <div class="footer"> |
---|
388 | © Copyright 2011, Pete Jemian. |
---|
389 | Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7. |
---|
390 | </div> |
---|
391 | </body> |
---|
392 | </html> |
---|