Alert_Class sets came text depending on DPE name dynamically

Find and share HowTos to various installations / configurations!
6 posts • Page 1 of 1
Romero
Posts:27
Joined: Wed Jul 19, 2017 9:24 am

Alert_Class sets came text depending on DPE name dynamically

Post by Romero »

I cannot figure out how to script the alert action of the Alert_Class to set the came text of each DPE with this alert class. I need to show on the AES Screen, on the column alertText, a "piece" of the name of the DPE which has its _alert_hdl triggered.

For example:
I got the DP: Dist_Panel
It has DPE for the alarms: .ALM.General_Alarm and .ALM.Door_Open.

At the end i will have like: System1:Dist_Panel.ALM.General_Alarm and System1:Dist_Panel.ALM.Door_Open.
Both DPE got the power config _alert_hdl with the same alarm class.

At the AES Screen they need to be show up like General Alarm and Door Open.

It could be easy however i don't know how to get the name of the DPE dynamically to make their came/alertText depending on its name.

Thank you for your time.
Agustín Romero.

nmnogueira
Posts:125
Joined: Thu May 05, 2011 12:59 pm

Re: Alert_Class sets came text depending on DPE name dynamically

Post by nmnogueira »

Can't you just configure the text in the alert_hdl?

Image
Attachments
alert_hdl.png

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

Re: Alert_Class sets came text depending on DPE name dynamically

Post by leoknipp »

If you want to show a meaningful text instead of the name of the dp element you have to define a dp description.
There is no need to change the alert text in that case.
If the alert text can be changed at an instance depends on the power config which is used. If the power config does not allow to change the text it cannot be changed at the instances.

Do you see the alert text as changeable value when you select the option to modiy the power config at the instances?

Best Regards
Leopold Knipp
Senior Support Specialist

Romero
Posts:27
Joined: Wed Jul 19, 2017 9:24 am

Re: Alert_Class sets came text depending on DPE name dynamically

Post by Romero »

Thank you both for your fast replies.

Yes Nuno, i can do that way however i got like 40 diferent DPE with _alarm_hdl per DP and then i got from 100 to 400 DP's for now and they can be created dinamically, i need to generate their texts dinamically too, so if i can do it at the alarm class, it will save me a lot of time i think.

About the dp description, i am pretty sure that could work but i don't know how to show only the dp description on the aes_table :S . If you could give me a hint i will appreciate it.

EDIT: After giving it a try i realized it automatically shows the description if there is one. Thank you again Leopold.

Regards
Agustín Romero

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

Re: Alert_Class sets came text depending on DPE name dynamically

Post by leoknipp »

The alarm text cannot be defined at the alert class. You have to define it on the dp element where the _alert_hdl config is configured.

If you want to add/modify it automatically when creating a new datapoint you can use Master datapoints and power configs.
When using power configs a script (power config definition) is executed when creating a new datapoint for a dp type where a Master dp is configured. This script you can modify to fit the project needs.
Modifying the power configs or creating new ones is possible with the power config editor (System Management --> Database --> PowerConfig Editor).

Best Regards
Leopold Knipp
Senior Support Specialist

Romero
Posts:27
Joined: Wed Jul 19, 2017 9:24 am

Re: Alert_Class sets came text depending on DPE name dynamically

Post by Romero »

The description advice is working for now. At the same time i create the DP i set a description based on its name and the params i need. I will investigate about the master datapoint solution to find out which one is best for this proyect.

Thank you for your quick answer.

Regards
Agustín Romero.

6 posts • Page 1 of 1