Please enable JavaScript to view this site.

DAQFactory User's Guide

Navigation: 11 Alarming

11.2 Creating a new alarm

Scroll Prev Top Next More

To create an alarm, right click on ALARMS: in the workspace and select Add Alarm.  You will be prompted for a name for your alarm.  Just like other names in DAQFactory, alarm names must start with a letter and only contain letters, numbers or the underscore.  Once you've entered your alarm name, the alarm view will appear allowing you to edit the parameters of your alarm.  To return to the alarm view for an alarm later, simply click on the alarm's name in the workspace under ALARMS:

Alarms in DAQFactory are a bit different than many other SCADA applications in that the alarm condition is not channel dependant.  There are no High and High-High alarms for each channel, but rather expressions that determine the alarm and can be based on values from several channels at once.  Because of this, all alarms are checked every time a new data point arrives on any channel.  If you have a large quantity of alarms and a large quantity of channels, this can cause your acquisition loops to slow as each alarm is evaluated with each individual channel read.  If you have this situation, you will want to use the Alarm.Paused and Alarm.CheckAlarms() variable and function to manually control when DAQFactory checks alarms.  This is described in the section on Alarm Variables and Functions.

Alarm Parameters:

Condition: when this expression evaluates to a non-zero number then the alarm fires.  If an alarm sound file is specified, it will be played.  This is evaluated for every incoming data point, but does not evaluate streaming, or image data.  Data added to a channel using the AddValue() function will also cause alarms to be evaluated.

Reset Condition: when this expression evaluates to a non-zero number and an alarm has fired, the alarm is considered reset.  The alarm will still sound until acknowledged.

Description: description displayed in the alarm table view

Priority: determines the color and order alarms are displayed.  Log only alarms do not display in the alarm table and are simply logged.  They also automatically acknowledge.

Alarm Sound: a wave file that is played continuously until the alarm is reset and acknowledged or another alarm with a sound fires.

Enabled: determines if the alarm is evaluated

Help: extra information about the alarm

Events:

Alarms also have three events, script that will be executed when a particular event occurs.  There is one for when the alarm fires, when the alarm resets, and when the alarm is acknowledged.  Each has its own tab in the alarm view.  If you return(0) from the event, then the alarm fire, reset or ack will be ignored.

Application: One possible use for the alarm event is preventing a user who needs to see a list of alarms from acknowledging them.  The alarm summary view has an Acknowledge All button, which cannot be disabled.  You can however, still prevent the user from acknowledging the alarms.  To do this, simply create an ack event for each alarm.  In that event do the following:

 

if (AlarmRights == 1)

  return (1)

else

  return (0)

endif

Then, create a way for the user to login, and in the process set AlarmRights to either 0 or 1 depending on whether they are allowed to acknowledge the alarms.  This can of course be applied on an alarm by alarm basis, allowing different users the ability to acknowledge only certain alarms.

Hint: You could also code the above event as:

 

return (AlarmRights == 1)