EPICS Record Reference Manual - Argonne National Laboratory

Transcription

EPICSRecord Reference ManualPhilip StanleyJanet AndersonMarty KraimerEPICS Release 3.13EPICS Release: R3.13EPICS1

CopyrightExperimental Physics and Industrial Control System (EPICS)Copyright, 1995, The University of California, The University of ChicagoPortions of this material resulted from work developed under a U.S. Government contract and are subject to the followinglicense: For a period of five years from March 30, 1993, the Government is granted for itself and others acting on itsbehalf a paid-up, nonexclusive, irrevocable worldwide license in this computer software to reproduce, prepare derivativeworks, and perform publicly and display publicly. Upon request of Licensee, and with DOE and Licensors approval, thisperiod may be renewed for two additional five year periods. Following the expiration of this period or periods, theGovernment is granted for itself and others acting on its behalf, a paid-up, nonexclusive, irrevocable worldwide license inthis computer software to reproduce, prepare derivative works, distribute copies to the public, perform publicly anddisplay publicly, and to permit others to do so. NEITHER THE UNITED STATES NOR THE UNITED STATESDEPARTMENT OF ENERGY, NOR ANY OF THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS ORIMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY,COMPLETENESS, OR USEFULNESS OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESSDISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS.Initial development by:The Controls and Automation Group (AOT-8),Ground Test Accelerator,Accelerator Technology Division,Los Alamos National Laboratory.Co-developed with:The Controls and Computing Group,Accelerator Systems Division,Advanced Photon Source,Argonne National Laboratory.EPICS Release: R3.13

Document Revision: Draft

ContentsPreface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Organization.1Conventions .1Record Tables .2Inaccuracies.2Chapter 1: Database Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31. Scanning Specification.3Periodic Scanning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Event Scanning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Passive Scanning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Forward Process Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112. Address Specification .12Hardware Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Database Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Constants. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153. Conversion Specification .16Discrete Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Analog Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174. Alarm Specification .225. Monitor Specification .25Notification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25List Maintenance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256. Control Specification .26Closing an Analog Control Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26Chapter 2: Fields Common to All Record Types. . . . . . . . . . . . . . . . . . . . . . . . . . 28Introduction .282. Scan Fields .28Field Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28Field Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293. Alarm Fields.30Field Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Field Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314. Device Fields .31Field Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Field Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325. Debugging Fields .32Field Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Field Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326. Miscellaneous Fields.33Field Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Field Description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Chapter 3: Fields Common to Many Record Types . . . . . . . . . . . . . . . . . . . . . . . 35EPICS Release: R3.13iv

Introduction .352. Input Records .35Common Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Device Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Soft Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Simulation Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353636373. Output Records .38Common Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Soft Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Output Mode Select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Simulation Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Invalid Alarm Output Action . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3839394040Chapter 4: ai—Analog Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Introduction .412. Scanning Parameters.413. Read and Convert Parameters.42Input Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Conversion Related Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434. Operator Display Parameters .445. Alarm Parameters.446. Monitor Parameters.457. Run-Time Parameters and Simulation Mode Parameters.458. Record Support Routines .469. Record Processing.4710. Device Support.48Fields Of Interest To Device Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Device Support Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Device Support For Soft Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Chapter 5: ao - Analog Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Introduction .512. Scan Parameters .513. Desired Output Parameters .514. Convert and Write Parameters .53Conversion Related Fields and the Conversion Process . . . . . . . . . . . . . . . . . . . . . . . . . 53Output Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 545. Operator Display Parameters .546. Alarm Parameters.557. Monitor Parameters.568. Run-Time Parameters and Simulation Mode Parameters.569. Record Support Routines .5710. Record Processing.5811. Device Support.59Fields Of Interest To Device Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Device Support routines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Device Support For Soft Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61Chapter 6: The Archive Record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62vDocument Revision: 1

