source: epicsdf/doc/build/html/_sources/epics/index.txt @ 608

Last change on this file since 608 was 608, checked in by jemian, 12 years ago

revise installation notes further

  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 6.0 KB
Line 
1.. $Id: index.rst 592 2011-08-04 04:23:37Z jemian $
2
3EPICS IOC support documentation
4--------------------------------------------------------------
5
6The EPICS IOC support package consists of an EPICS database,
7an autosave request file to support the database,
8an example EPICS softIOC to run the database,
9a MEDM screen, and some test code to demonstrate
10the routine operations.
11
12goals
13^^^^^^^^^^^^^^^
14
15* uses EPICS alarms
16* sends email whenever alarm PV changes
17* alarm PV changes based on its calculation
18* default calculation watches .SEVR of free and avail
19* trip points set by user
20* default trip points are 500 (minor) and 50 (major) MB remaining on either free or avail
21* disk PV will be reset to previous value if new value is empty or path does not exist
22* period PV will be reset if it is not a number or if it is below 1.0
23* update is forced early when certain PVs change (successfully): disk and period
24
25
26database
27^^^^^^^^^^^^^^^
28
29Supports client-side software that watches disk space
30on a single partition and generates alarms as the free
31space grows small.  EPICS Alarms are used to signal
32for attention.  Client-side software will be used to send
33email when $(P)$(D)df:alarm changes its value.
34Trip points for the alarms are in .HIGH and .HIHI fields
35of the "ao" records.
36
37macro parameters
38+++++++++++++++++++++++
39
40        =====  =============  ===================================
41        macro  typical value  meaning
42        =====  =============  ===================================
43        P      prj:           IOC prefix
44        D      p300:          specific device supported
45        =====  =============  ===================================
46
47This database can be run in an EPICS softIoc (usually for development).
48    See the source project for file ``epics/start_ioc.sh``.::
49
50        softIoc -m P=prj:,D=p300: -d epicsdf.db
51       
52:note: softIoc is one of the tools built in EPICS base and
53        can be found on the path
54        ``${EPICS_BASE}/bin/${EPICS_HOST_ARCH}/softIoc``
55
56process variables
57+++++++++++++++++++++++
58
59The support database creates process variables to hold various values.
60The waveform PVs hold string values up to 1024 characters in length.
61
62        ======================  =============  ===================================
63        name                    type           meaning
64        ======================  =============  ===================================
65        $(P)$(D)df:disk         waveform       disk partition being watched
66        $(P)$(D)df:message      waveform       message to be sent by email
67        $(P)$(D)df:email_list   waveform       list of email addresses
68        $(P)$(D)df:total        ao             total space on the partition (MB)
69        $(P)$(D)df:free         ao             free space (MB)
70        $(P)$(D)df:avail        ao             available space
71        $(P)$(D)df:used         ao             disk space in use (computed)
72        $(P)$(D)df:free:pct     ao             percentage free space
73        $(P)$(D)df:used:pct     ao             percentage used space
74        $(P)$(D)df:avail:pct    ao             percentage available space
75        $(P)$(D)df:period       ao             time between updates (s)
76        $(P)$(D)df:alarm        calcout        calculated alarm condition
77        ======================  =============  ===================================
78
79**Note:** To use either command line ``caget`` or ``caput`` with the
80waveform strings, it is necessary to use the ``-S`` option to
81indicate the use of a waveform string.  Here are examples::
82       
83        $ caget -S 15iddLAX:p100:df:disk
84        /mnt/data
85        $ caput -S 15iddLAX:p100:df:disk /
86        Old : 15iddLAX:p100:df:disk          /mnt/data
87        New : 15iddLAX:p100:df:disk          /
88
89
90alarm calculation
91^^^^^^^^^^^^^^^^^^^
92
93The alarm calculation uses a calcout record.
94The calcout records allows the user to reprogram the behavior as desired.
95In the default configuration,
96if the value of the $(P)$(D)df:alarm PV is non-zero, then
97disk space is running low.
98
99The alarm calculation watches
100the .SEVR field on the "free: and "avail" PVs.  These PVs have alarm
101trip points for .LOW (minor) and .LOLO (major) alarms.
102By default, the trip points are set at 500 MB (minor) and 50 MB (major)
103space remaining with a hysteresis (.HYST) field of 5 MB. All these fields
104can be changed by users at run-time.  Any change in either the
105"free: or "avail" PV will trigger a recalculation of the "alarm" PV
106through the forward link (.FLNK) fields of the "ao" record.
107
108:note:  The present MEDM interface does not have entry boxes for changing the
109        trip points now, nor for editing the calcout record.  Changes to all these
110        may be made from the command line through the caput command.
111
112database fragment::
113
114        record(ao, "$(P)$(D)df:free")
115        {
116                field(DESC, "free space")
117                field(EGU,  "MB")
118                field(PREC, "3")
119                field(HYST, "5")
120                field(LOW,  "500")
121                field(LOLO, "50")
122                field(LSV,  "MINOR")
123                field(LLSV, "MAJOR")
124                field(FLNK, "$(P)$(D)df:alarm")
125        }
126        record(ao, "$(P)$(D)df:avail")
127        {
128                field(DESC, "available space")
129                field(EGU,  "MB")
130                field(PREC, "3")
131                field(HYST, "5")
132                field(LOW,  "500")
133                field(LOLO, "50")
134                field(LSV,  "MINOR")
135                field(LLSV, "MAJOR")
136                field(FLNK, "$(P)$(D)df:alarm")
137        }
138        record(calcout, "$(P)$(D)df:alarm")
139        {
140                field(DESC, "any alarms will trigger this")
141                field(CALC, "A>B?A:B")
142                field(INPA, "$(P)$(D)df:free.SEVR  NPP NMS")
143                field(INPB, "$(P)$(D)df:avail.SEVR  NPP NMS")
144                field(EGU,  "boolean")
145                field(HOPR, "2")
146                field(HIHI, "2")
147                field(HIGH, "1")
148                field(HHSV, "MAJOR")
149                field(HSV,  "MINOR")
150        }
151
152
153
154MEDM client
155^^^^^^^^^^^^^^^
156
157The MEDM screen has been created to support the users and the code developer.
158It could be improved with user feedback.
159
160The macro parameters are defined the same as for the database.
161The support screen is typically started with a command such as::
162
163  medm -x -macro P=15iddLAX:,D=p100: epicsdf.adl &
164
165macro parameters
166+++++++++++++++++++++++
167
168        =====  =============  ===================================
169        macro  example value  meaning
170        =====  =============  ===================================
171        P      15iddLAX:      IOC prefix
172        D      p100:          specific device supported
173        =====  =============  ===================================
174
175.. image:: epicsdf_medm.jpg
176   :alt: example MEDM screen for <tt>epicsdf</tt>
177   
Note: See TracBrowser for help on using the repository browser.