<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki-ext.aps.anl.gov/epics/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BobDalesio</id>
	<title>EPICSWIKI - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-ext.aps.anl.gov/epics/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=BobDalesio"/>
	<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=Special:Contributions/BobDalesio"/>
	<updated>2026-07-11T10:30:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Multi-Bit_Binary_Output&amp;diff=3685</id>
		<title>RRM 3-14 Multi-Bit Binary Output</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Multi-Bit_Binary_Output&amp;diff=3685"/>
		<updated>2012-06-01T15:24:44Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* mbbo -- Multi-Bit Binary Output */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= mbbo -- Multi-Bit Binary Output =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The normal use for the mbbo record type is to send a binary value (representing one of up to 16 states) to a Digital Output module. It is used for any device that uses more than one contiguous bit to control it. The mbbo record can also be used to write discrete values to other records via database or channel access links.&lt;br /&gt;
&lt;br /&gt;
== Parameter Fields ==&lt;br /&gt;
&lt;br /&gt;
The multi-bit binary output fields fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* scan parameters&lt;br /&gt;
* desired output parameters&lt;br /&gt;
* write and convert parameters&lt;br /&gt;
* operator display parameters&lt;br /&gt;
* alarm parameters&lt;br /&gt;
* run-time parameters&lt;br /&gt;
&lt;br /&gt;
=== Scan Parameters ===&lt;br /&gt;
&lt;br /&gt;
The mbbo record has the standard fields for specifying under what circumstances it will be processed. These fields are listed in [[RRM 3-14 dbCommon#Scan Fields|Scan Fields]]. In addition, [[RRM 3-14 Concepts#Scanning Specification|Scanning Specification]] explains how these fields are used. Note that I/O event scanning is only supported for those card types that interrupt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Desired Output Parameters ===&lt;br /&gt;
&lt;br /&gt;
The multi-bit binary output record, like all output records, must specify where its output originates. The output mode select (OMSL) field determines whether the output originates from another record or from database access (i.e., the operator). When set to &amp;lt;CODE&amp;gt;closed_loop&amp;lt;/CODE&amp;gt;, the desired output is retrieved from the link specified in the desired output (DOL) field--which can specify either a database or channel access link--and placed into the VAL field. When set to &amp;lt;CODE&amp;gt;supervisory&amp;lt;/CODE&amp;gt;, the DOL field is ignored and the current value of VAL is simply written. VAL can be changed via dpPuts at run-time when OMSL is &amp;lt;CODE&amp;gt;supervisory&amp;lt;/CODE&amp;gt;. The DOL field can also be a constant, in which case the VAL field is initialized to the constant value. If DOL is a constant, OMSL cannot be set to &amp;lt;CODE&amp;gt;closed_loop&amp;lt;/CODE&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The VAL field itself usually consists of an index that specifies one of the states. The actual output written is the value of RVAL, which is converted from VAL following the routine explained in the next section. However, records that use the &amp;lt;CODE&amp;gt;Soft Channel&amp;lt;/CODE&amp;gt; device support module write the VAL field's value without any conversion.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;OMSL&amp;lt;TD&amp;gt;Output Mode Select&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DOL&amp;lt;TD&amp;gt;Desired Output Location (an Input Link)&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;VAL&amp;lt;TD&amp;gt;Value Field&amp;lt;TD&amp;gt;ENUM&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Convert and Write Parameters ===&lt;br /&gt;
&lt;br /&gt;
The device support routines write the desired output to the location specified in the OUT field. If the record uses soft device support, OUT can contain a constant, a database link, or a channel access link; however, if OUT is a constant, no value will be written.&lt;br /&gt;
&lt;br /&gt;
For records that write their values to hardware devices, the OUT output link must specify the address of the I/O card, and the DTYP field must specify the corresponding device support module. Be aware that the address format differs according to the I/O bus used. See [[RRM 3-14 Concepts#Address Specification|Address Specification]] for information on the format of hardware addresses. The user can see a list of the device support modules currently supported at the user's local site by using the &amp;lt;CODE&amp;gt;dbst&amp;lt;/CODE&amp;gt; utility in R3.13.&lt;br /&gt;
&lt;br /&gt;
For mbbo records that write to hardware, the value written to the output location is the value contained in RVAL, which is converted from VAL, VAL containing an index of one of the 16 states (0-15). RVAL is then set to the corresponding state value, the value in one of the fields ZRVL through FFVL. Then this value is shifted left according to the number in the SHFT field so that the value is in the correct position for the bits being used (the SHFT value is set by device support and is not configurable by the user).&lt;br /&gt;
&lt;br /&gt;
The state value fields ZRVL through FFVL must be configured by the user before run-time. When the state values are not defined, the states defined (SDEF) field is set to FALSE at initialization time by the record routines. When SDEF is FALSE, then the record processing routine does not try to find a match, RVAL is set equal to VAL, the bits are shifted using the number in SHFT, and the value is written thus.&lt;br /&gt;
&lt;br /&gt;
If the OUT output link specifies a database link, channel access link, or constant, then the DTYP field must specify either one of the two soft device support modules--&amp;lt;CODE&amp;gt;Soft Channel&amp;lt;/CODE&amp;gt; or &amp;lt;CODE&amp;gt;Raw&amp;lt;/CODE&amp;gt; &amp;lt;CODE&amp;gt;Soft Channel&amp;lt;/CODE&amp;gt;. &amp;lt;CODE&amp;gt;Soft&amp;lt;/CODE&amp;gt; &amp;lt;CODE&amp;gt;Channel&amp;lt;/CODE&amp;gt; writes the value of VAL to the output link, without any conversion, while &amp;lt;CODE&amp;gt;Raw Soft Channel &amp;lt;/CODE&amp;gt;writes the value from RVAL after it has undergone the above conversion. See [[RRM 3-14 Concepts#Address Specification|Address Specification]] for information on specifying links.&lt;br /&gt;
&lt;br /&gt;
Note also that when a string is retrieved as the desired output, a record support routine is provided (&amp;lt;CODE&amp;gt;put_enum_str&amp;lt;/CODE&amp;gt;) that will set check to see if the string matches one of the strings in the ZRST through FFST fields. If a match is found, RVAL is set equal to the corresponding state value of that string. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;OUT&amp;lt;TD&amp;gt;Output Link&amp;lt;TD&amp;gt;OUTLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RVAL&amp;lt;TD&amp;gt;Raw Data Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SHFT&amp;lt;TD&amp;gt;Shift&amp;lt;TD&amp;gt;USHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDEF&amp;lt;TD&amp;gt;States Defined?&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ZRVL&amp;lt;TD&amp;gt;Zero Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ONVL&amp;lt;TD&amp;gt;One value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TWVL&amp;lt;TD&amp;gt;Two Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;THVL&amp;lt;TD&amp;gt;Three Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FRVL&amp;lt;TD&amp;gt;Four Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FVVL&amp;lt;TD&amp;gt;Five Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SXVL&amp;lt;TD&amp;gt;Six Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SVVL&amp;lt;TD&amp;gt;Seven Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EIVL&amp;lt;TD&amp;gt;Eight value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NIVL&amp;lt;TD&amp;gt;Nine Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TEVL&amp;lt;TD&amp;gt;Ten Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ELVL&amp;lt;TD&amp;gt;Eleven Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TVVL&amp;lt;TD&amp;gt;Twelve Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TTVL&amp;lt;TD&amp;gt;Thirteen Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FTVL&amp;lt;TD&amp;gt;Fourteen Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FFVL&amp;lt;TD&amp;gt;Fifteen Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ZRST&amp;lt;TD&amp;gt;Zero String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ONST&amp;lt;TD&amp;gt;One String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TWST&amp;lt;TD&amp;gt;Two String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;THST&amp;lt;TD&amp;gt;Three String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FRST&amp;lt;TD&amp;gt;Four String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FVST&amp;lt;TD&amp;gt;Five String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SXST&amp;lt;TD&amp;gt;Six String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SVST&amp;lt;TD&amp;gt;Seven String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EIST&amp;lt;TD&amp;gt;Eight String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NIST&amp;lt;TD&amp;gt;Nine String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TEST&amp;lt;TD&amp;gt;Ten String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ELST&amp;lt;TD&amp;gt;Eleven String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TVST&amp;lt;TD&amp;gt;Twelve String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TTST&amp;lt;TD&amp;gt;Thirteen String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FTST&amp;lt;TD&amp;gt;Fourteen String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FFST&amp;lt;TD&amp;gt;Fifteen String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Operator Display Parameters ===&lt;br /&gt;
&lt;br /&gt;
These parameters are used to present meaningful data to the operator. These fields are used to display the value and other parameters of the mbbo record either textually or graphically. The ZRST-FFST fields contain strings describing each of the corresponding states. The &amp;lt;CODE&amp;gt;get_enum_str&amp;lt;/CODE&amp;gt; and &amp;lt;CODE&amp;gt;get_enum_strs&amp;lt;/CODE&amp;gt; record routines retrieve these strings for the operator. &amp;lt;CODE&amp;gt;Get_enum_str&amp;lt;/CODE&amp;gt; gets the string corresponding to the value set in VAL, and &amp;lt;CODE&amp;gt;get_enum_strs&amp;lt;/CODE&amp;gt; retrieves all the strings.&lt;br /&gt;
&lt;br /&gt;
See [[RRM 3-14 dbCommon#Fields Common to All Record Types|Fields Common to All Record Types]] for more on the record name (NAME) and description (DESC) fields.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ZRST,...,FFST&amp;lt;TD&amp;gt;Zero String, One String, ...&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Alarm Parameters ===&lt;br /&gt;
&lt;br /&gt;
The possible alarm conditions for multi-bit binary outputs are the SCAN, READ, INVALID, and state alarms. The SCAN and READ alarms are called by the support modules and are not configurable by the user, as their severity is always MAJOR.&lt;br /&gt;
&lt;br /&gt;
The IVOA field specifies an action to take from a number of possible choices when the INVALID alarm is triggered. The IVOV field contains a value to be written once the INVALID alarm has been triggered if &amp;lt;CODE&amp;gt;Set output to IVOV&amp;lt;/CODE&amp;gt; has been chosen in the IVOA field. The severity of the INVALID alarm is not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
The state alarms are configured in the below severity fields. These fields have the usual possible values for severity fields: NO_ALARM, MINOR, and MAJOR.&lt;br /&gt;
&lt;br /&gt;
The unknown state severity field (UNSV), if set to MINOR or MAJOR, triggers an alarm when the record support routine cannot find a matching value in the state value fields for VAL or when VAL is out of range.&lt;br /&gt;
&lt;br /&gt;
The change of state severity field (COSV) triggers an alarm when the record's state changes, if set to MAJOR or MINOR.&lt;br /&gt;
&lt;br /&gt;
The state severity (ZRSV-FFSV) fields, when set to MAJOR or MINOR, trigger an alarm when VAL equals the corresponding field.&lt;br /&gt;
&lt;br /&gt;
See [[RRM 3-14 Concepts#Alarm Specification|Alarm Specification]] for a complete explanation of discrete alarms and these fields. See [[RRM 3-14 Common#Invalid Alarm Output Action|Invalid Alarm Output Action]] for an explanation of the IVOA and IVOV fields. [[RRM 3-14 dbCommon#Alarm Fields|Alarm Fields]] lists other fields related to a alarms that are common to all record types. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UNSV&amp;lt;TD&amp;gt;Unknown State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;COSV&amp;lt;TD&amp;gt;Change of State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;IVOA&amp;lt;TD&amp;gt;Invalid Alarm Output Action&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;IVOV&amp;lt;TD&amp;gt;Invalid Alarm Output Value, in eng. units&amp;lt;TD&amp;gt;DOUBLE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ZRSV&amp;lt;TD&amp;gt;0 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ONSV&amp;lt;TD&amp;gt;1 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TWSV&amp;lt;TD&amp;gt;2 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;THSV&amp;lt;TD&amp;gt;3 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FRSV&amp;lt;TD&amp;gt;4 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FVSV&amp;lt;TD&amp;gt;5 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SXSV&amp;lt;TD&amp;gt;6 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SVSV&amp;lt;TD&amp;gt;7 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EISV&amp;lt;TD&amp;gt;8 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NISV&amp;lt;TD&amp;gt;9 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TESV&amp;lt;TD&amp;gt;10 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ELSV&amp;lt;TD&amp;gt;11 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TVSV&amp;lt;TD&amp;gt;12 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TTSV&amp;lt;TD&amp;gt;13 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FTSV&amp;lt;TD&amp;gt;14 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FFSV&amp;lt;TD&amp;gt;15 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run-Time and Simulation Mode Parameters ===&lt;br /&gt;
&lt;br /&gt;
These parameters are used by the run-time code for processing the multi-bit binary output.&lt;br /&gt;
&lt;br /&gt;
MASK is used by device support routine to read the hardware register. Record support sets low order of MASK the number of bits specified in NOBT. Device support can shift this value.&lt;br /&gt;
&lt;br /&gt;
The LALM field implements the change of state alarm severity by holding the value of VAL when the previous change of state alarm was issued.&lt;br /&gt;
&lt;br /&gt;
MLST holds the value when the last monitor for value change was triggered.&lt;br /&gt;
&lt;br /&gt;
SDEF is used by record support to save time if no states are defined; it is used for converting VAL to RVAL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NOBT&amp;lt;TD&amp;gt;Number of Bits&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ORAW&amp;lt;TD&amp;gt;Old Raw Data&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MASK&amp;lt;TD&amp;gt;Mask&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LALM&amp;lt;TD&amp;gt;Last Alarmed&amp;lt;TD&amp;gt;USHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLST&amp;lt;TD&amp;gt;Monitor Last&amp;lt;TD&amp;gt;USHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDEF&amp;lt;TD&amp;gt;States Defined?&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following fields are used to operate the mbbo record in the simulation mode. See [[RRM 3-14 Common#Fields Common to Many Record Types|Fields Common to Many Record Types]] for more information on the simulation mode fields.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SIOL&amp;lt;TD&amp;gt;Simulation Value Location&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SIML&amp;lt;TD&amp;gt;Simulation Mode Location&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SIMM&amp;lt;TD&amp;gt;Simulation Mode&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SIMS&amp;lt;TD&amp;gt;Simulation Mode Alarm Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Record Support ==&lt;br /&gt;
&lt;br /&gt;
=== Record Support Routines ===&lt;br /&gt;
&lt;br /&gt;
==== init_record ====&lt;br /&gt;
&lt;br /&gt;
This routine initializes SIMM if SIML is a constant or creates a channel access link if SIML is PV_LINK. If SIOL is PV_LINK a channel access link is created.&lt;br /&gt;
&lt;br /&gt;
This routine next checks to see that device support is available. The routine next checks to see if the device support write routine is defined. If either device support or the device support write routine does not exist, an error message is issued and processing is terminated.&lt;br /&gt;
&lt;br /&gt;
If DOL is a constant, then VAL is initialized to its value and UDF is set to FALSE.&lt;br /&gt;
&lt;br /&gt;
MASK is cleared and then the NOBT low order bits are set.&lt;br /&gt;
&lt;br /&gt;
If device support includes init_record, it is called.&lt;br /&gt;
&lt;br /&gt;
init_common is then called to determine if any states are defined. If states are defined, SDEF is set to TRUE.&lt;br /&gt;
&lt;br /&gt;
If device support returns success, VAL is then set from RVAL and UDF is set to FALSE.&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
See next section.&lt;br /&gt;
&lt;br /&gt;
==== special ====&lt;br /&gt;
&lt;br /&gt;
Computes SDEF when any of the fields ZRVL,...FFVL change value.&lt;br /&gt;
&lt;br /&gt;
==== get_value ====&lt;br /&gt;
&lt;br /&gt;
Fills in the values of struct valueDes so that they refer to VAL.&lt;br /&gt;
&lt;br /&gt;
==== get_enum_str ====&lt;br /&gt;
&lt;br /&gt;
Retrieves ASCII string corresponding to VAL.&lt;br /&gt;
&lt;br /&gt;
==== get_enum_strs ====&lt;br /&gt;
&lt;br /&gt;
Retrieves ASCII strings for ZRST,...FFST.&lt;br /&gt;
&lt;br /&gt;
==== put_enum_str ====&lt;br /&gt;
&lt;br /&gt;
Checks if string matches ZRST,...FFST and if it does, sets VAL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Record Processing ===&lt;br /&gt;
&lt;br /&gt;
Routine process implements the following algorithm:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Check to see that the appropriate device support module exists. If it doesn't, an error message is issued and processing is terminated with the PACT field still set to TRUE. This ensures that processes will not longer be called for this record. Thus error storms will not occur.&lt;br /&gt;
# If PACT is FALSE&lt;br /&gt;
#* If DOL is DB_LINK and OMSL is CLOSED_LOOP&lt;br /&gt;
#** Get value from DOL&lt;br /&gt;
#** Set UDF to FALSE&lt;br /&gt;
#** Check for link alarm&lt;br /&gt;
#* If any state values are defined&lt;br /&gt;
#** If VAL &amp;amp;gt; 15, then raise alarm and go to 4&lt;br /&gt;
#** Else using VAL as index set RVAL = one of ZRVL,...FFVL&lt;br /&gt;
#* Else set RVAL = VAL&lt;br /&gt;
#* Shift RVAL left SHFT bits&lt;br /&gt;
# Convert&lt;br /&gt;
#* If PACT is FALSE, compute RVAL&lt;br /&gt;
#** If VAL is 0,...,15, set RVAL from ZRVL,...,FFVL&lt;br /&gt;
#** If VAL out of range, set RVAL = undefined&lt;br /&gt;
#* Status = write_mbbo&lt;br /&gt;
# Check alarms. This routine checks to see if the new VAL causes the alarm status and severity to change. If so, NSEV, NSTA and LALM are set.&lt;br /&gt;
# Check severity and write the new value. See [[RRM 3-14 Common#Simulation Mode|Simulation Mode]] and [[RRM 3-14 Common#Invalid Alarm Output Action|Invalid Alarm Output Action]] for more information.&lt;br /&gt;
# If PACT has been changed to TRUE, the device support write output routine has started but has not completed writing the new value. In this case, the processing routine merely returns, leaving PACT TRUE.&lt;br /&gt;
# Check to see if monitors should be invoked.&lt;br /&gt;
#* Alarm monitors are invoked if the alarm status or severity has changed.&lt;br /&gt;
#* Archive and value change monitors are invoked if MLST is not equal to VAL.&lt;br /&gt;
#* Monitors for RVAL and RBV are checked whenever other monitors are invoked.&lt;br /&gt;
#* NSEV and NSTA are reset to 0.&lt;br /&gt;
# Scan forward link if necessary, set PACT FALSE, and return.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Device Support ==&lt;br /&gt;
&lt;br /&gt;
=== Fields Of Interest To Device Support ===&lt;br /&gt;
&lt;br /&gt;
Each mbbo record must have an associated set of device support routines. The primary responsibility of the device support routines is to obtain a new raw mbbo value whenever write_mbbo is called. The device support routines are primarily interested in the following fields:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD rowspan=4&amp;gt;See [[RRM 3-14 dbCommon#Fields Common to All Record Types|Fields Common to All Record Types]] for an explanation of these fields.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NOBT&amp;lt;TD&amp;gt;Number of Bits&amp;lt;TD&amp;gt;Number of hardware bits accessed. They must be consecutive.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;OUT&amp;lt;TD&amp;gt;Output Link&amp;lt;TD&amp;gt;This field is used by the device support routines to locate its output.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RVAL&amp;lt;TD&amp;gt;Raw data value.&amp;lt;TD&amp;gt;This is the value to be written to OUT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RBV&amp;lt;TD&amp;gt;Read Back Value&amp;lt;TD&amp;gt;It is the responsibility of the device support modules to set this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MASK&amp;lt;TD&amp;gt;Mask&amp;lt;TD&amp;gt;This is a mask used to read the hardware. Record support sets the low order NOBT bits. The device support routine can shift the bits. The device support routine should perform the shift in init_record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SHFT&amp;lt;TD&amp;gt;Shift&amp;lt;TD&amp;gt;This can be set by the device support module at init_record time.&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Device Support Routines ===&lt;br /&gt;
&lt;br /&gt;
Device support consists of the following routines:&lt;br /&gt;
&lt;br /&gt;
==== report ====&lt;br /&gt;
&lt;br /&gt;
 report(FILE fp, paddr)&lt;br /&gt;
&lt;br /&gt;
Not currently used.&lt;br /&gt;
&lt;br /&gt;
==== init ====&lt;br /&gt;
&lt;br /&gt;
 init()&lt;br /&gt;
&lt;br /&gt;
This routine is called once during IOC initialization.&lt;br /&gt;
&lt;br /&gt;
==== init_record ====&lt;br /&gt;
&lt;br /&gt;
 init_record(precord)&lt;br /&gt;
&lt;br /&gt;
This routine is optional. If provided, it is called by the record support init_record routine. If MASK is used, it should be shifted if necessary and SHFT given a value.&lt;br /&gt;
&lt;br /&gt;
==== get_ioint_info ====&lt;br /&gt;
&lt;br /&gt;
 get_ioint_info(int cmd,struct dbCommon *precord,IOSCANPVT *ppvt)&lt;br /&gt;
&lt;br /&gt;
This routine is called by the ioEventScan system each time the record is added or deleted from an I/O event scan list. cmd has the value (0,1) if the record is being (added to, deleted from) an I/O event list. It must be provided for any device type that can use the ioEvent scanner.&lt;br /&gt;
&lt;br /&gt;
==== write_mbbo ====&lt;br /&gt;
&lt;br /&gt;
 write_mbbo(precord)&lt;br /&gt;
&lt;br /&gt;
This routine must output a new value. It returns the following values:&lt;br /&gt;
&lt;br /&gt;
* 0: Success.&lt;br /&gt;
* Other: Error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Device Support For Soft Records ===&lt;br /&gt;
&lt;br /&gt;
==== Soft Channel ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;CODE&amp;gt;Soft Channel&amp;lt;/CODE&amp;gt; module writes the current value of VAL.&lt;br /&gt;
&lt;br /&gt;
If the OUT link type is PV_LINK, then dbCaAddInlink is called by init_record.&lt;br /&gt;
&lt;br /&gt;
write_mbbo calls recGblPutLinkValue to write the current value of VAL. See [[RRM 3-14 Common#Soft Output|Soft Output]] for more information.&lt;br /&gt;
&lt;br /&gt;
==== Raw Soft Channel ====&lt;br /&gt;
&lt;br /&gt;
This module writes RVAL to the location specified in the output link. It returns a 0.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Multi-Bit_Binary_Input&amp;diff=3684</id>
		<title>RRM 3-14 Multi-Bit Binary Input</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Multi-Bit_Binary_Input&amp;diff=3684"/>
		<updated>2012-06-01T15:23:45Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* mbbi -- Multi-Bit Binary Input */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= mbbi -- Multi-Bit Binary Input =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The normal use for the multi-bit binary input record is to read contiguous, multiple bit inputs from hardware. The binary value represents a state from a range of up to 16 states. The multi-bit input record interfaces with devices that use more than one bit.&lt;br /&gt;
&lt;br /&gt;
Most device support modules obtain values from hardware and place the value in RVAL. For these device support modules record processing uses RVAL to determine the current state (VAL is given a value between 0 and 15). Device support modules may optionally read a value directly into VAL.&lt;br /&gt;
&lt;br /&gt;
Soft device modules are provided to obtain input via database or channel access links or via dbPutField or dbPutLink requests. Two soft device support modules are provided: &amp;lt;CODE&amp;gt;Soft Channel&amp;lt;/CODE&amp;gt; allows VAL to be an arbitrary unsigned short integer. &amp;lt;CODE&amp;gt;Raw Soft Channel&amp;lt;/CODE&amp;gt; reads the value into RVAL just like normal device support modules.&lt;br /&gt;
&lt;br /&gt;
== Parameter Fields ==&lt;br /&gt;
&lt;br /&gt;
The multi-bit binary input fields fall into the following categories:&lt;br /&gt;
&lt;br /&gt;
* scan parameters&lt;br /&gt;
* read and convert parameters&lt;br /&gt;
* operator display parameters&lt;br /&gt;
* alarm parameters&lt;br /&gt;
* run-time and simulation mode parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Scan parameters ===&lt;br /&gt;
&lt;br /&gt;
The multi-bit binary input record has the standard fields for specifying under what circumstances it will be processed. These fields are listed in [[RRM 3-14 dbCommon#Scan Fields|Scan Fields]]. In addition, [[RRM 3-14 Concepts#Scanning Specification|Scanning Specification]] explains how these fields are used. Note that I/O event scanning is only supported for those card types that interrupt.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Read and Convert Parameters ===&lt;br /&gt;
&lt;br /&gt;
The device support routines obtain the record's input from the device or link specified in the INP field. For records that obtain their input from devices, the INP field must contain the address of the I/O card, and the DTYP field must specify the proper device support module. Be aware that the address format differs according to the I/O bus used. See [[RRM 3-14 Concepts#Address Specification|Address Specification]] for information on the format of hardware addresses. You can see a list of the device support modules currently supported at the user's local site by using the &amp;lt;CODE&amp;gt;dbst&amp;lt;/CODE&amp;gt; utility in R3.13.&lt;br /&gt;
&lt;br /&gt;
Two soft device support modules can be specified in DTYP--&amp;lt;CODE&amp;gt;Soft Channel&amp;lt;/CODE&amp;gt; and &amp;lt;CODE&amp;gt;Raw Soft Channel&amp;lt;/CODE&amp;gt;. &amp;lt;CODE&amp;gt;Raw Soft Channel&amp;lt;/CODE&amp;gt; reads the value into RVAL, upon which the normal conversion process is undergone. &amp;lt;CODE&amp;gt;Soft Channel&amp;lt;/CODE&amp;gt; reads any unsigned integer directly into VAL. For a soft mbbi record, the INP field can be a constant, a database, or a channel access link. If INP is a constant, then the VAL is initialized to the constant value but can be changed at run-time via dbPutField or dbPutLink. See [[RRM 3-14 Concepts#Address Specification|Address Specification]] for information on the format of database addresses.&lt;br /&gt;
&lt;br /&gt;
MASK is used by the raw soft channel read routine, and by typical device support read routines, to select only the desired bits when reading the hardware register.  It is initialized to ((1 &amp;lt;&amp;lt; NOBT) - 1) by record initialization.  The user can configure the NOBT field, but the device support routines may set it, in which case the value given to it by the user is simply overridden.   The device support routines may also override MASK or shift it left by SHFT bits.   If MASK is non-zero, only the bits specified by MASK will appear in RVAL.&lt;br /&gt;
&lt;br /&gt;
Unless the device support routine specifies no conversion, RVAL is used to determine VAL as follows:&lt;br /&gt;
&lt;br /&gt;
# RVAL is assigned to a temporary variable -- rval = RVAL&lt;br /&gt;
# rval is shifted right SHFT number of bits.&lt;br /&gt;
# A match is sought between rval and one of the state value fields, ZRVL-FFVL.&lt;br /&gt;
&lt;br /&gt;
Each of the fields, ZRVL-FFVL, represents one of the possible sixteen states (not all sixteen have to be used).&lt;br /&gt;
&lt;br /&gt;
Alternatively, the input value can be read as a string, in which case, a match is sought with one of the strings specified in the ZRST-FFST fields. Then RVAL is set equal to the corresponding value for that string, and the conversion process occurs. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;VAL&amp;lt;TD&amp;gt;Value Field&amp;lt;TD&amp;gt;ENUM&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;INP&amp;lt;TD&amp;gt;Input Link&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MASK&amp;lt;TD&amp;gt;Mask&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NOBT&amp;lt;TD&amp;gt;Number of Bits&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RVAL&amp;lt;TD&amp;gt;Raw Data Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SHFT&amp;lt;TD&amp;gt;Shift&amp;lt;TD&amp;gt;USHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ZRVL&amp;lt;TD&amp;gt;Zero Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ONVL&amp;lt;TD&amp;gt;One value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TWVL&amp;lt;TD&amp;gt;Two Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;THVL&amp;lt;TD&amp;gt;Three Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FRVL&amp;lt;TD&amp;gt;Four Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FVVL&amp;lt;TD&amp;gt;Five Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SXVL&amp;lt;TD&amp;gt;Six Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SVVL&amp;lt;TD&amp;gt;Seven Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EIVL&amp;lt;TD&amp;gt;Eight value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NIVL&amp;lt;TD&amp;gt;Nine Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TEVL&amp;lt;TD&amp;gt;Ten Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ELVL&amp;lt;TD&amp;gt;Eleven Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TVVL&amp;lt;TD&amp;gt;Twelve Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TTVL&amp;lt;TD&amp;gt;Thirteen Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FTVL&amp;lt;TD&amp;gt;Fourteen Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FFVL&amp;lt;TD&amp;gt;Fifteen Value&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ZRST&amp;lt;TD&amp;gt;Zero String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ONST&amp;lt;TD&amp;gt;One String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TWST&amp;lt;TD&amp;gt;Two String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;THST&amp;lt;TD&amp;gt;Three String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FRST&amp;lt;TD&amp;gt;Four String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FVST&amp;lt;TD&amp;gt;Five String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SXST&amp;lt;TD&amp;gt;Six String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SVST&amp;lt;TD&amp;gt;Seven String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EIST&amp;lt;TD&amp;gt;Eight String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NIST&amp;lt;TD&amp;gt;Nine String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TEST&amp;lt;TD&amp;gt;Ten String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ELST&amp;lt;TD&amp;gt;Eleven String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TVST&amp;lt;TD&amp;gt;Twelve String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TTST&amp;lt;TD&amp;gt;Thirteen String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FTST&amp;lt;TD&amp;gt;Fourteen String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FFST&amp;lt;TD&amp;gt;Fifteen String&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Operator Display Parameters ===&lt;br /&gt;
&lt;br /&gt;
These parameters are used to present meaningful data to the operator. They display the value and other parameters of the mbbi record either textually or graphically. The ZRST-FFST fields contain strings describing one of the possible states of the record. The &amp;lt;CODE&amp;gt;get_enum_str&amp;lt;/CODE&amp;gt; and &amp;lt;CODE&amp;gt;get_enum_strs&amp;lt;/CODE&amp;gt; record routines retrieve these strings for the operator. &amp;lt;CODE&amp;gt;Get_enum_str&amp;lt;/CODE&amp;gt; gets the string corresponding to the value set in VAL, and &amp;lt;CODE&amp;gt;get_enum_strs&amp;lt;/CODE&amp;gt; retrieves all the strings.&lt;br /&gt;
&lt;br /&gt;
See [[RRM 3-14 dbCommon#Fields Common to All Record Types|Fields Common to All Record Types]] for more on the record name (NAME) and description (DESC) fields.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ZRST,...,FFST&amp;lt;TD&amp;gt;Zero String, One String, ...&amp;lt;TD&amp;gt;STRING [16]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Parameters ===&lt;br /&gt;
&lt;br /&gt;
The possible alarm conditions for multi-bit binary inputs are the SCAN, READ, and state alarms. The state alarms are configured in the below severity fields. These fields have the usual possible values for severity fields: NO_ALARM, MINOR, and MAJOR.&lt;br /&gt;
&lt;br /&gt;
The unknown state severity (UNSV) field, if set to MINOR or MAJOR, triggers an alarm when the record support routine cannot find a matching value in the state value fields for &amp;lt;CODE&amp;gt;rval&amp;lt;/CODE&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The change of state severity (COSV) field triggers an alarm when any change of state occurs, if set to MAJOR or MINOR.&lt;br /&gt;
&lt;br /&gt;
The other fields, when set to MAJOR or MINOR, trigger an alarm when VAL equals the corresponding state. See the See [[RRM 3-14 Concepts#Alarm Specification|Alarm Specification]] for a complete explanation of discrete alarms and these fields. [[RRM 3-14 dbCommon#Alarm Fields|Alarm Fields]] lists other fields related to a alarms that are common to all record types. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UNSV&amp;lt;TD&amp;gt;Unknown State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;COSV&amp;lt;TD&amp;gt;Change of State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ZRSV&amp;lt;TD&amp;gt;0 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ONSV&amp;lt;TD&amp;gt;1 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TWSV&amp;lt;TD&amp;gt;2 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;THSV&amp;lt;TD&amp;gt;3 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FRSV&amp;lt;TD&amp;gt;4 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FVSV&amp;lt;TD&amp;gt;5 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SXSV&amp;lt;TD&amp;gt;6 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SVSV&amp;lt;TD&amp;gt;7 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EISV&amp;lt;TD&amp;gt;8 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NISV&amp;lt;TD&amp;gt;9 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TESV&amp;lt;TD&amp;gt;10 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ELSV&amp;lt;TD&amp;gt;11 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TVSV&amp;lt;TD&amp;gt;12 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TTSV&amp;lt;TD&amp;gt;13 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FTSV&amp;lt;TD&amp;gt;14 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FFSV&amp;lt;TD&amp;gt;15 State Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Run-time Parameters ===&lt;br /&gt;
&lt;br /&gt;
These parameters are used by the run-time code for processing the multi-bit binary input.&lt;br /&gt;
&lt;br /&gt;
ORAW is used by record processing to hold the prior RVAL for use in determining when to post a monitor event for the RVAL field.&lt;br /&gt;
&lt;br /&gt;
The LALM field implements the change of state alarm severity by holding the value of VAL when the previous change of state alarm was issued.&lt;br /&gt;
&lt;br /&gt;
MLST holds the value when the last monitor for value change was triggered.&lt;br /&gt;
&lt;br /&gt;
SDEF is used by record support to save time if no states are defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ORAW&amp;lt;TD&amp;gt;Old Raw Data&amp;lt;TD&amp;gt;ULONG&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LALM&amp;lt;TD&amp;gt;Last Alarmed&amp;lt;TD&amp;gt;USHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLST&amp;lt;TD&amp;gt;Monitor Last&amp;lt;TD&amp;gt;USHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDEF&amp;lt;TD&amp;gt;States Defined?&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Simulation Mode Parameters ===&lt;br /&gt;
&lt;br /&gt;
The following fields are used to operate the mbbi record in the simulation mode. See [[RRM 3-14 Common#Fields Common to Many Record Types|Fields Common to Many Record Types]] for more information on these fields.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SIOL&amp;lt;TD&amp;gt;Simulation Value Location&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SVAL&amp;lt;TD&amp;gt;Simulation Value&amp;lt;TD&amp;gt;DOUBLE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SIML&amp;lt;TD&amp;gt;Simulation Mode Location&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SIMM&amp;lt;TD&amp;gt;Simulation Mode&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SIMS&amp;lt;TD&amp;gt;Simulation Mode Alarm Severity&amp;lt;TD&amp;gt;[[RRM 3-14 Menu Choices|GBLCHOICE]]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Record Support ==&lt;br /&gt;
&lt;br /&gt;
=== Record Support Routines ===&lt;br /&gt;
&lt;br /&gt;
==== init_record ====&lt;br /&gt;
&lt;br /&gt;
This routine initializes SIMM with the value of SIML if SIML type is CONSTANT link or creates a channel access link if SIML type is PV_LINK. SVAL is likewise initialized if SIOL is CONSTANT or PV_LINK.&lt;br /&gt;
&lt;br /&gt;
This routine next checks to see that device support is available and a device support read routine is defined. If either does not exist, an error message is issued and processing is terminated.&lt;br /&gt;
&lt;br /&gt;
Clears MASK and then sets the NOBT low order bits.&lt;br /&gt;
&lt;br /&gt;
If device support includes init_record, it is called.&lt;br /&gt;
&lt;br /&gt;
init_common is then called to determine if any states are defined. If states are defined, SDEF is set to TRUE.&lt;br /&gt;
&lt;br /&gt;
==== process ====&lt;br /&gt;
&lt;br /&gt;
See next section.&lt;br /&gt;
&lt;br /&gt;
==== special ====&lt;br /&gt;
&lt;br /&gt;
Calls init_common to compute SDEF when any of the fields ZRVL, ... FFVL change value.&lt;br /&gt;
&lt;br /&gt;
==== get_value ====&lt;br /&gt;
&lt;br /&gt;
Fills in the values of struct valueDes so that they refer to VAL.&lt;br /&gt;
&lt;br /&gt;
==== get_enum_str ====&lt;br /&gt;
&lt;br /&gt;
Retrieves ASCII string corresponding to VAL.&lt;br /&gt;
&lt;br /&gt;
==== get_enum_strs ====&lt;br /&gt;
&lt;br /&gt;
Retrieves ASCII strings for ZRST,...FFST.&lt;br /&gt;
&lt;br /&gt;
==== put_enum_str ====&lt;br /&gt;
&lt;br /&gt;
Checks if string matches ZRST,...FFST and if it does, sets VAL.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Record Processing ===&lt;br /&gt;
&lt;br /&gt;
Routine process implements the following algorithm:&lt;br /&gt;
&lt;br /&gt;
# Check to see that the appropriate device support module exists. If it doesn't, an error message is issued and processing is terminated with the PACT field still set to TRUE. This ensures that processes will no longer be called for this record. Thus error storms will not occur.&lt;br /&gt;
# readValue is called. See [[RRM 3-14 Common#Input Records|Input Records]] for more information.&lt;br /&gt;
# If PACT has been changed to TRUE, the device support read routine has started but has not completed reading a new input value. In this case, the processing routine merely returns, leaving PACT TRUE.&lt;br /&gt;
# Convert:&lt;br /&gt;
#* status=read_mbbi&lt;br /&gt;
#* PACT = TRUE&lt;br /&gt;
#* TIME = tsLocalTime&lt;br /&gt;
#* If status is 0, then determine VAL&lt;br /&gt;
#** Set rval = RVAL&lt;br /&gt;
#** Shift rval right SHFT bits&lt;br /&gt;
#* If at least one state value is defined&lt;br /&gt;
#** Set UDF to TRUE&lt;br /&gt;
#* If RVAL is ZRVL,...,FFVL then set&lt;br /&gt;
#** VAL equals index of state&lt;br /&gt;
#** UDF set to FALSE&lt;br /&gt;
#* Else set VAL = undefined&lt;br /&gt;
#** Else set VAL = RVAL&lt;br /&gt;
#* Set UDF to FALSE&lt;br /&gt;
#** If status is 1, return(0)&lt;br /&gt;
#* If status is 2, set status = 0&lt;br /&gt;
# Check alarms. This routine checks to see if the new VAL causes the alarm status and severity to change. If so, NSEV, NSTA and LALM are set.&lt;br /&gt;
# Check to see if monitors should be invoked.&lt;br /&gt;
#* Alarm monitors are invoked if the alarm status or severity has changed.&lt;br /&gt;
#* Archive and value change monitors are invoked if MLST is not equal to VAL.&lt;br /&gt;
#* Monitors for RVAL are checked whenever other monitors are invoked.&lt;br /&gt;
#* NSEV and NSTA are reset to 0.&lt;br /&gt;
# Scan forward link if necessary, set PACT FALSE, and return.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Device Support ==&lt;br /&gt;
&lt;br /&gt;
=== Fields Of Interest To Device Support ===&lt;br /&gt;
&lt;br /&gt;
Each input record must have an associated set of device support routines.&lt;br /&gt;
&lt;br /&gt;
The primary responsibility of the device support routines is to obtain a new raw input value whenever read_mbbi is called. The device support routines are primarily interested in the following fields:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD rowspan=5&amp;gt;See [[RRM 3-14 dbCommon#Fields Common to All Record Types|Fields Common to All Record Types]] for an explanation of these fields.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NOBT&amp;lt;TD&amp;gt;Number of Bits&amp;lt;TD&amp;gt;Number of hardware bits accessed. They must be consecutive.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;VAL&amp;lt;TD&amp;gt;Value Field&amp;lt;TD&amp;gt;This field is set by the device support routines if they don't want record support to set it.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;INP&amp;lt;TD&amp;gt;Input Link&amp;lt;TD&amp;gt;This field is used by the device support routines to locate its input.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RVAL&amp;lt;TD&amp;gt;Raw Data Value&amp;lt;TD&amp;gt;It is the responsibility of the device support routine to give this field a value.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MASK&amp;lt;TD&amp;gt;Mask&amp;lt;TD&amp;gt;This is a mask used to read the hardware. Record support sets the low order NOBT bits. The device support routine can shift the bits. The device support routine should perform the shift in init_record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SHFT&amp;lt;TD&amp;gt;Shift&amp;lt;TD&amp;gt;This can be set by the device support module at init_record time.&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Device Support Routines ===&lt;br /&gt;
&lt;br /&gt;
Device support consists of the following routines:&lt;br /&gt;
&lt;br /&gt;
==== report ====&lt;br /&gt;
&lt;br /&gt;
 report(FILE fp, paddr)&lt;br /&gt;
&lt;br /&gt;
Not currently used.&lt;br /&gt;
&lt;br /&gt;
==== init ====&lt;br /&gt;
&lt;br /&gt;
 init()&lt;br /&gt;
&lt;br /&gt;
This routine is called once during IOC initialization.&lt;br /&gt;
&lt;br /&gt;
==== init_record ====&lt;br /&gt;
&lt;br /&gt;
 init_record(precord)&lt;br /&gt;
&lt;br /&gt;
This routine is optional. If provided, it is called by the record support init_record routine. If it uses MASK, it should shift it as necessary and also give SHFT a value.&lt;br /&gt;
&lt;br /&gt;
==== get_ioint_info ====&lt;br /&gt;
&lt;br /&gt;
get_ioint_info(int cmd,struct dbCommon *precord,IOSCANPVT *ppvt)&lt;br /&gt;
&lt;br /&gt;
This routine is called by the ioEventScan system each time the record is added or deleted from an I/O event scan list. cmd has the value (0,1) if the record is being (added to, deleted from) an I/O event list. It must be provided for any device type that can use the I/O Event scanner.&lt;br /&gt;
&lt;br /&gt;
==== read_mbbi ====&lt;br /&gt;
&lt;br /&gt;
 read_mbbi(precord)&lt;br /&gt;
&lt;br /&gt;
This routine must provide a new input value. It returns the following values:&lt;br /&gt;
&lt;br /&gt;
* 0: Success. A new raw value is placed in RVAL. The record support      module determines VAL from RVAL, SHFT, and ZEVL ... FFVL.&lt;br /&gt;
* 2: Success, but don't modify VAL.&lt;br /&gt;
* Other: Error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Device Support For Soft Records ===&lt;br /&gt;
&lt;br /&gt;
Two soft device support modules &amp;lt;CODE&amp;gt;Soft Channel&amp;lt;/CODE&amp;gt; and &amp;lt;CODE&amp;gt;Raw Soft Channel&amp;lt;/CODE&amp;gt; are provided for multi-bit binary input records not related to actual hardware devices. The INP link type must be either CONSTANT, DB_LINK, or CA_LINK.&lt;br /&gt;
&lt;br /&gt;
==== Soft Channel ====&lt;br /&gt;
&lt;br /&gt;
read_mbbi always returns a value of 2, which means that no conversion is performed.&lt;br /&gt;
&lt;br /&gt;
If the INP link type is constant, then the constant value is stored into VAL by init_record, and UDF is set to FALSE. VAL can be changed via dbPut requests. If the INP link type is PV_LINK, then dbCaAddInlink is called by init_record.&lt;br /&gt;
&lt;br /&gt;
read_mbbi calls recGblGetLinkValue to read the current value of VAL. See [[RRM 3-14 Common#Soft Input|Soft Input]].&lt;br /&gt;
&lt;br /&gt;
If the return status of recGblGetLinkValue is zero, then read_mbbi sets UDF to FALSE. The status of recGblGetLinkValue is returned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Raw Soft Channel ====&lt;br /&gt;
&lt;br /&gt;
This module is like the previous except that values are read into RVAL, VAL is computed from RVAL, and read_mbbi returns a value of 0. Thus the record processing routine will determine VAL in the normal way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1728</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1728"/>
		<updated>2009-04-24T20:11:43Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Field Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;This indicates that the record has never been processed or is UnDeFined. Typically this is caused by a failure in device support or is the state of a record that is scanned Passive, has PINI set to false, and is never processed. UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Indicates if there is a breakpoint set at this record.  This supports setting a debug breakpoint in the record processing. STEP through database processing can be supported using this.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [60]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;?&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Soft Record Support&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;This indicates the mechanism to use to get the time stamp. 0 - call get time as before 1 - call the time stamp driver and use the best source available. 2 - the device support provides the time stamp from the hardware.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp. If this link is defined the time stamp of the referenced record becomes the time stamp for this record as well. This mechanism allows things like calculation records to use the time stamp from a device support routine that has an event time stamp for instance.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1727</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1727"/>
		<updated>2009-04-24T19:42:40Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Field Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;This indicates that the record has never been processed or is UnDeFined. Typically this is caused by a failure in device support or is the state of a record that is scanned Passive, has PINI set to false, and is never processed. UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Indicates if there is a breakpoint set at this record.  This supports setting a debug breakpoint in the record processing. STEP through database processing can be supported using this.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [60]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;?&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Soft Record Support&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;This indicates the mechanism to use to get the time stamp. 1 - call the time stamp driver and use the best source available. 2 - the device support provides the time stamp from the hardware.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp. If this link is defined the time stamp of the referenced record becomes the time stamp for this record as well. This mechanism allows things like calculation records to use the time stamp from a device support routine that has an event time stamp for instance.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1726</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1726"/>
		<updated>2009-04-24T19:40:29Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Field Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;This indicates that the record has never been processed or is UnDeFined. Typically this is caused by a failure in device support or is the state of a record that is scanned Passive, has PINI set to false, and is never processed. UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Indicates if there is a breakpoint set at this record.  This supports setting a debug breakpoint in the record processing. STEP through database processing can be supported using this.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [60]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;?&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Soft Record Support&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;This indicates the mechanism to use to get the time stamp. 1 - call the time stamp driver and use the best source available. 2 - the device support provides the time stamp from the hardware.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp. If this link is defined the time stamp of the referenced record becomes the time stamp for this record as well. This mechanism allows things like calculation records to use the time stamp from a device support routine that has an event time stamp for instance.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1725</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1725"/>
		<updated>2009-04-24T19:39:07Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Field Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;This indicates that the record has never been processed or is UnDeFined. Typically this is caused by a failure in device support or is the state of a record that is scanned Passive, has PINI set to false, and is never processed. UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Indicates if there is a breakpoint set at this record.  This supports setting a debug breakpoint in the record processing. STEP through database processing can be supported using this.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [60]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;?&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;This indicates the mechanism to use to get the time stamp. 1 - call the time stamp driver and use the best source available. 2 - the device support provides the time stamp from the hardware.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp. If this link is defined the time stamp of the referenced record becomes the time stamp for this record as well. This mechanism allows things like calculation records to use the time stamp from a device support routine that has an event time stamp for instance.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1724</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1724"/>
		<updated>2009-04-24T19:37:04Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Field Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;This indicates that the record has never been processed or is UnDeFined. Typically this is caused by a failure in device support or is the state of a record that is scanned Passive, has PINI set to false, and is never processed. UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Indicates if there is a breakpoint set at this record.  This supports setting a debug breakpoint in the record processing. STEP through database processing can be supported using this.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [60]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;This indicates the mechanism to use to get the time stamp. 1 - call the time stamp driver and use the best source available. 2 - the device support provides the time stamp from the hardware.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp. If this link is defined the time stamp of the referenced record becomes the time stamp for this record as well. This mechanism allows things like calculation records to use the time stamp from a device support routine that has an event time stamp for instance.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1723</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1723"/>
		<updated>2009-04-24T19:30:50Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Field Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;This indicates that the record has never been processed or is UnDeFined. Typically this is caused by a failure in device support or is the state of a record that is scanned Passive, has PINI set to false, and is never processed. UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Indicates if there is a breakpoint set at this record.  This supports setting a debug breakpoint in the record processing. STEP through database processing can be supported using this.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;This indicates the mechanism to use to get the time stamp. 1 - call the time stamp driver and use the best source available. 2 - the device support provides the time stamp from the hardware.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp. If this link is defined the time stamp of the referenced record becomes the time stamp for this record as well. This mechanism allows things like calculation records to use the time stamp from a device support routine that has an event time stamp for instance.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1722</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1722"/>
		<updated>2009-04-24T19:25:02Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Field Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;This indicates that the record has never been processed or is UnDeFined. Typically this is caused by a failure in device support or is the state of a record that is scanned Passive, has PINI set to false, and is never processed. UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Indicates if there is a breakpoint set at this record.  This supports setting a debug breakpoint in the record processing. STEP through database processing can be supported using this.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;The event number for time stamp.  This is only meaningful if the IOC has an associated hardware event receiver.  See 'er' record for details.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp event number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1721</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1721"/>
		<updated>2009-04-24T19:23:09Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Field Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;This indicates that the record has never been processed or is UnDeFined. Typically this is caused by a failure in device support or is the state of a record that is scanned Passive, has PINI set to false, and is never processed. UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Holds a pointer to the breakpoint table specified in LINR, if any.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;The event number for time stamp.  This is only meaningful if the IOC has an associated hardware event receiver.  See 'er' record for details.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp event number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1720</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1720"/>
		<updated>2009-04-24T19:20:19Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Field Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;This indicates that the record has never been processed or is UnDeFined. Typically this is caused by a failure in device support or is the state of a record that is scanned Passive, has PINI set to false, and is never processed. UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Holds a pointer to the breakpoint table specified in LINR, if any.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;The event number for time stamp.  This is only meaningful if the IOC has an associated hardware event receiver.  See 'er' record for details.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp event number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1719</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1719"/>
		<updated>2009-04-24T19:18:48Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Field Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;This indicates that the record has never been processed or is UnDeFined. Typically this is caused by a failure in device support or is the state of a record that is scanned Passive, has PINI set to false, and is never processed. UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Holds a pointer to the breakpoint table specified in LINR, if any.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;The event number for time stamp.  This is only meaningful if the IOC has an associated hardware event receiver.  See 'er' record for details.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp event number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1718</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1718"/>
		<updated>2009-04-24T19:16:30Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Field Summary */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Holds a pointer to the breakpoint table specified in LINR, if any.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;The event number for time stamp.  This is only meaningful if the IOC has an associated hardware event receiver.  See 'er' record for details.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp event number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1716</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1716"/>
		<updated>2009-04-22T15:01:06Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Scan Fields */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;11&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Holds a pointer to the breakpoint table specified in LINR, if any.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;The event number for time stamp.  This is only meaningful if the IOC has an associated hardware event receiver.  See 'er' record for details.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp event number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1714</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1714"/>
		<updated>2009-04-22T14:51:47Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;11&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Holds a pointer to the breakpoint table specified in LINR, if any.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;The event number for time stamp.  This is only meaningful if the IOC has an associated hardware event receiver.  See 'er' record for details.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp event number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1713</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1713"/>
		<updated>2009-04-21T20:37:06Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Field Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Rate&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;11&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Holds a pointer to the breakpoint table specified in LINR, if any.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;The event number for time stamp.  This is only meaningful if the IOC has an associated hardware event receiver.  See 'er' record for details.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp event number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1712</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1712"/>
		<updated>2009-04-21T20:24:07Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Scan Fields */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Algorithm&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;11&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Holds a pointer to the breakpoint table specified in LINR, if any.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;The event number for time stamp.  This is only meaningful if the IOC has an associated hardware event receiver.  See 'er' record for details.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp event number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1711</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1711"/>
		<updated>2009-04-20T20:28:54Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Scan Fields */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Algorithm&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;11&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Holds a pointer to the breakpoint table specified in LINR, if any.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;The event number for time stamp.  This is only meaningful if the IOC has an associated hardware event receiver.  See 'er' record for details.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp event number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1710</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1710"/>
		<updated>2009-04-20T20:27:36Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Scan Fields */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Algorithm&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;11&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Holds a pointer to the breakpoint table specified in LINR, if any.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;The event number for time stamp.  This is only meaningful if the IOC has an associated hardware event receiver.  See 'er' record for details.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp event number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1709</id>
		<title>RRM 3-14 dbCommon</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_dbCommon&amp;diff=1709"/>
		<updated>2009-04-20T20:25:56Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: /* Scan Fields */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Fields Common to All Record Types ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
This chapter contains a description of fields that are common to all records. These fields are defined in dbcommon.dbd.&lt;br /&gt;
&lt;br /&gt;
=== Scan Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information related to how and when a record processes. For a further explanation of these record processing and these fields, see Scanning Specification, Chapter 1, 1. A few records have unique fields that also affect how they process. These fields, if any, will be listed and explained in the chapter for each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&lt;br /&gt;
&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Passive&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Low&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No Alarm&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;FWDLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SCAN&amp;lt;TD&amp;gt;Scanning Algorithm&amp;lt;TD&amp;gt;This can be one of the periodic intervals (&amp;lt;CODE&amp;gt;.1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;.5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;1 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;2 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;5 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;10 second&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;I/O Intr&amp;lt;/CODE&amp;gt;, &amp;lt;CODE&amp;gt;Event&amp;lt;/CODE&amp;gt;, or &amp;lt;CODE&amp;gt;Passive&amp;lt;/CODE&amp;gt;.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PINI&amp;lt;TD&amp;gt;Process at Initialization&amp;lt;TD&amp;gt;If this field is set to YES during database configuration, then the record is processed once at IOC initialization (before the normal scan tasks are started).&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PHAS&amp;lt;TD&amp;gt;Scan Phase Number&amp;lt;TD&amp;gt;This field orders the records within a specific SCAN group. This is not meaningful for passive records. All records of a specified phase are processed before those with higher phase number. Whenever possible it is better to use linked passive records to enforce the order of processing rather than phase number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;EVNT&amp;lt;TD&amp;gt;Event Number&amp;lt;TD&amp;gt;Event number for scan type SCAN_EVENT. All records with scan type event and the same EVNT value will be processed when a call to post_event for EVNT is made. The call to post_event is: post_event(short event_number)&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PRIO&amp;lt;TD&amp;gt;Priority&amp;lt;TD&amp;gt;Scheduling priority for processing I/O Event scanned records and asynchronous record completion tasks.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISV&amp;lt;TD&amp;gt;Disable Value&amp;lt;TD&amp;gt;If DISV=DISA, then the record will be disabled, i.e. dbProcess will not process the record.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISA&amp;lt;TD&amp;gt;Scan Disable Input Link Value&amp;lt;TD&amp;gt;This is the value that is compared with DISV to determine if the record is disabled. Its value is obtained via SDIS if SDIS is a database or channel access link. If SDIS is not a database or channel access link, then DISA can be set via dbPutField or dbPutLink.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SDIS&amp;lt;TD&amp;gt;Scan Disable Input Link&amp;lt;TD&amp;gt;An input link from which to obtain a value for DISA. This field is ignored unless it is a database link or a channel access link. If it is a database or a channel access link, dbProcess calls dbGetLink to obtain a value for DISA before deciding to call the processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PROC&amp;lt;TD&amp;gt;Process Record&amp;lt;TD&amp;gt;A record will be processed whenever a dbPutField is directed to this field.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISS&amp;lt;TD&amp;gt;Disable Alarm Severity&amp;lt;TD&amp;gt;When this record is disabled, it will be put into alarm with this severity and a status of DISABLE_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LSET&amp;lt;TD&amp;gt;Lock Set&amp;lt;TD&amp;gt;The lock set to which this record belongs.  All records linked in any way via input, output, or forward database links belong to the same lock set.  Lock sets are determined at IOC initialization time, and are updated whenever a database link is added, removed or altered.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;LCNT&amp;lt;TD&amp;gt;Lock Count&amp;lt;TD&amp;gt;The number of times in succession dbProcess finds the record active, i.e. PACT is TRUE. If dbProcess finds the record active MAX_LOCK (currently set to 10) times in succession, it raises a SCAN_ALARM.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PACT&amp;lt;TD&amp;gt;Processing Active&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage. PACT is TRUE while the record is being processed. For asynchronous records PACT can be TRUE from the time record processing is started until the asynchronous completion occurs. As long as PACT is TRUE, dbProcess will not call the record processing routine.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;FLNK&amp;lt;TD&amp;gt;Forward Link&amp;lt;TD&amp;gt;This field is a database link. If FLNK is specified, processing this record will force a processing of the scan passive forward link record.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Alarm Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields indicate the status and severity of alarms, or else determine the how and when alarms are triggered. For a further explanation of database alarms, see Alarm Specification, Chapter 1, 4. Of course, many records have alarm-related fields not common to all records. These fields are listed and explained in the appropriate chapter on each record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;UDF_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;INVALID_ALARM&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;GBLCHOICE&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;11&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;Yes&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;STAT&amp;lt;TD&amp;gt;Current Alarm Status&amp;lt;TD rowspan=4&amp;gt;These four fields are the alarm status and severity fields. STAT and SEVR are the values seen outside database access. NSTA and NSEV are the fields the database access, record support, and device support use to set new alarm status and severity values. Whenever any software component discovers an alarm condition, it uses the following macro function: recGblSetSevr(precord,new_status,new_severity) This ensures that the current alarm severity is set equal to the highest outstanding alarm. The file alarm.h defines all allowed alarm status and severity values.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SEVR&amp;lt;TD&amp;gt;Current Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSTA&amp;lt;TD&amp;gt;New Alarm Status&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NSEV&amp;lt;TD&amp;gt;New Alarm Severity&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKS&amp;lt;TD&amp;gt;Alarm Acknowledge Severity&amp;lt;TD&amp;gt;Highest severity unacknowledged alarm&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ACKT&amp;lt;TD&amp;gt;Alarm Acknowledge Transient&amp;lt;TD&amp;gt;Is it necessary to acknowledge transient alarms?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;UDF&amp;lt;TD&amp;gt;VAL Undefined&amp;lt;TD&amp;gt;UDF is initialized to TRUE at IOC initialization.  Record and device support routines which write to the VAL field are responsible for setting UDF to FALSE.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Device Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields contain information about the device and record support used by a record.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;SPVT&amp;lt;TD&amp;gt;Scan Private&amp;lt;TD&amp;gt;This field is for private use of the scanning system.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RSET&amp;lt;TD&amp;gt;Address of Record Support Entry Table&amp;lt;TD&amp;gt;See Application Developers Guide for details on usage.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DSET&amp;lt;TD&amp;gt;Address of Device Support Entry Table&amp;lt;TD&amp;gt;This address of the device support entry table for this record. The value of this field is determined at IOC initialization time. Record support routines use this field to locate their device support routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DPVT&amp;lt;TD&amp;gt;Device Private&amp;lt;TD&amp;gt;This field is for private use of the device support modules.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Debugging Fields ===&lt;br /&gt;
&lt;br /&gt;
These fields can aid in the debugging process.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;1&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TPRO&amp;lt;TD&amp;gt;Trace Processing&amp;lt;TD&amp;gt;If this field is set 1, a message is printed each time this record is processed and a message is printed for each record processed as a result of this record being processed&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;BKPT&amp;lt;TD&amp;gt;BreakPoint&amp;lt;TD&amp;gt;Holds a pointer to the breakpoint table specified in LINR, if any.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Miscellaneous Fields ===&lt;br /&gt;
&lt;br /&gt;
These are miscellaneous fields common to all record types.&lt;br /&gt;
&lt;br /&gt;
==== Field Summary ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Field&amp;lt;TH&amp;gt;Type&amp;lt;TH&amp;gt;DCT&amp;lt;TH&amp;gt;Initial&amp;lt;TH&amp;gt;Access&amp;lt;TH&amp;gt;Modify&amp;lt;TH&amp;gt;Rec Proc Monitor&amp;lt;TH&amp;gt;PP&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;STRING [29]&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;SHORT&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;INLINK&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Null&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;N/A&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;DEVCHOICE&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;12&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;UCHAR&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;0&amp;lt;TD&amp;gt;Yes&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;4&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;NO_ACCESS&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;NOACCESS&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;8&amp;lt;TD&amp;gt;Option&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;TD&amp;gt;No&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Field Description ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE BORDER=&amp;quot;1&amp;quot;&amp;gt;&amp;lt;TH&amp;gt;Name&amp;lt;TH&amp;gt;Summary&amp;lt;TH&amp;gt;Description&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;NAME&amp;lt;TD&amp;gt;Record Name&amp;lt;TD&amp;gt;An arbitrary 28 character record name supplied by the application developer.  This name is the means of identifying a specific record. It must have a unique value across all IOCs attached to the same local area subnet.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DESC&amp;lt;TD&amp;gt;Description&amp;lt;TD&amp;gt;An arbitrary 28 character record description supplied by the application developer.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASG&amp;lt;TD&amp;gt;Access Security Group&amp;lt;TD&amp;gt;A character string value defining the access security group for this record.  If left NULL, the record is placed in group DEFAULT.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSE&amp;lt;TD&amp;gt;Time Stamp Event&amp;lt;TD&amp;gt;The event number for time stamp.  This is only meaningful if the IOC has an associated hardware event receiver.  See 'er' record for details.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TSEL&amp;lt;TD&amp;gt;Time Stamp Event Link&amp;lt;TD&amp;gt;An input link for obtaining the time stamp event number.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DTYP&amp;lt;TD&amp;gt;Device Type&amp;lt;TD&amp;gt;This field specifies the device type for the record. Each record type has its own set of device support routines which are specified in devSup.ASCII. If a record type does not have any associated device support, DTYP and DSET are meaningless.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLOK&amp;lt;TD&amp;gt;Monitor Lock&amp;lt;TD&amp;gt;The lock used by the monitor routines when the monitor list is being used. The list is locked whenever monitors are being scheduled, invoked, or when monitors are being added to or removed from the list. This field is accessed only by the dbEvent routines.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;MLIS&amp;lt;TD&amp;gt;Monitor List&amp;lt;TD&amp;gt;This is the head of the list of monitors connected to this record. Each record support module is responsible for triggering monitors for any fields that change as a result of record processing. Monitors are present if mlis count is greater than zero. The call to trigger monitors is: db_post_event(precord,&amp;amp;amp;data,mask), where &amp;quot;mask&amp;quot; is some combination of DBE_ALARM, DBE_VALUE, and DBE_LOG.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;DISP&amp;lt;TD&amp;gt;Disable putFields&amp;lt;TD&amp;gt;If this field is set to TRUE, then all dbPutFields (normally issued by channel access) directed to this record are ignored except to the field DISP itself.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PUTF&amp;lt;TD&amp;gt;dbPutField Process&amp;lt;TD&amp;gt;Did dbPutField cause the current record processing?&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RPRO&amp;lt;TD&amp;gt;Reprocess&amp;lt;TD&amp;gt;Reprocess record when current processing completes.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;ASP&amp;lt;TD&amp;gt;Access Security Private&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPN&amp;lt;TD&amp;gt;Address of putNotify&amp;lt;TD&amp;gt;Address of putNotify callback.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;PPNR&amp;lt;TD&amp;gt;Next Record for putNotify&amp;lt;TD&amp;gt;Next record for PutNotify.&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;RDES&amp;lt;TD&amp;gt;Address of dbRecordType&amp;lt;TD&amp;gt;&amp;amp;nbsp;&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD&amp;gt;TIME&amp;lt;TD&amp;gt;Time&amp;lt;TD&amp;gt;The time when this record was last processed, in standard format.&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1924</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1924"/>
		<updated>2009-04-20T20:09:43Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified in [[#Channel Access Puts to Passive Scanned Records|''Channel Access Puts to Passive Scanned Records'']].&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Forward Links ====&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
The interface between EPICS process database logic and hardware drivers is indicated in two fields of records that support hardware interfaces: DTYP and INP/OUT. The DTYP field is the name of the device support entry table that is used to interface to the device. The address specification is dictated by the device support. Some conventions exist for several buses that are listed below. Lately, more devices have just opted to use a string that is then parsed by the device support as desired. This specification type is called INST I/O. The other conventions listed here include: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, VXI, and RF. The input specification for each of these is different. The specification of these strings must be acquired from the device support code or document.&lt;br /&gt;
&lt;br /&gt;
=== INST ===&lt;br /&gt;
The INST I/O specification is a string that is parsed by the device support. The format of this string is determined by the device support.&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced, '.' is the separator between the record name and the field name, and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name can be a mix of the following: a-z A-Z 0-9 _ - : . [ ] &amp;lt; &amp;gt; ;. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' Off&lt;br /&gt;
; '''One Name (ONAM):'''  On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' On&lt;br /&gt;
; '''One Name (ONAM):'''  Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is a multi-bit binary output record. Consider a two state valve which has four states-- Traveling, full open, full closed, and disconnected. The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
; '''Number of Bits (NOBT): ''' 2&lt;br /&gt;
; '''First Input Bit Spec (INP): ''' Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''  0&lt;br /&gt;
; '''One Value (ONVL):'''   1&lt;br /&gt;
; '''Two Value (TWVL):'''   2&lt;br /&gt;
; '''Three Value (THVL):''' 3&lt;br /&gt;
; '''Zero String (ZRST):''' Traveling&lt;br /&gt;
; '''One String (ONST):'''  Open&lt;br /&gt;
; '''Two String (TWST):'''  Closed&lt;br /&gt;
; '''Three String (THST):'''Disconnected&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the two monitor bits read equal &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt; (2), the Two value is the corresponding value, and the device would be set to state 2 which indicates that the valve is Closed.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. In this example all possible states are defined.&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10. In all cases, the EGU field is a string that contains the text to indicate the units of the value.&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 175.0&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 350&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:'''  175&lt;br /&gt;
; '''EGUL:''' -175&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR''' Linear&lt;br /&gt;
; '''EGUF'''  437.5&lt;br /&gt;
; '''EGUL''' -437.5&lt;br /&gt;
; '''EGU'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion. These are conversions that could be entered as polynomials. As these are more time consuming to execute, a break point table is created that breaks the non-linear conversion into linear segments that are accurate enough. &lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Table ====&lt;br /&gt;
The breakpoint table is then used to do a piece-wise linear conversion. Each piecewise segment of the breakpoint table contains:&amp;lt;br&amp;gt;&lt;br /&gt;
Raw Value Start for this segment, Engineering Units at the start, Slope of this segment.&lt;br /&gt;
For a 12 bit ADC a table may look like this:&lt;br /&gt;
0x000, 14.0, .2    &lt;br /&gt;
0x7ff, 3500.0, .1&lt;br /&gt;
-1.&lt;br /&gt;
Any raw value between 000 and 7ff would be set to 14.0 + .2 * raw value.&lt;br /&gt;
Any raw value between 7ff and fff would be set to 3500 + .1 * (raw value - 7ff)&lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Conversion Example ====&lt;br /&gt;
&lt;br /&gt;
When a new raw value is read, the conversion routine starts from the previous line segment, comparing the raw value start, and either going forward or backward in the table to find the proper segment for this new raw value. Once the proper segment is found, the new engineering units value is the engineering units value at the start of this segment plus the slope of this segment times the position on this segment. A table that has an entry for each possible raw count is effectively a look up table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
; '''LINR''' typeJdegC&lt;br /&gt;
; '''EGUF''' 0&lt;br /&gt;
; '''EGUL''' 0&lt;br /&gt;
; '''EGU'''  DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. &lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
==== Creating Breakpoint Tables ====&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a bad address specification, device communication failure, or signal is over range. In these cases, an alarm severity of INVALID is set. An INVALID alarm can point to a simple configuration problem or a serious operational problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severity, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Status ===&lt;br /&gt;
Alarm status is a field common to all records. The field is defined as an enumerated field. The possible states are listed below. &lt;br /&gt;
* NO_ALARM:This record is not in alarm&lt;br /&gt;
* READ:An INPUT link failed in the device support&lt;br /&gt;
* WRITE:An OUTPUT link failed in the device support&lt;br /&gt;
* HIHI:An analog value limit alarm&lt;br /&gt;
* HIGH:An analog value limit alarm&lt;br /&gt;
* LOLO:An analog value limit alarm&lt;br /&gt;
* LOW:An analog value limit alarm&lt;br /&gt;
* STATE:An digital value state alarm&lt;br /&gt;
* COS:An digital value change of state alarm&lt;br /&gt;
* COMM:A device support alarm that indicates the device is not communicating&lt;br /&gt;
* TIMEOUT:A device sup alarm that indicates the asynchronous device timed out&lt;br /&gt;
* HWLIMIT:A device sup alarm that indicates a hardware limit alarm&lt;br /&gt;
* CALC:A record support alarm for calculation records indicating a bad calulation&lt;br /&gt;
* SCAN:An invalid SCAN field is entered&lt;br /&gt;
* LINK:Soft device support for a link failed:no record, bad field, invalid conversion, INVALID alarm severity on the referenced record.&lt;br /&gt;
* SOFT&lt;br /&gt;
* BAD_SUB&lt;br /&gt;
* UDF&lt;br /&gt;
* DISABLE&lt;br /&gt;
* SIMM&lt;br /&gt;
* READ_ACCESS&lt;br /&gt;
* WRITE_ACCESS&lt;br /&gt;
&lt;br /&gt;
There are several problems with this field and menu. &lt;br /&gt;
* The maximum enumerated strings passed through channel access is 16 so nothing past SOFT is seen if the value is not requested by Channel Access as a string.&lt;br /&gt;
* Only one state can be true at a time so that the root cause of a problem or multiple problems are masked. This is particularly obvious in the interface between the record support and the device support. The hardware could have some combination of problems and there is no way to see this through the interface provided.&lt;br /&gt;
* The list is not complete.&lt;br /&gt;
In short, the ability to see failures through the STAT field are limited. Most problems in the hardware, configuration, or communication are reduced to READ or WRITE error and have their severity set to INVALID. When you have an INVALID alarm severity, some investigation is currently needed to determine the fault. Most EPICS drivers provide a report routine that dumps a large set of diagnostic information. This is a good place to start in these cases.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Conditions Configured in the Database ===&lt;br /&gt;
When you have a valid value, there are fields in the record that allow the user to configure off normal conditions. For analog values these are limit alarms. For discrete values, these are state alarms.&lt;br /&gt;
&lt;br /&gt;
==== Limit Alarms ====&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
==== State Alarms ====&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
Channel Access Clients connect to channels to either put, get, or monitor. There are fields in the EPICS records that help limit the monitors posted to these clients through the Channel Access Server. These fields most typically apply when the CA Client is monitoring the VAL field of a record. Most other fields post a monitor whenever they are changed. For instance, a Channel Access put to an alarm limit, causes a monitor to be posted to any client that is monitoring that field. The channel access client can select For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Rate Limits ==&lt;br /&gt;
The inherent rate limit is the rate at which the record is scanned. Monitors are only posted when the record is processed as a minimum. There are currently no mechanisms for the client to rate limit a monitor. If a record is being processed at a much higher rate than an application wants, either the database developer can make a second record at a lower rate and have the client connect to that version of the record or the client can disregard the monitors until the time stamp reflects the change.&lt;br /&gt;
&lt;br /&gt;
== Channel Access Deadband Selection ==&lt;br /&gt;
The Channel Access client can set a mask to indicate which alarm change it wants to monitor. There are three: value change, archive change, and alarm change.&lt;br /&gt;
&lt;br /&gt;
=== Value Change Monitors ===&lt;br /&gt;
The value change monitors are typically sent whenever a field in the database changes. The VAL field is the exception. If the MDEL field is set, then the VAL field is sent when a monitor is set, and then only sent again, when the VAL field has changed by MDEL. Note that a MDEL of 0 sends a monitor whenever the VAL fields changes and an MDEL of -1 sends a monitor whenever the record is processed as the MDEL is applied to the absolute value of the difference between the previous scan and the current scan. An MDEL of -1 is useful for scalars that are triggered and a positive indication that the trigger occurred is required.&lt;br /&gt;
&lt;br /&gt;
=== Archive Change Monitors ===&lt;br /&gt;
The archive change monitors are typically sent whenever a field in the database changes. The VAL field is the exception. If the ADEL field is set, then the VAL field is sent when a monitor is set, and then only sent again, when the VAL field has changed by ADEL. &lt;br /&gt;
&lt;br /&gt;
=== Alarm Change Monitors ===&lt;br /&gt;
The alarm change monitors are only sent when the alarm severity or status change. As there are filters on the alarm condition checking, the change of alarm status or severity is already filtered through those mechanisms. These are described in [[#Alarm Specification|''Alarm Specification'']].&lt;br /&gt;
&lt;br /&gt;
== Metadata Changes ==&lt;br /&gt;
When a Channel Access Clients connects to a field, it typically requests some metadata related to that field. One case is a connection from an operator interface typically requests metadata that includes: display limits, control limits, and display information such as precision and engineering units. If any of the fields in a record that are included in this metadata change after the connection is made, the client is not informed and therefore this is not reflected unless the client disconnects and reconnects. A new flag is being added to the Channel Access Client to support posting a monitor to the client whenever any of this metadata changes. Clients can then request the metadata and reflect the change. Stay tuned for this improvement in the record support and channel access clients.&lt;br /&gt;
&lt;br /&gt;
== Client specific Filtering ==&lt;br /&gt;
Several situation have come up that would be useful. These include event filtering, rate guarantee, rate limit, and value change.&lt;br /&gt;
&lt;br /&gt;
=== Event Filtering ===&lt;br /&gt;
There are several cases where a monitor was sent from a channel only when a specific event was true. For instance, there are diagnostics that are read at 1 kHz. A control program may only want this information when the machine is producing a particular beam such as a linac that has several injectors and beam lines. These are virtual machines that want to be notified when the machine is in their mode. These modes can be interleaved at 60 Hz in some cases.  A fault analysis tool may only be interested in all of this data when a fault occurs and the beam is dumped. There are two efforts here: one at LANL and one from ANL/BNL. These should be discussed in the near future.&lt;br /&gt;
&lt;br /&gt;
=== Rate Guarantee ===&lt;br /&gt;
Some clients may want to receive a monitor at a given rate. Binary inputs that only notify on change of state may not post a monitor for a very long time. Some clients may prefer to have a notification at some rate even when the value is not changing.&lt;br /&gt;
&lt;br /&gt;
=== Rate Limit ===&lt;br /&gt;
There is a limit to the rate that most clients care to be notified. Currently, only the SCAN period limits this. A user imposed limit is needed in some cases such as a data archiver that would only want this channel at 1 Hz (all channels on the same 1 msec in this case). &lt;br /&gt;
&lt;br /&gt;
=== Value Change ===&lt;br /&gt;
Different clients may have a need to set different deadbands among them. No specific case is cited.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
A control loop is a set of database records used to maintain control autonomously. Each output record has two fields that are help implement this independent control: the desired output location field (DOL) and the output mode select field (OMSL). The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is the VAL field. In supervisory mode the DOL link is not retrieved. In the supervisory mode, VAL is set typically by the operator through a Channel Access &amp;quot;Put&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. The operator sets the Setpoint in the PID record. Then, a PID record retrieves the value from the analog input record and computes the error - the difference between the readback and the setpoint. The PID record computes the new output setting to move the process variable toward the setpoint. The analog output record gets the value from the PID through the DOL when the OMSL is closed_loop. It sets the new output and on the next period repeats this process.&lt;br /&gt;
&lt;br /&gt;
== Configuring an Interlock ==&lt;br /&gt;
&lt;br /&gt;
When certain conditions become true in the process, it may trip an interlock. The result of this interlock is to move something into a safe state or to mitigate damage by taking some action. One example is the closing of a vacuum valve to isolate a vacuum loss. When a vacuum reading in one region of a machine is not at the operating range, an interlock is used to either close a valve and prohibit it from being open. This can be implemented by reading several vacuum gauges in an area into a calculation record. The expression in the calculation record can express the condition that permits the valve to open. The result of the expression is then referenced to the DOL field of a binary output record that controls the valve. If the binary output has the OMSL field set to closed_loop it sets the valve to the value of the calculation record. If it is set to supervisory, the operator can override the interlock and control the valve directly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1706</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1706"/>
		<updated>2009-04-09T18:09:18Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
#= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified in [[#Channel Access Puts to Passive Scanned Records|''Channel Access Puts to Passive Scanned Records'']].&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Forward Links ====&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
The interface between EPICS process database logic and hardware drivers is indicated in two fields of records that support hardware interfaces: DTYP and INP/OUT. The DTYP field is the name of the device support entry table that is used to interface to the device. The address specification is dictated by the device support. Some conventions exist for several buses that are listed below. Lately, more devices have just opted to use a string that is then parsed by the device support as desired. This specification type is called INST I/O. The other conventions listed here include: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, VXI, and RF. The input specification for each of these is different. The specification of these strings must be acquired from the device support code or document.&lt;br /&gt;
&lt;br /&gt;
=== INST ===&lt;br /&gt;
The INST I/O specification is a string that is parsed by the device support. The format of this string is determined by the device support.&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced, '.' is the separator between the record name and the field name, and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name can be a mix of the following: a-z A-Z 0-9 _ - : . [ ] &amp;lt; &amp;gt; ;. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' Off&lt;br /&gt;
; '''One Name (ONAM):'''  On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' On&lt;br /&gt;
; '''One Name (ONAM):'''  Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is a multi-bit binary output record. Consider a two state valve which has four states-- Traveling, full open, full closed, and disconnected. The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
; '''Number of Bits (NOBT): ''' 2&lt;br /&gt;
; '''First Input Bit Spec (INP): ''' Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''  0&lt;br /&gt;
; '''One Value (ONVL):'''   1&lt;br /&gt;
; '''Two Value (TWVL):'''   2&lt;br /&gt;
; '''Three Value (THVL):''' 3&lt;br /&gt;
; '''Zero String (ZRST):''' Traveling&lt;br /&gt;
; '''One String (ONST):'''  Open&lt;br /&gt;
; '''Two String (TWST):'''  Closed&lt;br /&gt;
; '''Three String (THST):'''Disconnected&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the two monitor bits read equal &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt; (2), the Two value is the corresponding value, and the device would be set to state 2 which indicates that the valve is Closed.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. In this example all possible states are defined.&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10. In all cases, the EGU field is a string that contains the text to indicate the units of the value.&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 175.0&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 350&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:'''  175&lt;br /&gt;
; '''EGUL:''' -175&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR''' Linear&lt;br /&gt;
; '''EGUF'''  437.5&lt;br /&gt;
; '''EGUL''' -437.5&lt;br /&gt;
; '''EGU'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion. These are conversions that could be entered as polynomials. As these are more time consuming to execute, a break point table is created that breaks the non-linear conversion into linear segments that are accurate enough. &lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Table ====&lt;br /&gt;
The breakpoint table is then used to do a piece-wise linear conversion. Each piecewise segment of the breakpoint table contains:&amp;lt;br&amp;gt;&lt;br /&gt;
Raw Value Start for this segment, Engineering Units at the start, Slope of this segment.&lt;br /&gt;
For a 12 bit ADC a table may look like this:&lt;br /&gt;
0x000, 14.0, .2    &lt;br /&gt;
0x7ff, 3500.0, .1&lt;br /&gt;
-1.&lt;br /&gt;
Any raw value between 000 and 7ff would be set to 14.0 + .2 * raw value.&lt;br /&gt;
Any raw value between 7ff and fff would be set to 3500 + .1 * (raw value - 7ff)&lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Conversion Example ====&lt;br /&gt;
&lt;br /&gt;
When a new raw value is read, the conversion routine starts from the previous line segment, comparing the raw value start, and either going forward or backward in the table to find the proper segment for this new raw value. Once the proper segment is found, the new engineering units value is the engineering units value at the start of this segment plus the slope of this segment times the position on this segment. A table that has an entry for each possible raw count is effectively a look up table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
; '''LINR''' typeJdegC&lt;br /&gt;
; '''EGUF''' 0&lt;br /&gt;
; '''EGUL''' 0&lt;br /&gt;
; '''EGU'''  DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. &lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
==== Creating Breakpoint Tables ====&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a bad address specification, device communication failure, or signal is over range. In these cases, an alarm severity of INVALID is set. An INVALID alarm can point to a simple configuration problem or a serious operational problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severity, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Status ===&lt;br /&gt;
Alarm status is a field common to all records. The field is defined as an enumerated field. The possible states are listed below. &lt;br /&gt;
* NO_ALARM:This record is not in alarm&lt;br /&gt;
* READ:An INPUT link failed in the device support&lt;br /&gt;
* WRITE:An OUTPUT link failed in the device support&lt;br /&gt;
* HIHI:An analog value limit alarm&lt;br /&gt;
* HIGH:An analog value limit alarm&lt;br /&gt;
* LOLO:An analog value limit alarm&lt;br /&gt;
* LOW:An analog value limit alarm&lt;br /&gt;
* STATE:An digital value state alarm&lt;br /&gt;
* COS:An digital value change of state alarm&lt;br /&gt;
* COMM:A device support alarm that indicates the device is not communicating&lt;br /&gt;
* TIMEOUT:A device sup alarm that indicates the asynchronous device timed out&lt;br /&gt;
* HWLIMIT:A device sup alarm that indicates a hardware limit alarm&lt;br /&gt;
* CALC:A record support alarm for calculation records indicating a bad calulation&lt;br /&gt;
* SCAN:An invalid SCAN field is entered&lt;br /&gt;
* LINK:Soft device support for a link failed:no record, bad field, invalid conversion, INVALID alarm severity on the referenced record.&lt;br /&gt;
* SOFT&lt;br /&gt;
* BAD_SUB&lt;br /&gt;
* UDF&lt;br /&gt;
* DISABLE&lt;br /&gt;
* SIMM&lt;br /&gt;
* READ_ACCESS&lt;br /&gt;
* WRITE_ACCESS&lt;br /&gt;
&lt;br /&gt;
There are several problems with this field and menu. &lt;br /&gt;
* The maximum enumerated strings passed through channel access is 16 so nothing past SOFT is seen if the value is not requested by Channel Access as a string.&lt;br /&gt;
* Only one state can be true at a time so that the root cause of a problem or multiple problems are masked. This is particularly obvious in the interface between the record support and the device support. The hardware could have some combination of problems and there is no way to see this through the interface provided.&lt;br /&gt;
* The list is not complete.&lt;br /&gt;
In short, the ability to see failures through the STAT field are limited. Most problems in the hardware, configuration, or communication are reduced to READ or WRITE error and have their severity set to INVALID. When you have an INVALID alarm severity, some investigation is currently needed to determine the fault. Most EPICS drivers provide a report routine that dumps a large set of diagnostic information. This is a good place to start in these cases.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Conditions Configured in the Database ===&lt;br /&gt;
When you have a valid value, there are fields in the record that allow the user to configure off normal conditions. For analog values these are limit alarms. For discrete values, these are state alarms.&lt;br /&gt;
&lt;br /&gt;
==== Limit Alarms ====&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
==== State Alarms ====&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
Channel Access Clients connect to channels to either put, get, or monitor. There are fields in the EPICS records that help limit the monitors posted to these clients through the Channel Access Server. These fields most typically apply when the CA Client is monitoring the VAL field of a record. Most other fields post a monitor whenever they are changed. For instance, a Channel Access put to an alarm limit, causes a monitor to be posted to any client that is monitoring that field. The channel access client can select For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Rate Limits ==&lt;br /&gt;
The inherent rate limit is the rate at which the record is scanned. Monitors are only posted when the record is processed as a minimum. There are currently no mechanisms for the client to rate limit a monitor. If a record is being processed at a much higher rate than an application wants, either the database developer can make a second record at a lower rate and have the client connect to that version of the record or the client can disregard the monitors until the time stamp reflects the change.&lt;br /&gt;
&lt;br /&gt;
== Channel Access Deadband Selection ==&lt;br /&gt;
The Channel Access client can set a mask to indicate which alarm change it wants to monitor. There are three: value change, archive change, and alarm change.&lt;br /&gt;
&lt;br /&gt;
=== Value Change Monitors ===&lt;br /&gt;
The value change monitors are typically sent whenever a field in the database changes. The VAL field is the exception. If the MDEL field is set, then the VAL field is sent when a monitor is set, and then only sent again, when the VAL field has changed by MDEL. Note that a MDEL of 0 sends a monitor whenever the VAL fields changes and an MDEL of -1 sends a monitor whenever the record is processed as the MDEL is applied to the absolute value of the difference between the previous scan and the current scan. An MDEL of -1 is useful for scalars that are triggered and a positive indication that the trigger occurred is required.&lt;br /&gt;
&lt;br /&gt;
=== Archive Change Monitors ===&lt;br /&gt;
The archive change monitors are typically sent whenever a field in the database changes. The VAL field is the exception. If the ADEL field is set, then the VAL field is sent when a monitor is set, and then only sent again, when the VAL field has changed by ADEL. &lt;br /&gt;
&lt;br /&gt;
=== Alarm Change Monitors ===&lt;br /&gt;
The alarm change monitors are only sent when the alarm severity or status change. As there are filters on the alarm condition checking, the change of alarm status or severity is already filtered through those mechanisms. These are described in [[#Alarm Specification|''Alarm Specification'']].&lt;br /&gt;
&lt;br /&gt;
== Metadata Changes ==&lt;br /&gt;
When a Channel Access Clients connects to a field, it typically requests some metadata related to that field. One case is a connection from an operator interface typically requests metadata that includes: display limits, control limits, and display information such as precision and engineering units. If any of the fields in a record that are included in this metadata change after the connection is made, the client is not informed and therefore this is not reflected unless the client disconnects and reconnects. A new flag is being added to the Channel Access Client to support posting a monitor to the client whenever any of this metadata changes. Clients can then request the metadata and reflect the change. Stay tuned for this improvement in the record support and channel access clients.&lt;br /&gt;
&lt;br /&gt;
== Client specific Filtering ==&lt;br /&gt;
Several situation have come up that would be useful. These include event filtering, rate guarantee, rate limit, and value change.&lt;br /&gt;
&lt;br /&gt;
=== Event Filtering ===&lt;br /&gt;
There are several cases where a monitor was sent from a channel only when a specific event was true. For instance, there are diagnostics that are read at 1 kHz. A control program may only want this information when the machine is producing a particular beam such as a linac that has several injectors and beam lines. These are virtual machines that want to be notified when the machine is in their mode. These modes can be interleaved at 60 Hz in some cases.  A fault analysis tool may only be interested in all of this data when a fault occurs and the beam is dumped. There are two efforts here: one at LANL and one from ANL/BNL. These should be discussed in the near future.&lt;br /&gt;
&lt;br /&gt;
=== Rate Guarantee ===&lt;br /&gt;
Some clients may want to receive a monitor at a given rate. Binary inputs that only notify on change of state may not post a monitor for a very long time. Some clients may prefer to have a notification at some rate even when the value is not changing.&lt;br /&gt;
&lt;br /&gt;
=== Rate Limit ===&lt;br /&gt;
There is a limit to the rate that most clients care to be notified. Currently, only the SCAN period limits this. A user imposed limit is needed in some cases such as a data archiver that would only want this channel at 1 Hz (all channels on the same 1 msec in this case). &lt;br /&gt;
&lt;br /&gt;
=== Value Change ===&lt;br /&gt;
Different clients may have a need to set different deadbands among them. No specific case is cited.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1705</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1705"/>
		<updated>2009-04-09T17:35:02Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
#= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified in [[#Channel Access Puts to Passive Scanned Records|''Channel Access Puts to Passive Scanned Records'']].&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Forward Links ====&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
The interface between EPICS process database logic and hardware drivers is indicated in two fields of records that support hardware interfaces: DTYP and INP/OUT. The DTYP field is the name of the device support entry table that is used to interface to the device. The address specification is dictated by the device support. Some conventions exist for several buses that are listed below. Lately, more devices have just opted to use a string that is then parsed by the device support as desired. This specification type is called INST I/O. The other conventions listed here include: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, VXI, and RF. The input specification for each of these is different. The specification of these strings must be acquired from the device support code or document.&lt;br /&gt;
&lt;br /&gt;
=== INST ===&lt;br /&gt;
The INST I/O specification is a string that is parsed by the device support. The format of this string is determined by the device support.&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced, '.' is the separator between the record name and the field name, and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name can be a mix of the following: a-z A-Z 0-9 _ - : . [ ] &amp;lt; &amp;gt; ;. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' Off&lt;br /&gt;
; '''One Name (ONAM):'''  On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' On&lt;br /&gt;
; '''One Name (ONAM):'''  Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is a multi-bit binary output record. Consider a two state valve which has four states-- Traveling, full open, full closed, and disconnected. The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
; '''Number of Bits (NOBT): ''' 2&lt;br /&gt;
; '''First Input Bit Spec (INP): ''' Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''  0&lt;br /&gt;
; '''One Value (ONVL):'''   1&lt;br /&gt;
; '''Two Value (TWVL):'''   2&lt;br /&gt;
; '''Three Value (THVL):''' 3&lt;br /&gt;
; '''Zero String (ZRST):''' Traveling&lt;br /&gt;
; '''One String (ONST):'''  Open&lt;br /&gt;
; '''Two String (TWST):'''  Closed&lt;br /&gt;
; '''Three String (THST):'''Disconnected&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the two monitor bits read equal &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt; (2), the Two value is the corresponding value, and the device would be set to state 2 which indicates that the valve is Closed.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. In this example all possible states are defined.&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10. In all cases, the EGU field is a string that contains the text to indicate the units of the value.&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 175.0&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 350&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:'''  175&lt;br /&gt;
; '''EGUL:''' -175&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR''' Linear&lt;br /&gt;
; '''EGUF'''  437.5&lt;br /&gt;
; '''EGUL''' -437.5&lt;br /&gt;
; '''EGU'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion. These are conversions that could be entered as polynomials. As these are more time consuming to execute, a break point table is created that breaks the non-linear conversion into linear segments that are accurate enough. &lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Table ====&lt;br /&gt;
The breakpoint table is then used to do a piece-wise linear conversion. Each piecewise segment of the breakpoint table contains:&amp;lt;br&amp;gt;&lt;br /&gt;
Raw Value Start for this segment, Engineering Units at the start, Slope of this segment.&lt;br /&gt;
For a 12 bit ADC a table may look like this:&lt;br /&gt;
0x000, 14.0, .2    &lt;br /&gt;
0x7ff, 3500.0, .1&lt;br /&gt;
-1.&lt;br /&gt;
Any raw value between 000 and 7ff would be set to 14.0 + .2 * raw value.&lt;br /&gt;
Any raw value between 7ff and fff would be set to 3500 + .1 * (raw value - 7ff)&lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Conversion Example ====&lt;br /&gt;
&lt;br /&gt;
When a new raw value is read, the conversion routine starts from the previous line segment, comparing the raw value start, and either going forward or backward in the table to find the proper segment for this new raw value. Once the proper segment is found, the new engineering units value is the engineering units value at the start of this segment plus the slope of this segment times the position on this segment. A table that has an entry for each possible raw count is effectively a look up table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
; '''LINR''' typeJdegC&lt;br /&gt;
; '''EGUF''' 0&lt;br /&gt;
; '''EGUL''' 0&lt;br /&gt;
; '''EGU'''  DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. &lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
==== Creating Breakpoint Tables ====&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a bad address specification, device communication failure, or signal is over range. In these cases, an alarm severity of INVALID is set. An INVALID alarm can point to a simple configuration problem or a serious operational problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severity, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Status ===&lt;br /&gt;
Alarm status is a field common to all records. The field is defined as an enumerated field. The possible states are listed below. &lt;br /&gt;
* NO_ALARM:This record is not in alarm&lt;br /&gt;
* READ:An INPUT link failed in the device support&lt;br /&gt;
* WRITE:An OUTPUT link failed in the device support&lt;br /&gt;
* HIHI:An analog value limit alarm&lt;br /&gt;
* HIGH:An analog value limit alarm&lt;br /&gt;
* LOLO:An analog value limit alarm&lt;br /&gt;
* LOW:An analog value limit alarm&lt;br /&gt;
* STATE:An digital value state alarm&lt;br /&gt;
* COS:An digital value change of state alarm&lt;br /&gt;
* COMM:A device support alarm that indicates the device is not communicating&lt;br /&gt;
* TIMEOUT:A device sup alarm that indicates the asynchronous device timed out&lt;br /&gt;
* HWLIMIT:A device sup alarm that indicates a hardware limit alarm&lt;br /&gt;
* CALC:A record support alarm for calculation records indicating a bad calulation&lt;br /&gt;
* SCAN:An invalid SCAN field is entered&lt;br /&gt;
* LINK:Soft device support for a link failed:no record, bad field, invalid conversion, INVALID alarm severity on the referenced record.&lt;br /&gt;
* SOFT&lt;br /&gt;
* BAD_SUB&lt;br /&gt;
* UDF&lt;br /&gt;
* DISABLE&lt;br /&gt;
* SIMM&lt;br /&gt;
* READ_ACCESS&lt;br /&gt;
* WRITE_ACCESS&lt;br /&gt;
&lt;br /&gt;
There are several problems with this field and menu. &lt;br /&gt;
* The maximum enumerated strings passed through channel access is 16 so nothing past SOFT is seen if the value is not requested by Channel Access as a string.&lt;br /&gt;
* Only one state can be true at a time so that the root cause of a problem or multiple problems are masked. This is particularly obvious in the interface between the record support and the device support. The hardware could have some combination of problems and there is no way to see this through the interface provided.&lt;br /&gt;
* The list is not complete.&lt;br /&gt;
In short, the ability to see failures through the STAT field are limited. Most problems in the hardware, configuration, or communication are reduced to READ or WRITE error and have their severity set to INVALID. When you have an INVALID alarm severity, some investigation is currently needed to determine the fault. Most EPICS drivers provide a report routine that dumps a large set of diagnostic information. This is a good place to start in these cases.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Conditions Configured in the Database ===&lt;br /&gt;
When you have a valid value, there are fields in the record that allow the user to configure off normal conditions. For analog values these are limit alarms. For discrete values, these are state alarms.&lt;br /&gt;
&lt;br /&gt;
==== Limit Alarms ====&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
==== State Alarms ====&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
Channel Access Clients connect to channels to either put, get, or monitor. There are fields in the EPICS records that help limit the monitors posted to these clients through the Channel Access Server. These fields most typically apply when the CA Client is monitoring the VAL field of a record. Most other fields post a monitor whenever they are changed. For instance, a Channel Access put to an alarm limit, causes a monitor to be posted to any client that is monitoring that field. The channel access client can select For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Rate Limits ==&lt;br /&gt;
The inherent rate limit is the rate at which the record is scanned. Monitors are only posted when the record is processed as a minimum. There are currently no mechanisms for the client to rate limit a monitor. If a record is being processed at a much higher rate than an application wants, either the database developer can make a second record at a lower rate and have the client connect to that version of the record or the client can disregard the monitors until the time stamp reflects the change.&lt;br /&gt;
&lt;br /&gt;
== Channel Access Deadband Selection ==&lt;br /&gt;
The Channel Access client can set a mask to indicate which alarm change it wants to monitor. There are three: value change, archive change, and alarm change.&lt;br /&gt;
&lt;br /&gt;
=== Value Change Monitors ===&lt;br /&gt;
The value change monitors are typically sent whenever a field in the database changes. The VAL field is the exception. If the MDEL field is set, then the VAL field is sent when a monitor is set, and then only sent again, when the VAL field has changed by MDEL. Note that a MDEL of 0 sends a monitor whenever the VAL fields changes and an MDEL of -1 sends a monitor whenever the record is processed as the MDEL is applied to the absolute value of the difference between the previous scan and the current scan. An MDEL of -1 is useful for scalars that are triggered and a positive indication that the trigger occurred is required.&lt;br /&gt;
&lt;br /&gt;
=== Archive Change Monitors ===&lt;br /&gt;
The archive change monitors are typically sent whenever a field in the database changes. The VAL field is the exception. If the ADEL field is set, then the VAL field is sent when a monitor is set, and then only sent again, when the VAL field has changed by ADEL. &lt;br /&gt;
&lt;br /&gt;
=== Alarm Change Monitors ===&lt;br /&gt;
The alarm change monitors are only sent when the alarm severity or status change. As there are filters on the alarm condition checking, the change of alarm status or severity is already filtered through those mechanisms. These are described in [[#Alarm Specification|''Alarm Specification'']].&lt;br /&gt;
&lt;br /&gt;
== Metadata Changes ==&lt;br /&gt;
When a Channel Access Clients connects to a field, it typically requests some metadata related to that field. One case is a connection from an operator interface typically requests metadata that includes: display limits, control limits, and display information such as precision and engineering units. If any of the fields in a record that are included in this metadata change after the connection is made, the client is not informed and therefore this is not reflected unless the client disconnects and reconnects. A new flag is being added to the Channel Access Client to support posting a monitor to the client whenever any of this metadata changes. Clients can then request the metadata and reflect the change. Stay tuned for this improvement in the record support and channel access clients.&lt;br /&gt;
&lt;br /&gt;
== Rate Limit Filtering ==&lt;br /&gt;
put event and timeout in here.&lt;br /&gt;
&lt;br /&gt;
== Client specific Filtering ==&lt;br /&gt;
Several situation have come up that would be us&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1704</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1704"/>
		<updated>2009-04-09T16:16:51Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
#= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified in [[#Channel Access Puts to Passive Scanned Records|''Channel Access Puts to Passive Scanned Records'']].&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Forward Links ====&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
The interface between EPICS process database logic and hardware drivers is indicated in two fields of records that support hardware interfaces: DTYP and INP/OUT. The DTYP field is the name of the device support entry table that is used to interface to the device. The address specification is dictated by the device support. Some conventions exist for several buses that are listed below. Lately, more devices have just opted to use a string that is then parsed by the device support as desired. This specification type is called INST I/O. The other conventions listed here include: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, VXI, and RF. The input specification for each of these is different. The specification of these strings must be acquired from the device support code or document.&lt;br /&gt;
&lt;br /&gt;
=== INST ===&lt;br /&gt;
The INST I/O specification is a string that is parsed by the device support. The format of this string is determined by the device support.&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced, '.' is the separator between the record name and the field name, and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name can be a mix of the following: a-z A-Z 0-9 _ - : . [ ] &amp;lt; &amp;gt; ;. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' Off&lt;br /&gt;
; '''One Name (ONAM):'''  On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' On&lt;br /&gt;
; '''One Name (ONAM):'''  Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is a multi-bit binary output record. Consider a two state valve which has four states-- Traveling, full open, full closed, and disconnected. The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
; '''Number of Bits (NOBT): ''' 2&lt;br /&gt;
; '''First Input Bit Spec (INP): ''' Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''  0&lt;br /&gt;
; '''One Value (ONVL):'''   1&lt;br /&gt;
; '''Two Value (TWVL):'''   2&lt;br /&gt;
; '''Three Value (THVL):''' 3&lt;br /&gt;
; '''Zero String (ZRST):''' Traveling&lt;br /&gt;
; '''One String (ONST):'''  Open&lt;br /&gt;
; '''Two String (TWST):'''  Closed&lt;br /&gt;
; '''Three String (THST):'''Disconnected&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the two monitor bits read equal &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt; (2), the Two value is the corresponding value, and the device would be set to state 2 which indicates that the valve is Closed.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. In this example all possible states are defined.&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10. In all cases, the EGU field is a string that contains the text to indicate the units of the value.&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 175.0&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 350&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:'''  175&lt;br /&gt;
; '''EGUL:''' -175&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR''' Linear&lt;br /&gt;
; '''EGUF'''  437.5&lt;br /&gt;
; '''EGUL''' -437.5&lt;br /&gt;
; '''EGU'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion. These are conversions that could be entered as polynomials. As these are more time consuming to execute, a break point table is created that breaks the non-linear conversion into linear segments that are accurate enough. &lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Table ====&lt;br /&gt;
The breakpoint table is then used to do a piece-wise linear conversion. Each piecewise segment of the breakpoint table contains:&amp;lt;br&amp;gt;&lt;br /&gt;
Raw Value Start for this segment, Engineering Units at the start, Slope of this segment.&lt;br /&gt;
For a 12 bit ADC a table may look like this:&lt;br /&gt;
0x000, 14.0, .2    &lt;br /&gt;
0x7ff, 3500.0, .1&lt;br /&gt;
-1.&lt;br /&gt;
Any raw value between 000 and 7ff would be set to 14.0 + .2 * raw value.&lt;br /&gt;
Any raw value between 7ff and fff would be set to 3500 + .1 * (raw value - 7ff)&lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Conversion Example ====&lt;br /&gt;
&lt;br /&gt;
When a new raw value is read, the conversion routine starts from the previous line segment, comparing the raw value start, and either going forward or backward in the table to find the proper segment for this new raw value. Once the proper segment is found, the new engineering units value is the engineering units value at the start of this segment plus the slope of this segment times the position on this segment. A table that has an entry for each possible raw count is effectively a look up table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
; '''LINR''' typeJdegC&lt;br /&gt;
; '''EGUF''' 0&lt;br /&gt;
; '''EGUL''' 0&lt;br /&gt;
; '''EGU'''  DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. &lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
==== Creating Breakpoint Tables ====&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a bad address specification, device communication failure, or signal is over range. In these cases, an alarm severity of INVALID is set. An INVALID alarm can point to a simple configuration problem or a serious operational problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severity, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Status ===&lt;br /&gt;
Alarm status is a field common to all records. The field is defined as an enumerated field. The possible states are listed below. &lt;br /&gt;
* NO_ALARM:This record is not in alarm&lt;br /&gt;
* READ:An INPUT link failed in the device support&lt;br /&gt;
* WRITE:An OUTPUT link failed in the device support&lt;br /&gt;
* HIHI:An analog value limit alarm&lt;br /&gt;
* HIGH:An analog value limit alarm&lt;br /&gt;
* LOLO:An analog value limit alarm&lt;br /&gt;
* LOW:An analog value limit alarm&lt;br /&gt;
* STATE:An digital value state alarm&lt;br /&gt;
* COS:An digital value change of state alarm&lt;br /&gt;
* COMM:A device support alarm that indicates the device is not communicating&lt;br /&gt;
* TIMEOUT:A device sup alarm that indicates the asynchronous device timed out&lt;br /&gt;
* HWLIMIT:A device sup alarm that indicates a hardware limit alarm&lt;br /&gt;
* CALC:A record support alarm for calculation records indicating a bad calulation&lt;br /&gt;
* SCAN:An invalid SCAN field is entered&lt;br /&gt;
* LINK:Soft device support for a link failed:no record, bad field, invalid conversion, INVALID alarm severity on the referenced record.&lt;br /&gt;
* SOFT&lt;br /&gt;
* BAD_SUB&lt;br /&gt;
* UDF&lt;br /&gt;
* DISABLE&lt;br /&gt;
* SIMM&lt;br /&gt;
* READ_ACCESS&lt;br /&gt;
* WRITE_ACCESS&lt;br /&gt;
&lt;br /&gt;
There are several problems with this field and menu. &lt;br /&gt;
* The maximum enumerated strings passed through channel access is 16 so nothing past SOFT is seen if the value is not requested by Channel Access as a string.&lt;br /&gt;
* Only one state can be true at a time so that the root cause of a problem or multiple problems are masked. This is particularly obvious in the interface between the record support and the device support. The hardware could have some combination of problems and there is no way to see this through the interface provided.&lt;br /&gt;
* The list is not complete.&lt;br /&gt;
In short, the ability to see failures through the STAT field are limited. Most problems in the hardware, configuration, or communication are reduced to READ or WRITE error and have their severity set to INVALID. When you have an INVALID alarm severity, some investigation is currently needed to determine the fault. Most EPICS drivers provide a report routine that dumps a large set of diagnostic information. This is a good place to start in these cases.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Conditions Configured in the Database ===&lt;br /&gt;
When you have a valid value, there are fields in the record that allow the user to configure off normal conditions. For analog values these are limit alarms. For discrete values, these are state alarms.&lt;br /&gt;
&lt;br /&gt;
==== Limit Alarms ====&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
==== State Alarms ====&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
Channel Access Clients connect to channels to either put, get, or monitor. There are fields in the EPICS records that help limit the monitors posted to these clients through the Channel Access Server. These fields most typically apply when the CA Client is monitoring the VAL field of a record. Most other fields post a monitor whenever they are changed. For instance, a Channel Access put to an alarm limit, causes a monitor to be posted to any client that is monitoring that field. The channel access client can select For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Rate Limits ==&lt;br /&gt;
The inherent rate limit is the rate at which the record is scanned. Monitors are only posted when the record is processed as a minimum. There are currently no mechanisms for the client to rate limit a monitor. If a record is being processed at a much higher rate than an application wants, either the database developer can make a second record at a lower rate and have the client connect to that version of the record or the client can disregard the monitors until the time stamp reflects the change.&lt;br /&gt;
&lt;br /&gt;
== Channel Access Deadband Selection ==&lt;br /&gt;
The Channel Access client can set a mask to indicate which alarm change it wants to monitor. There are three: value change, archive change, and alarm change.&lt;br /&gt;
&lt;br /&gt;
=== Value Change Monitors ===&lt;br /&gt;
The value change monitors are typically sent whenever a field in the database changes. The VAL field is the exception. If the MDEL field is set, then the VAL field is sent when a monitor is set, and then only sent again, when the VAL field has changed by MDEL. Note that a MDEL of 0 sends a monitor whenever the VAL fields changes and an MDEL of -1 sends a monitor whenever the record is processed as the MDEL is applied to the absolute value of the difference between the previous scan and the current scan. An MDEL of -1 is useful for scalars that are triggered and a positive indication that the trigger occurred is required.&lt;br /&gt;
&lt;br /&gt;
== Archive Change Monitors ==&lt;br /&gt;
The archive change monitors are typically sent whenever a field in the database changes. The VAL field is the exception. If the ADEL field is set, then the VAL field is sent when a monitor is set, and then only sent again, when the VAL field has changed by ADEL. &lt;br /&gt;
&lt;br /&gt;
== Alarm Change Monitors ==&lt;br /&gt;
The alarm change monitors are only sent when the alarm severity or status change. As there are filters on the alarm condition checking, the change of alarm status or severity is already filtered through those mechanisms. These are described in [[#Alarm Specification|''Alarm Specification'']].&lt;br /&gt;
&lt;br /&gt;
== Metadata Changes ==&lt;br /&gt;
When a Channel Access Clients connects to a field, it typically requests some metadata related to that field. One case is a connection from an operator interface typically requests metadata that includes: display limits, control limits, and display information such as precision and engineering units. If any of the fields in a record that are included in this metadata change after the connection is made, the client is not informed and therefore this is not reflected unless the client disconnects and reconnects. A new flag is being added to the Channel Access Client to support posting a monitor to the client whenever any of this metadata changes. Clients can then request the metadata and reflect the change. Stay tuned for this improvement in the record support and channel access clients.&lt;br /&gt;
&lt;br /&gt;
== Client specific Filtering ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1703</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1703"/>
		<updated>2009-04-09T14:55:36Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
#= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified in [[#Channel Access Puts to Passive Scanned Records|''Channel Access Puts to Passive Scanned Records'']].&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Forward Links ====&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced, '.' is the separator between the record name and the field name, and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name can be a mix of the following: a-z A-Z 0-9 _ - : . [ ] &amp;lt; &amp;gt; ;. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' Off&lt;br /&gt;
; '''One Name (ONAM):'''  On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' On&lt;br /&gt;
; '''One Name (ONAM):'''  Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is a multi-bit binary output record. Consider a two state valve which has four states-- Traveling, full open, full closed, and disconnected. The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
; '''Number of Bits (NOBT): ''' 2&lt;br /&gt;
; '''First Input Bit Spec (INP): ''' Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''  0&lt;br /&gt;
; '''One Value (ONVL):'''   1&lt;br /&gt;
; '''Two Value (TWVL):'''   2&lt;br /&gt;
; '''Three Value (THVL):''' 3&lt;br /&gt;
; '''Zero String (ZRST):''' Traveling&lt;br /&gt;
; '''One String (ONST):'''  Open&lt;br /&gt;
; '''Two String (TWST):'''  Closed&lt;br /&gt;
; '''Three String (THST):'''Disconnected&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the two monitor bits read equal &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt; (2), the Two value is the corresponding value, and the device would be set to state 2 which indicates that the valve is Closed.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. In this example all possible states are defined.&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10. In all cases, the EGU field is a string that contains the text to indicate the units of the value.&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 175.0&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 350&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:'''  175&lt;br /&gt;
; '''EGUL:''' -175&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR''' Linear&lt;br /&gt;
; '''EGUF'''  437.5&lt;br /&gt;
; '''EGUL''' -437.5&lt;br /&gt;
; '''EGU'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion. These are conversions that could be entered as polynomials. As these are more time consuming to execute, a break point table is created that breaks the non-linear conversion into linear segments that are accurate enough. &lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Table ====&lt;br /&gt;
The breakpoint table is then used to do a piece-wise linear conversion. Each piecewise segment of the breakpoint table contains:&amp;lt;br&amp;gt;&lt;br /&gt;
Raw Value Start for this segment, Engineering Units at the start, Slope of this segment.&lt;br /&gt;
For a 12 bit ADC a table may look like this:&lt;br /&gt;
0x000, 14.0, .2    &lt;br /&gt;
0x7ff, 3500.0, .1&lt;br /&gt;
-1.&lt;br /&gt;
Any raw value between 000 and 7ff would be set to 14.0 + .2 * raw value.&lt;br /&gt;
Any raw value between 7ff and fff would be set to 3500 + .1 * (raw value - 7ff)&lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Conversion Example ====&lt;br /&gt;
&lt;br /&gt;
When a new raw value is read, the conversion routine starts from the previous line segment, comparing the raw value start, and either going forward or backward in the table to find the proper segment for this new raw value. Once the proper segment is found, the new engineering units value is the engineering units value at the start of this segment plus the slope of this segment times the position on this segment. A table that has an entry for each possible raw count is effectively a look up table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
; '''LINR''' typeJdegC&lt;br /&gt;
; '''EGUF''' 0&lt;br /&gt;
; '''EGUL''' 0&lt;br /&gt;
; '''EGU'''  DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. &lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
==== Creating Breakpoint Tables ====&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a bad address specification, device communication failure, or signal is over range. In these cases, an alarm severity of INVALID is set. An INVALID alarm can point to a simple configuration problem or a serious operational problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severity, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Status ===&lt;br /&gt;
Alarm status is a field common to all records. The field is defined as an enumerated field. The possible states are listed below. &lt;br /&gt;
* NO_ALARM:This record is not in alarm&lt;br /&gt;
* READ:An INPUT link failed in the device support&lt;br /&gt;
* WRITE:An OUTPUT link failed in the device support&lt;br /&gt;
* HIHI:An analog value limit alarm&lt;br /&gt;
* HIGH:An analog value limit alarm&lt;br /&gt;
* LOLO:An analog value limit alarm&lt;br /&gt;
* LOW:An analog value limit alarm&lt;br /&gt;
* STATE:An digital value state alarm&lt;br /&gt;
* COS:An digital value change of state alarm&lt;br /&gt;
* COMM:A device support alarm that indicates the device is not communicating&lt;br /&gt;
* TIMEOUT:A device sup alarm that indicates the asynchronous device timed out&lt;br /&gt;
* HWLIMIT:A device sup alarm that indicates a hardware limit alarm&lt;br /&gt;
* CALC:A record support alarm for calculation records indicating a bad calulation&lt;br /&gt;
* SCAN:An invalid SCAN field is entered&lt;br /&gt;
* LINK:Soft device support for a link failed:no record, bad field, invalid conversion, INVALID alarm severity on the referenced record.&lt;br /&gt;
* SOFT&lt;br /&gt;
* BAD_SUB&lt;br /&gt;
* UDF&lt;br /&gt;
* DISABLE&lt;br /&gt;
* SIMM&lt;br /&gt;
* READ_ACCESS&lt;br /&gt;
* WRITE_ACCESS&lt;br /&gt;
&lt;br /&gt;
There are several problems with this field and menu. &lt;br /&gt;
* The maximum enumerated strings passed through channel access is 16 so nothing past SOFT is seen if the value is not requested by Channel Access as a string.&lt;br /&gt;
* Only one state can be true at a time so that the root cause of a problem or multiple problems are masked. This is particularly obvious in the interface between the record support and the device support. The hardware could have some combination of problems and there is no way to see this through the interface provided.&lt;br /&gt;
* The list is not complete.&lt;br /&gt;
In short, the ability to see failures through the STAT field are limited. Most problems in the hardware, configuration, or communication are reduced to READ or WRITE error and have their severity set to INVALID. When you have an INVALID alarm severity, some investigation is currently needed to determine the fault. Most EPICS drivers provide a report routine that dumps a large set of diagnostic information. This is a good place to start in these cases.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Conditions Configured in the Database ===&lt;br /&gt;
When you have a valid value, there are fields in the record that allow the user to configure off normal conditions. For analog values these are limit alarms. For discrete values, these are state alarms.&lt;br /&gt;
&lt;br /&gt;
==== Limit Alarms ====&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
==== State Alarms ====&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1702</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1702"/>
		<updated>2009-04-09T14:54:42Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= #Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified in [[#Channel Access Puts to Passive Scanned Records|''Channel Access Puts to Passive Scanned Records'']].&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Forward Links ====&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= #Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced, '.' is the separator between the record name and the field name, and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name can be a mix of the following: a-z A-Z 0-9 _ - : . [ ] &amp;lt; &amp;gt; ;. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' Off&lt;br /&gt;
; '''One Name (ONAM):'''  On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' On&lt;br /&gt;
; '''One Name (ONAM):'''  Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is a multi-bit binary output record. Consider a two state valve which has four states-- Traveling, full open, full closed, and disconnected. The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
; '''Number of Bits (NOBT): ''' 2&lt;br /&gt;
; '''First Input Bit Spec (INP): ''' Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''  0&lt;br /&gt;
; '''One Value (ONVL):'''   1&lt;br /&gt;
; '''Two Value (TWVL):'''   2&lt;br /&gt;
; '''Three Value (THVL):''' 3&lt;br /&gt;
; '''Zero String (ZRST):''' Traveling&lt;br /&gt;
; '''One String (ONST):'''  Open&lt;br /&gt;
; '''Two String (TWST):'''  Closed&lt;br /&gt;
; '''Three String (THST):'''Disconnected&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the two monitor bits read equal &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt; (2), the Two value is the corresponding value, and the device would be set to state 2 which indicates that the valve is Closed.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. In this example all possible states are defined.&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10. In all cases, the EGU field is a string that contains the text to indicate the units of the value.&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 175.0&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 350&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:'''  175&lt;br /&gt;
; '''EGUL:''' -175&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR''' Linear&lt;br /&gt;
; '''EGUF'''  437.5&lt;br /&gt;
; '''EGUL''' -437.5&lt;br /&gt;
; '''EGU'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion. These are conversions that could be entered as polynomials. As these are more time consuming to execute, a break point table is created that breaks the non-linear conversion into linear segments that are accurate enough. &lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Table ====&lt;br /&gt;
The breakpoint table is then used to do a piece-wise linear conversion. Each piecewise segment of the breakpoint table contains:&amp;lt;br&amp;gt;&lt;br /&gt;
Raw Value Start for this segment, Engineering Units at the start, Slope of this segment.&lt;br /&gt;
For a 12 bit ADC a table may look like this:&lt;br /&gt;
0x000, 14.0, .2    &lt;br /&gt;
0x7ff, 3500.0, .1&lt;br /&gt;
-1.&lt;br /&gt;
Any raw value between 000 and 7ff would be set to 14.0 + .2 * raw value.&lt;br /&gt;
Any raw value between 7ff and fff would be set to 3500 + .1 * (raw value - 7ff)&lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Conversion Example ====&lt;br /&gt;
&lt;br /&gt;
When a new raw value is read, the conversion routine starts from the previous line segment, comparing the raw value start, and either going forward or backward in the table to find the proper segment for this new raw value. Once the proper segment is found, the new engineering units value is the engineering units value at the start of this segment plus the slope of this segment times the position on this segment. A table that has an entry for each possible raw count is effectively a look up table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
; '''LINR''' typeJdegC&lt;br /&gt;
; '''EGUF''' 0&lt;br /&gt;
; '''EGUL''' 0&lt;br /&gt;
; '''EGU'''  DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. &lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
==== Creating Breakpoint Tables ====&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a bad address specification, device communication failure, or signal is over range. In these cases, an alarm severity of INVALID is set. An INVALID alarm can point to a simple configuration problem or a serious operational problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severity, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Status ===&lt;br /&gt;
Alarm status is a field common to all records. The field is defined as an enumerated field. The possible states are listed below. &lt;br /&gt;
* NO_ALARM:This record is not in alarm&lt;br /&gt;
* READ:An INPUT link failed in the device support&lt;br /&gt;
* WRITE:An OUTPUT link failed in the device support&lt;br /&gt;
* HIHI:An analog value limit alarm&lt;br /&gt;
* HIGH:An analog value limit alarm&lt;br /&gt;
* LOLO:An analog value limit alarm&lt;br /&gt;
* LOW:An analog value limit alarm&lt;br /&gt;
* STATE:An digital value state alarm&lt;br /&gt;
* COS:An digital value change of state alarm&lt;br /&gt;
* COMM:A device support alarm that indicates the device is not communicating&lt;br /&gt;
* TIMEOUT:A device sup alarm that indicates the asynchronous device timed out&lt;br /&gt;
* HWLIMIT:A device sup alarm that indicates a hardware limit alarm&lt;br /&gt;
* CALC:A record support alarm for calculation records indicating a bad calulation&lt;br /&gt;
* SCAN:An invalid SCAN field is entered&lt;br /&gt;
* LINK:Soft device support for a link failed:no record, bad field, invalid conversion, INVALID alarm severity on the referenced record.&lt;br /&gt;
* SOFT&lt;br /&gt;
* BAD_SUB&lt;br /&gt;
* UDF&lt;br /&gt;
* DISABLE&lt;br /&gt;
* SIMM&lt;br /&gt;
* READ_ACCESS&lt;br /&gt;
* WRITE_ACCESS&lt;br /&gt;
&lt;br /&gt;
There are several problems with this field and menu. &lt;br /&gt;
* The maximum enumerated strings passed through channel access is 16 so nothing past SOFT is seen if the value is not requested by Channel Access as a string.&lt;br /&gt;
* Only one state can be true at a time so that the root cause of a problem or multiple problems are masked. This is particularly obvious in the interface between the record support and the device support. The hardware could have some combination of problems and there is no way to see this through the interface provided.&lt;br /&gt;
* The list is not complete.&lt;br /&gt;
In short, the ability to see failures through the STAT field are limited. Most problems in the hardware, configuration, or communication are reduced to READ or WRITE error and have their severity set to INVALID. When you have an INVALID alarm severity, some investigation is currently needed to determine the fault. Most EPICS drivers provide a report routine that dumps a large set of diagnostic information. This is a good place to start in these cases.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Conditions Configured in the Database ===&lt;br /&gt;
When you have a valid value, there are fields in the record that allow the user to configure off normal conditions. For analog values these are limit alarms. For discrete values, these are state alarms.&lt;br /&gt;
&lt;br /&gt;
==== Limit Alarms ====&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
==== State Alarms ====&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1701</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1701"/>
		<updated>2009-04-09T14:26:44Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified in [[#Channel Access Puts to Passive Scanned Records|''Channel Access Puts to Passive Scanned Records'']].&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Forward Links ====&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced, '.' is the separator between the record name and the field name, and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name can be a mix of the following: a-z A-Z 0-9 _ - : . [ ] &amp;lt; &amp;gt; ;. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' Off&lt;br /&gt;
; '''One Name (ONAM):'''  On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' On&lt;br /&gt;
; '''One Name (ONAM):'''  Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is a multi-bit binary output record. Consider a two state valve which has four states-- Traveling, full open, full closed, and disconnected. The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
; '''Number of Bits (NOBT): ''' 2&lt;br /&gt;
; '''First Input Bit Spec (INP): ''' Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''  0&lt;br /&gt;
; '''One Value (ONVL):'''   1&lt;br /&gt;
; '''Two Value (TWVL):'''   2&lt;br /&gt;
; '''Three Value (THVL):''' 3&lt;br /&gt;
; '''Zero String (ZRST):''' Traveling&lt;br /&gt;
; '''One String (ONST):'''  Open&lt;br /&gt;
; '''Two String (TWST):'''  Closed&lt;br /&gt;
; '''Three String (THST):'''Disconnected&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the two monitor bits read equal &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt; (2), the Two value is the corresponding value, and the device would be set to state 2 which indicates that the valve is Closed.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. In this example all possible states are defined.&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10. In all cases, the EGU field is a string that contains the text to indicate the units of the value.&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 175.0&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 350&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:'''  175&lt;br /&gt;
; '''EGUL:''' -175&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR''' Linear&lt;br /&gt;
; '''EGUF'''  437.5&lt;br /&gt;
; '''EGUL''' -437.5&lt;br /&gt;
; '''EGU'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion. These are conversions that could be entered as polynomials. As these are more time consuming to execute, a break point table is created that breaks the non-linear conversion into linear segments that are accurate enough. &lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Table ====&lt;br /&gt;
The breakpoint table is then used to do a piece-wise linear conversion. Each piecewise segment of the breakpoint table contains:&amp;lt;br&amp;gt;&lt;br /&gt;
Raw Value Start for this segment, Engineering Units at the start, Slope of this segment.&lt;br /&gt;
For a 12 bit ADC a table may look like this:&lt;br /&gt;
0x000, 14.0, .2    &lt;br /&gt;
0x7ff, 3500.0, .1&lt;br /&gt;
-1.&lt;br /&gt;
Any raw value between 000 and 7ff would be set to 14.0 + .2 * raw value.&lt;br /&gt;
Any raw value between 7ff and fff would be set to 3500 + .1 * (raw value - 7ff)&lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Conversion Example ====&lt;br /&gt;
&lt;br /&gt;
When a new raw value is read, the conversion routine starts from the previous line segment, comparing the raw value start, and either going forward or backward in the table to find the proper segment for this new raw value. Once the proper segment is found, the new engineering units value is the engineering units value at the start of this segment plus the slope of this segment times the position on this segment. A table that has an entry for each possible raw count is effectively a look up table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
; '''LINR''' typeJdegC&lt;br /&gt;
; '''EGUF''' 0&lt;br /&gt;
; '''EGUL''' 0&lt;br /&gt;
; '''EGU'''  DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. &lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
==== Creating Breakpoint Tables ====&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a bad address specification, device communication failure, or signal is over range. In these cases, an alarm severity of INVALID is set. An INVALID alarm can point to a simple configuration problem or a serious operational problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severity, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Status ===&lt;br /&gt;
Alarm status is a field common to all records. The field is defined as an enumerated field. The possible states are listed below. &lt;br /&gt;
* NO_ALARM:This record is not in alarm&lt;br /&gt;
* READ:An INPUT link failed in the device support&lt;br /&gt;
* WRITE:An OUTPUT link failed in the device support&lt;br /&gt;
* HIHI:An analog value limit alarm&lt;br /&gt;
* HIGH:An analog value limit alarm&lt;br /&gt;
* LOLO:An analog value limit alarm&lt;br /&gt;
* LOW:An analog value limit alarm&lt;br /&gt;
* STATE:An digital value state alarm&lt;br /&gt;
* COS:An digital value change of state alarm&lt;br /&gt;
* COMM:A device support alarm that indicates the device is not communicating&lt;br /&gt;
* TIMEOUT:A device sup alarm that indicates the asynchronous device timed out&lt;br /&gt;
* HWLIMIT:A device sup alarm that indicates a hardware limit alarm&lt;br /&gt;
* CALC:A record support alarm for calculation records indicating a bad calulation&lt;br /&gt;
* SCAN:An invalid SCAN field is entered&lt;br /&gt;
* LINK:Soft device support for a link failed:no record, bad field, invalid conversion, INVALID alarm severity on the referenced record.&lt;br /&gt;
* SOFT&lt;br /&gt;
* BAD_SUB&lt;br /&gt;
* UDF&lt;br /&gt;
* DISABLE&lt;br /&gt;
* SIMM&lt;br /&gt;
* READ_ACCESS&lt;br /&gt;
* WRITE_ACCESS&lt;br /&gt;
&lt;br /&gt;
There are several problems with this field and menu. &lt;br /&gt;
* The maximum enumerated strings passed through channel access is 16 so nothing past SOFT is seen if the value is not requested by Channel Access as a string.&lt;br /&gt;
* Only one state can be true at a time so that the root cause of a problem or multiple problems are masked. This is particularly obvious in the interface between the record support and the device support. The hardware could have some combination of problems and there is no way to see this through the interface provided.&lt;br /&gt;
* The list is not complete.&lt;br /&gt;
In short, the ability to see failures through the STAT field are limited. Most problems in the hardware, configuration, or communication are reduced to READ or WRITE error and have their severity set to INVALID. When you have an INVALID alarm severity, some investigation is currently needed to determine the fault. Most EPICS drivers provide a report routine that dumps a large set of diagnostic information. This is a good place to start in these cases.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Conditions Configured in the Database ===&lt;br /&gt;
When you have a valid value, there are fields in the record that allow the user to configure off normal conditions. For analog values these are limit alarms. For discrete values, these are state alarms.&lt;br /&gt;
&lt;br /&gt;
==== Limit Alarms ====&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
==== State Alarms ====&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1700</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1700"/>
		<updated>2009-04-09T14:23:45Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified in [[#Channel Access Puts to Passive Scanned Records|''Channel Access Puts to Passive Scanned Records'']].&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Forward Links ====&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced, '.' is the separator between the record name and the field name, and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name can be a mix of the following: a-z A-Z 0-9 _ - : . [ ] &amp;lt; &amp;gt; ;. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' Off&lt;br /&gt;
; '''One Name (ONAM):'''  On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
; '''Zero Name (ZNAM):''' On&lt;br /&gt;
; '''One Name (ONAM):'''  Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is a multi-bit binary output record. Consider a two state valve which has four states-- Traveling, full open, full closed, and disconnected. The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
; '''Number of Bits (NOBT): ''' 2&lt;br /&gt;
; '''First Input Bit Spec (INP): ''' Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''  0&lt;br /&gt;
; '''One Value (ONVL):'''   1&lt;br /&gt;
; '''Two Value (TWVL):'''   2&lt;br /&gt;
; '''Three Value (THVL):''' 3&lt;br /&gt;
; '''Zero String (ZRST):''' Traveling&lt;br /&gt;
; '''One String (ONST):'''  Open&lt;br /&gt;
; '''Two String (TWST):'''  Closed&lt;br /&gt;
; '''Three String (THST):'''Disconnected&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the two monitor bits read equal &amp;lt;code&amp;gt;10&amp;lt;/code&amp;gt; (2), the Two value is the corresponding value, and the device would be set to state 2 which indicates that the valve is Closed.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. In this example all possible states are defined.&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10. In all cases, the EGU field is a string that contains the text to indicate the units of the value.&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 175.0&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 350&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:'''  175&lt;br /&gt;
; '''EGUL:''' -175&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR''' Linear&lt;br /&gt;
; '''EGUF'''  437.5&lt;br /&gt;
; '''EGUL''' -437.5&lt;br /&gt;
; '''EGU'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion. These are conversions that could be entered as polynomials. As these are more time consuming to execute, a break point table is created that breaks the non-linear conversion into linear segments that are accurate enough. &lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Table ====&lt;br /&gt;
The breakpoint table is then used to do a piece-wise linear conversion. Each piecewise segment of the breakpoint table contains:&amp;lt;br&amp;gt;&lt;br /&gt;
Raw Value Start for this segment, Engineering Units at the start, Slope of this segment.&lt;br /&gt;
For a 12 bit ADC a table may look like this:&lt;br /&gt;
0x000, 14.0, .2    &lt;br /&gt;
0x7ff, 3500.0, .1&lt;br /&gt;
-1.&lt;br /&gt;
Any raw value between 000 and 7ff would be set to 14.0 + .2 * raw value.&lt;br /&gt;
Any raw value between 7ff and fff would be set to 3500 + .1 * (raw value - 7ff)&lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Conversion Example ====&lt;br /&gt;
&lt;br /&gt;
When a new raw value is read, the conversion routine starts from the previous line segment, comparing the raw value start, and either going forward or backward in the table to find the proper segment for this new raw value. Once the proper segment is found, the new engineering units value is the engineering units value at the start of this segment plus the slope of this segment times the position on this segment. A table that has an entry for each possible raw count is effectively a look up table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
; '''LINR''' typeJdegC&lt;br /&gt;
; '''EGUF''' 0&lt;br /&gt;
; '''EGUL''' 0&lt;br /&gt;
; '''EGU'''  DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. &lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
==== Creating Breakpoint Tables ====&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a bad address specification, device communication failure, or signal is over range. In these cases, an alarm severity of INVALID is set. An INVALID alarm can point to a simple configuration problem or a serious operational problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severity, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Status ===&lt;br /&gt;
Alarm status is a field common to all records. The field is defined as an enumerated field. The possible states are listed below. &lt;br /&gt;
* NO_ALARM:This record is not in alarm&lt;br /&gt;
* READ:An INPUT link failed in the device support&lt;br /&gt;
* WRITE:An OUTPUT link failed in the device support&lt;br /&gt;
* HIHI:An analog value limit alarm&lt;br /&gt;
* HIGH:An analog value limit alarm&lt;br /&gt;
* LOLO:An analog value limit alarm&lt;br /&gt;
* LOW:An analog value limit alarm&lt;br /&gt;
* STATE:An digital value state alarm&lt;br /&gt;
* COS:An digital value change of state alarm&lt;br /&gt;
* COMM:A device support alarm that indicates the device is not communicating&lt;br /&gt;
* TIMEOUT:A device sup alarm that indicates the asynchronous device timed out&lt;br /&gt;
* HWLIMIT:A device sup alarm that indicates a hardware limit alarm&lt;br /&gt;
* CALC:A record support alarm for calculation records indicating a bad calulation&lt;br /&gt;
* SCAN:An invalid SCAN field is entered&lt;br /&gt;
* LINK:Soft device support for a link failed:no record, bad field, invalid conversion, INVALID alarm severity on the referenced record.&lt;br /&gt;
* SOFT&lt;br /&gt;
* BAD_SUB&lt;br /&gt;
* UDF&lt;br /&gt;
* DISABLE&lt;br /&gt;
* SIMM&lt;br /&gt;
* READ_ACCESS&lt;br /&gt;
* WRITE_ACCESS&lt;br /&gt;
&lt;br /&gt;
There are several problems with this field and menu. &lt;br /&gt;
* The maximum enumerated strings passed through channel access is 16 so nothing past SOFT is seen if the value is not requested by Channel Access as a string.&lt;br /&gt;
* Only one state can be true at a time so that the root cause of a problem or multiple problems are masked. This is particularly obvious in the interface between the record support and the device support. The hardware could have some combination of problems and there is no way to see this through the interface provided.&lt;br /&gt;
* The list is not complete.&lt;br /&gt;
In short, the ability to see failures through the STAT field are limited. Most problems in the hardware, configuration, or communication are reduced to READ or WRITE error and have their severity set to INVALID. When you have an INVALID alarm severity, some investigation is currently needed to determine the fault. Most EPICS drivers provide a report routine that dumps a large set of diagnostic information. This is a good place to start in these cases.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Conditions Configured in the Database ===&lt;br /&gt;
When you have a valid value, there are fields in the record that allow the user to configure off normal conditions. For analog values these are limit alarms. For discrete values, these are state alarms.&lt;br /&gt;
&lt;br /&gt;
==== Limit Alarms ====&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
==== State Alarms ====&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1699</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1699"/>
		<updated>2009-04-09T14:07:48Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified in [[#Channel Access Puts to Passive Scanned Records|''Channel Access Puts to Passive Scanned Records'']].&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Forward Links ====&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced, '.' is the separator between the record name and the field name, and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name can be a mix of the following: a-z A-Z 0-9 _ - : . [ ] &amp;lt; &amp;gt; ;. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 175.0&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:''' 350&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR:''' Linear&lt;br /&gt;
; '''EGUF:'''  175&lt;br /&gt;
; '''EGUL:''' -175&lt;br /&gt;
; '''EGU:'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
; '''LINR''' Linear&lt;br /&gt;
; '''EGUF'''  437.5&lt;br /&gt;
; '''EGUL''' -437.5&lt;br /&gt;
; '''EGU'''  PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion. These are conversions that could be entered as polynomials. As these are more time consuming to execute, a break point table is created that breaks the non-linear conversion into linear segments that are accurate enough. &lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Table ====&lt;br /&gt;
The breakpoint table is then used to do a piece-wise linear conversion. Each piecewise segment of the breakpoint table contains:&amp;lt;br&amp;gt;&lt;br /&gt;
Raw Value Start for this segment, Engineering Units at the start, Slope of this segment.&lt;br /&gt;
For a 12 bit ADC a table may look like this:&lt;br /&gt;
0x000, 14.0, .2    &lt;br /&gt;
0x7ff, 3500.0, .1&lt;br /&gt;
-1.&lt;br /&gt;
Any raw value between 000 and 7ff would be set to 14.0 + .2 * raw value.&lt;br /&gt;
Any raw value between 7ff and fff would be set to 3500 + .1 * (raw value - 7ff)&lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Conversion Example ====&lt;br /&gt;
&lt;br /&gt;
When a new raw value is read, the conversion routine starts from the previous line segment, comparing the raw value start, and either going forward or backward in the table to find the proper segment for this new raw value. Once the proper segment is found, the new engineering units value is the engineering units value at the start of this segment plus the slope of this segment times the position on this segment. A table that has an entry for each possible raw count is effectively a look up table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
; '''LINR''' typeJdegC&lt;br /&gt;
; '''EGUF''' 0&lt;br /&gt;
; '''EGUL''' 0&lt;br /&gt;
; '''EGU'''  DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. &lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
==== Creating Breakpoint Tables ====&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a bad address specification, device communication failure, or signal is over range. In these cases, an alarm severity of INVALID is set. An INVALID alarm can point to a simple configuration problem or a serious operational problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severity, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Status ===&lt;br /&gt;
Alarm status is a field common to all records. The field is defined as an enumerated field. The possible states are listed below. &lt;br /&gt;
* NO_ALARM:This record is not in alarm&lt;br /&gt;
* READ:An INPUT link failed in the device support&lt;br /&gt;
* WRITE:An OUTPUT link failed in the device support&lt;br /&gt;
* HIHI:An analog value limit alarm&lt;br /&gt;
* HIGH:An analog value limit alarm&lt;br /&gt;
* LOLO:An analog value limit alarm&lt;br /&gt;
* LOW:An analog value limit alarm&lt;br /&gt;
* STATE:An digital value state alarm&lt;br /&gt;
* COS:An digital value change of state alarm&lt;br /&gt;
* COMM:A device support alarm that indicates the device is not communicating&lt;br /&gt;
* TIMEOUT:A device sup alarm that indicates the asynchronous device timed out&lt;br /&gt;
* HWLIMIT:A device sup alarm that indicates a hardware limit alarm&lt;br /&gt;
* CALC:A record support alarm for calculation records indicating a bad calulation&lt;br /&gt;
* SCAN:An invalid SCAN field is entered&lt;br /&gt;
* LINK:Soft device support for a link failed:no record, bad field, invalid conversion, INVALID alarm severity on the referenced record.&lt;br /&gt;
* SOFT&lt;br /&gt;
* BAD_SUB&lt;br /&gt;
* UDF&lt;br /&gt;
* DISABLE&lt;br /&gt;
* SIMM&lt;br /&gt;
* READ_ACCESS&lt;br /&gt;
* WRITE_ACCESS&lt;br /&gt;
&lt;br /&gt;
There are several problems with this field and menu. &lt;br /&gt;
* The maximum enumerated strings passed through channel access is 16 so nothing past SOFT is seen if the value is not requested by Channel Access as a string.&lt;br /&gt;
* Only one state can be true at a time so that the root cause of a problem or multiple problems are masked. This is particularly obvious in the interface between the record support and the device support. The hardware could have some combination of problems and there is no way to see this through the interface provided.&lt;br /&gt;
* The list is not complete.&lt;br /&gt;
In short, the ability to see failures through the STAT field are limited. Most problems in the hardware, configuration, or communication are reduced to READ or WRITE error and have their severity set to INVALID. When you have an INVALID alarm severity, some investigation is currently needed to determine the fault. Most EPICS drivers provide a report routine that dumps a large set of diagnostic information. This is a good place to start in these cases.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Conditions Configured in the Database ===&lt;br /&gt;
When you have a valid value, there are fields in the record that allow the user to configure off normal conditions. For analog values these are limit alarms. For discrete values, these are state alarms.&lt;br /&gt;
&lt;br /&gt;
==== Limit Alarms ====&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
==== State Alarms ====&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1698</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1698"/>
		<updated>2009-04-09T13:58:28Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified in [[#Channel Access Puts to Passive Scanned Records|''Channel Access Puts to Passive Scanned Records'']].&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Forward Links ====&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced, '.' is the separator between the record name and the field name, and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name can be a mix of the following: a-z A-Z 0-9 _ - : . [ ] &amp;lt; &amp;gt; ;. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion. These are conversions that could be entered as polynomials. As these are more time consuming to execute, a break point table is created that breaks the non-linear conversion into linear segments that are accurate enough. &lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Table ====&lt;br /&gt;
The breakpoint table is then used to do a piece-wise linear conversion. Each piecewise segment of the breakpoint table contains:&amp;lt;br&amp;gt;&lt;br /&gt;
Raw Value Start for this segment, Engineering Units at the start, Slope of this segment.&lt;br /&gt;
For a 12 bit ADC a table may look like this:&lt;br /&gt;
0x000, 14.0, .2    &lt;br /&gt;
0x7ff, 3500.0, .1&lt;br /&gt;
-1.&lt;br /&gt;
Any raw value between 000 and 7ff would be set to 14.0 + .2 * raw value.&lt;br /&gt;
Any raw value between 7ff and fff would be set to 3500 + .1 * (raw value - 7ff)&lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Conversion Example ====&lt;br /&gt;
&lt;br /&gt;
When a new raw value is read, the conversion routine starts from the previous line segment, comparing the raw value start, and either going forward or backward in the table to find the proper segment for this new raw value. Once the proper segment is found, the new engineering units value is the engineering units value at the start of this segment plus the slope of this segment times the position on this segment. A table that has an entry for each possible raw count is effectively a look up table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:''' typeJdegC&lt;br /&gt;
; '''EGUF:''' 0&lt;br /&gt;
; '''EGUL:''' 0&lt;br /&gt;
; '''EGU:'''  DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. &lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
==== Creating Breakpoint Tables ====&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a bad address specification, device communication failure, or signal is over range. In these cases, an alarm severity of INVALID is set. An INVALID alarm can point to a simple configuration problem or a serious operational problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severity, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Status ===&lt;br /&gt;
Alarm status is a field common to all records. The field is defined as an enumerated field. The possible states are listed below. &lt;br /&gt;
* NO_ALARM:This record is not in alarm&lt;br /&gt;
* READ:An INPUT link failed in the device support&lt;br /&gt;
* WRITE:An OUTPUT link failed in the device support&lt;br /&gt;
* HIHI:An analog value limit alarm&lt;br /&gt;
* HIGH:An analog value limit alarm&lt;br /&gt;
* LOLO:An analog value limit alarm&lt;br /&gt;
* LOW:An analog value limit alarm&lt;br /&gt;
* STATE:An digital value state alarm&lt;br /&gt;
* COS:An digital value change of state alarm&lt;br /&gt;
* COMM:A device support alarm that indicates the device is not communicating&lt;br /&gt;
* TIMEOUT:A device sup alarm that indicates the asynchronous device timed out&lt;br /&gt;
* HWLIMIT:A device sup alarm that indicates a hardware limit alarm&lt;br /&gt;
* CALC:A record support alarm for calculation records indicating a bad calulation&lt;br /&gt;
* SCAN:An invalid SCAN field is entered&lt;br /&gt;
* LINK:Soft device support for a link failed:no record, bad field, invalid conversion, INVALID alarm severity on the referenced record.&lt;br /&gt;
* SOFT&lt;br /&gt;
* BAD_SUB&lt;br /&gt;
* UDF&lt;br /&gt;
* DISABLE&lt;br /&gt;
* SIMM&lt;br /&gt;
* READ_ACCESS&lt;br /&gt;
* WRITE_ACCESS&lt;br /&gt;
&lt;br /&gt;
There are several problems with this field and menu. &lt;br /&gt;
* The maximum enumerated strings passed through channel access is 16 so nothing past SOFT is seen if the value is not requested by Channel Access as a string.&lt;br /&gt;
* Only one state can be true at a time so that the root cause of a problem or multiple problems are masked. This is particularly obvious in the interface between the record support and the device support. The hardware could have some combination of problems and there is no way to see this through the interface provided.&lt;br /&gt;
* The list is not complete.&lt;br /&gt;
In short, the ability to see failures through the STAT field are limited. Most problems in the hardware, configuration, or communication are reduced to READ or WRITE error and have their severity set to INVALID. When you have an INVALID alarm severity, some investigation is currently needed to determine the fault. Most EPICS drivers provide a report routine that dumps a large set of diagnostic information. This is a good place to start in these cases.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Conditions Configured in the Database ===&lt;br /&gt;
When you have a valid value, there are fields in the record that allow the user to configure off normal conditions. For analog values these are limit alarms. For discrete values, these are state alarms.&lt;br /&gt;
&lt;br /&gt;
==== Limit Alarms ====&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
==== State Alarms ====&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1697</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1697"/>
		<updated>2009-04-09T13:45:17Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified in [[#Channel Access Puts to Passive Scanned Records|''Channel Access Puts to Passive Scanned Records'']].&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Forward Links ====&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced, '.' is the separator between the record name and the field name, and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name can be a mix of the following: a-z A-Z 0-9 _ - : . [ ] &amp;lt; &amp;gt; ;. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion. These are conversions that could be entered as polynomials. As these are more time consuming to execute, a break point table is created that breaks the non-linear conversion into linear segments that are accurate enough. &lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Table ====&lt;br /&gt;
The breakpoint table is then used to do a piece-wise linear conversion. Each piecewise segment of the breakpoint table contains:&amp;lt;br&amp;gt;&lt;br /&gt;
Raw Value Start for this segment, Engineering Units at the start, Slope of this segment.&lt;br /&gt;
For a 12 bit ADC a table may look like this:&lt;br /&gt;
0x000, 14.0, .2    &lt;br /&gt;
0x7ff, 3500.0, .1&lt;br /&gt;
-1.&lt;br /&gt;
Any raw value between 000 and 7ff would be set to 14.0 + .2 * raw value.&lt;br /&gt;
Any raw value between 7ff and fff would be set to 3500 + .1 * (raw value - 7ff)&lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Conversion Example ====&lt;br /&gt;
&lt;br /&gt;
When a new raw value is read, the conversion routine starts from the previous line segment, comparing the raw value start, and either going forward or backward in the table to find the proper segment for this new raw value. Once the proper segment is found, the new engineering units value is the engineering units value at the start of this segment plus the slope of this segment times the position on this segment. A table that has an entry for each possible raw count is effectively a look up table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. &lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
==== Creating Breakpoint Tables ====&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a bad address specification, device communication failure, or signal is over range. In these cases, an alarm severity of INVALID is set. An INVALID alarm can point to a simple configuration problem or a serious operational problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severity, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Status ===&lt;br /&gt;
Alarm status is a field common to all records. The field is defined as an enumerated field. The possible states are listed below. &lt;br /&gt;
* NO_ALARM:This record is not in alarm&lt;br /&gt;
* READ:An INPUT link failed in the device support&lt;br /&gt;
* WRITE:An OUTPUT link failed in the device support&lt;br /&gt;
* HIHI:An analog value limit alarm&lt;br /&gt;
* HIGH:An analog value limit alarm&lt;br /&gt;
* LOLO:An analog value limit alarm&lt;br /&gt;
* LOW:An analog value limit alarm&lt;br /&gt;
* STATE:An digital value state alarm&lt;br /&gt;
* COS:An digital value change of state alarm&lt;br /&gt;
* COMM:A device support alarm that indicates the device is not communicating&lt;br /&gt;
* TIMEOUT:A device sup alarm that indicates the asynchronous device timed out&lt;br /&gt;
* HWLIMIT:A device sup alarm that indicates a hardware limit alarm&lt;br /&gt;
* CALC:A record support alarm for calculation records indicating a bad calulation&lt;br /&gt;
* SCAN:An invalid SCAN field is entered&lt;br /&gt;
* LINK:Soft device support for a link failed:no record, bad field, invalid conversion, INVALID alarm severity on the referenced record.&lt;br /&gt;
* SOFT&lt;br /&gt;
* BAD_SUB&lt;br /&gt;
* UDF&lt;br /&gt;
* DISABLE&lt;br /&gt;
* SIMM&lt;br /&gt;
* READ_ACCESS&lt;br /&gt;
* WRITE_ACCESS&lt;br /&gt;
==== Scan Alarm ====&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
==== Read Alarm ====&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
==== Write Alarm ====&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
==== Limit Alarms ====&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
==== State Alarms ====&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1696</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1696"/>
		<updated>2009-04-08T21:14:09Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified in [[#Channel Access Puts to Passive Scanned Records|''Channel Access Puts to Passive Scanned Records'']].&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Forward Links ====&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced, '.' is the separator between the record name and the field name, and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name can be a mix of the following: a-z A-Z 0-9 _ - : . [ ] &amp;lt; &amp;gt; ;. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion. These are conversions that could be entered as polynomials. As these are more time consuming to execute, a break point table is created that breaks the non-linear conversion into linear segments that are accurate enough. &lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Table ====&lt;br /&gt;
The breakpoint table is then used to do a piece-wise linear conversion. Each piecewise segment of the breakpoint table contains:&amp;lt;br&amp;gt;&lt;br /&gt;
Raw Value Start for this segment, Engineering Units at the start, Slope of this segment.&lt;br /&gt;
For a 12 bit ADC a table may look like this:&lt;br /&gt;
0x000, 14.0, .2    &lt;br /&gt;
0x7ff, 3500.0, .1&lt;br /&gt;
-1.&lt;br /&gt;
Any raw value between 000 and 7ff would be set to 14.0 + .2 * raw value.&lt;br /&gt;
Any raw value between 7ff and fff would be set to 3500 + .1 * (raw value - 7ff)&lt;br /&gt;
&lt;br /&gt;
==== Breakpoint Conversion Example ====&lt;br /&gt;
&lt;br /&gt;
When a new raw value is read, the conversion routine starts from the previous line segment, comparing the raw value start, and either going forward or backward in the table to find the proper segment for this new raw value. Once the proper segment is found, the new engineering units value is the engineering units value at the start of this segment plus the slope of this segment times the position on this segment. A table that has an entry for each possible raw count is effectively a look up table.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. &lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
==== Creating Breakpoint Tables ====&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a bad address specification, device communication failure, or signal is over range. In these cases, an alarm severity of INVALID is set. An INVALID alarm can point to a simple configuration problem or a serious operational problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severity, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Status ===&lt;br /&gt;
&lt;br /&gt;
==== Scan Alarm ====&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
==== Read Alarm ====&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
==== Write Alarm ====&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
==== Limit Alarms ====&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
==== State Alarms ====&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1695</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1695"/>
		<updated>2009-04-07T21:15:02Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified in [[#Channel Access Puts to Passive Scanned Records|''Channel Access Puts to Passive Scanned Records'']].&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Forward Links ====&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced, '.' is the separator between the record name and the field name, and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name can be a mix of the following: a-z A-Z 0-9 _ - : . [ ] &amp;lt; &amp;gt; ;. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion, otherwise known as a breakpoint conversion. In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. Instead, this conversion is completed by performing a table lookup. The value read from the device is known as the ''raw value'', which is initially read into the RVAL (raw value) field. This raw value is then used to identify the line segment in which this value falls. Each entry of the table includes a beginning point for the segment, the floating engineering units value at the point, and the slope of the line segment. The conversion to the engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
 final value = eng. units + (raw value - first point) &amp;amp;times; slope&lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a persons trips over some wires, unplugging them, which disables the sensors, which means that a new value couldn't be scanned for the record. In that case, an alarm of INVALID severity will be triggered. When a system is being tested, an INVALID alarm can point to a simple configuration problem. However, when the system is actually on-line, an INVALID alarm can signal a much more serious problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severities, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Scan Alarm ===&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Read Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Write Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Limit Alarms ===&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
=== State Alarms ===&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1694</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1694"/>
		<updated>2009-04-07T20:35:04Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.015 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The ZSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
==== Process Chains ====&lt;br /&gt;
Links can be used to create complex scanning logic. In the forward link example above, the chain of records is determined by the scan rate of the input record. In the PP example, the scan rate of the chain is determined by the rate of the output. Either of these may be appropriate depending on the hardware and process limitations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Care must be taken as this flexibility can also lead to some incorrect configurations. In these next examples we look at some mistakes that can occur. &lt;br /&gt;
&lt;br /&gt;
In [[#Figure 4|''Figure 4'']]) two records that are scanned at 10 Hz make references to the same Passive record. In this case, no alarm or error is generated. The Passive record is scanned twice at 10 Hz. The time between the two scans depends on what records are processed between the two periodic records.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:ScanTwice.jpg|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 5|''Figure 5'']]), several circular references are made. As the record processing is recursively called for links, the record containing the link is marked as active during the entire time that the chain is being processed. When one of these circular references is encountered, the active flag is recognized and the request to process the record is ignored.&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:PACT.jpg|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
A Channel Access link is an input link or output link that specifies a link to a record located in another IOC or an input and output link with one of the following attributes: CA, CP, or CPP. &lt;br /&gt;
&lt;br /&gt;
==== Channel Access Input Links ====&lt;br /&gt;
If the input link specifies CA, CP, or CPP, regardless of the location of the process variable being referenced, it will be forced to be a Channel Access link. This is helpful for separating process chains that are not tightly related. If the input link specifies CP, it also causes the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it causes the record to be processed if and only if the record with the CPP link has a SCAN field set to Passive. In other words, CP and CPP cause the record containing the link to be processed with the process variable that they reference changes.&lt;br /&gt;
&lt;br /&gt;
====Channel Access Output Links ====&lt;br /&gt;
Only CA is appropriate for an output link. The write to a field over channel access causes processing as specified above.&lt;br /&gt;
&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
== Forward Process Links ==&lt;br /&gt;
&lt;br /&gt;
When the ''forward processing link'' field (FLNK) of one record contains an address of a second record, it causes the second record to be processed after the first record is itself processed.&lt;br /&gt;
&lt;br /&gt;
We discussed forward links in the section on [[#Passive Scanning|passive processing]]. To reiterate, this field causes the record that it specifies to be scanned when the record that contains the forward link is scanned. It is thus used to cause related records to process. (For more on specifying records in link fields, see [[#Address Specification|''Address Specification'']]).&lt;br /&gt;
&lt;br /&gt;
If a forward link references the PROC field of a record in another IOC, a Channel Access &amp;quot; put&amp;quot; request is directed to the specified record, causing it to process.&lt;br /&gt;
&lt;br /&gt;
One record type exists solely to propagate forward processing: the fanout record. The fanout record is used when there is more than one record which needs to be processed as a result of another record being processed. It can specify as many as six forward links. Let's look at an example where an analog input's value is used in two different calculations ([[#Figure 7|''Figure 7'']]). Because there is only one forward processing link in the analog input record, it is used to process the fanout record. Here two of the fanout records forward links are used to link to two calculation records. In the example, when the I/O interrupt occurs, the analog input is processed, then the fanout record is processed, causing each of the calculation records to be processed. Note that the fanout record simply causes the specified records to process. It does not send values to other records. The ''data fanout'' record, on the other hand, does send values to other records. Refer to [[RRM 3-14 Fanout|''Fanout'']], and [[RRM 3-14 Dfanout|''dfanout'']], for more information on the fanout and data fanout records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_7&amp;quot;&amp;gt;Figure 7&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-7.gif|Figure 7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name entered in Capfast (or whatever other configuration tool) can be a mix of upper and lower case letters. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
For inputs and desired output links, the specified record is processed before the value has been read, and for output links the specified record is processed after the value has been written. In the case of the forward processing link, the record being referenced is processed after the record making the link is processed.&lt;br /&gt;
&lt;br /&gt;
Remember that input links such as INP and DOL (desired output location), can specify process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;) or no process passive (&amp;lt;code&amp;gt;NPP&amp;lt;/code&amp;gt;). When a record's input link specifies a database address, the record specified by the address will process only if the input link specifies process passive and only if the addressed record specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field. If the input link specifies no process passive (NPP), the addressed record will not be processed even if it is a passive record. Because output links such as OUT are always process passive, they always cause the specified record to be processed, provided that the specified record's SCAN field is configured as &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Be aware that other types of conversions may not be made when a value is retrieved from another record. Whether it does or doesn't depends on the record and the device support routine which the record specifies. Most records must specify a device support routine in their DTYP field. Device support routines take care of the specifics of input and output. For such records, there are device support routines for hardware I/O, and other routines for I/O between records. For example, the analog input has many device support routines for input from hardware, and two routines specific for retrieving input from other records: &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt; retrieves the input value and performs the specified linear conversions on the value (that is, if the record is configured to perform linear conversions). The &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine, on the other hand, reads the value directly into the VAL field and doesn't perform any linear conversions on the value.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Note: Link fields can reference records in a different database, that is, a database that resides in a different IOC. Records residing on different IOCs connect through channel access, so any link that refers to a record in another IOC is called a channel access link. The format of a channel access link does not differ from that of a regular database link.'''&lt;br /&gt;
&lt;br /&gt;
'''Channel access links are created when the database is initialized. When the initialization routines cannot find the link in the local database, a channel access link is created.'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As of Release 3.13.0, input and output links can also be forced to be Channel Access links, even when they are located in the same IOC. Input links can specify either CA, CP, or CPP. Specifying CA forces the input link to be a Channel Access link. When an input link becomes a Channel Access link, a Channel Access monitor is established on the field and a buffer is allocated for the field using the field type and the element count of the field. In addition to the value of the input link, the alarm status of the link is monitored. Specifying CP or CPP also forces the input link to be a Channel Access link, but in addition, CP or CPP will force the record that contains the link to be processed when a monitor occurs, that is, if the record is process passive.&lt;br /&gt;
&lt;br /&gt;
Output links can also specify CA, in which case they will be forced to be Channel Access links. When an output link becomes a Channel Access link, a buffer is allocated the first time a &amp;quot;put&amp;quot; operation occurs on the record containing the link. Each time a &amp;quot;put&amp;quot; occurs for the record, the data is retrieved from the buffer. And the buffer is updated. The CP and CPP options are not available for output links.&lt;br /&gt;
&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
&lt;br /&gt;
Because of the nature of Channel Access links, they cannot be process passive. For example, if an input link that specifies another record in another IOC but also specifies PP, the PP attribute will be ignored. Another aspect of Channel Access links is that they are never placed in the same lock set as the records they link to.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion, otherwise known as a breakpoint conversion. In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. Instead, this conversion is completed by performing a table lookup. The value read from the device is known as the ''raw value'', which is initially read into the RVAL (raw value) field. This raw value is then used to identify the line segment in which this value falls. Each entry of the table includes a beginning point for the segment, the floating engineering units value at the point, and the slope of the line segment. The conversion to the engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
 final value = eng. units + (raw value - first point) &amp;amp;times; slope&lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a persons trips over some wires, unplugging them, which disables the sensors, which means that a new value couldn't be scanned for the record. In that case, an alarm of INVALID severity will be triggered. When a system is being tested, an INVALID alarm can point to a simple configuration problem. However, when the system is actually on-line, an INVALID alarm can signal a much more serious problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severities, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Scan Alarm ===&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Read Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Write Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Limit Alarms ===&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
=== State Alarms ===&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=File:ScanTwice.jpg&amp;diff=2926</id>
		<title>File:ScanTwice.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=File:ScanTwice.jpg&amp;diff=2926"/>
		<updated>2009-04-07T20:18:25Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: ScanTwice&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;ScanTwice&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=EPICSWIKI:Upload_log&amp;diff=1952</id>
		<title>EPICSWIKI:Upload log</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=EPICSWIKI:Upload_log&amp;diff=1952"/>
		<updated>2009-04-07T20:18:25Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: uploaded &amp;quot;ScanTwice.jpg&amp;quot;: ScanTwice&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Below is a list of the most recent file uploads.&lt;br /&gt;
All times shown are server time (UTC).&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;20:18, 7 Apr 2009 [[User:BobDalesio|BobDalesio]] uploaded &amp;quot;[[:Image:ScanTwice.jpg|ScanTwice.jpg]]&amp;quot; &amp;lt;em&amp;gt;(ScanTwice)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;20:17, 7 Apr 2009 [[User:BobDalesio|BobDalesio]] uploaded &amp;quot;[[:Image:PACT.jpg|PACT.jpg]]&amp;quot; &amp;lt;em&amp;gt;(PACT)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;17:27, 7 Apr 2009 [[User:BobDalesio|BobDalesio]] uploaded &amp;quot;[[:Image:RecordProcessingPPExample.jpg|RecordProcessingPPExample.jpg]]&amp;quot; &amp;lt;em&amp;gt;(PPExample)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;15:55, 7 Apr 2009 [[User:BobDalesio|BobDalesio]] uploaded &amp;quot;[[:Image:RecordProcessingPhase.jpg|RecordProcessingPhase.jpg]]&amp;quot; &amp;lt;em&amp;gt;(Phase)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;15:54, 7 Apr 2009 [[User:BobDalesio|BobDalesio]] uploaded &amp;quot;[[:Image:RecordProcessing1PP.jpg|RecordProcessing1PP.jpg]]&amp;quot; &amp;lt;em&amp;gt;(Process Passive)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;15:52, 7 Apr 2009 [[User:BobDalesio|BobDalesio]] uploaded &amp;quot;[[:Image:RecordProcessingFLNK.jpg|RecordProcessingFLNK.jpg]]&amp;quot; &amp;lt;em&amp;gt;(Forward Link)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;15:32, 7 Apr 2009 [[User:BobDalesio|BobDalesio]] uploaded &amp;quot;[[:Image:RecordProcessing1.jpg|RecordProcessing1.jpg]]&amp;quot; &amp;lt;em&amp;gt;(RecordProcessing)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;19:51, 13 Feb 2009 [[User:LewisMuir|LewisMuir]] uploaded &amp;quot;[[:Image:RRM_3-14_Compression-2.gif|RRM_3-14_Compression-2.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Compression Diagram 1.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;19:50, 13 Feb 2009 [[User:LewisMuir|LewisMuir]] uploaded &amp;quot;[[:Image:RRM_3-14_Compression-1.gif|RRM_3-14_Compression-1.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Compression Equation 1.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;22:06, 17 Apr 2008 [[User:KazimierzGofron|KazimierzGofron]] uploaded &amp;quot;[[:Image:RRM_3-14_Concepts-2.gif|RRM_3-14_Concepts-2.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Figure 2.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;21:26, 17 Apr 2008 [[User:KazimierzGofron|KazimierzGofron]] uploaded &amp;quot;[[:Image:RRM_3-14_Concepts-1.gif|RRM_3-14_Concepts-1.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Figure 1.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;21:26, 17 Apr 2008 [[User:KazimierzGofron|KazimierzGofron]] uploaded &amp;quot;[[:Image:RRM_3-14_Concepts-2.gif|RRM_3-14_Concepts-2.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Figure 2.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;21:26, 17 Apr 2008 [[User:KazimierzGofron|KazimierzGofron]] uploaded &amp;quot;[[:Image:RRM_3-14_Concepts-3.gif|RRM_3-14_Concepts-3.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Figure 3.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;21:21, 17 Apr 2008 [[User:KazimierzGofron|KazimierzGofron]] uploaded &amp;quot;[[:Image:RRM_3-14_Concepts-1.gif|RRM_3-14_Concepts-1.gif]]&amp;quot;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;21:53, 1 Sep 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Scan-2.gif|RRM_3-13_Scan-2.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Scan Figure 2.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;21:52, 1 Sep 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Scan-1.gif|RRM_3-13_Scan-1.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Scan Figure 1.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;18:41, 1 Sep 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Compression-2.gif|RRM_3-13_Compression-2.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Compression Diagram 1.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;18:34, 1 Sep 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Compression-1.gif|RRM_3-13_Compression-1.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Compression Equation 1.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;21:21, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts_d5.gif|RRM_3-13_Concepts_d5.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Diagram 5.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;21:07, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts_d4.gif|RRM_3-13_Concepts_d4.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Diagram 4.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;21:05, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts_d2.gif|RRM_3-13_Concepts_d2.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Diagram 2.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;21:05, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts_d3.gif|RRM_3-13_Concepts_d3.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Diagram 3.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;21:01, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts_d1.gif|RRM_3-13_Concepts_d1.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Diagram 1.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;20:07, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts-9.gif|RRM_3-13_Concepts-9.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Figure 9.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;20:05, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts-7.gif|RRM_3-13_Concepts-7.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Figure 7.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;19:50, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts-8.gif|RRM_3-13_Concepts-8.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Figure 8.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;16:08, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts-6.gif|RRM_3-13_Concepts-6.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Figure 6.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;16:00, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts-4.gif|RRM_3-13_Concepts-4.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Figure 4.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;15:58, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts-5.gif|RRM_3-13_Concepts-5.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Figure 5.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;15:49, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts-3.gif|RRM_3-13_Concepts-3.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Figure 3.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;15:42, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts-2.gif|RRM_3-13_Concepts-2.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Figure 2.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;15:15, 31 Aug 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:RRM_3-13_Concepts-1.gif|RRM_3-13_Concepts-1.gif]]&amp;quot; &amp;lt;em&amp;gt;(RRM Database Concepts, Figure 1.)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;13:03, 9 Aug 2005 [[User:KayKasemir|KayKasemir]] uploaded &amp;quot;[[:Image:V4DataInter.jpg|V4DataInter.jpg]]&amp;quot; &amp;lt;em&amp;gt;(Data Interface Layout)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;08:45, 8 Aug 2005 [[User:RalphLange|RalphLange]] uploaded &amp;quot;[[:Image:Tux.png|Tux.png]]&amp;quot; &amp;lt;em&amp;gt;(TUX!)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;10:53, 28 Jul 2005 [[User:RalphLange|RalphLange]] uploaded &amp;quot;[[:Image:Containers.jpg|Containers.jpg]]&amp;quot; &amp;lt;em&amp;gt;(Containers)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;20:24, 12 Jul 2005 [[User:RalphLange|RalphLange]] uploaded &amp;quot;[[:Image:ContainerYard.jpg|ContainerYard.jpg]]&amp;quot; &amp;lt;em&amp;gt;(Container Yard)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;19:34, 18 Mar 2005 [[User:AndrewJohnson|AndrewJohnson]] uploaded &amp;quot;[[:Image:Logo50.gif|Logo50.gif]]&amp;quot; &amp;lt;em&amp;gt;(EPICS Logo, 50px square)&amp;lt;/em&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=File:PACT.jpg&amp;diff=2858</id>
		<title>File:PACT.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=File:PACT.jpg&amp;diff=2858"/>
		<updated>2009-04-07T20:17:48Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: PACT&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PACT&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1691</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1691"/>
		<updated>2009-04-07T17:38:04Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.019 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The OSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Channel Access Links ====&lt;br /&gt;
&lt;br /&gt;
Passive scanning differs somewhat for Channel Access links. A Channel Access link is an input link or output link that specifies a link to a record located in another IOC (a forward processing link can be a CA link under certain circumstances). In addition, as of Release 3.13 input and output links can be forced to be Channel Access links even if they reference a record located in the same database. Input links can specify CA, CP, or CPP. If the input link specifies CA, it will be forced to be a Channel Access link. If the input link specifies CP, it will also be forced to be a Channel Access link; in addition, it will cause the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it means the same thing as CP, except that the record will be processed if and only if the record itself specifies passive in its SCAN field. Output links can specify CA, which will simply cause them to be Channel Access links.&lt;br /&gt;
&lt;br /&gt;
Channel Access links, be they between records located in different IOCs or between records located in the same IOC, cannot be process passive, e.g., they cannot cause the record they specify to process when written to or read from.&lt;br /&gt;
&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
== Forward Process Links ==&lt;br /&gt;
&lt;br /&gt;
When the ''forward processing link'' field (FLNK) of one record contains an address of a second record, it causes the second record to be processed after the first record is itself processed.&lt;br /&gt;
&lt;br /&gt;
We discussed forward links in the section on [[#Passive Scanning|passive processing]]. To reiterate, this field causes the record that it specifies to be scanned when the record that contains the forward link is scanned. It is thus used to cause related records to process. (For more on specifying records in link fields, see [[#Address Specification|''Address Specification'']]).&lt;br /&gt;
&lt;br /&gt;
If a forward link references the PROC field of a record in another IOC, a Channel Access &amp;quot; put&amp;quot; request is directed to the specified record, causing it to process.&lt;br /&gt;
&lt;br /&gt;
One record type exists solely to propagate forward processing: the fanout record. The fanout record is used when there is more than one record which needs to be processed as a result of another record being processed. It can specify as many as six forward links. Let's look at an example where an analog input's value is used in two different calculations ([[#Figure 7|''Figure 7'']]). Because there is only one forward processing link in the analog input record, it is used to process the fanout record. Here two of the fanout records forward links are used to link to two calculation records. In the example, when the I/O interrupt occurs, the analog input is processed, then the fanout record is processed, causing each of the calculation records to be processed. Note that the fanout record simply causes the specified records to process. It does not send values to other records. The ''data fanout'' record, on the other hand, does send values to other records. Refer to [[RRM 3-14 Fanout|''Fanout'']], and [[RRM 3-14 Dfanout|''dfanout'']], for more information on the fanout and data fanout records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_7&amp;quot;&amp;gt;Figure 7&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-7.gif|Figure 7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name entered in Capfast (or whatever other configuration tool) can be a mix of upper and lower case letters. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
For inputs and desired output links, the specified record is processed before the value has been read, and for output links the specified record is processed after the value has been written. In the case of the forward processing link, the record being referenced is processed after the record making the link is processed.&lt;br /&gt;
&lt;br /&gt;
Remember that input links such as INP and DOL (desired output location), can specify process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;) or no process passive (&amp;lt;code&amp;gt;NPP&amp;lt;/code&amp;gt;). When a record's input link specifies a database address, the record specified by the address will process only if the input link specifies process passive and only if the addressed record specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field. If the input link specifies no process passive (NPP), the addressed record will not be processed even if it is a passive record. Because output links such as OUT are always process passive, they always cause the specified record to be processed, provided that the specified record's SCAN field is configured as &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Be aware that other types of conversions may not be made when a value is retrieved from another record. Whether it does or doesn't depends on the record and the device support routine which the record specifies. Most records must specify a device support routine in their DTYP field. Device support routines take care of the specifics of input and output. For such records, there are device support routines for hardware I/O, and other routines for I/O between records. For example, the analog input has many device support routines for input from hardware, and two routines specific for retrieving input from other records: &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt; retrieves the input value and performs the specified linear conversions on the value (that is, if the record is configured to perform linear conversions). The &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine, on the other hand, reads the value directly into the VAL field and doesn't perform any linear conversions on the value.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Note: Link fields can reference records in a different database, that is, a database that resides in a different IOC. Records residing on different IOCs connect through channel access, so any link that refers to a record in another IOC is called a channel access link. The format of a channel access link does not differ from that of a regular database link.'''&lt;br /&gt;
&lt;br /&gt;
'''Channel access links are created when the database is initialized. When the initialization routines cannot find the link in the local database, a channel access link is created.'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As of Release 3.13.0, input and output links can also be forced to be Channel Access links, even when they are located in the same IOC. Input links can specify either CA, CP, or CPP. Specifying CA forces the input link to be a Channel Access link. When an input link becomes a Channel Access link, a Channel Access monitor is established on the field and a buffer is allocated for the field using the field type and the element count of the field. In addition to the value of the input link, the alarm status of the link is monitored. Specifying CP or CPP also forces the input link to be a Channel Access link, but in addition, CP or CPP will force the record that contains the link to be processed when a monitor occurs, that is, if the record is process passive.&lt;br /&gt;
&lt;br /&gt;
Output links can also specify CA, in which case they will be forced to be Channel Access links. When an output link becomes a Channel Access link, a buffer is allocated the first time a &amp;quot;put&amp;quot; operation occurs on the record containing the link. Each time a &amp;quot;put&amp;quot; occurs for the record, the data is retrieved from the buffer. And the buffer is updated. The CP and CPP options are not available for output links.&lt;br /&gt;
&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
&lt;br /&gt;
Because of the nature of Channel Access links, they cannot be process passive. For example, if an input link that specifies another record in another IOC but also specifies PP, the PP attribute will be ignored. Another aspect of Channel Access links is that they are never placed in the same lock set as the records they link to.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion, otherwise known as a breakpoint conversion. In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. Instead, this conversion is completed by performing a table lookup. The value read from the device is known as the ''raw value'', which is initially read into the RVAL (raw value) field. This raw value is then used to identify the line segment in which this value falls. Each entry of the table includes a beginning point for the segment, the floating engineering units value at the point, and the slope of the line segment. The conversion to the engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
 final value = eng. units + (raw value - first point) &amp;amp;times; slope&lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a persons trips over some wires, unplugging them, which disables the sensors, which means that a new value couldn't be scanned for the record. In that case, an alarm of INVALID severity will be triggered. When a system is being tested, an INVALID alarm can point to a simple configuration problem. However, when the system is actually on-line, an INVALID alarm can signal a much more serious problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severities, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Scan Alarm ===&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Read Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Write Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Limit Alarms ===&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
=== State Alarms ===&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1690</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1690"/>
		<updated>2009-04-07T17:32:03Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.019 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The OSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
In [[#Figure 3|''Figure 3'']]), the PP/NPP attribute is used to calculate a rate of change. At 1 Hz, the calculation record is processed. It fetches the inputs for the calc record in order. As INPA has an attribute of NPP, the VAL field is taken from the ai record. Before INPB takes the VAL field from the ai record it is processed, as the attribute on this link is PP. The new ai value is placed in the B field of the calc record. A-B is the VAL field of the ai one second ago and the current VAL field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessingPPExample.jpg|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
For example, [[#Figure 1|''Figure 1'']] presents a VDCT schematic of two records, Record_1 and Record_2. Record_1 is an analog output record. Most output records have a DOL or Desired Output Link, from which they can retrieve the value that they output. Thus, the DOL link is an input link which can be process passive. The blue line connecting the records is a data link. In this case it means that the DOL link is connected to the VAL field of Record_2. In other words, Record_1 retrieves its value, the value that it outputs, from Record_2. When Record_1 begins processing, it will first retrieve the value from the field connected to DOL, which, in this case, is the VAL field of Record_2. If DOL is process passive, it will cause Record_1 to be processed when the value is retrieved. Record_2 will then process. After Record_1 finishes processing, the value from its VAL field will be retrieved by DOL. Record_1 will then finish its processing.&lt;br /&gt;
&lt;br /&gt;
If NPP is specified as an input link's attribute, the value is retrieved as is from the other record without causing the other record to process. So in the above example, if DOL didn't specify process passive, record 1 would not cause record 2 to process.&lt;br /&gt;
&lt;br /&gt;
Let's consider a few more examples of passive scanning.&lt;br /&gt;
&lt;br /&gt;
Consider a case where an analog output is controlled only by the operator. There is no reason to process this record until the operator changes the desired output. (This is done by writing to the VAL field.) If this record is passive, the database access routine that places the new desired output into the record will cause it to be processed immediately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The calculation record's SCAN field specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the SCAN field of the analog input Record_3 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt;, and the SCAN field of the analog input Record_4 specifies &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;. In this example the calculation will be processed every two seconds and whenever the I/O card interrupts. Thus, the calculation inherits the periodic scanning trait of the first analog input record and the I/O event scanning trait of the second. Each time the calc record Record_5 is processed, it will retrieve values from the locations specified in its input links and perform its calculation.&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingPhase.jpg|thumb|Description]]&lt;br /&gt;
[[Image:RecordProcessing1.jpg|Figure 2]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-1.gif|Figure 1]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-2.gif|Figure 2]]&lt;br /&gt;
&lt;br /&gt;
A more complex use of passive scanning causes passive records to inherit the scan traits of the records to which they are connected. Let's look at the simple case ([[#Figure 2|''Figure 2'']]) where two analog input records (AI) get their input from the VAL field of a calculation record (CALC). Each analog input (Record_3, Record_4) has a forward link (FLNK) pointing to the calculation record (Record_5). In VDCT, FLNKs connect directly to another record, unlike CapFast where FLNK connects to SLNK field. However, this is just a way to specify to which record FLNK points to. In EPICS, a FLNK of Record_3 and Record_4 merely contains the name of another record (Record_5).&lt;br /&gt;
&lt;br /&gt;
Next, let's look at a continuous control loop ([[#Figure 3|''Figure 3'']]). In this case the analog input Record_6, which is scanned every 0.1 seconds, has a forward link to the calculation record Record_7, and the calculation record, in turn, has a forward link to the analog output Record_8. Every 0.1 seconds the analog input will process, converting its value and causing the calc record to process. The calc record will make its calculation, causing the analog output record to process. The analog output will then write its output after fetching, if necessary, its desired output. If the operator changes a value in the calculation, this will also cause the calc record to perform its calculation and the analog output to write its output, since the calc and the analog output record are passive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-3.gif|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
Let's consider a case ([[#Figure 4|''Figure 4'']]) where values are fetched from other records via input links. When a record fetches a value from another record, the other record is first processed, only if the other record is passive and only if the link specifies process passive or &amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;. As an example, suppose a calculation record Record_11 has two input links, each of which specifies an analog input record (Record_9, Record_10) and each of which specifies process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;). Suppose also that the calculation record specifies &amp;lt;code&amp;gt;1 second&amp;lt;/code&amp;gt; in its SCAN field, meaning that it is scanned every second. Every second, the calc record will cause each analog input to process before fetching the values, provided that each analog input specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-4.gif|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In a variation of this example ([[#Figure 5|''Figure 5'']]), suppose one of the analog inputs Record_13 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt; in its SCAN field which means it would no longer be a passive record. Thus, the periodically scanned analog input will ''not'' be processed every time the calculation is processed. Its current value will simply be fetched as is; then the other analog input Record_12 will be processed and the calculation performed. The same thing would occur if the calculation's INPB link of calc Record_14 specified NPP or no process passive. In this case, even if the analog input's SCAN field specified &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the value would be fetched as is without causing the analog input to process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-5.gif|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Passive Scanning and Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
Passive scanning differs somewhat for Channel Access links. A Channel Access link is an input link or output link that specifies a link to a record located in another IOC (a forward processing link can be a CA link under certain circumstances). In addition, as of Release 3.13 input and output links can be forced to be Channel Access links even if they reference a record located in the same database. Input links can specify CA, CP, or CPP. If the input link specifies CA, it will be forced to be a Channel Access link. If the input link specifies CP, it will also be forced to be a Channel Access link; in addition, it will cause the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it means the same thing as CP, except that the record will be processed if and only if the record itself specifies passive in its SCAN field. Output links can specify CA, which will simply cause them to be Channel Access links.&lt;br /&gt;
&lt;br /&gt;
Channel Access links, be they between records located in different IOCs or between records located in the same IOC, cannot be process passive, e.g., they cannot cause the record they specify to process when written to or read from.&lt;br /&gt;
&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
== Forward Process Links ==&lt;br /&gt;
&lt;br /&gt;
When the ''forward processing link'' field (FLNK) of one record contains an address of a second record, it causes the second record to be processed after the first record is itself processed.&lt;br /&gt;
&lt;br /&gt;
We discussed forward links in the section on [[#Passive Scanning|passive processing]]. To reiterate, this field causes the record that it specifies to be scanned when the record that contains the forward link is scanned. It is thus used to cause related records to process. (For more on specifying records in link fields, see [[#Address Specification|''Address Specification'']]).&lt;br /&gt;
&lt;br /&gt;
If a forward link references the PROC field of a record in another IOC, a Channel Access &amp;quot; put&amp;quot; request is directed to the specified record, causing it to process.&lt;br /&gt;
&lt;br /&gt;
One record type exists solely to propagate forward processing: the fanout record. The fanout record is used when there is more than one record which needs to be processed as a result of another record being processed. It can specify as many as six forward links. Let's look at an example where an analog input's value is used in two different calculations ([[#Figure 7|''Figure 7'']]). Because there is only one forward processing link in the analog input record, it is used to process the fanout record. Here two of the fanout records forward links are used to link to two calculation records. In the example, when the I/O interrupt occurs, the analog input is processed, then the fanout record is processed, causing each of the calculation records to be processed. Note that the fanout record simply causes the specified records to process. It does not send values to other records. The ''data fanout'' record, on the other hand, does send values to other records. Refer to [[RRM 3-14 Fanout|''Fanout'']], and [[RRM 3-14 Dfanout|''dfanout'']], for more information on the fanout and data fanout records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_7&amp;quot;&amp;gt;Figure 7&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-7.gif|Figure 7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name entered in Capfast (or whatever other configuration tool) can be a mix of upper and lower case letters. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
For inputs and desired output links, the specified record is processed before the value has been read, and for output links the specified record is processed after the value has been written. In the case of the forward processing link, the record being referenced is processed after the record making the link is processed.&lt;br /&gt;
&lt;br /&gt;
Remember that input links such as INP and DOL (desired output location), can specify process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;) or no process passive (&amp;lt;code&amp;gt;NPP&amp;lt;/code&amp;gt;). When a record's input link specifies a database address, the record specified by the address will process only if the input link specifies process passive and only if the addressed record specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field. If the input link specifies no process passive (NPP), the addressed record will not be processed even if it is a passive record. Because output links such as OUT are always process passive, they always cause the specified record to be processed, provided that the specified record's SCAN field is configured as &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Be aware that other types of conversions may not be made when a value is retrieved from another record. Whether it does or doesn't depends on the record and the device support routine which the record specifies. Most records must specify a device support routine in their DTYP field. Device support routines take care of the specifics of input and output. For such records, there are device support routines for hardware I/O, and other routines for I/O between records. For example, the analog input has many device support routines for input from hardware, and two routines specific for retrieving input from other records: &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt; retrieves the input value and performs the specified linear conversions on the value (that is, if the record is configured to perform linear conversions). The &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine, on the other hand, reads the value directly into the VAL field and doesn't perform any linear conversions on the value.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Note: Link fields can reference records in a different database, that is, a database that resides in a different IOC. Records residing on different IOCs connect through channel access, so any link that refers to a record in another IOC is called a channel access link. The format of a channel access link does not differ from that of a regular database link.'''&lt;br /&gt;
&lt;br /&gt;
'''Channel access links are created when the database is initialized. When the initialization routines cannot find the link in the local database, a channel access link is created.'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As of Release 3.13.0, input and output links can also be forced to be Channel Access links, even when they are located in the same IOC. Input links can specify either CA, CP, or CPP. Specifying CA forces the input link to be a Channel Access link. When an input link becomes a Channel Access link, a Channel Access monitor is established on the field and a buffer is allocated for the field using the field type and the element count of the field. In addition to the value of the input link, the alarm status of the link is monitored. Specifying CP or CPP also forces the input link to be a Channel Access link, but in addition, CP or CPP will force the record that contains the link to be processed when a monitor occurs, that is, if the record is process passive.&lt;br /&gt;
&lt;br /&gt;
Output links can also specify CA, in which case they will be forced to be Channel Access links. When an output link becomes a Channel Access link, a buffer is allocated the first time a &amp;quot;put&amp;quot; operation occurs on the record containing the link. Each time a &amp;quot;put&amp;quot; occurs for the record, the data is retrieved from the buffer. And the buffer is updated. The CP and CPP options are not available for output links.&lt;br /&gt;
&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
&lt;br /&gt;
Because of the nature of Channel Access links, they cannot be process passive. For example, if an input link that specifies another record in another IOC but also specifies PP, the PP attribute will be ignored. Another aspect of Channel Access links is that they are never placed in the same lock set as the records they link to.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion, otherwise known as a breakpoint conversion. In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. Instead, this conversion is completed by performing a table lookup. The value read from the device is known as the ''raw value'', which is initially read into the RVAL (raw value) field. This raw value is then used to identify the line segment in which this value falls. Each entry of the table includes a beginning point for the segment, the floating engineering units value at the point, and the slope of the line segment. The conversion to the engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
 final value = eng. units + (raw value - first point) &amp;amp;times; slope&lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a persons trips over some wires, unplugging them, which disables the sensors, which means that a new value couldn't be scanned for the record. In that case, an alarm of INVALID severity will be triggered. When a system is being tested, an INVALID alarm can point to a simple configuration problem. However, when the system is actually on-line, an INVALID alarm can signal a much more serious problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severities, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Scan Alarm ===&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Read Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Write Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Limit Alarms ===&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
=== State Alarms ===&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=File:RecordProcessingPPExample.jpg&amp;diff=2925</id>
		<title>File:RecordProcessingPPExample.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=File:RecordProcessingPPExample.jpg&amp;diff=2925"/>
		<updated>2009-04-07T17:27:13Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: PPExample&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;PPExample&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1689</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1689"/>
		<updated>2009-04-07T17:18:12Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The periodic scan tasks run as close to the frequency specified as possible. When each periodic scan task starts, it calls the gettime routine, then processes all of the records on this period. After the processing, gettime is called again and this thread sleeps the difference between the scan period and the time to process the records. If the 1 second scan records take 100 milliseconds to process, then the 1 second scan period will start again 900 milliseconds after completion. The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.019 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The OSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_3.VAL, then the VAL field is fetched from the Input_3 record and placed in the A field of the CALC record. These data links have an attribute that specify if a passive record should be processed before the value is returned. The default for this attribute is NPP (no process passive). In this case, the record takes the VAL field and returns it. If they are set to PP (process passive), then the record is processed before the field is returned. In [[#Figure 2|''Figure 2'']]), the PP attribute is used. In this example, Output_3 is processed periodically. Record processing first fetching the DOL field. As the DOL field has the PP attribute set, before the VAL field of Calc_3 is returned, the record is processed. The first thing done by the ai record Input_3 does is to read the input. It then converts the RVAL field to engineering units and places this in the VAL field, checks alarms, posts monitors, and then returns. The calc record then fetches the VAL field field from Input_3, places it in the A field, computes the calculation, checks alarms, posts monitors, the returns. The ao record, Output_3, then fetches the VAL field from the CALC record, applies rate of change and limits, write the new value, checks alarms, posts monitors and completes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figurex1&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
For example, [[#Figure 1|''Figure 1'']] presents a VDCT schematic of two records, Record_1 and Record_2. Record_1 is an analog output record. Most output records have a DOL or Desired Output Link, from which they can retrieve the value that they output. Thus, the DOL link is an input link which can be process passive. The blue line connecting the records is a data link. In this case it means that the DOL link is connected to the VAL field of Record_2. In other words, Record_1 retrieves its value, the value that it outputs, from Record_2. When Record_1 begins processing, it will first retrieve the value from the field connected to DOL, which, in this case, is the VAL field of Record_2. If DOL is process passive, it will cause Record_1 to be processed when the value is retrieved. Record_2 will then process. After Record_1 finishes processing, the value from its VAL field will be retrieved by DOL. Record_1 will then finish its processing.&lt;br /&gt;
&lt;br /&gt;
If NPP is specified as an input link's attribute, the value is retrieved as is from the other record without causing the other record to process. So in the above example, if DOL didn't specify process passive, record 1 would not cause record 2 to process.&lt;br /&gt;
&lt;br /&gt;
Let's consider a few more examples of passive scanning.&lt;br /&gt;
&lt;br /&gt;
Consider a case where an analog output is controlled only by the operator. There is no reason to process this record until the operator changes the desired output. (This is done by writing to the VAL field.) If this record is passive, the database access routine that places the new desired output into the record will cause it to be processed immediately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The calculation record's SCAN field specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the SCAN field of the analog input Record_3 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt;, and the SCAN field of the analog input Record_4 specifies &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;. In this example the calculation will be processed every two seconds and whenever the I/O card interrupts. Thus, the calculation inherits the periodic scanning trait of the first analog input record and the I/O event scanning trait of the second. Each time the calc record Record_5 is processed, it will retrieve values from the locations specified in its input links and perform its calculation.&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingPhase.jpg|thumb|Description]]&lt;br /&gt;
[[Image:RecordProcessing1.jpg|Figure 2]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-1.gif|Figure 1]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-2.gif|Figure 2]]&lt;br /&gt;
&lt;br /&gt;
A more complex use of passive scanning causes passive records to inherit the scan traits of the records to which they are connected. Let's look at the simple case ([[#Figure 2|''Figure 2'']]) where two analog input records (AI) get their input from the VAL field of a calculation record (CALC). Each analog input (Record_3, Record_4) has a forward link (FLNK) pointing to the calculation record (Record_5). In VDCT, FLNKs connect directly to another record, unlike CapFast where FLNK connects to SLNK field. However, this is just a way to specify to which record FLNK points to. In EPICS, a FLNK of Record_3 and Record_4 merely contains the name of another record (Record_5).&lt;br /&gt;
&lt;br /&gt;
Next, let's look at a continuous control loop ([[#Figure 3|''Figure 3'']]). In this case the analog input Record_6, which is scanned every 0.1 seconds, has a forward link to the calculation record Record_7, and the calculation record, in turn, has a forward link to the analog output Record_8. Every 0.1 seconds the analog input will process, converting its value and causing the calc record to process. The calc record will make its calculation, causing the analog output record to process. The analog output will then write its output after fetching, if necessary, its desired output. If the operator changes a value in the calculation, this will also cause the calc record to perform its calculation and the analog output to write its output, since the calc and the analog output record are passive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-3.gif|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
Let's consider a case ([[#Figure 4|''Figure 4'']]) where values are fetched from other records via input links. When a record fetches a value from another record, the other record is first processed, only if the other record is passive and only if the link specifies process passive or &amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;. As an example, suppose a calculation record Record_11 has two input links, each of which specifies an analog input record (Record_9, Record_10) and each of which specifies process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;). Suppose also that the calculation record specifies &amp;lt;code&amp;gt;1 second&amp;lt;/code&amp;gt; in its SCAN field, meaning that it is scanned every second. Every second, the calc record will cause each analog input to process before fetching the values, provided that each analog input specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-4.gif|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In a variation of this example ([[#Figure 5|''Figure 5'']]), suppose one of the analog inputs Record_13 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt; in its SCAN field which means it would no longer be a passive record. Thus, the periodically scanned analog input will ''not'' be processed every time the calculation is processed. Its current value will simply be fetched as is; then the other analog input Record_12 will be processed and the calculation performed. The same thing would occur if the calculation's INPB link of calc Record_14 specified NPP or no process passive. In this case, even if the analog input's SCAN field specified &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the value would be fetched as is without causing the analog input to process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-5.gif|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Passive Scanning and Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
Passive scanning differs somewhat for Channel Access links. A Channel Access link is an input link or output link that specifies a link to a record located in another IOC (a forward processing link can be a CA link under certain circumstances). In addition, as of Release 3.13 input and output links can be forced to be Channel Access links even if they reference a record located in the same database. Input links can specify CA, CP, or CPP. If the input link specifies CA, it will be forced to be a Channel Access link. If the input link specifies CP, it will also be forced to be a Channel Access link; in addition, it will cause the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it means the same thing as CP, except that the record will be processed if and only if the record itself specifies passive in its SCAN field. Output links can specify CA, which will simply cause them to be Channel Access links.&lt;br /&gt;
&lt;br /&gt;
Channel Access links, be they between records located in different IOCs or between records located in the same IOC, cannot be process passive, e.g., they cannot cause the record they specify to process when written to or read from.&lt;br /&gt;
&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
== Forward Process Links ==&lt;br /&gt;
&lt;br /&gt;
When the ''forward processing link'' field (FLNK) of one record contains an address of a second record, it causes the second record to be processed after the first record is itself processed.&lt;br /&gt;
&lt;br /&gt;
We discussed forward links in the section on [[#Passive Scanning|passive processing]]. To reiterate, this field causes the record that it specifies to be scanned when the record that contains the forward link is scanned. It is thus used to cause related records to process. (For more on specifying records in link fields, see [[#Address Specification|''Address Specification'']]).&lt;br /&gt;
&lt;br /&gt;
If a forward link references the PROC field of a record in another IOC, a Channel Access &amp;quot; put&amp;quot; request is directed to the specified record, causing it to process.&lt;br /&gt;
&lt;br /&gt;
One record type exists solely to propagate forward processing: the fanout record. The fanout record is used when there is more than one record which needs to be processed as a result of another record being processed. It can specify as many as six forward links. Let's look at an example where an analog input's value is used in two different calculations ([[#Figure 7|''Figure 7'']]). Because there is only one forward processing link in the analog input record, it is used to process the fanout record. Here two of the fanout records forward links are used to link to two calculation records. In the example, when the I/O interrupt occurs, the analog input is processed, then the fanout record is processed, causing each of the calculation records to be processed. Note that the fanout record simply causes the specified records to process. It does not send values to other records. The ''data fanout'' record, on the other hand, does send values to other records. Refer to [[RRM 3-14 Fanout|''Fanout'']], and [[RRM 3-14 Dfanout|''dfanout'']], for more information on the fanout and data fanout records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_7&amp;quot;&amp;gt;Figure 7&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-7.gif|Figure 7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name entered in Capfast (or whatever other configuration tool) can be a mix of upper and lower case letters. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
For inputs and desired output links, the specified record is processed before the value has been read, and for output links the specified record is processed after the value has been written. In the case of the forward processing link, the record being referenced is processed after the record making the link is processed.&lt;br /&gt;
&lt;br /&gt;
Remember that input links such as INP and DOL (desired output location), can specify process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;) or no process passive (&amp;lt;code&amp;gt;NPP&amp;lt;/code&amp;gt;). When a record's input link specifies a database address, the record specified by the address will process only if the input link specifies process passive and only if the addressed record specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field. If the input link specifies no process passive (NPP), the addressed record will not be processed even if it is a passive record. Because output links such as OUT are always process passive, they always cause the specified record to be processed, provided that the specified record's SCAN field is configured as &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Be aware that other types of conversions may not be made when a value is retrieved from another record. Whether it does or doesn't depends on the record and the device support routine which the record specifies. Most records must specify a device support routine in their DTYP field. Device support routines take care of the specifics of input and output. For such records, there are device support routines for hardware I/O, and other routines for I/O between records. For example, the analog input has many device support routines for input from hardware, and two routines specific for retrieving input from other records: &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt; retrieves the input value and performs the specified linear conversions on the value (that is, if the record is configured to perform linear conversions). The &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine, on the other hand, reads the value directly into the VAL field and doesn't perform any linear conversions on the value.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Note: Link fields can reference records in a different database, that is, a database that resides in a different IOC. Records residing on different IOCs connect through channel access, so any link that refers to a record in another IOC is called a channel access link. The format of a channel access link does not differ from that of a regular database link.'''&lt;br /&gt;
&lt;br /&gt;
'''Channel access links are created when the database is initialized. When the initialization routines cannot find the link in the local database, a channel access link is created.'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As of Release 3.13.0, input and output links can also be forced to be Channel Access links, even when they are located in the same IOC. Input links can specify either CA, CP, or CPP. Specifying CA forces the input link to be a Channel Access link. When an input link becomes a Channel Access link, a Channel Access monitor is established on the field and a buffer is allocated for the field using the field type and the element count of the field. In addition to the value of the input link, the alarm status of the link is monitored. Specifying CP or CPP also forces the input link to be a Channel Access link, but in addition, CP or CPP will force the record that contains the link to be processed when a monitor occurs, that is, if the record is process passive.&lt;br /&gt;
&lt;br /&gt;
Output links can also specify CA, in which case they will be forced to be Channel Access links. When an output link becomes a Channel Access link, a buffer is allocated the first time a &amp;quot;put&amp;quot; operation occurs on the record containing the link. Each time a &amp;quot;put&amp;quot; occurs for the record, the data is retrieved from the buffer. And the buffer is updated. The CP and CPP options are not available for output links.&lt;br /&gt;
&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
&lt;br /&gt;
Because of the nature of Channel Access links, they cannot be process passive. For example, if an input link that specifies another record in another IOC but also specifies PP, the PP attribute will be ignored. Another aspect of Channel Access links is that they are never placed in the same lock set as the records they link to.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion, otherwise known as a breakpoint conversion. In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. Instead, this conversion is completed by performing a table lookup. The value read from the device is known as the ''raw value'', which is initially read into the RVAL (raw value) field. This raw value is then used to identify the line segment in which this value falls. Each entry of the table includes a beginning point for the segment, the floating engineering units value at the point, and the slope of the line segment. The conversion to the engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
 final value = eng. units + (raw value - first point) &amp;amp;times; slope&lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a persons trips over some wires, unplugging them, which disables the sensors, which means that a new value couldn't be scanned for the record. In that case, an alarm of INVALID severity will be triggered. When a system is being tested, an INVALID alarm can point to a simple configuration problem. However, when the system is actually on-line, an INVALID alarm can signal a much more serious problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severities, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Scan Alarm ===&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Read Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Write Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Limit Alarms ===&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
=== State Alarms ===&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1688</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1688"/>
		<updated>2009-04-07T17:05:16Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.019 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The OSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1]]&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_2.VAL, then the VAL field is fetched from the Input_2 record and placed in the A field of the CALC record. These data links have an attribute that can cause the record to be processed before the field is returned. In figure 2,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figurex1&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
For example, [[#Figure 1|''Figure 1'']] presents a VDCT schematic of two records, Record_1 and Record_2. Record_1 is an analog output record. Most output records have a DOL or Desired Output Link, from which they can retrieve the value that they output. Thus, the DOL link is an input link which can be process passive. The blue line connecting the records is a data link. In this case it means that the DOL link is connected to the VAL field of Record_2. In other words, Record_1 retrieves its value, the value that it outputs, from Record_2. When Record_1 begins processing, it will first retrieve the value from the field connected to DOL, which, in this case, is the VAL field of Record_2. If DOL is process passive, it will cause Record_1 to be processed when the value is retrieved. Record_2 will then process. After Record_1 finishes processing, the value from its VAL field will be retrieved by DOL. Record_1 will then finish its processing.&lt;br /&gt;
&lt;br /&gt;
If NPP is specified as an input link's attribute, the value is retrieved as is from the other record without causing the other record to process. So in the above example, if DOL didn't specify process passive, record 1 would not cause record 2 to process.&lt;br /&gt;
&lt;br /&gt;
Let's consider a few more examples of passive scanning.&lt;br /&gt;
&lt;br /&gt;
Consider a case where an analog output is controlled only by the operator. There is no reason to process this record until the operator changes the desired output. (This is done by writing to the VAL field.) If this record is passive, the database access routine that places the new desired output into the record will cause it to be processed immediately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The calculation record's SCAN field specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the SCAN field of the analog input Record_3 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt;, and the SCAN field of the analog input Record_4 specifies &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;. In this example the calculation will be processed every two seconds and whenever the I/O card interrupts. Thus, the calculation inherits the periodic scanning trait of the first analog input record and the I/O event scanning trait of the second. Each time the calc record Record_5 is processed, it will retrieve values from the locations specified in its input links and perform its calculation.&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingPhase.jpg|thumb|Description]]&lt;br /&gt;
[[Image:RecordProcessing1.jpg|Figure 2]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-1.gif|Figure 1]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-2.gif|Figure 2]]&lt;br /&gt;
&lt;br /&gt;
A more complex use of passive scanning causes passive records to inherit the scan traits of the records to which they are connected. Let's look at the simple case ([[#Figure 2|''Figure 2'']]) where two analog input records (AI) get their input from the VAL field of a calculation record (CALC). Each analog input (Record_3, Record_4) has a forward link (FLNK) pointing to the calculation record (Record_5). In VDCT, FLNKs connect directly to another record, unlike CapFast where FLNK connects to SLNK field. However, this is just a way to specify to which record FLNK points to. In EPICS, a FLNK of Record_3 and Record_4 merely contains the name of another record (Record_5).&lt;br /&gt;
&lt;br /&gt;
Next, let's look at a continuous control loop ([[#Figure 3|''Figure 3'']]). In this case the analog input Record_6, which is scanned every 0.1 seconds, has a forward link to the calculation record Record_7, and the calculation record, in turn, has a forward link to the analog output Record_8. Every 0.1 seconds the analog input will process, converting its value and causing the calc record to process. The calc record will make its calculation, causing the analog output record to process. The analog output will then write its output after fetching, if necessary, its desired output. If the operator changes a value in the calculation, this will also cause the calc record to perform its calculation and the analog output to write its output, since the calc and the analog output record are passive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-3.gif|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
Let's consider a case ([[#Figure 4|''Figure 4'']]) where values are fetched from other records via input links. When a record fetches a value from another record, the other record is first processed, only if the other record is passive and only if the link specifies process passive or &amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;. As an example, suppose a calculation record Record_11 has two input links, each of which specifies an analog input record (Record_9, Record_10) and each of which specifies process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;). Suppose also that the calculation record specifies &amp;lt;code&amp;gt;1 second&amp;lt;/code&amp;gt; in its SCAN field, meaning that it is scanned every second. Every second, the calc record will cause each analog input to process before fetching the values, provided that each analog input specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-4.gif|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In a variation of this example ([[#Figure 5|''Figure 5'']]), suppose one of the analog inputs Record_13 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt; in its SCAN field which means it would no longer be a passive record. Thus, the periodically scanned analog input will ''not'' be processed every time the calculation is processed. Its current value will simply be fetched as is; then the other analog input Record_12 will be processed and the calculation performed. The same thing would occur if the calculation's INPB link of calc Record_14 specified NPP or no process passive. In this case, even if the analog input's SCAN field specified &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the value would be fetched as is without causing the analog input to process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-5.gif|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Passive Scanning and Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
Passive scanning differs somewhat for Channel Access links. A Channel Access link is an input link or output link that specifies a link to a record located in another IOC (a forward processing link can be a CA link under certain circumstances). In addition, as of Release 3.13 input and output links can be forced to be Channel Access links even if they reference a record located in the same database. Input links can specify CA, CP, or CPP. If the input link specifies CA, it will be forced to be a Channel Access link. If the input link specifies CP, it will also be forced to be a Channel Access link; in addition, it will cause the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it means the same thing as CP, except that the record will be processed if and only if the record itself specifies passive in its SCAN field. Output links can specify CA, which will simply cause them to be Channel Access links.&lt;br /&gt;
&lt;br /&gt;
Channel Access links, be they between records located in different IOCs or between records located in the same IOC, cannot be process passive, e.g., they cannot cause the record they specify to process when written to or read from.&lt;br /&gt;
&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
== Forward Process Links ==&lt;br /&gt;
&lt;br /&gt;
When the ''forward processing link'' field (FLNK) of one record contains an address of a second record, it causes the second record to be processed after the first record is itself processed.&lt;br /&gt;
&lt;br /&gt;
We discussed forward links in the section on [[#Passive Scanning|passive processing]]. To reiterate, this field causes the record that it specifies to be scanned when the record that contains the forward link is scanned. It is thus used to cause related records to process. (For more on specifying records in link fields, see [[#Address Specification|''Address Specification'']]).&lt;br /&gt;
&lt;br /&gt;
If a forward link references the PROC field of a record in another IOC, a Channel Access &amp;quot; put&amp;quot; request is directed to the specified record, causing it to process.&lt;br /&gt;
&lt;br /&gt;
One record type exists solely to propagate forward processing: the fanout record. The fanout record is used when there is more than one record which needs to be processed as a result of another record being processed. It can specify as many as six forward links. Let's look at an example where an analog input's value is used in two different calculations ([[#Figure 7|''Figure 7'']]). Because there is only one forward processing link in the analog input record, it is used to process the fanout record. Here two of the fanout records forward links are used to link to two calculation records. In the example, when the I/O interrupt occurs, the analog input is processed, then the fanout record is processed, causing each of the calculation records to be processed. Note that the fanout record simply causes the specified records to process. It does not send values to other records. The ''data fanout'' record, on the other hand, does send values to other records. Refer to [[RRM 3-14 Fanout|''Fanout'']], and [[RRM 3-14 Dfanout|''dfanout'']], for more information on the fanout and data fanout records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_7&amp;quot;&amp;gt;Figure 7&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-7.gif|Figure 7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name entered in Capfast (or whatever other configuration tool) can be a mix of upper and lower case letters. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
For inputs and desired output links, the specified record is processed before the value has been read, and for output links the specified record is processed after the value has been written. In the case of the forward processing link, the record being referenced is processed after the record making the link is processed.&lt;br /&gt;
&lt;br /&gt;
Remember that input links such as INP and DOL (desired output location), can specify process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;) or no process passive (&amp;lt;code&amp;gt;NPP&amp;lt;/code&amp;gt;). When a record's input link specifies a database address, the record specified by the address will process only if the input link specifies process passive and only if the addressed record specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field. If the input link specifies no process passive (NPP), the addressed record will not be processed even if it is a passive record. Because output links such as OUT are always process passive, they always cause the specified record to be processed, provided that the specified record's SCAN field is configured as &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Be aware that other types of conversions may not be made when a value is retrieved from another record. Whether it does or doesn't depends on the record and the device support routine which the record specifies. Most records must specify a device support routine in their DTYP field. Device support routines take care of the specifics of input and output. For such records, there are device support routines for hardware I/O, and other routines for I/O between records. For example, the analog input has many device support routines for input from hardware, and two routines specific for retrieving input from other records: &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt; retrieves the input value and performs the specified linear conversions on the value (that is, if the record is configured to perform linear conversions). The &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine, on the other hand, reads the value directly into the VAL field and doesn't perform any linear conversions on the value.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Note: Link fields can reference records in a different database, that is, a database that resides in a different IOC. Records residing on different IOCs connect through channel access, so any link that refers to a record in another IOC is called a channel access link. The format of a channel access link does not differ from that of a regular database link.'''&lt;br /&gt;
&lt;br /&gt;
'''Channel access links are created when the database is initialized. When the initialization routines cannot find the link in the local database, a channel access link is created.'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As of Release 3.13.0, input and output links can also be forced to be Channel Access links, even when they are located in the same IOC. Input links can specify either CA, CP, or CPP. Specifying CA forces the input link to be a Channel Access link. When an input link becomes a Channel Access link, a Channel Access monitor is established on the field and a buffer is allocated for the field using the field type and the element count of the field. In addition to the value of the input link, the alarm status of the link is monitored. Specifying CP or CPP also forces the input link to be a Channel Access link, but in addition, CP or CPP will force the record that contains the link to be processed when a monitor occurs, that is, if the record is process passive.&lt;br /&gt;
&lt;br /&gt;
Output links can also specify CA, in which case they will be forced to be Channel Access links. When an output link becomes a Channel Access link, a buffer is allocated the first time a &amp;quot;put&amp;quot; operation occurs on the record containing the link. Each time a &amp;quot;put&amp;quot; occurs for the record, the data is retrieved from the buffer. And the buffer is updated. The CP and CPP options are not available for output links.&lt;br /&gt;
&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
&lt;br /&gt;
Because of the nature of Channel Access links, they cannot be process passive. For example, if an input link that specifies another record in another IOC but also specifies PP, the PP attribute will be ignored. Another aspect of Channel Access links is that they are never placed in the same lock set as the records they link to.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion, otherwise known as a breakpoint conversion. In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. Instead, this conversion is completed by performing a table lookup. The value read from the device is known as the ''raw value'', which is initially read into the RVAL (raw value) field. This raw value is then used to identify the line segment in which this value falls. Each entry of the table includes a beginning point for the segment, the floating engineering units value at the point, and the slope of the line segment. The conversion to the engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
 final value = eng. units + (raw value - first point) &amp;amp;times; slope&lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a persons trips over some wires, unplugging them, which disables the sensors, which means that a new value couldn't be scanned for the record. In that case, an alarm of INVALID severity will be triggered. When a system is being tested, an INVALID alarm can point to a simple configuration problem. However, when the system is actually on-line, an INVALID alarm can signal a much more serious problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severities, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Scan Alarm ===&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Read Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Write Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Limit Alarms ===&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
=== State Alarms ===&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1687</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1687"/>
		<updated>2009-04-07T17:01:57Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.019 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The OSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure 1:&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure_1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A more complex use of passive scanning causes passive records to inherit the scan traits of the records to which they are connected. Let's look at the simple case ([[#Figure 2|''Figure 2'']]) where two analog input records (AI) get their input from the VAL field of a calculation record (CALC). Each analog input (Record_3, Record_4) has a forward link (FLNK) pointing to the calculation record (Record_5). In VDCT, FLNKs connect directly to another record, unlike CapFast where FLNK connects to SLNK field. However, this is just a way to specify to which record FLNK points to. In EPICS, a FLNK of Record_3 and Record_4 merely contains the name of another record (Record_5).&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_2.VAL, then the VAL field is fetched from the Input_2 record and placed in the A field of the CALC record. These data links have an attribute that can cause the record to be processed before the field is returned. In figure 2,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_1&amp;quot;&amp;gt;Figurex1&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
For example, [[#Figure 1|''Figure 1'']] presents a VDCT schematic of two records, Record_1 and Record_2. Record_1 is an analog output record. Most output records have a DOL or Desired Output Link, from which they can retrieve the value that they output. Thus, the DOL link is an input link which can be process passive. The blue line connecting the records is a data link. In this case it means that the DOL link is connected to the VAL field of Record_2. In other words, Record_1 retrieves its value, the value that it outputs, from Record_2. When Record_1 begins processing, it will first retrieve the value from the field connected to DOL, which, in this case, is the VAL field of Record_2. If DOL is process passive, it will cause Record_1 to be processed when the value is retrieved. Record_2 will then process. After Record_1 finishes processing, the value from its VAL field will be retrieved by DOL. Record_1 will then finish its processing.&lt;br /&gt;
&lt;br /&gt;
If NPP is specified as an input link's attribute, the value is retrieved as is from the other record without causing the other record to process. So in the above example, if DOL didn't specify process passive, record 1 would not cause record 2 to process.&lt;br /&gt;
&lt;br /&gt;
Let's consider a few more examples of passive scanning.&lt;br /&gt;
&lt;br /&gt;
Consider a case where an analog output is controlled only by the operator. There is no reason to process this record until the operator changes the desired output. (This is done by writing to the VAL field.) If this record is passive, the database access routine that places the new desired output into the record will cause it to be processed immediately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The calculation record's SCAN field specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the SCAN field of the analog input Record_3 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt;, and the SCAN field of the analog input Record_4 specifies &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;. In this example the calculation will be processed every two seconds and whenever the I/O card interrupts. Thus, the calculation inherits the periodic scanning trait of the first analog input record and the I/O event scanning trait of the second. Each time the calc record Record_5 is processed, it will retrieve values from the locations specified in its input links and perform its calculation.&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingPhase.jpg|thumb|Description]]&lt;br /&gt;
[[Image:RecordProcessing1.jpg|Figure 2]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-1.gif|Figure 1]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-2.gif|Figure 2]]&lt;br /&gt;
&lt;br /&gt;
Next, let's look at a continuous control loop ([[#Figure 3|''Figure 3'']]). In this case the analog input Record_6, which is scanned every 0.1 seconds, has a forward link to the calculation record Record_7, and the calculation record, in turn, has a forward link to the analog output Record_8. Every 0.1 seconds the analog input will process, converting its value and causing the calc record to process. The calc record will make its calculation, causing the analog output record to process. The analog output will then write its output after fetching, if necessary, its desired output. If the operator changes a value in the calculation, this will also cause the calc record to perform its calculation and the analog output to write its output, since the calc and the analog output record are passive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-3.gif|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
Let's consider a case ([[#Figure 4|''Figure 4'']]) where values are fetched from other records via input links. When a record fetches a value from another record, the other record is first processed, only if the other record is passive and only if the link specifies process passive or &amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;. As an example, suppose a calculation record Record_11 has two input links, each of which specifies an analog input record (Record_9, Record_10) and each of which specifies process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;). Suppose also that the calculation record specifies &amp;lt;code&amp;gt;1 second&amp;lt;/code&amp;gt; in its SCAN field, meaning that it is scanned every second. Every second, the calc record will cause each analog input to process before fetching the values, provided that each analog input specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-4.gif|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In a variation of this example ([[#Figure 5|''Figure 5'']]), suppose one of the analog inputs Record_13 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt; in its SCAN field which means it would no longer be a passive record. Thus, the periodically scanned analog input will ''not'' be processed every time the calculation is processed. Its current value will simply be fetched as is; then the other analog input Record_12 will be processed and the calculation performed. The same thing would occur if the calculation's INPB link of calc Record_14 specified NPP or no process passive. In this case, even if the analog input's SCAN field specified &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the value would be fetched as is without causing the analog input to process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-5.gif|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Passive Scanning and Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
Passive scanning differs somewhat for Channel Access links. A Channel Access link is an input link or output link that specifies a link to a record located in another IOC (a forward processing link can be a CA link under certain circumstances). In addition, as of Release 3.13 input and output links can be forced to be Channel Access links even if they reference a record located in the same database. Input links can specify CA, CP, or CPP. If the input link specifies CA, it will be forced to be a Channel Access link. If the input link specifies CP, it will also be forced to be a Channel Access link; in addition, it will cause the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it means the same thing as CP, except that the record will be processed if and only if the record itself specifies passive in its SCAN field. Output links can specify CA, which will simply cause them to be Channel Access links.&lt;br /&gt;
&lt;br /&gt;
Channel Access links, be they between records located in different IOCs or between records located in the same IOC, cannot be process passive, e.g., they cannot cause the record they specify to process when written to or read from.&lt;br /&gt;
&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
== Forward Process Links ==&lt;br /&gt;
&lt;br /&gt;
When the ''forward processing link'' field (FLNK) of one record contains an address of a second record, it causes the second record to be processed after the first record is itself processed.&lt;br /&gt;
&lt;br /&gt;
We discussed forward links in the section on [[#Passive Scanning|passive processing]]. To reiterate, this field causes the record that it specifies to be scanned when the record that contains the forward link is scanned. It is thus used to cause related records to process. (For more on specifying records in link fields, see [[#Address Specification|''Address Specification'']]).&lt;br /&gt;
&lt;br /&gt;
If a forward link references the PROC field of a record in another IOC, a Channel Access &amp;quot; put&amp;quot; request is directed to the specified record, causing it to process.&lt;br /&gt;
&lt;br /&gt;
One record type exists solely to propagate forward processing: the fanout record. The fanout record is used when there is more than one record which needs to be processed as a result of another record being processed. It can specify as many as six forward links. Let's look at an example where an analog input's value is used in two different calculations ([[#Figure 7|''Figure 7'']]). Because there is only one forward processing link in the analog input record, it is used to process the fanout record. Here two of the fanout records forward links are used to link to two calculation records. In the example, when the I/O interrupt occurs, the analog input is processed, then the fanout record is processed, causing each of the calculation records to be processed. Note that the fanout record simply causes the specified records to process. It does not send values to other records. The ''data fanout'' record, on the other hand, does send values to other records. Refer to [[RRM 3-14 Fanout|''Fanout'']], and [[RRM 3-14 Dfanout|''dfanout'']], for more information on the fanout and data fanout records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_7&amp;quot;&amp;gt;Figure 7&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-7.gif|Figure 7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name entered in Capfast (or whatever other configuration tool) can be a mix of upper and lower case letters. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
For inputs and desired output links, the specified record is processed before the value has been read, and for output links the specified record is processed after the value has been written. In the case of the forward processing link, the record being referenced is processed after the record making the link is processed.&lt;br /&gt;
&lt;br /&gt;
Remember that input links such as INP and DOL (desired output location), can specify process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;) or no process passive (&amp;lt;code&amp;gt;NPP&amp;lt;/code&amp;gt;). When a record's input link specifies a database address, the record specified by the address will process only if the input link specifies process passive and only if the addressed record specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field. If the input link specifies no process passive (NPP), the addressed record will not be processed even if it is a passive record. Because output links such as OUT are always process passive, they always cause the specified record to be processed, provided that the specified record's SCAN field is configured as &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Be aware that other types of conversions may not be made when a value is retrieved from another record. Whether it does or doesn't depends on the record and the device support routine which the record specifies. Most records must specify a device support routine in their DTYP field. Device support routines take care of the specifics of input and output. For such records, there are device support routines for hardware I/O, and other routines for I/O between records. For example, the analog input has many device support routines for input from hardware, and two routines specific for retrieving input from other records: &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt; retrieves the input value and performs the specified linear conversions on the value (that is, if the record is configured to perform linear conversions). The &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine, on the other hand, reads the value directly into the VAL field and doesn't perform any linear conversions on the value.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Note: Link fields can reference records in a different database, that is, a database that resides in a different IOC. Records residing on different IOCs connect through channel access, so any link that refers to a record in another IOC is called a channel access link. The format of a channel access link does not differ from that of a regular database link.'''&lt;br /&gt;
&lt;br /&gt;
'''Channel access links are created when the database is initialized. When the initialization routines cannot find the link in the local database, a channel access link is created.'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As of Release 3.13.0, input and output links can also be forced to be Channel Access links, even when they are located in the same IOC. Input links can specify either CA, CP, or CPP. Specifying CA forces the input link to be a Channel Access link. When an input link becomes a Channel Access link, a Channel Access monitor is established on the field and a buffer is allocated for the field using the field type and the element count of the field. In addition to the value of the input link, the alarm status of the link is monitored. Specifying CP or CPP also forces the input link to be a Channel Access link, but in addition, CP or CPP will force the record that contains the link to be processed when a monitor occurs, that is, if the record is process passive.&lt;br /&gt;
&lt;br /&gt;
Output links can also specify CA, in which case they will be forced to be Channel Access links. When an output link becomes a Channel Access link, a buffer is allocated the first time a &amp;quot;put&amp;quot; operation occurs on the record containing the link. Each time a &amp;quot;put&amp;quot; occurs for the record, the data is retrieved from the buffer. And the buffer is updated. The CP and CPP options are not available for output links.&lt;br /&gt;
&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
&lt;br /&gt;
Because of the nature of Channel Access links, they cannot be process passive. For example, if an input link that specifies another record in another IOC but also specifies PP, the PP attribute will be ignored. Another aspect of Channel Access links is that they are never placed in the same lock set as the records they link to.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion, otherwise known as a breakpoint conversion. In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. Instead, this conversion is completed by performing a table lookup. The value read from the device is known as the ''raw value'', which is initially read into the RVAL (raw value) field. This raw value is then used to identify the line segment in which this value falls. Each entry of the table includes a beginning point for the segment, the floating engineering units value at the point, and the slope of the line segment. The conversion to the engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
 final value = eng. units + (raw value - first point) &amp;amp;times; slope&lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a persons trips over some wires, unplugging them, which disables the sensors, which means that a new value couldn't be scanned for the record. In that case, an alarm of INVALID severity will be triggered. When a system is being tested, an INVALID alarm can point to a simple configuration problem. However, when the system is actually on-line, an INVALID alarm can signal a much more serious problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severities, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Scan Alarm ===&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Read Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Write Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Limit Alarms ===&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
=== State Alarms ===&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1686</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1686"/>
		<updated>2009-04-07T17:00:05Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.019 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The OSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In ([[#Figure 1|''Figure 1x'']]), three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_1:&amp;quot;&amp;gt;Figure 1: Forward Link&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure_1]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A more complex use of passive scanning causes passive records to inherit the scan traits of the records to which they are connected. Let's look at the simple case ([[#Figure 2|''Figure 2'']]) where two analog input records (AI) get their input from the VAL field of a calculation record (CALC). Each analog input (Record_3, Record_4) has a forward link (FLNK) pointing to the calculation record (Record_5). In VDCT, FLNKs connect directly to another record, unlike CapFast where FLNK connects to SLNK field. However, this is just a way to specify to which record FLNK points to. In EPICS, a FLNK of Record_3 and Record_4 merely contains the name of another record (Record_5).&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_2.VAL, then the VAL field is fetched from the Input_2 record and placed in the A field of the CALC record. These data links have an attribute that can cause the record to be processed before the field is returned. In figure 2,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_1&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
For example, [[#Figure 1|''Figure 1'']] presents a VDCT schematic of two records, Record_1 and Record_2. Record_1 is an analog output record. Most output records have a DOL or Desired Output Link, from which they can retrieve the value that they output. Thus, the DOL link is an input link which can be process passive. The blue line connecting the records is a data link. In this case it means that the DOL link is connected to the VAL field of Record_2. In other words, Record_1 retrieves its value, the value that it outputs, from Record_2. When Record_1 begins processing, it will first retrieve the value from the field connected to DOL, which, in this case, is the VAL field of Record_2. If DOL is process passive, it will cause Record_1 to be processed when the value is retrieved. Record_2 will then process. After Record_1 finishes processing, the value from its VAL field will be retrieved by DOL. Record_1 will then finish its processing.&lt;br /&gt;
&lt;br /&gt;
If NPP is specified as an input link's attribute, the value is retrieved as is from the other record without causing the other record to process. So in the above example, if DOL didn't specify process passive, record 1 would not cause record 2 to process.&lt;br /&gt;
&lt;br /&gt;
Let's consider a few more examples of passive scanning.&lt;br /&gt;
&lt;br /&gt;
Consider a case where an analog output is controlled only by the operator. There is no reason to process this record until the operator changes the desired output. (This is done by writing to the VAL field.) If this record is passive, the database access routine that places the new desired output into the record will cause it to be processed immediately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The calculation record's SCAN field specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the SCAN field of the analog input Record_3 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt;, and the SCAN field of the analog input Record_4 specifies &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;. In this example the calculation will be processed every two seconds and whenever the I/O card interrupts. Thus, the calculation inherits the periodic scanning trait of the first analog input record and the I/O event scanning trait of the second. Each time the calc record Record_5 is processed, it will retrieve values from the locations specified in its input links and perform its calculation.&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingPhase.jpg|thumb|Description]]&lt;br /&gt;
[[Image:RecordProcessing1.jpg|Figure 2]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-1.gif|Figure 1]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-2.gif|Figure 2]]&lt;br /&gt;
&lt;br /&gt;
Next, let's look at a continuous control loop ([[#Figure 3|''Figure 3'']]). In this case the analog input Record_6, which is scanned every 0.1 seconds, has a forward link to the calculation record Record_7, and the calculation record, in turn, has a forward link to the analog output Record_8. Every 0.1 seconds the analog input will process, converting its value and causing the calc record to process. The calc record will make its calculation, causing the analog output record to process. The analog output will then write its output after fetching, if necessary, its desired output. If the operator changes a value in the calculation, this will also cause the calc record to perform its calculation and the analog output to write its output, since the calc and the analog output record are passive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-3.gif|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
Let's consider a case ([[#Figure 4|''Figure 4'']]) where values are fetched from other records via input links. When a record fetches a value from another record, the other record is first processed, only if the other record is passive and only if the link specifies process passive or &amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;. As an example, suppose a calculation record Record_11 has two input links, each of which specifies an analog input record (Record_9, Record_10) and each of which specifies process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;). Suppose also that the calculation record specifies &amp;lt;code&amp;gt;1 second&amp;lt;/code&amp;gt; in its SCAN field, meaning that it is scanned every second. Every second, the calc record will cause each analog input to process before fetching the values, provided that each analog input specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-4.gif|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In a variation of this example ([[#Figure 5|''Figure 5'']]), suppose one of the analog inputs Record_13 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt; in its SCAN field which means it would no longer be a passive record. Thus, the periodically scanned analog input will ''not'' be processed every time the calculation is processed. Its current value will simply be fetched as is; then the other analog input Record_12 will be processed and the calculation performed. The same thing would occur if the calculation's INPB link of calc Record_14 specified NPP or no process passive. In this case, even if the analog input's SCAN field specified &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the value would be fetched as is without causing the analog input to process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-5.gif|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Passive Scanning and Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
Passive scanning differs somewhat for Channel Access links. A Channel Access link is an input link or output link that specifies a link to a record located in another IOC (a forward processing link can be a CA link under certain circumstances). In addition, as of Release 3.13 input and output links can be forced to be Channel Access links even if they reference a record located in the same database. Input links can specify CA, CP, or CPP. If the input link specifies CA, it will be forced to be a Channel Access link. If the input link specifies CP, it will also be forced to be a Channel Access link; in addition, it will cause the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it means the same thing as CP, except that the record will be processed if and only if the record itself specifies passive in its SCAN field. Output links can specify CA, which will simply cause them to be Channel Access links.&lt;br /&gt;
&lt;br /&gt;
Channel Access links, be they between records located in different IOCs or between records located in the same IOC, cannot be process passive, e.g., they cannot cause the record they specify to process when written to or read from.&lt;br /&gt;
&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
== Forward Process Links ==&lt;br /&gt;
&lt;br /&gt;
When the ''forward processing link'' field (FLNK) of one record contains an address of a second record, it causes the second record to be processed after the first record is itself processed.&lt;br /&gt;
&lt;br /&gt;
We discussed forward links in the section on [[#Passive Scanning|passive processing]]. To reiterate, this field causes the record that it specifies to be scanned when the record that contains the forward link is scanned. It is thus used to cause related records to process. (For more on specifying records in link fields, see [[#Address Specification|''Address Specification'']]).&lt;br /&gt;
&lt;br /&gt;
If a forward link references the PROC field of a record in another IOC, a Channel Access &amp;quot; put&amp;quot; request is directed to the specified record, causing it to process.&lt;br /&gt;
&lt;br /&gt;
One record type exists solely to propagate forward processing: the fanout record. The fanout record is used when there is more than one record which needs to be processed as a result of another record being processed. It can specify as many as six forward links. Let's look at an example where an analog input's value is used in two different calculations ([[#Figure 7|''Figure 7'']]). Because there is only one forward processing link in the analog input record, it is used to process the fanout record. Here two of the fanout records forward links are used to link to two calculation records. In the example, when the I/O interrupt occurs, the analog input is processed, then the fanout record is processed, causing each of the calculation records to be processed. Note that the fanout record simply causes the specified records to process. It does not send values to other records. The ''data fanout'' record, on the other hand, does send values to other records. Refer to [[RRM 3-14 Fanout|''Fanout'']], and [[RRM 3-14 Dfanout|''dfanout'']], for more information on the fanout and data fanout records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_7&amp;quot;&amp;gt;Figure 7&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-7.gif|Figure 7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name entered in Capfast (or whatever other configuration tool) can be a mix of upper and lower case letters. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
For inputs and desired output links, the specified record is processed before the value has been read, and for output links the specified record is processed after the value has been written. In the case of the forward processing link, the record being referenced is processed after the record making the link is processed.&lt;br /&gt;
&lt;br /&gt;
Remember that input links such as INP and DOL (desired output location), can specify process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;) or no process passive (&amp;lt;code&amp;gt;NPP&amp;lt;/code&amp;gt;). When a record's input link specifies a database address, the record specified by the address will process only if the input link specifies process passive and only if the addressed record specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field. If the input link specifies no process passive (NPP), the addressed record will not be processed even if it is a passive record. Because output links such as OUT are always process passive, they always cause the specified record to be processed, provided that the specified record's SCAN field is configured as &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Be aware that other types of conversions may not be made when a value is retrieved from another record. Whether it does or doesn't depends on the record and the device support routine which the record specifies. Most records must specify a device support routine in their DTYP field. Device support routines take care of the specifics of input and output. For such records, there are device support routines for hardware I/O, and other routines for I/O between records. For example, the analog input has many device support routines for input from hardware, and two routines specific for retrieving input from other records: &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt; retrieves the input value and performs the specified linear conversions on the value (that is, if the record is configured to perform linear conversions). The &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine, on the other hand, reads the value directly into the VAL field and doesn't perform any linear conversions on the value.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Note: Link fields can reference records in a different database, that is, a database that resides in a different IOC. Records residing on different IOCs connect through channel access, so any link that refers to a record in another IOC is called a channel access link. The format of a channel access link does not differ from that of a regular database link.'''&lt;br /&gt;
&lt;br /&gt;
'''Channel access links are created when the database is initialized. When the initialization routines cannot find the link in the local database, a channel access link is created.'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As of Release 3.13.0, input and output links can also be forced to be Channel Access links, even when they are located in the same IOC. Input links can specify either CA, CP, or CPP. Specifying CA forces the input link to be a Channel Access link. When an input link becomes a Channel Access link, a Channel Access monitor is established on the field and a buffer is allocated for the field using the field type and the element count of the field. In addition to the value of the input link, the alarm status of the link is monitored. Specifying CP or CPP also forces the input link to be a Channel Access link, but in addition, CP or CPP will force the record that contains the link to be processed when a monitor occurs, that is, if the record is process passive.&lt;br /&gt;
&lt;br /&gt;
Output links can also specify CA, in which case they will be forced to be Channel Access links. When an output link becomes a Channel Access link, a buffer is allocated the first time a &amp;quot;put&amp;quot; operation occurs on the record containing the link. Each time a &amp;quot;put&amp;quot; occurs for the record, the data is retrieved from the buffer. And the buffer is updated. The CP and CPP options are not available for output links.&lt;br /&gt;
&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
&lt;br /&gt;
Because of the nature of Channel Access links, they cannot be process passive. For example, if an input link that specifies another record in another IOC but also specifies PP, the PP attribute will be ignored. Another aspect of Channel Access links is that they are never placed in the same lock set as the records they link to.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion, otherwise known as a breakpoint conversion. In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. Instead, this conversion is completed by performing a table lookup. The value read from the device is known as the ''raw value'', which is initially read into the RVAL (raw value) field. This raw value is then used to identify the line segment in which this value falls. Each entry of the table includes a beginning point for the segment, the floating engineering units value at the point, and the slope of the line segment. The conversion to the engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
 final value = eng. units + (raw value - first point) &amp;amp;times; slope&lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a persons trips over some wires, unplugging them, which disables the sensors, which means that a new value couldn't be scanned for the record. In that case, an alarm of INVALID severity will be triggered. When a system is being tested, an INVALID alarm can point to a simple configuration problem. However, when the system is actually on-line, an INVALID alarm can signal a much more serious problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severities, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Scan Alarm ===&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Read Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Write Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Limit Alarms ===&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
=== State Alarms ===&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1685</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1685"/>
		<updated>2009-04-07T16:56:46Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.019 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The OSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links ====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In the Figure 2, three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_1: Forward Link&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1 Forward Link Example]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A more complex use of passive scanning causes passive records to inherit the scan traits of the records to which they are connected. Let's look at the simple case ([[#Figure 2|''Figure 2'']]) where two analog input records (AI) get their input from the VAL field of a calculation record (CALC). Each analog input (Record_3, Record_4) has a forward link (FLNK) pointing to the calculation record (Record_5). In VDCT, FLNKs connect directly to another record, unlike CapFast where FLNK connects to SLNK field. However, this is just a way to specify to which record FLNK points to. In EPICS, a FLNK of Record_3 and Record_4 merely contains the name of another record (Record_5).&lt;br /&gt;
&lt;br /&gt;
==== Input Links ====&lt;br /&gt;
Input links normally fetch data from one field into a field in the referring record. For instance, if the INPA field of a CALC record is set to Input_2.VAL, then the VAL field is fetched from the Input_2 record and placed in the A field of the CALC record. These data links have an attribute that can cause the record to be processed before the field is returned. In figure 2,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_1&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|Figure 2. Process Passive Link Attribute]]&lt;br /&gt;
&lt;br /&gt;
For example, [[#Figure 1|''Figure 1'']] presents a VDCT schematic of two records, Record_1 and Record_2. Record_1 is an analog output record. Most output records have a DOL or Desired Output Link, from which they can retrieve the value that they output. Thus, the DOL link is an input link which can be process passive. The blue line connecting the records is a data link. In this case it means that the DOL link is connected to the VAL field of Record_2. In other words, Record_1 retrieves its value, the value that it outputs, from Record_2. When Record_1 begins processing, it will first retrieve the value from the field connected to DOL, which, in this case, is the VAL field of Record_2. If DOL is process passive, it will cause Record_1 to be processed when the value is retrieved. Record_2 will then process. After Record_1 finishes processing, the value from its VAL field will be retrieved by DOL. Record_1 will then finish its processing.&lt;br /&gt;
&lt;br /&gt;
If NPP is specified as an input link's attribute, the value is retrieved as is from the other record without causing the other record to process. So in the above example, if DOL didn't specify process passive, record 1 would not cause record 2 to process.&lt;br /&gt;
&lt;br /&gt;
Let's consider a few more examples of passive scanning.&lt;br /&gt;
&lt;br /&gt;
Consider a case where an analog output is controlled only by the operator. There is no reason to process this record until the operator changes the desired output. (This is done by writing to the VAL field.) If this record is passive, the database access routine that places the new desired output into the record will cause it to be processed immediately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The calculation record's SCAN field specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the SCAN field of the analog input Record_3 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt;, and the SCAN field of the analog input Record_4 specifies &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;. In this example the calculation will be processed every two seconds and whenever the I/O card interrupts. Thus, the calculation inherits the periodic scanning trait of the first analog input record and the I/O event scanning trait of the second. Each time the calc record Record_5 is processed, it will retrieve values from the locations specified in its input links and perform its calculation.&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingPhase.jpg|thumb|Description]]&lt;br /&gt;
[[Image:RecordProcessing1.jpg|Figure 2]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-1.gif|Figure 1]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-2.gif|Figure 2]]&lt;br /&gt;
&lt;br /&gt;
Next, let's look at a continuous control loop ([[#Figure 3|''Figure 3'']]). In this case the analog input Record_6, which is scanned every 0.1 seconds, has a forward link to the calculation record Record_7, and the calculation record, in turn, has a forward link to the analog output Record_8. Every 0.1 seconds the analog input will process, converting its value and causing the calc record to process. The calc record will make its calculation, causing the analog output record to process. The analog output will then write its output after fetching, if necessary, its desired output. If the operator changes a value in the calculation, this will also cause the calc record to perform its calculation and the analog output to write its output, since the calc and the analog output record are passive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-3.gif|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
Let's consider a case ([[#Figure 4|''Figure 4'']]) where values are fetched from other records via input links. When a record fetches a value from another record, the other record is first processed, only if the other record is passive and only if the link specifies process passive or &amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;. As an example, suppose a calculation record Record_11 has two input links, each of which specifies an analog input record (Record_9, Record_10) and each of which specifies process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;). Suppose also that the calculation record specifies &amp;lt;code&amp;gt;1 second&amp;lt;/code&amp;gt; in its SCAN field, meaning that it is scanned every second. Every second, the calc record will cause each analog input to process before fetching the values, provided that each analog input specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-4.gif|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In a variation of this example ([[#Figure 5|''Figure 5'']]), suppose one of the analog inputs Record_13 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt; in its SCAN field which means it would no longer be a passive record. Thus, the periodically scanned analog input will ''not'' be processed every time the calculation is processed. Its current value will simply be fetched as is; then the other analog input Record_12 will be processed and the calculation performed. The same thing would occur if the calculation's INPB link of calc Record_14 specified NPP or no process passive. In this case, even if the analog input's SCAN field specified &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the value would be fetched as is without causing the analog input to process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-5.gif|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Passive Scanning and Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
Passive scanning differs somewhat for Channel Access links. A Channel Access link is an input link or output link that specifies a link to a record located in another IOC (a forward processing link can be a CA link under certain circumstances). In addition, as of Release 3.13 input and output links can be forced to be Channel Access links even if they reference a record located in the same database. Input links can specify CA, CP, or CPP. If the input link specifies CA, it will be forced to be a Channel Access link. If the input link specifies CP, it will also be forced to be a Channel Access link; in addition, it will cause the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it means the same thing as CP, except that the record will be processed if and only if the record itself specifies passive in its SCAN field. Output links can specify CA, which will simply cause them to be Channel Access links.&lt;br /&gt;
&lt;br /&gt;
Channel Access links, be they between records located in different IOCs or between records located in the same IOC, cannot be process passive, e.g., they cannot cause the record they specify to process when written to or read from.&lt;br /&gt;
&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
== Forward Process Links ==&lt;br /&gt;
&lt;br /&gt;
When the ''forward processing link'' field (FLNK) of one record contains an address of a second record, it causes the second record to be processed after the first record is itself processed.&lt;br /&gt;
&lt;br /&gt;
We discussed forward links in the section on [[#Passive Scanning|passive processing]]. To reiterate, this field causes the record that it specifies to be scanned when the record that contains the forward link is scanned. It is thus used to cause related records to process. (For more on specifying records in link fields, see [[#Address Specification|''Address Specification'']]).&lt;br /&gt;
&lt;br /&gt;
If a forward link references the PROC field of a record in another IOC, a Channel Access &amp;quot; put&amp;quot; request is directed to the specified record, causing it to process.&lt;br /&gt;
&lt;br /&gt;
One record type exists solely to propagate forward processing: the fanout record. The fanout record is used when there is more than one record which needs to be processed as a result of another record being processed. It can specify as many as six forward links. Let's look at an example where an analog input's value is used in two different calculations ([[#Figure 7|''Figure 7'']]). Because there is only one forward processing link in the analog input record, it is used to process the fanout record. Here two of the fanout records forward links are used to link to two calculation records. In the example, when the I/O interrupt occurs, the analog input is processed, then the fanout record is processed, causing each of the calculation records to be processed. Note that the fanout record simply causes the specified records to process. It does not send values to other records. The ''data fanout'' record, on the other hand, does send values to other records. Refer to [[RRM 3-14 Fanout|''Fanout'']], and [[RRM 3-14 Dfanout|''dfanout'']], for more information on the fanout and data fanout records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_7&amp;quot;&amp;gt;Figure 7&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-7.gif|Figure 7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name entered in Capfast (or whatever other configuration tool) can be a mix of upper and lower case letters. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
For inputs and desired output links, the specified record is processed before the value has been read, and for output links the specified record is processed after the value has been written. In the case of the forward processing link, the record being referenced is processed after the record making the link is processed.&lt;br /&gt;
&lt;br /&gt;
Remember that input links such as INP and DOL (desired output location), can specify process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;) or no process passive (&amp;lt;code&amp;gt;NPP&amp;lt;/code&amp;gt;). When a record's input link specifies a database address, the record specified by the address will process only if the input link specifies process passive and only if the addressed record specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field. If the input link specifies no process passive (NPP), the addressed record will not be processed even if it is a passive record. Because output links such as OUT are always process passive, they always cause the specified record to be processed, provided that the specified record's SCAN field is configured as &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Be aware that other types of conversions may not be made when a value is retrieved from another record. Whether it does or doesn't depends on the record and the device support routine which the record specifies. Most records must specify a device support routine in their DTYP field. Device support routines take care of the specifics of input and output. For such records, there are device support routines for hardware I/O, and other routines for I/O between records. For example, the analog input has many device support routines for input from hardware, and two routines specific for retrieving input from other records: &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt; retrieves the input value and performs the specified linear conversions on the value (that is, if the record is configured to perform linear conversions). The &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine, on the other hand, reads the value directly into the VAL field and doesn't perform any linear conversions on the value.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Note: Link fields can reference records in a different database, that is, a database that resides in a different IOC. Records residing on different IOCs connect through channel access, so any link that refers to a record in another IOC is called a channel access link. The format of a channel access link does not differ from that of a regular database link.'''&lt;br /&gt;
&lt;br /&gt;
'''Channel access links are created when the database is initialized. When the initialization routines cannot find the link in the local database, a channel access link is created.'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As of Release 3.13.0, input and output links can also be forced to be Channel Access links, even when they are located in the same IOC. Input links can specify either CA, CP, or CPP. Specifying CA forces the input link to be a Channel Access link. When an input link becomes a Channel Access link, a Channel Access monitor is established on the field and a buffer is allocated for the field using the field type and the element count of the field. In addition to the value of the input link, the alarm status of the link is monitored. Specifying CP or CPP also forces the input link to be a Channel Access link, but in addition, CP or CPP will force the record that contains the link to be processed when a monitor occurs, that is, if the record is process passive.&lt;br /&gt;
&lt;br /&gt;
Output links can also specify CA, in which case they will be forced to be Channel Access links. When an output link becomes a Channel Access link, a buffer is allocated the first time a &amp;quot;put&amp;quot; operation occurs on the record containing the link. Each time a &amp;quot;put&amp;quot; occurs for the record, the data is retrieved from the buffer. And the buffer is updated. The CP and CPP options are not available for output links.&lt;br /&gt;
&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
&lt;br /&gt;
Because of the nature of Channel Access links, they cannot be process passive. For example, if an input link that specifies another record in another IOC but also specifies PP, the PP attribute will be ignored. Another aspect of Channel Access links is that they are never placed in the same lock set as the records they link to.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion, otherwise known as a breakpoint conversion. In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. Instead, this conversion is completed by performing a table lookup. The value read from the device is known as the ''raw value'', which is initially read into the RVAL (raw value) field. This raw value is then used to identify the line segment in which this value falls. Each entry of the table includes a beginning point for the segment, the floating engineering units value at the point, and the slope of the line segment. The conversion to the engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
 final value = eng. units + (raw value - first point) &amp;amp;times; slope&lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a persons trips over some wires, unplugging them, which disables the sensors, which means that a new value couldn't be scanned for the record. In that case, an alarm of INVALID severity will be triggered. When a system is being tested, an INVALID alarm can point to a simple configuration problem. However, when the system is actually on-line, an INVALID alarm can signal a much more serious problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severities, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Scan Alarm ===&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Read Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Write Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Limit Alarms ===&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
=== State Alarms ===&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1684</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1684"/>
		<updated>2009-04-07T16:51:07Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.019 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_015_second, &amp;quot; .015 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The OSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links =====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In the Figure 2, three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_1: Forward Link&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 1: Forward Link Example]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A more complex use of passive scanning causes passive records to inherit the scan traits of the records to which they are connected. Let's look at the simple case ([[#Figure 2|''Figure 2'']]) where two analog input records (AI) get their input from the VAL field of a calculation record (CALC). Each analog input (Record_3, Record_4) has a forward link (FLNK) pointing to the calculation record (Record_5). In VDCT, FLNKs connect directly to another record, unlike CapFast where FLNK connects to SLNK field. However, this is just a way to specify to which record FLNK points to. In EPICS, a FLNK of Record_3 and Record_4 merely contains the name of another record (Record_5).&lt;br /&gt;
&lt;br /&gt;
==== Input Links =====&lt;br /&gt;
&lt;br /&gt;
For example, [[#Figure 1|''Figure 1'']] presents a VDCT schematic of two records, Record_1 and Record_2. Record_1 is an analog output record. Most output records have a DOL or Desired Output Link, from which they can retrieve the value that they output. Thus, the DOL link is an input link which can be process passive. The blue line connecting the records is a data link. In this case it means that the DOL link is connected to the VAL field of Record_2. In other words, Record_1 retrieves its value, the value that it outputs, from Record_2. When Record_1 begins processing, it will first retrieve the value from the field connected to DOL, which, in this case, is the VAL field of Record_2. If DOL is process passive, it will cause Record_1 to be processed when the value is retrieved. Record_2 will then process. After Record_1 finishes processing, the value from its VAL field will be retrieved by DOL. Record_1 will then finish its processing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_1&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|thumb|Description]]&lt;br /&gt;
[[Image:RecordProcessingPhase.jpg|thumb|Description]]&lt;br /&gt;
[[Image:RecordProcessing1.jpg|Figure 2]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-1.gif|Figure 1]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-2.gif|Figure 2]]&lt;br /&gt;
&lt;br /&gt;
If NPP is specified as an input link's attribute, the value is retrieved as is from the other record without causing the other record to process. So in the above example, if DOL didn't specify process passive, record 1 would not cause record 2 to process.&lt;br /&gt;
&lt;br /&gt;
Let's consider a few more examples of passive scanning.&lt;br /&gt;
&lt;br /&gt;
Consider a case where an analog output is controlled only by the operator. There is no reason to process this record until the operator changes the desired output. (This is done by writing to the VAL field.) If this record is passive, the database access routine that places the new desired output into the record will cause it to be processed immediately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The calculation record's SCAN field specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the SCAN field of the analog input Record_3 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt;, and the SCAN field of the analog input Record_4 specifies &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;. In this example the calculation will be processed every two seconds and whenever the I/O card interrupts. Thus, the calculation inherits the periodic scanning trait of the first analog input record and the I/O event scanning trait of the second. Each time the calc record Record_5 is processed, it will retrieve values from the locations specified in its input links and perform its calculation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, let's look at a continuous control loop ([[#Figure 3|''Figure 3'']]). In this case the analog input Record_6, which is scanned every 0.1 seconds, has a forward link to the calculation record Record_7, and the calculation record, in turn, has a forward link to the analog output Record_8. Every 0.1 seconds the analog input will process, converting its value and causing the calc record to process. The calc record will make its calculation, causing the analog output record to process. The analog output will then write its output after fetching, if necessary, its desired output. If the operator changes a value in the calculation, this will also cause the calc record to perform its calculation and the analog output to write its output, since the calc and the analog output record are passive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-3.gif|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
Let's consider a case ([[#Figure 4|''Figure 4'']]) where values are fetched from other records via input links. When a record fetches a value from another record, the other record is first processed, only if the other record is passive and only if the link specifies process passive or &amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;. As an example, suppose a calculation record Record_11 has two input links, each of which specifies an analog input record (Record_9, Record_10) and each of which specifies process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;). Suppose also that the calculation record specifies &amp;lt;code&amp;gt;1 second&amp;lt;/code&amp;gt; in its SCAN field, meaning that it is scanned every second. Every second, the calc record will cause each analog input to process before fetching the values, provided that each analog input specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-4.gif|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In a variation of this example ([[#Figure 5|''Figure 5'']]), suppose one of the analog inputs Record_13 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt; in its SCAN field which means it would no longer be a passive record. Thus, the periodically scanned analog input will ''not'' be processed every time the calculation is processed. Its current value will simply be fetched as is; then the other analog input Record_12 will be processed and the calculation performed. The same thing would occur if the calculation's INPB link of calc Record_14 specified NPP or no process passive. In this case, even if the analog input's SCAN field specified &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the value would be fetched as is without causing the analog input to process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-5.gif|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Passive Scanning and Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
Passive scanning differs somewhat for Channel Access links. A Channel Access link is an input link or output link that specifies a link to a record located in another IOC (a forward processing link can be a CA link under certain circumstances). In addition, as of Release 3.13 input and output links can be forced to be Channel Access links even if they reference a record located in the same database. Input links can specify CA, CP, or CPP. If the input link specifies CA, it will be forced to be a Channel Access link. If the input link specifies CP, it will also be forced to be a Channel Access link; in addition, it will cause the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it means the same thing as CP, except that the record will be processed if and only if the record itself specifies passive in its SCAN field. Output links can specify CA, which will simply cause them to be Channel Access links.&lt;br /&gt;
&lt;br /&gt;
Channel Access links, be they between records located in different IOCs or between records located in the same IOC, cannot be process passive, e.g., they cannot cause the record they specify to process when written to or read from.&lt;br /&gt;
&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
== Forward Process Links ==&lt;br /&gt;
&lt;br /&gt;
When the ''forward processing link'' field (FLNK) of one record contains an address of a second record, it causes the second record to be processed after the first record is itself processed.&lt;br /&gt;
&lt;br /&gt;
We discussed forward links in the section on [[#Passive Scanning|passive processing]]. To reiterate, this field causes the record that it specifies to be scanned when the record that contains the forward link is scanned. It is thus used to cause related records to process. (For more on specifying records in link fields, see [[#Address Specification|''Address Specification'']]).&lt;br /&gt;
&lt;br /&gt;
If a forward link references the PROC field of a record in another IOC, a Channel Access &amp;quot; put&amp;quot; request is directed to the specified record, causing it to process.&lt;br /&gt;
&lt;br /&gt;
One record type exists solely to propagate forward processing: the fanout record. The fanout record is used when there is more than one record which needs to be processed as a result of another record being processed. It can specify as many as six forward links. Let's look at an example where an analog input's value is used in two different calculations ([[#Figure 7|''Figure 7'']]). Because there is only one forward processing link in the analog input record, it is used to process the fanout record. Here two of the fanout records forward links are used to link to two calculation records. In the example, when the I/O interrupt occurs, the analog input is processed, then the fanout record is processed, causing each of the calculation records to be processed. Note that the fanout record simply causes the specified records to process. It does not send values to other records. The ''data fanout'' record, on the other hand, does send values to other records. Refer to [[RRM 3-14 Fanout|''Fanout'']], and [[RRM 3-14 Dfanout|''dfanout'']], for more information on the fanout and data fanout records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_7&amp;quot;&amp;gt;Figure 7&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-7.gif|Figure 7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name entered in Capfast (or whatever other configuration tool) can be a mix of upper and lower case letters. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
For inputs and desired output links, the specified record is processed before the value has been read, and for output links the specified record is processed after the value has been written. In the case of the forward processing link, the record being referenced is processed after the record making the link is processed.&lt;br /&gt;
&lt;br /&gt;
Remember that input links such as INP and DOL (desired output location), can specify process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;) or no process passive (&amp;lt;code&amp;gt;NPP&amp;lt;/code&amp;gt;). When a record's input link specifies a database address, the record specified by the address will process only if the input link specifies process passive and only if the addressed record specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field. If the input link specifies no process passive (NPP), the addressed record will not be processed even if it is a passive record. Because output links such as OUT are always process passive, they always cause the specified record to be processed, provided that the specified record's SCAN field is configured as &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Be aware that other types of conversions may not be made when a value is retrieved from another record. Whether it does or doesn't depends on the record and the device support routine which the record specifies. Most records must specify a device support routine in their DTYP field. Device support routines take care of the specifics of input and output. For such records, there are device support routines for hardware I/O, and other routines for I/O between records. For example, the analog input has many device support routines for input from hardware, and two routines specific for retrieving input from other records: &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt; retrieves the input value and performs the specified linear conversions on the value (that is, if the record is configured to perform linear conversions). The &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine, on the other hand, reads the value directly into the VAL field and doesn't perform any linear conversions on the value.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Note: Link fields can reference records in a different database, that is, a database that resides in a different IOC. Records residing on different IOCs connect through channel access, so any link that refers to a record in another IOC is called a channel access link. The format of a channel access link does not differ from that of a regular database link.'''&lt;br /&gt;
&lt;br /&gt;
'''Channel access links are created when the database is initialized. When the initialization routines cannot find the link in the local database, a channel access link is created.'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As of Release 3.13.0, input and output links can also be forced to be Channel Access links, even when they are located in the same IOC. Input links can specify either CA, CP, or CPP. Specifying CA forces the input link to be a Channel Access link. When an input link becomes a Channel Access link, a Channel Access monitor is established on the field and a buffer is allocated for the field using the field type and the element count of the field. In addition to the value of the input link, the alarm status of the link is monitored. Specifying CP or CPP also forces the input link to be a Channel Access link, but in addition, CP or CPP will force the record that contains the link to be processed when a monitor occurs, that is, if the record is process passive.&lt;br /&gt;
&lt;br /&gt;
Output links can also specify CA, in which case they will be forced to be Channel Access links. When an output link becomes a Channel Access link, a buffer is allocated the first time a &amp;quot;put&amp;quot; operation occurs on the record containing the link. Each time a &amp;quot;put&amp;quot; occurs for the record, the data is retrieved from the buffer. And the buffer is updated. The CP and CPP options are not available for output links.&lt;br /&gt;
&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
&lt;br /&gt;
Because of the nature of Channel Access links, they cannot be process passive. For example, if an input link that specifies another record in another IOC but also specifies PP, the PP attribute will be ignored. Another aspect of Channel Access links is that they are never placed in the same lock set as the records they link to.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion, otherwise known as a breakpoint conversion. In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. Instead, this conversion is completed by performing a table lookup. The value read from the device is known as the ''raw value'', which is initially read into the RVAL (raw value) field. This raw value is then used to identify the line segment in which this value falls. Each entry of the table includes a beginning point for the segment, the floating engineering units value at the point, and the slope of the line segment. The conversion to the engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
 final value = eng. units + (raw value - first point) &amp;amp;times; slope&lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a persons trips over some wires, unplugging them, which disables the sensors, which means that a new value couldn't be scanned for the record. In that case, an alarm of INVALID severity will be triggered. When a system is being tested, an INVALID alarm can point to a simple configuration problem. However, when the system is actually on-line, an INVALID alarm can signal a much more serious problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severities, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Scan Alarm ===&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Read Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Write Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Limit Alarms ===&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
=== State Alarms ===&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1683</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1683"/>
		<updated>2009-04-07T16:09:27Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.019 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_019_second, &amp;quot; .019 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The OSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links =====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In the Figure 2, three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|Figure 2: Forward Link Example]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A more complex use of passive scanning causes passive records to inherit the scan traits of the records to which they are connected. Let's look at the simple case ([[#Figure 2|''Figure 2'']]) where two analog input records (AI) get their input from the VAL field of a calculation record (CALC). Each analog input (Record_3, Record_4) has a forward link (FLNK) pointing to the calculation record (Record_5). In VDCT, FLNKs connect directly to another record, unlike CapFast where FLNK connects to SLNK field. However, this is just a way to specify to which record FLNK points to. In EPICS, a FLNK of Record_3 and Record_4 merely contains the name of another record (Record_5).&lt;br /&gt;
&lt;br /&gt;
==== Input Links =====&lt;br /&gt;
&lt;br /&gt;
For example, [[#Figure 1|''Figure 1'']] presents a VDCT schematic of two records, Record_1 and Record_2. Record_1 is an analog output record. Most output records have a DOL or Desired Output Link, from which they can retrieve the value that they output. Thus, the DOL link is an input link which can be process passive. The blue line connecting the records is a data link. In this case it means that the DOL link is connected to the VAL field of Record_2. In other words, Record_1 retrieves its value, the value that it outputs, from Record_2. When Record_1 begins processing, it will first retrieve the value from the field connected to DOL, which, in this case, is the VAL field of Record_2. If DOL is process passive, it will cause Record_1 to be processed when the value is retrieved. Record_2 will then process. After Record_1 finishes processing, the value from its VAL field will be retrieved by DOL. Record_1 will then finish its processing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_1&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|thumb|Description]]&lt;br /&gt;
[[Image:RecordProcessingPhase.jpg|thumb|Description]]&lt;br /&gt;
[[Image:RecordProcessing1.jpg|Figure 2]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-1.gif|Figure 1]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-2.gif|Figure 2]]&lt;br /&gt;
&lt;br /&gt;
If NPP is specified as an input link's attribute, the value is retrieved as is from the other record without causing the other record to process. So in the above example, if DOL didn't specify process passive, record 1 would not cause record 2 to process.&lt;br /&gt;
&lt;br /&gt;
Let's consider a few more examples of passive scanning.&lt;br /&gt;
&lt;br /&gt;
Consider a case where an analog output is controlled only by the operator. There is no reason to process this record until the operator changes the desired output. (This is done by writing to the VAL field.) If this record is passive, the database access routine that places the new desired output into the record will cause it to be processed immediately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The calculation record's SCAN field specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the SCAN field of the analog input Record_3 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt;, and the SCAN field of the analog input Record_4 specifies &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;. In this example the calculation will be processed every two seconds and whenever the I/O card interrupts. Thus, the calculation inherits the periodic scanning trait of the first analog input record and the I/O event scanning trait of the second. Each time the calc record Record_5 is processed, it will retrieve values from the locations specified in its input links and perform its calculation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, let's look at a continuous control loop ([[#Figure 3|''Figure 3'']]). In this case the analog input Record_6, which is scanned every 0.1 seconds, has a forward link to the calculation record Record_7, and the calculation record, in turn, has a forward link to the analog output Record_8. Every 0.1 seconds the analog input will process, converting its value and causing the calc record to process. The calc record will make its calculation, causing the analog output record to process. The analog output will then write its output after fetching, if necessary, its desired output. If the operator changes a value in the calculation, this will also cause the calc record to perform its calculation and the analog output to write its output, since the calc and the analog output record are passive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-3.gif|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
Let's consider a case ([[#Figure 4|''Figure 4'']]) where values are fetched from other records via input links. When a record fetches a value from another record, the other record is first processed, only if the other record is passive and only if the link specifies process passive or &amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;. As an example, suppose a calculation record Record_11 has two input links, each of which specifies an analog input record (Record_9, Record_10) and each of which specifies process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;). Suppose also that the calculation record specifies &amp;lt;code&amp;gt;1 second&amp;lt;/code&amp;gt; in its SCAN field, meaning that it is scanned every second. Every second, the calc record will cause each analog input to process before fetching the values, provided that each analog input specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-4.gif|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In a variation of this example ([[#Figure 5|''Figure 5'']]), suppose one of the analog inputs Record_13 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt; in its SCAN field which means it would no longer be a passive record. Thus, the periodically scanned analog input will ''not'' be processed every time the calculation is processed. Its current value will simply be fetched as is; then the other analog input Record_12 will be processed and the calculation performed. The same thing would occur if the calculation's INPB link of calc Record_14 specified NPP or no process passive. In this case, even if the analog input's SCAN field specified &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the value would be fetched as is without causing the analog input to process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-5.gif|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Passive Scanning and Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
Passive scanning differs somewhat for Channel Access links. A Channel Access link is an input link or output link that specifies a link to a record located in another IOC (a forward processing link can be a CA link under certain circumstances). In addition, as of Release 3.13 input and output links can be forced to be Channel Access links even if they reference a record located in the same database. Input links can specify CA, CP, or CPP. If the input link specifies CA, it will be forced to be a Channel Access link. If the input link specifies CP, it will also be forced to be a Channel Access link; in addition, it will cause the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it means the same thing as CP, except that the record will be processed if and only if the record itself specifies passive in its SCAN field. Output links can specify CA, which will simply cause them to be Channel Access links.&lt;br /&gt;
&lt;br /&gt;
Channel Access links, be they between records located in different IOCs or between records located in the same IOC, cannot be process passive, e.g., they cannot cause the record they specify to process when written to or read from.&lt;br /&gt;
&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
== Forward Process Links ==&lt;br /&gt;
&lt;br /&gt;
When the ''forward processing link'' field (FLNK) of one record contains an address of a second record, it causes the second record to be processed after the first record is itself processed.&lt;br /&gt;
&lt;br /&gt;
We discussed forward links in the section on [[#Passive Scanning|passive processing]]. To reiterate, this field causes the record that it specifies to be scanned when the record that contains the forward link is scanned. It is thus used to cause related records to process. (For more on specifying records in link fields, see [[#Address Specification|''Address Specification'']]).&lt;br /&gt;
&lt;br /&gt;
If a forward link references the PROC field of a record in another IOC, a Channel Access &amp;quot; put&amp;quot; request is directed to the specified record, causing it to process.&lt;br /&gt;
&lt;br /&gt;
One record type exists solely to propagate forward processing: the fanout record. The fanout record is used when there is more than one record which needs to be processed as a result of another record being processed. It can specify as many as six forward links. Let's look at an example where an analog input's value is used in two different calculations ([[#Figure 7|''Figure 7'']]). Because there is only one forward processing link in the analog input record, it is used to process the fanout record. Here two of the fanout records forward links are used to link to two calculation records. In the example, when the I/O interrupt occurs, the analog input is processed, then the fanout record is processed, causing each of the calculation records to be processed. Note that the fanout record simply causes the specified records to process. It does not send values to other records. The ''data fanout'' record, on the other hand, does send values to other records. Refer to [[RRM 3-14 Fanout|''Fanout'']], and [[RRM 3-14 Dfanout|''dfanout'']], for more information on the fanout and data fanout records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_7&amp;quot;&amp;gt;Figure 7&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-7.gif|Figure 7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name entered in Capfast (or whatever other configuration tool) can be a mix of upper and lower case letters. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
For inputs and desired output links, the specified record is processed before the value has been read, and for output links the specified record is processed after the value has been written. In the case of the forward processing link, the record being referenced is processed after the record making the link is processed.&lt;br /&gt;
&lt;br /&gt;
Remember that input links such as INP and DOL (desired output location), can specify process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;) or no process passive (&amp;lt;code&amp;gt;NPP&amp;lt;/code&amp;gt;). When a record's input link specifies a database address, the record specified by the address will process only if the input link specifies process passive and only if the addressed record specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field. If the input link specifies no process passive (NPP), the addressed record will not be processed even if it is a passive record. Because output links such as OUT are always process passive, they always cause the specified record to be processed, provided that the specified record's SCAN field is configured as &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Be aware that other types of conversions may not be made when a value is retrieved from another record. Whether it does or doesn't depends on the record and the device support routine which the record specifies. Most records must specify a device support routine in their DTYP field. Device support routines take care of the specifics of input and output. For such records, there are device support routines for hardware I/O, and other routines for I/O between records. For example, the analog input has many device support routines for input from hardware, and two routines specific for retrieving input from other records: &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt; retrieves the input value and performs the specified linear conversions on the value (that is, if the record is configured to perform linear conversions). The &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine, on the other hand, reads the value directly into the VAL field and doesn't perform any linear conversions on the value.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Note: Link fields can reference records in a different database, that is, a database that resides in a different IOC. Records residing on different IOCs connect through channel access, so any link that refers to a record in another IOC is called a channel access link. The format of a channel access link does not differ from that of a regular database link.'''&lt;br /&gt;
&lt;br /&gt;
'''Channel access links are created when the database is initialized. When the initialization routines cannot find the link in the local database, a channel access link is created.'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As of Release 3.13.0, input and output links can also be forced to be Channel Access links, even when they are located in the same IOC. Input links can specify either CA, CP, or CPP. Specifying CA forces the input link to be a Channel Access link. When an input link becomes a Channel Access link, a Channel Access monitor is established on the field and a buffer is allocated for the field using the field type and the element count of the field. In addition to the value of the input link, the alarm status of the link is monitored. Specifying CP or CPP also forces the input link to be a Channel Access link, but in addition, CP or CPP will force the record that contains the link to be processed when a monitor occurs, that is, if the record is process passive.&lt;br /&gt;
&lt;br /&gt;
Output links can also specify CA, in which case they will be forced to be Channel Access links. When an output link becomes a Channel Access link, a buffer is allocated the first time a &amp;quot;put&amp;quot; operation occurs on the record containing the link. Each time a &amp;quot;put&amp;quot; occurs for the record, the data is retrieved from the buffer. And the buffer is updated. The CP and CPP options are not available for output links.&lt;br /&gt;
&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
&lt;br /&gt;
Because of the nature of Channel Access links, they cannot be process passive. For example, if an input link that specifies another record in another IOC but also specifies PP, the PP attribute will be ignored. Another aspect of Channel Access links is that they are never placed in the same lock set as the records they link to.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion, otherwise known as a breakpoint conversion. In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. Instead, this conversion is completed by performing a table lookup. The value read from the device is known as the ''raw value'', which is initially read into the RVAL (raw value) field. This raw value is then used to identify the line segment in which this value falls. Each entry of the table includes a beginning point for the segment, the floating engineering units value at the point, and the slope of the line segment. The conversion to the engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
 final value = eng. units + (raw value - first point) &amp;amp;times; slope&lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a persons trips over some wires, unplugging them, which disables the sensors, which means that a new value couldn't be scanned for the record. In that case, an alarm of INVALID severity will be triggered. When a system is being tested, an INVALID alarm can point to a simple configuration problem. However, when the system is actually on-line, an INVALID alarm can signal a much more serious problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severities, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Scan Alarm ===&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Read Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Write Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Limit Alarms ===&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
=== State Alarms ===&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1682</id>
		<title>RRM 3-14 Concepts</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=RRM_3-14_Concepts&amp;diff=1682"/>
		<updated>2009-04-07T16:07:23Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[RRM 3-14|EPICS Record Reference Manual]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H1&amp;gt;Database Concepts&amp;lt;/H1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This chapter covers the general functionality that is found in all database records. The topics covered are I/O scanning, I/O address specification, data conversions, alarms, database monitoring, and continuous control:&lt;br /&gt;
&lt;br /&gt;
* [[#Scanning Specification|''Scanning Specification'']] describes the various conditions under which a record is processed.&lt;br /&gt;
* [[#Address Specification|''Address Specification'']] explains the source of inputs and the destination of outputs.&lt;br /&gt;
* [[#Conversion Specification|''Conversion Specification'']] covers data conversions from transducer interfaces to engineering units.&lt;br /&gt;
* [[#Alarm Specification|''Alarm Specification'']] presents the many alarm detection mechanisms available in the database.&lt;br /&gt;
* [[#Monitor Specification|''Monitor Specification'']] details the mechanism which notifies operators about database value changes.&lt;br /&gt;
* [[#Control Specification|''Control Specification'']] explains the features available for achieving continuous control in the database.&lt;br /&gt;
&lt;br /&gt;
These concepts are essential in order to understand how the database interfaces with the process.&lt;br /&gt;
&lt;br /&gt;
The EPICS databases can be created using visual tools (VDCT, CapFast) or by manual creation of a database &amp;quot;myDatabase.db&amp;quot; text file. Visual Database Configuration Tool (VDCT), a java application from Cosylab, is a more modern tool for database creation/editing that runs on Linux, Windows, and Sun.&lt;br /&gt;
&lt;br /&gt;
= Scanning Specification =&lt;br /&gt;
&lt;br /&gt;
''Scanning'' determines when a record is processed. A record is ''processed'' when it processes its data and performs any actions related to that data. For example, when an output record is processed, it fetches the value which it is to output, converts the value, and then writes that value to the specified location. Each record must specify the scanning method that determines when it will be processed. There are three scanning methods for database records: (1) periodic, (2) event, and (3) passive.&lt;br /&gt;
&lt;br /&gt;
# Periodic scanning occurs on set time intervals.&lt;br /&gt;
# Event scanning occurs on either an I/O interrupt event or a user-defined event.&lt;br /&gt;
# Passive scanning occurs when the records linked to the passive record are scanned, or when a value is &amp;quot;put&amp;quot; into a passive record through the database access routines.&lt;br /&gt;
&lt;br /&gt;
For periodic or event scanning, the user can also control the order in which a set of records is processed by using the &amp;lt;code&amp;gt;PHASE&amp;lt;/code&amp;gt; mechanism. For event scanning, the user can control the priority at which a record will process. In addition to the scan and the phase mechanisms, there are data links and forward processing links that can be used to cause processing in other records. This section explains these concepts.&lt;br /&gt;
&lt;br /&gt;
== Periodic Scanning ==&lt;br /&gt;
&lt;br /&gt;
The following periods for scanning database records are available, though EPICS can be configured to recognize more scan periods:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; 10 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt; 1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.5 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.2 second&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The period that best fits the nature of the signal should be specified. A five-second interval is adequate for the temperature of a mass of water because it does not change rapidly. However, some power levels may change very rapidly, so they need to be scanned every 0.5 seconds. In the case of a continuous control loop, where the process variable being controlled can change quickly, the 0.1 second interval may be the best choice.&lt;br /&gt;
&lt;br /&gt;
For a record to scan periodically, a valid choice must be entered in its &amp;lt;code&amp;gt;SCAN&amp;lt;/code&amp;gt; field. Actually, the available choices depend on the configuration of the &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file. As with most other fields which consists of a menu of choices, the choices available for the SCAN field can be changed by editing the appropriate &amp;lt;code&amp;gt;.dbd&amp;lt;/code&amp;gt; (database definition) file. &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files are ASCII files that are used to generate header files that are, in turn, are used to compile the database code. Many &amp;lt;code&amp;gt;dbd&amp;lt;/code&amp;gt; files can be used to configure other things besides the choices of menu fields.&lt;br /&gt;
&lt;br /&gt;
Here is an example of a &amp;lt;code&amp;gt;menuScan.dbd&amp;lt;/code&amp;gt; file, which has the default menu choices for all periods listed above as well as choices for event scanning, passive scanning, and I/O interrupt scanning:&lt;br /&gt;
&lt;br /&gt;
 menu(menuScan) {&lt;br /&gt;
 	choice(menuScanPassive,&amp;quot;Passive&amp;quot;)&lt;br /&gt;
 	choice(menuScanEvent,&amp;quot;Event&amp;quot;)&lt;br /&gt;
 	choice(menuScanI_O_Intr,&amp;quot;I/O Intr&amp;quot;)&lt;br /&gt;
 	choice(menuScan10_second,&amp;quot;10 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan5_second,&amp;quot;5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan2_second,&amp;quot;2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan1_second,&amp;quot;1 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_5_second,&amp;quot;.5 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_2_second,&amp;quot;.2 second&amp;quot;)&lt;br /&gt;
 	choice(menuScan_1_second,&amp;quot;.1 second&amp;quot;)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The first three choices must appear first and in the order shown. The remaining definitions are for the periodic scan rates, which must appear in the order slowest to fastest (the order directly controls the thread priority assigned to the particular scan rate, and faster scan rates should be assigned higher thread priorities). At IOC initialization, the menu choice strings are read at scan initialization. The number of periodic scan rates and the period of each rate is determined from the menu choice strings. Thus periodic scan rates can be changed by changing menuScan.dbd and loading this version via dbLoadDatabase. The only requirement is that each periodic choice string must begin with a numeric value specified in units of seconds.For example, to add a choice for 0.019 seconds, add the following line after the 0.1 second choice:&lt;br /&gt;
&lt;br /&gt;
 	choice(menuScan_019_second, &amp;quot; .019 second&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
The range of values for scan periods can be from one clock tick. (vxWorks out of the box supports 0.015 seconds or a maximum period of 60 Hz), to the maximum number of ticks available on the system. Note, however, that the order of the choices is essential. The first three choices must appear in the above order. Then the remaining choices should follow in descending order, the biggest time period first and the smallest last.&lt;br /&gt;
&lt;br /&gt;
== Event Scanning ==&lt;br /&gt;
&lt;br /&gt;
There are two types of events supported in the input/output controller (IOC) database, the I/O interrupt event and the user-defined event. For each type of event, the user can specify the scheduling priority of the event using the PRIO or priority field. The scheduling priority refers to the priority the event has on the stack relative to other running tasks. There are three possible choices: &amp;lt;code&amp;gt;LOW&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MEDIUM&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;HIGH&amp;lt;/code&amp;gt;. A low priority event has a priority a little higher than Channel Access. A medium priority event has a priority about equal to the median of periodic scanning tasks. A high priority event has a priority equal to the event scanning task.&lt;br /&gt;
&lt;br /&gt;
=== I/O Interrupt Events ===&lt;br /&gt;
&lt;br /&gt;
Scanning on I/O interrupt causes a record to be processed when a driver posts an I/O Event. In many cases these events are posted in the interrupt service routine. For example, if an analog input record gets its value from a Xycom 566 Differential Latched card and it specifies I/O interrupt as its scanning routine, then the record will be processed each time the card generates an interrupt (not all types of I/O cards can generate interrupts). Note that even though some cards cannot actually generate interrupts, some driver support modules can simulate interrupts. In order for a record to scan on I/O interrupts, its SCAN field must specify &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== User-defined Events ===&lt;br /&gt;
&lt;br /&gt;
The user-defined event mechanism processes records that are meaningful only under specific circumstances. User-defined events can be generated by the &amp;lt;code&amp;gt;post_event()&amp;lt;/code&amp;gt; database access routine. Two records, the event record and the timer record, are also used to post events. For example, there is the timing output, generated when the process is in a state where a control can be safely changed. Timing outputs are controlled through Timer records, which have the ability to generate interrupts. Consider a case where the timer record is scanned on I/O interrupt and the timer record's event field (EVNT) contains an event number. When the record is scanned, the user-defined event will be posted. When the event is posted, all records will be processed whose SCAN field specifies event and whose event number is the same as the generated event. User-defined events can also be generated through software. Event numbers are configurable and should be controlled through the project engineer. They only need to be unique per IOC because they only trigger processing for records in the same IOC.&lt;br /&gt;
&lt;br /&gt;
All records that use the user-defined event mechanism must specify &amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt; in their SCAN field and an event number in their EVNT field.&lt;br /&gt;
&lt;br /&gt;
== Passive Scanning ==&lt;br /&gt;
Passive records are processed when the are referenced by other records through their link fields or when a channel access put is done to them. &lt;br /&gt;
&lt;br /&gt;
=== Channel Access Puts to Passive Scanned Records ===&lt;br /&gt;
In this case where a channel access put is done to a record, the field being written has an attribute that determines if this put causes record processing. In the case of all records, putting to the VAL field causes record processing. Consider a binary output that has a SCAN of Passive. If an operator display has a button on the VAL field, every time the button is pressed, a channel access put is sent to the record. When the VAL field is written, the Passive record is processed and the specified device support is called to write the newly converted RVAL to the device specified in the OUT field through the device support specified by DTYP. Fields determined to change the way a record behaves, typical cause the record to process. Another field that would cause the binary output to process would be the ZSV; which is the alarm severity if the binary output record is in state Zero (0). If the record was in state 0 and the severity of being in that state changed from No Alarm to Minor Alarm, the only way to catch this on a SCAN Passive record is to process it. Fields are configured to cause binary output records to process in the bo.dbd file. The OSV severity is configured as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(ZSV,DBF_MENU) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Zero Error Severity&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_ALARMS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		pp(TRUE)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
::		menu(menuAlarmSevr)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
where the line &amp;quot;pp(TRUE)&amp;quot; is the indication that this record is processed when a channel access put is done.&lt;br /&gt;
&lt;br /&gt;
=== Database Links to Passive Record ===&lt;br /&gt;
&lt;br /&gt;
The records in the process database use link fields to configure data passing and scheduling (or processing). These fields are either INLINK, OUTLINK, or FWDLINK fields. &lt;br /&gt;
&lt;br /&gt;
==== Forward Links =====&lt;br /&gt;
&lt;br /&gt;
In the database definition file (.dbd) these fields are defined as follows:&amp;lt;br&amp;gt;&lt;br /&gt;
:	field(FLNK,DBF_FWDLINK) {&amp;lt;br&amp;gt;&lt;br /&gt;
::		prompt(&amp;quot;Forward Process Link&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
::		promptgroup(GUI_LINKS)&amp;lt;br&amp;gt;&lt;br /&gt;
::		interest(1)&amp;lt;br&amp;gt;&lt;br /&gt;
:	}&amp;lt;br&amp;gt;&lt;br /&gt;
If the record that is referenced by the FLNK field has a SCAN field of Passive, then the record is processed after the record with the FLNK. The FLNK field only causes record processing, no data is passed. In the Figure 2, three records are shown. The ai record &amp;quot;Input_2&amp;quot; is processed periodically. At each interval, Input_2 is processed. After Input_2 has read the new input, converted it to engineering units, checked the alarm condition, and posted monitors to Channel Access, then the calc record &amp;quot;Calculation_2&amp;quot; is processed. Calculation_2 reads the input, performs the calculation, checked the alarm condition, and posted monitors to Channel Access, then the ao record &amp;quot;Output_2&amp;quot; is processed.  Output_2 reads the desired output, rate limits it, clamps the range, calls the device support for the OUT field, checks alarms, posts monitors and then is complete.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_2&amp;quot;&amp;gt;Figure 2&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RecordProcessingFLNK.jpg|thumb|Description]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A more complex use of passive scanning causes passive records to inherit the scan traits of the records to which they are connected. Let's look at the simple case ([[#Figure 2|''Figure 2'']]) where two analog input records (AI) get their input from the VAL field of a calculation record (CALC). Each analog input (Record_3, Record_4) has a forward link (FLNK) pointing to the calculation record (Record_5). In VDCT, FLNKs connect directly to another record, unlike CapFast where FLNK connects to SLNK field. However, this is just a way to specify to which record FLNK points to. In EPICS, a FLNK of Record_3 and Record_4 merely contains the name of another record (Record_5).&lt;br /&gt;
&lt;br /&gt;
==== Input Links =====&lt;br /&gt;
&lt;br /&gt;
For example, [[#Figure 1|''Figure 1'']] presents a VDCT schematic of two records, Record_1 and Record_2. Record_1 is an analog output record. Most output records have a DOL or Desired Output Link, from which they can retrieve the value that they output. Thus, the DOL link is an input link which can be process passive. The blue line connecting the records is a data link. In this case it means that the DOL link is connected to the VAL field of Record_2. In other words, Record_1 retrieves its value, the value that it outputs, from Record_2. When Record_1 begins processing, it will first retrieve the value from the field connected to DOL, which, in this case, is the VAL field of Record_2. If DOL is process passive, it will cause Record_1 to be processed when the value is retrieved. Record_2 will then process. After Record_1 finishes processing, the value from its VAL field will be retrieved by DOL. Record_1 will then finish its processing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_1&amp;quot;&amp;gt;Figure 1&amp;lt;/H5&amp;gt;&lt;br /&gt;
[[Image:RecordProcessing1PP.jpg|thumb|Description]]&lt;br /&gt;
[[Image:RecordProcessingPhase.jpg|thumb|Description]]&lt;br /&gt;
[[Image:RecordProcessing1.jpg|Figure 2]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-1.gif|Figure 1]]&lt;br /&gt;
[[Image:RRM 3-14 Concepts-2.gif|Figure 2]]&lt;br /&gt;
&lt;br /&gt;
If NPP is specified as an input link's attribute, the value is retrieved as is from the other record without causing the other record to process. So in the above example, if DOL didn't specify process passive, record 1 would not cause record 2 to process.&lt;br /&gt;
&lt;br /&gt;
Let's consider a few more examples of passive scanning.&lt;br /&gt;
&lt;br /&gt;
Consider a case where an analog output is controlled only by the operator. There is no reason to process this record until the operator changes the desired output. (This is done by writing to the VAL field.) If this record is passive, the database access routine that places the new desired output into the record will cause it to be processed immediately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The calculation record's SCAN field specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the SCAN field of the analog input Record_3 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt;, and the SCAN field of the analog input Record_4 specifies &amp;lt;code&amp;gt;I/O Intr&amp;lt;/code&amp;gt;. In this example the calculation will be processed every two seconds and whenever the I/O card interrupts. Thus, the calculation inherits the periodic scanning trait of the first analog input record and the I/O event scanning trait of the second. Each time the calc record Record_5 is processed, it will retrieve values from the locations specified in its input links and perform its calculation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, let's look at a continuous control loop ([[#Figure 3|''Figure 3'']]). In this case the analog input Record_6, which is scanned every 0.1 seconds, has a forward link to the calculation record Record_7, and the calculation record, in turn, has a forward link to the analog output Record_8. Every 0.1 seconds the analog input will process, converting its value and causing the calc record to process. The calc record will make its calculation, causing the analog output record to process. The analog output will then write its output after fetching, if necessary, its desired output. If the operator changes a value in the calculation, this will also cause the calc record to perform its calculation and the analog output to write its output, since the calc and the analog output record are passive.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_3&amp;quot;&amp;gt;Figure 3&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-3.gif|Figure 3]]&lt;br /&gt;
&lt;br /&gt;
Let's consider a case ([[#Figure 4|''Figure 4'']]) where values are fetched from other records via input links. When a record fetches a value from another record, the other record is first processed, only if the other record is passive and only if the link specifies process passive or &amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;. As an example, suppose a calculation record Record_11 has two input links, each of which specifies an analog input record (Record_9, Record_10) and each of which specifies process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;). Suppose also that the calculation record specifies &amp;lt;code&amp;gt;1 second&amp;lt;/code&amp;gt; in its SCAN field, meaning that it is scanned every second. Every second, the calc record will cause each analog input to process before fetching the values, provided that each analog input specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_4&amp;quot;&amp;gt;Figure 4&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-4.gif|Figure 4]]&lt;br /&gt;
&lt;br /&gt;
In a variation of this example ([[#Figure 5|''Figure 5'']]), suppose one of the analog inputs Record_13 specifies &amp;lt;code&amp;gt;2 second&amp;lt;/code&amp;gt; in its SCAN field which means it would no longer be a passive record. Thus, the periodically scanned analog input will ''not'' be processed every time the calculation is processed. Its current value will simply be fetched as is; then the other analog input Record_12 will be processed and the calculation performed. The same thing would occur if the calculation's INPB link of calc Record_14 specified NPP or no process passive. In this case, even if the analog input's SCAN field specified &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;, the value would be fetched as is without causing the analog input to process.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_5&amp;quot;&amp;gt;Figure 5&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-5.gif|Figure 5]]&lt;br /&gt;
&lt;br /&gt;
=== Passive Scanning and Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
Passive scanning differs somewhat for Channel Access links. A Channel Access link is an input link or output link that specifies a link to a record located in another IOC (a forward processing link can be a CA link under certain circumstances). In addition, as of Release 3.13 input and output links can be forced to be Channel Access links even if they reference a record located in the same database. Input links can specify CA, CP, or CPP. If the input link specifies CA, it will be forced to be a Channel Access link. If the input link specifies CP, it will also be forced to be a Channel Access link; in addition, it will cause the record containing the input link to process whenever a monitor is posted, no matter what the record's SCAN field specifies. If the input link specifies CPP, it means the same thing as CP, except that the record will be processed if and only if the record itself specifies passive in its SCAN field. Output links can specify CA, which will simply cause them to be Channel Access links.&lt;br /&gt;
&lt;br /&gt;
Channel Access links, be they between records located in different IOCs or between records located in the same IOC, cannot be process passive, e.g., they cannot cause the record they specify to process when written to or read from.&lt;br /&gt;
&lt;br /&gt;
== Phase ==&lt;br /&gt;
&lt;br /&gt;
The PHAS field is used to order the processing of records that are scanned at the same time, i.e., records that are scanned periodically at the same interval and priority, or that are scanned on the same event. In this manner records dependent upon other records can be assured of using current data.&lt;br /&gt;
&lt;br /&gt;
To illustrate this we will look at an example from the previous section, with the records, however, being scanned periodically instead of passively ([[#Figure 6|''Figure 6'']]). In this example each of these records specifies &amp;lt;code&amp;gt;.1 second&amp;lt;/code&amp;gt;; thus, the records are synchronous. The phase sequence is used to assure that the analog input is processed first, meaning that it fetches its value from the specified location and places it in the VAL field (after any conversions). Next, the calc record will be processed, retrieving its value from the analog input and performing its calculation. Lastly, the analog output will be processed, retrieving its desired output value from the calc record's VAL field (the VAL field contains the result of the calc record's calculations) and writing that value to the location specified it its OUT link. In order for this to occur, the PHAS field of the analog input record must specify 0, the PHAS field of the calculation record must specify 1, and the analog output's PHAS field must specify 2.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_6&amp;quot;&amp;gt;Figure 6&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-6.gif|Figure 6]]&lt;br /&gt;
&lt;br /&gt;
It is important to understand that in the above example, no record causes another to be processed. The phase mechanism instead causes each to process in sequence.&lt;br /&gt;
&lt;br /&gt;
== Forward Process Links ==&lt;br /&gt;
&lt;br /&gt;
When the ''forward processing link'' field (FLNK) of one record contains an address of a second record, it causes the second record to be processed after the first record is itself processed.&lt;br /&gt;
&lt;br /&gt;
We discussed forward links in the section on [[#Passive Scanning|passive processing]]. To reiterate, this field causes the record that it specifies to be scanned when the record that contains the forward link is scanned. It is thus used to cause related records to process. (For more on specifying records in link fields, see [[#Address Specification|''Address Specification'']]).&lt;br /&gt;
&lt;br /&gt;
If a forward link references the PROC field of a record in another IOC, a Channel Access &amp;quot; put&amp;quot; request is directed to the specified record, causing it to process.&lt;br /&gt;
&lt;br /&gt;
One record type exists solely to propagate forward processing: the fanout record. The fanout record is used when there is more than one record which needs to be processed as a result of another record being processed. It can specify as many as six forward links. Let's look at an example where an analog input's value is used in two different calculations ([[#Figure 7|''Figure 7'']]). Because there is only one forward processing link in the analog input record, it is used to process the fanout record. Here two of the fanout records forward links are used to link to two calculation records. In the example, when the I/O interrupt occurs, the analog input is processed, then the fanout record is processed, causing each of the calculation records to be processed. Note that the fanout record simply causes the specified records to process. It does not send values to other records. The ''data fanout'' record, on the other hand, does send values to other records. Refer to [[RRM 3-14 Fanout|''Fanout'']], and [[RRM 3-14 Dfanout|''dfanout'']], for more information on the fanout and data fanout records.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_7&amp;quot;&amp;gt;Figure 7&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-14 Concepts-7.gif|Figure 7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Address Specification =&lt;br /&gt;
&lt;br /&gt;
Address parameters specify where an input record obtains input, where an output record obtains its desired output values, and where an output record writes its output. They are used to identify links between records, and to specify the location of hardware devices. The most common link fields are OUT, an output link, INP, an input link, and DOL (desired output location), also an input link.&lt;br /&gt;
&lt;br /&gt;
There are three basic types of address specifications which can appear in these fields: hardware addresses, database addresses, and constants.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: Not all links support all three types, though some do. However, this doesn't hold true for algorithmic records, which cannot specify hardware addresses. Algorithm records are records like the Calculation, PID, and Select records. These records are used to process values retrieved from other records. Consult the documentation for each record consult. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Hardware Addresses ==&lt;br /&gt;
&lt;br /&gt;
Hardware addresses are used to specify input and output connections to hardware devices. They give the information needed by the IOC to interface to the instrumentation. There are currently eight I/O buses supported: VME, Allen-Bradley, CAMAC, GPIB, BITBUS, INST, VXI, and RF. The input specification for each of these is different.&lt;br /&gt;
&lt;br /&gt;
=== VME Bus ===&lt;br /&gt;
&lt;br /&gt;
The VME address specification format differs between the various devices. In all of these specifications the '#' character designates a hardware address. The three formats are:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#C''x'' S''y'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For analog in, analog out, and timer&lt;br /&gt;
:* C precedes the card number ''x''&lt;br /&gt;
:* S precedes the signal number ''y''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number in the VME addresses refers to the logical card number. Card numbers are assigned by address convention; their position in the backplane is of no consequence. The addresses are assigned by the technician who populates the backplane, with the logical numbers well-documented. The logical card numbers start with 0 as do the signal numbers. ''parm'' refers to an arbitrary string of up to 31 characters and is device specific.&lt;br /&gt;
&lt;br /&gt;
=== Allen-Bradley Bus ===&lt;br /&gt;
&lt;br /&gt;
The Allen-Bradley address specification is a bit more complicated as it has several more fields. The '#' designates a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' C''c'' S''d'' @''parm'&amp;lt;/code&amp;gt;&lt;br /&gt;
: All record types&lt;br /&gt;
:* L precedes the serial link number ''a'' and is optional - default 0&lt;br /&gt;
:* A precedes the adapter number ''b'' and is optional - default 0&lt;br /&gt;
:* C precedes the card number ''c''&lt;br /&gt;
:* S precedes the signal number ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The card number for Allen-Bradley I/O refers to the physical slot number, where 0 is the slot directly to the right of the adapter card. The Allen-Bradley I/O has 12 slots available for I/O cards numbered 0 through 11. Allen-Bradley I/O may use double slot addresses which means that slots 0,2,4,6,8, and 10 are used for input modules and slots 1,3,5,7,9 and 11 are used for output modules. It's required to use the double slot addressing mode when the 1771IL card is used as it only works in double slot addressing mode. This card is required as it provides Kilovolt isolation.&lt;br /&gt;
&lt;br /&gt;
=== Camac Bus ===&lt;br /&gt;
&lt;br /&gt;
The CAMAC address specification is similar to the Allen-Bradley address specification. The '#' signifies a hardware address. The format is:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#B''a'' C''b'' N''c'' A''d'' F''e'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For waveform digitizers&lt;br /&gt;
:* B precedes the branch number ''a''&lt;br /&gt;
:* C precedes the crate number ''b''&lt;br /&gt;
:* N precedes the station number ''c''&lt;br /&gt;
:* A precedes the subaddress ''d'' (optional)&lt;br /&gt;
:* F precedes the function ''e'' (optional)&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
The waveform digitizer supported is only one channel per card; no channel was necessary.&lt;br /&gt;
&lt;br /&gt;
=== Others ===&lt;br /&gt;
&lt;br /&gt;
The GPIB, INST, BITBUS, RF, and VXI card-types have been added to the supported I/O cards. A brief description of the address format for each follows. For a further explanation, see the specific documentation on each card.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' A''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For GPIB I/O&lt;br /&gt;
:* L precedes the link number ''a''&lt;br /&gt;
:* A precedes the GPIB address ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#L''a'' N''b'' P''c'' S''d'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For BITBUS I/O&lt;br /&gt;
:* L precedes the link ''a'', i.e., the VME bitbus interface&lt;br /&gt;
:* N precedes the bitbus node ''b''&lt;br /&gt;
:* P precedes the port on node ''c''&lt;br /&gt;
:* S precedes the signal on port ''d''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#@''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For INST I/O&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' C''b'' S''c'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, dynamic addressing&lt;br /&gt;
:* V precedes the VXI frame number ''a''&lt;br /&gt;
:* C precedes the slot within VXI frame ''b''&lt;br /&gt;
:* S precedes the signal number ''c''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;#V''a'' S''b'' @''parm''&amp;lt;/code&amp;gt;&lt;br /&gt;
: For VXI I/O, static addressing&lt;br /&gt;
:* V precedes the logical address ''a''&lt;br /&gt;
:* S precedes the signal number ''b''&lt;br /&gt;
:* @ precedes optional string ''parm''&lt;br /&gt;
&lt;br /&gt;
== Database Addresses ==&lt;br /&gt;
&lt;br /&gt;
Database addresses are used to specify input links, desired output links, output links, and forward processing links. The format in each case is the same:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;RecordName&amp;gt;.&amp;lt;FieldName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;code&amp;gt;RecordName&amp;lt;/code&amp;gt; is simply the name of the record being referenced and &amp;lt;code&amp;gt;FieldName&amp;lt;/code&amp;gt; is the name of the field within the record.&lt;br /&gt;
&lt;br /&gt;
The record name and field name specification are case sensitive. The record name entered in Capfast (or whatever other configuration tool) can be a mix of upper and lower case letters. The field name is always upper case. If no field name is specified as part of an address, the value field (VAL) of the record is assumed. Forward processing links do not need to include the field name because no value is returned when a forward processing link is used; therefore, a forward processing link need only specify a record name.&lt;br /&gt;
&lt;br /&gt;
For inputs and desired output links, the specified record is processed before the value has been read, and for output links the specified record is processed after the value has been written. In the case of the forward processing link, the record being referenced is processed after the record making the link is processed.&lt;br /&gt;
&lt;br /&gt;
Remember that input links such as INP and DOL (desired output location), can specify process passive (&amp;lt;code&amp;gt;PP&amp;lt;/code&amp;gt;) or no process passive (&amp;lt;code&amp;gt;NPP&amp;lt;/code&amp;gt;). When a record's input link specifies a database address, the record specified by the address will process only if the input link specifies process passive and only if the addressed record specifies &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt; in its SCAN field. If the input link specifies no process passive (NPP), the addressed record will not be processed even if it is a passive record. Because output links such as OUT are always process passive, they always cause the specified record to be processed, provided that the specified record's SCAN field is configured as &amp;lt;code&amp;gt;Passive&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Basic typecast conversions are made automatically when a value is retrieved from another record--integers are converted to floating point numbers and floating point numbers are converted to integers. For example, a calculation record which uses the value field of a binary input will get a floating point 1 or 0 to use in the calculation, because a calculation record's value fields are floating point numbers. If the value of the calculation record is used as the desired output of a multi-bit binary output, the floating point result is converted to an integer, because multi-bit binary outputs use integers.&lt;br /&gt;
&lt;br /&gt;
Be aware that other types of conversions may not be made when a value is retrieved from another record. Whether it does or doesn't depends on the record and the device support routine which the record specifies. Most records must specify a device support routine in their DTYP field. Device support routines take care of the specifics of input and output. For such records, there are device support routines for hardware I/O, and other routines for I/O between records. For example, the analog input has many device support routines for input from hardware, and two routines specific for retrieving input from other records: &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Raw Soft Channel&amp;lt;/code&amp;gt; retrieves the input value and performs the specified linear conversions on the value (that is, if the record is configured to perform linear conversions). The &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine, on the other hand, reads the value directly into the VAL field and doesn't perform any linear conversions on the value.&lt;br /&gt;
&lt;br /&gt;
Records that use soft device support routines or have no hardware device support routines are called ''soft records''. See the chapter on each record for information about that record's device support.&lt;br /&gt;
&lt;br /&gt;
=== Channel Access Links ===&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
'''Note: Link fields can reference records in a different database, that is, a database that resides in a different IOC. Records residing on different IOCs connect through channel access, so any link that refers to a record in another IOC is called a channel access link. The format of a channel access link does not differ from that of a regular database link.'''&lt;br /&gt;
&lt;br /&gt;
'''Channel access links are created when the database is initialized. When the initialization routines cannot find the link in the local database, a channel access link is created.'''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As of Release 3.13.0, input and output links can also be forced to be Channel Access links, even when they are located in the same IOC. Input links can specify either CA, CP, or CPP. Specifying CA forces the input link to be a Channel Access link. When an input link becomes a Channel Access link, a Channel Access monitor is established on the field and a buffer is allocated for the field using the field type and the element count of the field. In addition to the value of the input link, the alarm status of the link is monitored. Specifying CP or CPP also forces the input link to be a Channel Access link, but in addition, CP or CPP will force the record that contains the link to be processed when a monitor occurs, that is, if the record is process passive.&lt;br /&gt;
&lt;br /&gt;
Output links can also specify CA, in which case they will be forced to be Channel Access links. When an output link becomes a Channel Access link, a buffer is allocated the first time a &amp;quot;put&amp;quot; operation occurs on the record containing the link. Each time a &amp;quot;put&amp;quot; occurs for the record, the data is retrieved from the buffer. And the buffer is updated. The CP and CPP options are not available for output links.&lt;br /&gt;
&lt;br /&gt;
Forward links can also be Channel Access links, either when they specify a record located in another IOC or when they specify the CA attributes. However, forward links will only be made Channel Access links if they specify the PROC field of another record.&lt;br /&gt;
&lt;br /&gt;
Because of the nature of Channel Access links, they cannot be process passive. For example, if an input link that specifies another record in another IOC but also specifies PP, the PP attribute will be ignored. Another aspect of Channel Access links is that they are never placed in the same lock set as the records they link to.&lt;br /&gt;
&lt;br /&gt;
== Constants ==&lt;br /&gt;
&lt;br /&gt;
Input link fields and desired output location fields can specify a constant instead of a hardware or database address. A constant, which is not really an address, can be an integer value in whatever format (hex, decimal, etc.) or a floating-point value. The value field is initialized to the constant when the database is initialized, and at run-time the value field can be changed by a database access routine. For instance, a constant may be used in an input link of a calculation record. For non-constant links, the calc record retrieves the values from the input links, and places them in a corresponding value field. For constant links, the value fields are initialized with the constant, and the values can be changed by modifying the value field, not the link field. Thus, because the calc record uses its value fields as the operands of its expression, the constant becomes part of the calculation.&lt;br /&gt;
&lt;br /&gt;
When nothing is specified in a link field, it is a NULL link. Before Release 3.13, the value fields associated with the NULL link were initialized with the value of zero. As of Release 3.13, the value fields associated with the links are not initialized&lt;br /&gt;
&lt;br /&gt;
A constant may also be used in the desired output location or DOL field of an output record. In such a case, the initial desired output value (VAL) will be that constant. Any specified conversions are performed on the value before it is written as long as the device support module supports conversions (the &amp;lt;code&amp;gt;Soft Channel&amp;lt;/code&amp;gt; device support routine does not perform conversions). The desired output value can be changed by an operator at run-time by writing to the value field.&lt;br /&gt;
&lt;br /&gt;
A constant can be used in an output link field, but no output will be written if this is the case. Be aware that this is not considered an error by the database checking utilities.&lt;br /&gt;
&lt;br /&gt;
= Conversion Specification =&lt;br /&gt;
&lt;br /&gt;
Conversion parameters are used to convert transducer data into meaningful data. Discrete signals require converting between levels and states (i.e., on, off, high, low, etc.). Analog conversions require converting between levels and engineering units (i.e., pressure, temperature, level, etc.). These conversions are made to provide operators and application codes with values in meaningful units.&lt;br /&gt;
&lt;br /&gt;
The following sections discuss these types of conversions. The actual field names appear in capital letters.&lt;br /&gt;
&lt;br /&gt;
== Discrete Conversions ==&lt;br /&gt;
&lt;br /&gt;
The most simple type of discrete conversion would be the case of a discrete input that indicates the on/off state of a device. If the level is high it indicates that the state of the device is on. Conversely, if the level is low it indicates that the device is off. In the database, parameters are available to enter strings which correspond to each level, which, in turn, correspond to a state (0,1). By defining these strings, the operator is not required to know that a specific transducer is on when the level of its transmitter is high or off when the level is low. In a typical example, the conversion parameters for a discrete input would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One Name (ONAM):'''&lt;br /&gt;
: On&lt;br /&gt;
&lt;br /&gt;
The equivalent discrete output example would be an on/off controller. Let's consider a case where the safe state of a device is &amp;lt;code&amp;gt;On&amp;lt;/code&amp;gt;, the zero state. The level being low drives the device on, so that a broken cable will drive the device to a safe state. In this example the database parameters are entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Zero Name (ZNAM): '''&lt;br /&gt;
: On&lt;br /&gt;
; '''One Name (ONAM): '''&lt;br /&gt;
: Off&lt;br /&gt;
&lt;br /&gt;
By giving the outside world the device state, the information is clear. Binary inputs and binary outputs are used to represent such on/off devices.&lt;br /&gt;
&lt;br /&gt;
A more complex example involving discrete values is one that has many states such as a multi-bit binary output record. Consider a motor which has four states--off, low, medium, and high. A device of this type may have three control lines and three more monitor lines. Each line represents one of the on states (low, medium, or high). The bit pattern for each control state is entered into the database with the string that describes that state. The database parameters for the monitor would be entered as follows:&lt;br /&gt;
&lt;br /&gt;
; '''Number of Bits (NOBT): '''&lt;br /&gt;
: 3&lt;br /&gt;
; '''First Input Bit Spec (INP): '''&lt;br /&gt;
: Address of the least significant bit&lt;br /&gt;
; '''Zero Value (ZRVL):'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''One Value (ONVL):'''&lt;br /&gt;
: 1&lt;br /&gt;
; '''Two Value (TWVL):'''&lt;br /&gt;
: 2&lt;br /&gt;
; '''Three Value (THVL):'''&lt;br /&gt;
: 4&lt;br /&gt;
; '''Zero String (ZRST):'''&lt;br /&gt;
: Off&lt;br /&gt;
; '''One String (ONST):'''&lt;br /&gt;
: Low&lt;br /&gt;
; '''Two String (TWST):'''&lt;br /&gt;
: Medium&lt;br /&gt;
; '''Three String (THST):'''&lt;br /&gt;
: High&lt;br /&gt;
&lt;br /&gt;
In this case, when the database record is scanned, the monitor bits are read and compared with the bit patterns for each state. When the bit pattern is found, the device is set to that state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0100&amp;lt;/code&amp;gt; (4), the three value is the corresponding value, and the device would be set to state 3 which drives the device to its high level. The value can be displayed as an integer, in which case the value would be 3, or as a string, in which case the value would be 'High'.&lt;br /&gt;
&lt;br /&gt;
If the bit pattern is not found, the device is in an unknown state. For instance, if the three monitor bits read equal &amp;lt;code&amp;gt;0111&amp;lt;/code&amp;gt; (7) and there are no equivalent values, then the value is set to -1, the condition of the record is set to UNKNOWN alarm, and the alarm severity is set to whatever alarm severity is configured for the unknown state (see [[#Alarm Specification|''Alarm Specification'']]).&lt;br /&gt;
&lt;br /&gt;
In addition, the DOL fields of binary output records (bo and mbbo) will accept values in strings. When they retrieve the string or when the value field is given a string via &amp;lt;code&amp;gt;put_enum_strs&amp;lt;/code&amp;gt;, a match is sought with one of the states. If a match is found, the value for that state is written.&lt;br /&gt;
&lt;br /&gt;
== Analog Conversions ==&lt;br /&gt;
&lt;br /&gt;
Analog conversions require knowledge of the transducer, the filters, and the I/O cards. Together they measure the process, transmit the data, and interface the data to the IOC. Smoothing is available to filter noisy signals. The smoothing argument is a constant between 0 and 1 and is specified in the SMOO field. It is applied to the converted hardware signal as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units = (new eng units &amp;amp;times; (1 - smoothing)) + (old eng units &amp;amp;times; smoothing)&lt;br /&gt;
&lt;br /&gt;
The analog conversions from raw values to engineering units can be either linear or breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
Whether an analog record performs linear conversions, breakpoint conversions, or no conversions at all depends on how the record's LINR field is configured. The possible choices for the LINR field are as follows:&lt;br /&gt;
&lt;br /&gt;
* LINEAR&lt;br /&gt;
* NO CONVERSION&lt;br /&gt;
* typeKdegF&lt;br /&gt;
* typeKdegC&lt;br /&gt;
* typeJdegF&lt;br /&gt;
* typeJdegC&lt;br /&gt;
&lt;br /&gt;
If LINEAR is chosen, the record performs a linear conversion on the data. If NO CONVERSION is chosen, the record performs no conversion on its data. The other choices are the names of breakpoint tables. When one of these is specified in the LINR field, the record uses the specified table to convert its data. (Note that additional breakpoint tables are often added at specific sites, so more breakpoint tables than are listed here may be available at the user's site.) The following sections explain linear and breakpoint conversions.&lt;br /&gt;
&lt;br /&gt;
=== Linear Conversions ===&lt;br /&gt;
&lt;br /&gt;
There are three formulas to know when considering the linear conversion parameters. The conversion from measured value to engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = eng units low + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (eng units full scale - eng units low)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;full scale A/D counts&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The engineering units full scale and low scale are specified in the EGUF and EGUL fields, respectively. The values of the EGUF and EGUL fields correspond to the maximum and minimum values of the transducer, respectively. Thus, the value of these fields is device dependent. For example, if the transducer has a range of -10 to +10 volts, then the EGUF field should be 10 and the EGUL field should be -10.&lt;br /&gt;
&lt;br /&gt;
In the following examples the determination of engineering units full scale and low scale is shown. The conversion to engineering units is also shown to familiarize the reader with the signal conversions from signal source to database engineering units.&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
| '''Note: The engineering units field (EGU) in an analog record has nothing to do with the conversions. The EGU field simply contains a string that should describe the engineering units used by the record, such as PSI for an analog input that reads values from a device that transmits pressure. Thus, the EGU field is meant for the operator's sake. '''&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Transducer Matches the I/O module ====&lt;br /&gt;
&lt;br /&gt;
First let us consider a linear conversion. In this example, the transducer transmits 0-10 Volts, there is no amplification, and the I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d1.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer transmits pressure: 0 PSI at 0 Volts and 175 PSI at 10 Volts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10.0&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; 0.0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog input record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175.0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the pressure is 175 PSI, 10 Volts is sent to the I/O module. At 10 Volts the signal is read as 4095. When this is plugged into the conversion, the value is 175 PSI.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Lower than the I/O module ====&lt;br /&gt;
&lt;br /&gt;
Let's consider a variation of this linear conversion where the transducer is 0-5 Volts.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d2.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 5 Volts at 175 PSI. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units low scale = 35 &amp;amp;times; 10&lt;br /&gt;
 eng. units full scale = 35 &amp;amp;times; 0&lt;br /&gt;
&lt;br /&gt;
The field entries in an analog record to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 350&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = 0 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (350 - 0)&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 5 Volts to represent 175 PSI. This is only half of what the input card accepts; input is 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 0 + (2048 / 4095) * (350 - 0) = 175&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units full scale to compensate for the difference between the transmitter and the analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Transducer Positive and I/O module bipolar ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts (i.e. Bipolar instead of Unipolar).&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d3.gif]]&lt;br /&gt;
&lt;br /&gt;
In this example the transducer is producing 0 Volts at 0 PSI and 10 Volts at 175 PSI. The input module has a different range of voltages and the engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng. units full scale = 17.5 &amp;amp;times; 10&lt;br /&gt;
 eng. units low scale = 17.5 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
The database entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR: '''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 175&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: -175&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -175 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (175 - (-175))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -175 + (2048 / 4095) * (175 - -175) = 0&lt;br /&gt;
&lt;br /&gt;
In this example we had to adjust the engineering units low scale to compensate for the difference between the unipolar transmitter and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
==== Combining Linear Conversion with an Amplifier ====&lt;br /&gt;
&lt;br /&gt;
Let's consider another variation of this linear conversion where the input card accepts -10 Volts to 10 Volts, the transducer transmits 0 - 2 Volts for 0 - 175 PSI and a 2x amplifier is on the transmitter.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d4.gif]]&lt;br /&gt;
&lt;br /&gt;
At 0 PSI the transducer transmits 0 Volts. This is amplified to 0 Volts. At half scale, it is read as 2048. At 175 PSI, full scale, the transducer transmits 2 Volts, which is amplified to 4 Volts. The analog input card sees 4 Volts as 70 percent of range or 2867 counts. The engineering units full scale and low scale are determined as follows:&lt;br /&gt;
&lt;br /&gt;
 eng units full scale = 43.75 &amp;amp;times; 10&lt;br /&gt;
 eng units low scale = 43.75 &amp;amp;times; (-10)&lt;br /&gt;
&lt;br /&gt;
(175 / 4 = 43.75) The record's field entries to convert this pressure will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: Linear&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 437.5&lt;br /&gt;
; '''EGUL: '''&lt;br /&gt;
: -437.5&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: PSI&lt;br /&gt;
&lt;br /&gt;
The conversion will also take into account the precision of the I/O module. In this example (assuming a 12 bit analog input card) the conversion is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;TABLE&amp;gt;&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;eng units = -437.5 + (&lt;br /&gt;
&amp;lt;TD&amp;gt;measured A/D counts&lt;br /&gt;
&amp;lt;TD ROWSPAN=3&amp;gt;) &amp;amp;times; (437.5 - (-437.5))&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;----------------------------&lt;br /&gt;
&amp;lt;TR&amp;gt;&lt;br /&gt;
&amp;lt;TD ALIGN=CENTER&amp;gt;4095&lt;br /&gt;
&amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that at low scale the transducer will generate 0 Volts to represent 0 PSI. Because this is half of what the input card accepts, it is input as 2048. Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2048 / 4095) * (437.5 - -437.5) = 0&lt;br /&gt;
&lt;br /&gt;
Notice that at full scale the transducer will generate 2 volts which represents 175 PSI. The amplifier will change the 2 Volts to 4 Volts. 4 Volts is 14/20 or 70 percent of the I/O card's scale. The input from the I/O card is therefore 2866 (i.e., 0.7 * 4095). Let's plug in the numbers to see the result:&lt;br /&gt;
&lt;br /&gt;
 -437.5 + (2866 / 4095) * (437.5 - -437.5) = 175 PSI&lt;br /&gt;
&lt;br /&gt;
We had to adjust the engineering units full scale to adjust for the difference between the transducer with the amplifier affects and the range of the I/O card. We also adjusted the low scale to compensate for the difference between the unipolar transmitter/amplifier and the bipolar analog input card.&lt;br /&gt;
&lt;br /&gt;
=== Breakpoint Conversions ===&lt;br /&gt;
&lt;br /&gt;
Now let us consider a non-linear conversion, otherwise known as a breakpoint conversion. In this example the transducer is a thermocouple which transmits 0-20 milliAmps. An amplifier is present which amplifies milliAmps to volts. The I/O card uses a 0-10 Volt interface.&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts d5.gif]]&lt;br /&gt;
&lt;br /&gt;
The transducer is transmitting temperature. The database entries in the analog input record that are needed to convert this temperature will be as follows:&lt;br /&gt;
&lt;br /&gt;
; '''LINR:'''&lt;br /&gt;
: typeJdegC&lt;br /&gt;
; '''EGUF:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGUL:'''&lt;br /&gt;
: 0&lt;br /&gt;
; '''EGU:'''&lt;br /&gt;
: DGC&lt;br /&gt;
&lt;br /&gt;
For analog records that use breakpoint tables, the EGUF and EGUL fields are not used in the conversion, so they do not have to be given values. Instead, this conversion is completed by performing a table lookup. The value read from the device is known as the ''raw value'', which is initially read into the RVAL (raw value) field. This raw value is then used to identify the line segment in which this value falls. Each entry of the table includes a beginning point for the segment, the floating engineering units value at the point, and the slope of the line segment. The conversion to the engineering units is as follows:&lt;br /&gt;
&lt;br /&gt;
 final value = eng. units + (raw value - first point) &amp;amp;times; slope&lt;br /&gt;
&lt;br /&gt;
There are currently lookup tables for J and K thermocouples in degrees F and degrees C.&lt;br /&gt;
&lt;br /&gt;
Other applications for a lookup table are the remainder of the thermocouples, logarithmic output controllers, and exponential transducers. We have chosen the piece-wise linearization of the signals to perform the conversion, as they provide a mechanism for conversion that minimizes the amount of floating point arithmetic required to convert non-linear signals. Additional breakpoint tables can be added to the existing breakpoints.&lt;br /&gt;
&lt;br /&gt;
There are two ways to create a new breakpoint table:&lt;br /&gt;
&lt;br /&gt;
1. Simply type in the data for each segment, giving the raw and corresponding engineering unit value for each point in the following format.&lt;br /&gt;
&lt;br /&gt;
 breaktable(&amp;lt;tablename&amp;gt;) {&lt;br /&gt;
 	&amp;lt;first point&amp;gt; &amp;lt;first eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;next point&amp;gt; &amp;lt;next eng units&amp;gt;&lt;br /&gt;
 	&amp;lt;etc.&amp;gt; &amp;lt;...&amp;gt;&lt;br /&gt;
 	}&lt;br /&gt;
&lt;br /&gt;
where the &amp;lt;code&amp;gt;&amp;lt;tablename&amp;gt;&amp;lt;/code&amp;gt; is the name of the table, such as typeKdegC, and &amp;lt;code&amp;gt;&amp;lt;first point&amp;gt;&amp;lt;/code&amp;gt; is the raw value of the beginning point for each line segment, and &amp;lt;code&amp;gt;&amp;lt;first eng units&amp;gt;&amp;lt;/code&amp;gt; is the corresponding engineering unit value. The slope is calculated by the software and should not be specified.&lt;br /&gt;
&lt;br /&gt;
2. Create a file consisting of a table of an arbitrary number of values in engineering units and use the utility called '''makeBpt''' to convert the table into a breakpoint table. As an example, the contents data file to create the typeJdegC breakpoint table look like this:&lt;br /&gt;
&lt;br /&gt;
 !header&lt;br /&gt;
 &amp;quot;typeJdegC&amp;quot; 0 0 700 4095 .5 -210 760 1&lt;br /&gt;
 !data&lt;br /&gt;
 -8.096 -8.076 -8.057 ''many more numbers''&lt;br /&gt;
&lt;br /&gt;
The file must have the extension &amp;lt;code&amp;gt;.data&amp;lt;/code&amp;gt;. The file must first have a header specifying these nine things:&lt;br /&gt;
&lt;br /&gt;
# Name of breakpoint table in quotes: '''&amp;quot;typeJdegC&amp;quot;'''&lt;br /&gt;
# Engineering units for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Raw value for 1st breakpoint table entry: '''0'''&lt;br /&gt;
# Highest value desired in engineering units: '''700'''&lt;br /&gt;
# Raw value corresponding to high value in engineering units: '''4095'''&lt;br /&gt;
# Allowed error in engineering units: '''.5'''&lt;br /&gt;
# Engineering units corresponding to first entry in data table: '''-210'''&lt;br /&gt;
# Engineering units corresponding to last entry in data table: '''760'''&lt;br /&gt;
# Change in engineering units between data table entries: '''1'''&lt;br /&gt;
&lt;br /&gt;
The rest of the file contains lines of equally spaced engineering values, with each line no more than 160 characters before the new-line character. The header and the actual table should be specified by !header and !data, respectively. The file for this data table is called &amp;lt;code&amp;gt;typeJdegC.data&amp;lt;/code&amp;gt;, and can be converted to a breakpoint table with the '''makeBpt''' utility as follows:&lt;br /&gt;
&lt;br /&gt;
 unix% makeBpt TypeJdegC.data&lt;br /&gt;
&lt;br /&gt;
= 4.  Alarm Specification =&lt;br /&gt;
&lt;br /&gt;
There are two elements to an alarm condition: the alarm ''status ''and the ''severity'' of that alarm. Each database record contains its current alarm status and the corresponding severity for that status. The scan task which detects these alarms is also capable of generating a message for each change of alarm state. The types of alarms available fall into these categories: scan alarms, read/write alarms, limit alarms, and state alarms. Some of these alarms are configured by the user, and some are automatic which means that they are called by the record support routines on certain conditions, and cannot be changed or configured by the user.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Severity ===&lt;br /&gt;
&lt;br /&gt;
An alarm ''severity'' is used to give weight to the current alarm status. There are four severities:&lt;br /&gt;
&lt;br /&gt;
* NO_ALARM&lt;br /&gt;
* MINOR&lt;br /&gt;
* MAJOR&lt;br /&gt;
* INVALID&lt;br /&gt;
&lt;br /&gt;
NO_ALARM means no alarm has been triggered. An alarm state that needs attention but is not dangerous is a MINOR alarm. In this instance the alarm state is meant to give a warning to the operator. A serious state is a MAJOR alarm. In this instance the operator should give immediate attention to the situation and take corrective action. An INVALID alarm means there's a problem with the data, which can be any one of several problems; for instance, a persons trips over some wires, unplugging them, which disables the sensors, which means that a new value couldn't be scanned for the record. In that case, an alarm of INVALID severity will be triggered. When a system is being tested, an INVALID alarm can point to a simple configuration problem. However, when the system is actually on-line, an INVALID alarm can signal a much more serious problem.&lt;br /&gt;
&lt;br /&gt;
For limit alarms and state alarms, the severity can be configured by the user to be MAJOR or MINOR for the a specified state. For instance, an analog record can be configured to trigger a MAJOR alarm when its value exceeds 175.0. In addition to the MAJOR and MINOR severities, the user can choose the NO_ALARM severity, in which case no alarm is generated for that state.&lt;br /&gt;
&lt;br /&gt;
For the other alarm types (i.e., scan, read/write), the severity is always INVALID and not configurable by the user.&lt;br /&gt;
&lt;br /&gt;
=== Scan Alarm ===&lt;br /&gt;
&lt;br /&gt;
A scan alarm is generated if a record is not successfully placed in the desired scan list, or if it is found by the scan task to be locked in ten successive attempts to process it. When a scan alarm occurs, the alarm severity is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Read Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is fetched from hardware or from a database field. If the read routine fails, the READ_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Write Alarm ===&lt;br /&gt;
&lt;br /&gt;
This alarm status is returned when the value is written either to hardware or to a database field. If the write fails, the WRITE_ALARM condition exists. The severity of this alarm condition is always set to INVALID.&lt;br /&gt;
&lt;br /&gt;
=== Limit Alarms ===&lt;br /&gt;
&lt;br /&gt;
For analog records (this includes such records as the stepper motor record), there are configurable alarm limits. There are two limits for above normal operating range and two limits for the below-limit operating range. Each of these limits has an associated alarm severity which is configured in the database. If the record's value drops below the low limit and an alarm severity of MAJOR was specified for that limit, then a MAJOR alarm is triggered. When the severity of a limit is set to NO_ALARM, none will be generated, even if the limit entered has been violated.&lt;br /&gt;
&lt;br /&gt;
There are two limits at each end, two low values and two high values, so that a warning can be set off before the value goes into a dangerous condition.&lt;br /&gt;
&lt;br /&gt;
Analog records also contain a hysteresis field, which is also used when determining limit violations. The hysteresis field is the deadband around the alarm limits. The deadband keeps a signal that is hovering at the limit from generating too many alarms. Let's take an example ([[#Figure 8|''Figure 8'']]) where the range is -100 to 100 volts, the high alarm limit is 30 Volts, and the hysteresis is 10 Volts. If the value is normal and approaches the HIGH alarm limit, an alarm is generated when the value reaches 30 Volts. This will only go to normal if the value drops below the limit by more than the hysteresis. For instance, if the value changes from 30 to 28 this record will remain in HIGH alarm. Only when the value drops to 20 will this record return to normal state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_8&amp;quot;&amp;gt;Figure 8&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-8.gif|Figure 8]]&lt;br /&gt;
&lt;br /&gt;
=== State Alarms ===&lt;br /&gt;
&lt;br /&gt;
For discrete values there are configurable state alarms. In this case a user may configure a certain state to be an alarm condition. Let's consider a cooling fan whose discrete states are high, low, and off. The off state can be configured to be an alarm condition so that whenever the fan is off the record is in a STATE alarm. The severity of this error is configured for each state. In this example, the low state could be a STATE alarm of MINOR severity, and the off state a STATE alarm of MAJOR severity.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field in which the user can specify the severity of an unknown state to NO_ALARM, MINOR or MAJOR. Thus, the unknown state alarm is not automatic.&lt;br /&gt;
&lt;br /&gt;
Discrete records also have a field which can specify an alarm when the record's state changes. Thus, an operator can know when the record's alarm state has changed. If this field specifies NO_ALARM, then a change of state will not trigger a change of state alarm. However, if it specifies either MINOR or MAJOR, a change of state will trigger an alarm with the corresponding severity.&lt;br /&gt;
&lt;br /&gt;
=== Alarm Handling ===&lt;br /&gt;
&lt;br /&gt;
A record handles alarms with the NSEV, NSTA, SEVR, and STAT fields. When a software component wants to raise an alarm, it first checks the new alarm state fields: NSTA, new alarm state, and NSEV, new alarm severity. If the severity in the NSEV field is higher than the severity in the current severity field (SEVR), then the software component sets the NSTA and NSEV fields to the severity and alarm state that corresponds to the outstanding alarm. When the record process routine next processes the record, it sets the current alarm state (STAT) and current severity (SEVR) to the values in the NSEV and NSTA fields. This method of handling alarms ensures that the current severity (STAT) reflects the highest severity of outstanding alarm conditions instead of simply the last raised alarm. This also means that the if multiple alarms of equal severity are present, the alarm status indicates the first one detected.&lt;br /&gt;
&lt;br /&gt;
In addition, the &amp;lt;code&amp;gt;get_alarm_double()&amp;lt;/code&amp;gt; routine can be called to format an alarm message and send it to an alarm handler. The alarm conditions may be monitored by the operator interface by explicitly monitoring the STAT and SEVR fields. All values monitored by the operator interface are returned from the database access with current status information.&lt;br /&gt;
&lt;br /&gt;
= Monitor Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Monitors are a mechanism that provide a user program with data from the database without the user having to constantly poll the database. Through channel access, monitors inform the operator interface, archivers, alarm handlers and other user programs when a database field changes. Monitors can be placed on any field that can be accessed through the database access layer: floats, integers, strings, enumerated, and link fields. The fields involved with monitoring fall into two categories: determining when to notify a user and maintaining the list of monitors. For more information about using monitors, see the Channel Access Reference Guide.&lt;br /&gt;
&lt;br /&gt;
== Notification ==&lt;br /&gt;
&lt;br /&gt;
For most fields that are accessible through the database access layer, users are notified whenever the field changes. The exception is the VAL or value field found in most records. Monitors on the value fields are sent when either the value changes or the alarm condition changes. Value fields of the floating-point type are special in that there are two deadbands around the monitor notification: one for archive monitors, ADEL, and one for all other monitors, MDEL. These deadbands are provided to aid the user in reducing the amount of processing by filtering out negligible value changes. These numbers should be set after considering the precision required by the application. Setting these deadbands carefully could considerably extend the capability of an I/O Controller.&lt;br /&gt;
&lt;br /&gt;
To implement the deadbands, each record that has deadbands for the value field or fields (not all records have deadbands for value fields) will have fields that contain the value for the monitored field from the last time the record was processed. For instance, an analog output has the ALST and MLST fields. The first implements the deadband for the archivers; the second, for all other monitors on the value field. Each time the record is processed, the last value is compared to the current value, and if the change is greater than the deadband, monitors for the field are sent.&lt;br /&gt;
&lt;br /&gt;
 if ((current value - last value) &amp;gt; deadband)&lt;br /&gt;
 	send monitors&lt;br /&gt;
&lt;br /&gt;
Of course, the formula is a little bit more complicated in order to deal with negative numbers and other subtleties, but the basic idea is the same.&lt;br /&gt;
&lt;br /&gt;
== List Maintenance ==&lt;br /&gt;
&lt;br /&gt;
Each record keeps track of all the monitors that are active as a result of Channel Access monitor requests. A Channel Access monitor request occurs when a client has requested to monitor a specific record or field. The head of the list of monitors for a record currently active is found in the monitor list field (MLIS). Monitors are active when the value of MLIS is greater than 0.&lt;br /&gt;
&lt;br /&gt;
= Control Specification =&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Closed loop control is achieved by linking output records to other records. In all output records there are a set of fields available to specify a location from which the desired output should come. After the desired output value is retrieved, it is converted and then written. Usually, these fields are called DOL, or desired output location field, and the OMSL, or output mode select field. The OMSL field has two mode choices: &amp;lt;code&amp;gt;closed_loop or supervisory&amp;lt;/code&amp;gt;. When the closed loop mode is chosen, the desired output is retrieved from the location specified by the DOL field and placed into the VAL field. When the supervisory mode is chosen, the desired output value is simply taken from VAL and is not retrieved from DOL. In the supervisory mode, VAL can be changed externally via the database access routines.&lt;br /&gt;
&lt;br /&gt;
The DOL field, like most other link fields, can be a link or a constant. When a constant, the VAL field is initialized to its value. Thus, if the desired output of the record is to be controlled externally by the operator, the DOL field can be given a value with which the VAL field will be initialized.&lt;br /&gt;
&lt;br /&gt;
When an output record is set to closed loop mode, new desired outputs can be retrieved from algorithm records so that the output required can achieve a desired affect. Using this capability, closed control loops can be implemented. A closed control loop usually consists of an input record which retrieves a value from a process variable, an algorithm record which retrieves its value from the input record and manipulates the data in some way, and then an output record which retrieves the changed value from the algorithm record and sends out to a controller that will determine the input. This section will look at an example of closed loop control.&lt;br /&gt;
&lt;br /&gt;
== Closing an Analog Control Loop ==&lt;br /&gt;
&lt;br /&gt;
In a simple control loop an analog input record reads the value of a process variable or PV. Then, a PID record retrieves the value from the analog input record. A PID record reads a value, determine if the value is in error, and if so, corrects the error to conform with the desired output. Then this value can be used an output record to write the value to the same PV. In this case, an analog output record gets the value from the PID and writes it to the PV. In the database, the PID record gets the current value from the analog input record, and the analog output record gets the desired output from the PID record.&lt;br /&gt;
&lt;br /&gt;
For a closed control loop, &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; should be chosen in the analog output's OMSL field, in which case the desired output is retrieved from the DOL field which should specify the DM field of the PID record. The PID record determines the difference between the desired value and the current process value gotten from the analog input, and also determines how the output should change to get the process value to the desired value. The result of the PID calculation is an output delta. The analog output needs to be configured to accept incremental changes when tied to a PID that calculates change only. This can be done in the OIF field, which has two choices: &amp;lt;code&amp;gt;Full&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Incremental&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The analog output record, like most output records, can be taken out of the closed control loop by changing &amp;lt;code&amp;gt;closed_loop&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt; in its OMSL field, which is accessible and modifiable at run-time. Doing this, of course, suspends the closed control loop until the OMSL field is set back to &amp;lt;code&amp;gt;supervisory&amp;lt;/code&amp;gt;,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;H5 ID=&amp;quot;Figure_9&amp;quot;&amp;gt;Figure 9&amp;lt;/H5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:RRM 3-13 Concepts-9.gif|Figure 9]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
EPICS Record Reference Manual - 19 MAY 1998&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=File:RecordProcessingPhase.jpg&amp;diff=2924</id>
		<title>File:RecordProcessingPhase.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=File:RecordProcessingPhase.jpg&amp;diff=2924"/>
		<updated>2009-04-07T15:55:04Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: Phase&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Phase&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
	<entry>
		<id>https://wiki-ext.aps.anl.gov/epics/index.php?title=File:RecordProcessing1PP.jpg&amp;diff=2929</id>
		<title>File:RecordProcessing1PP.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki-ext.aps.anl.gov/epics/index.php?title=File:RecordProcessing1PP.jpg&amp;diff=2929"/>
		<updated>2009-04-07T15:54:20Z</updated>

		<summary type="html">&lt;p&gt;BobDalesio: Process Passive&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Process Passive&lt;/div&gt;</summary>
		<author><name>BobDalesio</name></author>
	</entry>
</feed>