Kurt Posted April 6, 2023 Share Posted April 6, 2023 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. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted April 6, 2023 Share Posted April 6, 2023 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. Quote Link to comment Share on other sites More sharing options...
Kurt Posted April 7, 2023 Author Share Posted April 7, 2023 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. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted April 7, 2023 Share Posted April 7, 2023 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@. Quote Link to comment Share on other sites More sharing options...
Kurt Posted April 11, 2023 Author Share Posted April 11, 2023 Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.