Add Values - Alert Table

Find and share HowTos to various installations / configurations!
12 posts • Page 1 of 2
najoua
Posts:26
Joined: Fri Nov 27, 2015 10:21 am

Add Values - Alert Table

Post by najoua »

Hello,

May I have please an example of the code to add a value to an alarm '_add_value_16' = "some info" for example?

Thanks in advance,

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

Re: Add Values - Alert Table

Post by leoknipp »

Hello,

first of all you have to differ between normal and multi instance alerts. For both types additional values can be set.
If an additional value shall be set you have to use the CTRL-function alertSet(). As parameters you have to pass the alert time and the count parameter for the already existing alert. In case of a multi instance alert the additional values can be set when raising the alert.

The alertSet command can look like the following example
alertSet(t_alTime,0,s_dp +":_alert_hdl.._add_value_1",TRUE);

Best Regards
Leopold Knipp
Senior Support Specialist

najoua
Posts:26
Joined: Fri Nov 27, 2015 10:21 am

Re: Add Values - Alert Table

Post by najoua »

Hello,

Thanks for your response. The idea is that I want to have additional columns in the alarm screen. I would like to add a column for example that contains some static info in common to all alerts in a DP (the name of the building that contains my alerts' equipment for example). That's why I taught of using the _add_values since it looks easy to get then in the alert table but how to set them?

I am still confused...

thanks in advance for your help!

najoua
Posts:26
Joined: Fri Nov 27, 2015 10:21 am

Re: Add Values - Alert Table

Post by najoua »

I have added a column called "Building" to my alarm table and I want to fill it with _alert_hdl.._add_value_16 from the DPA option for example. My question now is how to assign a value "the name of my building" to the attribute _add_value_16 of my alarm? I am new in WinCC, I need more details about the alertSet.

Is there somebody to help me? This is really urgent!

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

Re: Add Values - Alert Table

Post by leoknipp »

Hello,

if you want to add static information for a specific DPE you can define a dp description (_common config). The description will be displayed in the AEScreen, when it is defined, instead of the dp element name.
Then you do not have to set the value every time when an alert is raised.

Best Regards
Leopold Knipp
Senior Support Specialist

najoua
Posts:26
Joined: Fri Nov 27, 2015 10:21 am

Re: Add Values - Alert Table

Post by najoua »

Yes Thank you, but the problem is that I have at least 2 or 3 other information (more columns) that I want to display in the alarm table ! For the dp description it's ok but if I want to use the same way the dp alias, this is not possible because it have to be unique for each dp I think ! What if I stock all the needed information in a separate dp, how can I get these values in the alarm table?

Thanks again,

Regards,

najoua
Posts:26
Joined: Fri Nov 27, 2015 10:21 am

Re: Add Values - Alert Table

Post by najoua »

Concerning my previous question, since it is not possible to have the same alias in different dpe, I would like to set one alias at the dp level instead of dpe, but how to get this information in the alarm table ? The dpGetAlias returns the alias of the dpe not dp.

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

Re: Add Values - Alert Table

Post by leoknipp »

Hello,

in the AEScreen the information in every line is related to the dp-element. There is no standard function available to display information for another dp-element or the root node of the same datapoint.
If you want to display project specific information you can add a new column and a user defined function (defined in a C++ extension).
For details please have a look at the WinCC OA online help:
System management --> Diagnostics --> Alert and event panel --> Example of how to add a user-defined column

Best Regards
Leopold Knipp
Senior Support Specialist

najoua
Posts:26
Joined: Fri Nov 27, 2015 10:21 am

Re: Add Values - Alert Table

Post by najoua »

Hello,

About the add values of alerts, is it possible to do it with a dpSet instead of alertSet?

For example:
string value16 = "building";
dpSet("System1:ETD68M.Disjoncteurs.D01.Defaut:_alert_hdl.._add_value_16", value16);


Thanks,

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

Re: Add Values - Alert Table

Post by leoknipp »

Hello,

adding an _add_value to an existing alert is only possible with the CTRL function alertSet().
This function needs to be used as you have to specify the alert time and count parameter for the alert where the _add_value shall be added.

Best Regards
Leopold Knipp
Senior Support Specialist

12 posts • Page 1 of 2