RD Controls Design No. 87.0<P> <b> An Overview of the Epicure Alarm Subsystem</b>

RD Controls Design No. 87.0

An Overview of the Epicure Alarm Subsystem

D.S. Baddorf, E.J. Dambik, F.J. Nagy, T.M. Watts

Introduction:

The Alarm Subsystem consists of several cooperating processes on many different computer nodes. The Alarm Control Program and the Alarm Display Program are the visible part of the control system; the only part which most users will see and interact with. The other pieces which are discussed herein are the core of the system, which perform and coordinate the monitoring of alarms. More complete specifications for the control and display programs are provided in EPICURE Design Note 85.

Alarm Control Program:

Alarm Display Program:

Alarm Manager Process (AMP):

Alarm Monitoring Task (AMT):

Alarm Report Distributor (ARD):

Master ARD:

Secondary ARDs:

Alarm Structures:

Alarm State Blocks are used to control and record the state of the alarm monitoring of any device. Alarm Report Blocks are used to report devices which are going into or out of an alarm condition. The include file containing these structures, ALARM.H, follows.

/* ALARMS.H
 Definitions of alarm message formats to be passed between the various parts
 of the alarm system.
 */
#ifndef FTD_K_IMMEDIATE     
#include "epicure_inc:ftd.h"
#endif
#ifndef DB_M_DISPLAY_LOG
#include "epicure_inc:dbuser.h"
#endif

/* ALARM REPORT BLOCK HEADER - alarm signal report block header for a device reading or event. */

struct ARBhdr { unsigned short length; /* Length in bytes */ variant_union { unsigned short flags; /* Flag bits */ variant_struct { unsigned hi : 1; /* Readback > Max */ unsigned lo : 1; /* Readback < Min */ unsigned bad : 1; /* Device in alarm */ unsigned cooked : 1; /* Cooked report */ unsigned event : 1; /* Event report */ } flag_bit_fields; } flag_bits_overlay; int clinks; /* Time of alarm */ variant_union { unsigned int dipi; /* Device index/Property index */ variant_struct { unsigned di : 24; /* Device index */ unsigned pi : 8; /* Property index */ } di_pi_fields; } dev_descrip_overlay; };

/* ALARM REPORT BLOCK for an ANALOG VALUE - communication block signalling a condition change (going into or out of tolerance) for an analog device reading or event. */

struct ARB_ANALOG_VALUE { struct ARBhdr header; /* Report header information */ variant_union { int raw; /* Current unscaled reading */ float scaled; /* Current scaled reading */ } reading; struct DB_DISPLAY display; /* DB display info for cooked reports */ };

/* ALARM REPORT BLOCK for a BINARY STATUS - communication block signalling a condition change (state of a scanned bit) for an digital device reading or event. */

struct ARB_BINARY_STATUS { struct ARBhdr header; /* Report header information */ variant_union { struct { /* RAW state information */ unsigned int current[2]; /* Current digital reading */ unsigned int previous[2]; /* Previous state digital reading */ } raw_state; struct { /* COOKED state information */ unsigned int bitno; /* Bit number for changed state */ struct DB_DISPLAY display; /* DB display info for cooked reports */ } cooked_state; } states_overlay; };

/* ALARM STATE BLOCK ANALOG - alarm monitoring state block header for a device reading or event. */

struct ASBhdr { variant_union { unsigned int dipi; /* Device index/Property index */ variant_struct { unsigned di : 24; /* Device index */ unsigned pi : 8; /* Property index */ } di_pi_fields; } devdescrip_overlay; struct FTD ftd; /* Time of alarm scan */ variant_union { unsigned short flags; /* Flag bits */ variant_struct { unsigned hi : 1; /* Readback > Max */ unsigned lo : 1; /* Readback < Min */ unsigned bad : 1; /* Device in alarm */ unsigned clear : 1; /* Clear alarm state */ unsigned scanned : 1; /* Enable alarm scan */ } flag_bit_fields; } flag_bits_overlay; struct { unsigned char needed; /* Failures needed to report alarm */ unsigned char now; /* Current number of failures */ } tries; /* Number of reading failures */ };

/* ALARM STATE BLOCK for ANALOG READING - communication block used to read or set the state of alarm monitoring for an analog device reading or event. */

struct ASB_ANALOG_VALUE { struct ASBhdr header; /* Alarm state header information */ struct { unsigned int min; /* Minimum (lo) raw value to scan for */ unsigned int max; /* Maximum (hi) raw value to scan for */ } value; };

/* ALARM STATE BLOCK for a BINARY STATUS - communication block used to read or set the state of alarm monitoring for an digital device reading or event. */

struct ASB_BINARY_STATUS { struct ASBhdr header; /* Alarm state header information */ struct { /* RAW state information */ unsigned int nominal[2]; /* Normal digital reading bit states */ unsigned int scanned[2]; /* Bit mask to OR out relevant bits */ } state; };

Keywords: defaults, logical

Distribution: normal

Security, Privacy, Legal

rwest@fsus04.fnal.gov