Introduction .622. Scan Parameters .633. Read Parameters.634. Archive and Monitor Parameters .635. Operator Display Parameters .656. Run-time Parameters.65Chapter 7: bi - Binary Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67Introduction .672. Scan Parameters .673. Read and Convert Parameters.67Conversion Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684. Operator Display Parameters .685. Alarm Parameters.696. Run-time Parameters and Simulation Mode Parameters .697. Record Support Routines .708. Record Processing.719. Device Support.72Fields Of Interest To Device Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72Device Support routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72Device Support for Soft Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73Chapter 8: bo—Binary Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74Introduction .742. Scan Parameters .743. Desired Output Parameters .744. Convert and Write Parameters .75Conversion Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76Output Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765. Operator Display Parameters .766. Alarm Parameters.777. Run-Time and Simulation Mode Parameters.778. Record Support Routines .789. Record Processing.7910. Device Support.80Fields Of Interest To Device Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Device Support routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Device Support For Soft Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Chapter 9: Calc - Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83Introduction .832. Scan Parameters .833. Read Parameters.834. Expression.84Operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Algebraic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85Trigonometric Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86Relational Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86Logical Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86EPICS Release: R3.13vi

Bitwise Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Parentheses and Comma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Conditional Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .868787875. Operator Display Parameters .886. Alarm Parameters.887. Monitor Parameters.898. Run-time Parameters.899. Record Support Routines .9010. Record Processing.91Chapter 10: Calcout - Calculation Output Record . . . . . . . . . . . . . . . . . . . . . . . . 93Introduction .932. Scan Parameters .933. Read Parameters.944. Expression.94Operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Algebraic Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Trigonometric Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Relational Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Logical Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Bitwise Operators. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Parentheses and Comma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Conditional Expression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9596969697979797975. Output Parameters.986. Operator Display Parameters .997. Alarm Parameters.1018. Monitor Parameters.1019. Run-time Parameters.10210. Record Support Routines .10211. Record Processing.104process() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104execOutput(). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Chapter 11: compress - Compression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Introduction .1052. Scanning Parameters.1053. Read Parameters and Algorithm Parameters .105Input Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106Algorithms and Related Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1064. Operator Display Parameters .1075. Alarm Parameters.1086. Run-time Parameters.1087. Record Support Routines .1098. Record Processing.110Chapter 12: CPID Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Introduction .111viiDocument Revision: 1

2. Scan Parameters .1113. Controlled Variable and Setpoint Parameters.1124. Expression Parameters .1125. Output, Readback, and Mode Parameters.1146. Operator Display Parameters .1157. Alarm Parameters.1168. Monitor Parameters.1179. Run-time Parameters.11710. Record Support Routines .11811. Record Processing.11912. Device Support.120Chapter 13: dfanout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121Introduction .1212. Scan Parameters .1213. Desired Output Parameters .1214. Write Parameters.1225. Operator Display Parameters .1226. Alarm Parameters.1237. Monitor Parameters.1248. Run-Time Parameters and Simulation Mode Parameters.1249. Record Support Routines .12410. Record Processing.125Chapter 14: Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126Introduction .1262. Scan Parameters .1263. Input Specification .1264. Event Number Parameters .1275. Operator Display Parameters .1276. Alarm Parameters.1277. Simulation Mode Parameters.1288. Record Support Routines .1289. Record Processing.12810. Device Support.129Fields of Interest To Device Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Device Support Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Device Support For Soft Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130Chapter 15: Fanout. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Introduction .1312. Scan Parameters .1313. Operator Display Parameters .1324. Alarm Parameters.1325. Run-time Parameters.1336. Record Support Routines .1337. Record Processing.133EPICS Release: R3.13viii

Chapter 16: Histogram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134Introduction .1342. Scanning Parameters.1343. Read Parameters.1344. Operator Display Parameters .1355. Alarm Parameters.1356. Monitor Parameters.1357. Run-time and Simulation Mode Parameters .1368. Record Support Routines .1379. Record Processing.13810. Device Support.139Fields Of Interest To Device Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139Device Support Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139Device Support For Soft Records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139Chapter 17: longin—Long Input. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141Introduction .1412. Scan Parameters .1413. Read Parameters.1414. Operator Display Parameters .1425. Alarm Parameters.1426. Monitor Parameters.

EPICS Release: R3.13 EPICS 1 EPICS Record Reference Manual Philip Stanley Janet Anderson Marty Kraimer EPICS Release 3.13