Set alert text (CAME) at runtime

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
4 posts • Page 1 of 1
michael.danzer
Posts:13
Joined: Thu Aug 03, 2017 11:13 am

Set alert text (CAME) at runtime

Post by michael.danzer »

Hi,

I want to set the alert text dynamically over a script. Is this possible?

Datapoint structure:
bool alarm_flag
string alert_text

I found the function alertSet() in the help, but I am not sure which attribute I have to set in the _alert_hdl.

Are there other ways to set the alert text at runtime?

Thanks

Regards
Michael Danzer

NFedorenko
Posts:45
Joined: Wed Jun 15, 2016 5:41 pm

Re: Set alert text (CAME) at runtime

Post by NFedorenko »

Try _alert_hdl.1._text, _alert_hdl.2._text for CAME text if you have 2 ranges
_alert_hdl.1._went_text, _alert_hdl.1._went_text for WENT text.

You can do it using dpSet() or dpSetWait().

adaneau
Posts:310
Joined: Tue Feb 21, 2012 9:49 am

Re: Set alert text (CAME) at runtime

Post by adaneau »

Hi,

With the solution from Nikolai you'll need to deactivate the alarm I think (_alert_hdl.._active), as you change a configuration of it. This will lead to double instance as deactivate / activate will create a new version of alam.

This solution means that this new text will be applied to all new alarms. If you want to change only one of them and keep initial text for others, maybe use add values, or comments which will bring you more flexibility.

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Set alert text (CAME) at runtime

Post by leoknipp »

During runtime you cannot change the alert textes. As Alexandre has written the text can only be changed when the _alert_hdl is deactivated.
Before you can configure the _alert_hdl config you also have to acknowledge all pending alerts for the specific dp element.

Best Regards
Leopold Knipp
Senior Support Specialist

4 posts • Page 1 of 1