Technical FAQs

Ask a Question

Syntax for setting up Advanced Alarm in Alarm Sentry

Syntax for setting up Advanced Alarm

Product Line
Alarm Sentry
Event Notification Module

Alarm Sentry (http://localhost:83)

Sometimes it is necessary to combine a few tags to generate a single alarm.  This is acheived in Advanced Alarms.

The syntax has to conform to C# and always returns a boolean true or false.  This will be discussed separately for digital and analog alarms.  Two operators will be used:
  • Conditional AND Operator: &&
  • Conditional OR Operator: ||
In the examples below, two tags are used, however, the syntax can be modified to include more.
1. Digital Advanced Alarm
Two digital tags are combined together using a conditional OR operator:
if((Boolean)Source("<tag1>") || (Boolean)Source("<tag2>"))
{return true;}
{return false;}


if((Boolean)Source("localhost.ION.OpcDaServer.1.ION.A8600/IO/Digital/DI-S10 State") || (Boolean)Source("localhost.ION.OpcDaServer.1.ION.A8600/IO/Digital/DI-S9 State")) {return true;} else {return false;}

2. Analog Advanced Alarm
Two analog tags are combined together using a conditional AND operator:
if((Double)Source("<tag1>") > value1 && (Double)Source("<tag2>") < value2)
{return true;}
{return false;}


if((Double)Source("localhost.ION.OpcDaServer.1.PL.CM4/Currents/Current A/Current A") > 10 && (Double)Source("localhost.ION.OpcDaServer.1.PL.CM4/Currents/Current A/Current C") < 20) {return true;} else {return false;}

Was this helpful?
What can we do to improve the information ?