LabVIEW Graphical Programming, Fourth Edition

A vital function of any process control system is to alert the operator when important parameters have deviated outside specified limits. Any signal can be a source of an alarm condition, whether it's a measurement from a transducer, a calculated value such as an SQC control limit, or the status of an output. Alarms are generally classified by severity, such as informative, caution, or warning, and there are a variety of audiovisual alarm presentation methods available.
You should start by listing the signals and conditions in your process that require some form of alarm response and determining the appropriate responses. For analog signals and computed values, use the comparison functions (Figure 18.44, top) to generate boolean alarm flags. Digital signals, such as contact closure inputs, are combined with the logic functions, such as AND, OR, and NOT, to generate flags (Figure 18.44, bottom). Naturally, you can combine these techniques as required.
Change-of-state detection is another important function that you may need for alarm generation. This enables you to react to a signal that is generally constant but occasionally undergoes a sudden deviation.
To detect a change of state, the VI must remember the previous state of the signal, which implies the use of a Shift Register as shown in Figure 18.45.