There is no standard mechanism. Although this is something that I've thought of and heard of many times. You'd have to script something.
The lab section has a document 'XFile - The Discrete'. It shows you how a discrete alarm works. You might try this. You could have a script that is connected to the boolean value of your alarm. When the alarm comes high, then your sript records the timestamp. After x minutes you can set the userbit that will actually 'activate' the alarm.
So in generel, you could use the userbits to :
- Enable/disable an alarm
- escalate an alarm
- Implement a delay
It'll be an interesting scripting job. Good luck !
You could give the alert hdl a high '_min_prio' and lower it after a delay to activate the alert. The '_min_prio' does work with more alert types, then only a discrete alert.
there is no standard functionality available to raise an alert only if the alert condition is met for a given time.
for a customer/project a solution was implemented with 2 datapoint elements (for every alert) and script functionality.
If the value is received a timer is started and after the given time another dp-element is set if the value is still in the alert range. The additional dp-element has the _alert_hdl-config.
Best Regards
Leopold Knipp
Senior Support Specialist
Could you give some more details on the timers for that solution? We are looking to implement something similar and I'm unsure of the best way to script timers for all the alarms.
I do not know the implementation in detail.
The solution was made only for a few dp elements and not for all dp elements which have an _alert_hdl config.
You can write a function which checks in a defined interval (e.g. every 10 seconds) if the dp-element still has a value in the given alert range.
The list of dp-elements and their values is stored in a script global variable. The list is updated when a dp-element is set, e.g. with a dpQueryConnectSingle() function.
Best Regards
Leopold Knipp
Senior Support Specialist
afterall we decided to put the logic directly inside our devices on the field. So that we don't have dependecies from a ctrl script
Moreover in our case to duplicate all the DPEs whit alert handling would be not a good solution.
I think another approch could be a script that activates the alert handler config of the DPE only if its value remains over/below the threshold for a timeout.
Hi,
We ended up creating an alarm delay script which is initiated for each alarm with a delay. There are 2 data points associated with the script, the raw value and the delayed alarm which has the _alert_hdl config.