I want to change the color of the Acknowledgment column. As you can see in the attached image, the column is white or grey...
How can I change it? I'm reading all the scripts but I can't fix it....
Please I need your help!
Thank you.
leoknipp wrote: ↑ Thu Nov 07, 2019 4:06 pm The alert text is defined in the _alert_hdl config and then shown in the AEScreen.
If you want to see a specific text you have to define it at the _alert_hdl config.
Best Regards
Leopold Knipp
Senior Support Specialist
thank you Alexandre, I will try it! So nice tip!adaneau wrote: ↑ Thu Nov 07, 2019 5:11 pm Hi,
Actually it is possible to change ack color (AT YOUR OWN RISK) by adding a hook function inside AES.ctl.
After line 3901 doTimeStamp("AFTER DISPLAY DATA" );
Then you can have some hook call like bool ret = HOOK_styleAEStable();
And put the called function in a separate lib, for example AES_HOOK.ctl.
Then inside this function feel free to modify directly the table by using get/set function for graphical object.
Careful, this will slow display as you add calls for each alarm, after any new is coming in. So consider this carefully.
Careful, if you modify aes.ctl, then you are responsible at every patch for merging the eventual modifications from ETM into your own version (there is the hook valuable as you have only one line specific). Use something like beyondcompare.
Hope it will help.
BR
Alexandre Daneau
If you want to change the settings for the _alert_hdl config you have tojjang@gtd.eu wrote: ↑ Fri Nov 08, 2019 8:53 am Thank you for your kind explination. I have already set the _alert_hdl text like "Error" or "Ok" as you can see in the attatched file.
But I want to change this text for a value of another DP. So I did:
anytype aux_alarm,aux_alarm2;
string alert_text,alert_text2;
dpGet("System1:DIA1.DATA1_INTEGER:_original.._value",aux_alarm); //cogemos el valor del DP
dpGet("System1:BCN.A:_alert_hdl.._text",alert_text); //cogemos el valor del texto
alert_text = alert_text + " VALUE = " + aux_alarm; //formamos un nuevo texto
DebugTN("alert_text :",alert_text);
dpSetCache("System1:BCN.A:_alert_hdl.._text",alert_text); //asignamos el valor del texto
dpGetCache("System1:BCN.A:_alert_hdl.._text",alert_text2); //cogemos el valor del texto
DebugTN("alert_text2 :",alert_text2);
Actually, I can see the correct text in log viewer. But it doesn't show up in AESRow... Alert Text should change but it shouldn't.
Ok! I have already configure it and it works! (although I have to desactive&active everytime that I want to change the text). I will try to handle with add values.leoknipp wrote: ↑ Fri Nov 08, 2019 9:33 amIf you want to change the settings for the _alert_hdl config you have tojjang@gtd.eu wrote: ↑ Fri Nov 08, 2019 8:53 am Thank you for your kind explination. I have already set the _alert_hdl text like "Error" or "Ok" as you can see in the attatched file.
But I want to change this text for a value of another DP. So I did:
anytype aux_alarm,aux_alarm2;
string alert_text,alert_text2;
dpGet("System1:DIA1.DATA1_INTEGER:_original.._value",aux_alarm); //cogemos el valor del DP
dpGet("System1:BCN.A:_alert_hdl.._text",alert_text); //cogemos el valor del texto
alert_text = alert_text + " VALUE = " + aux_alarm; //formamos un nuevo texto
DebugTN("alert_text :",alert_text);
dpSetCache("System1:BCN.A:_alert_hdl.._text",alert_text); //asignamos el valor del texto
dpGetCache("System1:BCN.A:_alert_hdl.._text",alert_text2); //cogemos el valor del texto
DebugTN("alert_text2 :",alert_text2);
Actually, I can see the correct text in log viewer. But it doesn't show up in AESRow... Alert Text should change but it shouldn't.
-- acknowledge all pending alerts for this dp element
-- deactivate the _alert_hdl config
-- change the configuration
-- activate the _alert_hdl config
Also you have to use the functions dpSet() or dpSetWait(). You cannot modify the settings by using dpSetCache() and dpGetCache(). The "cache" functions are special functions for the AEScreen and must not be used in other CTRL code.
Maybe you can solve your requirement by using _add_values.
Then you add specific information for an existing alert without the need to modify the configuration.
In the AEScreen you can display columns which show the _add_values.
For details please have a look at the WinCC OA Documentation.
Best Regards
Leopold Knipp
Senior Support Specialist