Simple reset?


Kurt

Recommended Posts

Hi AzeoTech and forum users,

My alarm needs are pretty simple and I want my alarms to reset as soon as the fire condition is no longer met. I know I can do:

Alarm.MyAlarm.strCondition = "a long and complex fire condition"

Alarm.MyAlarm.strResetCondition = "!(a long and complex fire condition)"

But it would be simpler and easier to maintain if I could do something like the following, rather than having to copy the fire condition into the reset box:

Alarm.MyAlarm.strResetCondition = "!FireCondition"

Is there a way to reference the fire condition in the reset condition statement? I tried Alarm.MyAlarm.strResetCondition = "!evaluate(Alarm.MyAlarm.strCondition)" but it is inconvenient when duplicating alarms, plus it doesn't seem to work.

Another option would be to set up my alarms outside DAQFactory and import, but I noticed that the Help field is not included in exported alarms. :(

Link to comment
Share on other sites

It looks like the alarm condition is evaluated at global scope, so there is no direct shortcut.  The only solution I have for you is to create a calculated virtual channel with the complex equation, then set the Condition for the alarm to V.MyAlarmState[0] and the reset condition to !V.MyAlarmState[0].

Alternatively, you could write a simple script to set the reset condition equal to the inverse of the condition.  It'd be something like:

private string alarmList = alarm.listAll()
for (private i = 0, i < numrows(alarmList), i++)
   private string cond = evaluate("alarm." + alarmList[i] + ".strCondition")
   execute("alarm." + alarmList[i] + ".strResetCondition = '!(" + cond + ")'")
endfor

Run this every time you change / add an alarm and it will update all the reset conditions.

 

Link to comment
Share on other sites

Thanks! I'll try the script. Saves sanity compared to having to hunt for typos etc.

I'm surprised I'm the only person in this situation, but I'm new to SCADA and it may be I'm designing my alarms to be overly simplistic.

Link to comment
Share on other sites

In general most alarms will want to have hysteresis built in, so simply doing the inverse of the Fire condition doesn't work.  In cases where it is just a digital signal, from, say, a PLC, typically it is just one digital signal, so doing the ! of that signal isn't much effort.  That all said, we have, a believe, corrected the situation in the next DAQFactory release.  You are welcome to try a beta if you'd like.  Just email us at support@.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.