var alerts = myManager.Alerts;
alerts.SetAlertValue("ExampleDP_Arg2.", DateTime.Now, 1, "test");
I wasn't sure what value I should put as the value (the example shows "test" but I don't know what is valid to use - do I write the text I want or the value of the point?).
Also I'm not sure how to set up the ExampleDP_Arg2 (which is a float type) so it can accept alerts. Maybe using an ExampleDP_Float is a wrong idea - I just don't know what to do?
Our API manager may need to generate and clear some status alerts.
Re: Generating Multi Instance alarms from the C# API
Postby leoknipp »
At the datapoint ExampleDP_Arg1 a continuous alert handling is configured by default.
If you want to set a multiinstance alert for this dp element first you have change the settings of the _alert_hdl config.
You can use the example datapoints for your tests if the _alert_hdl config is configured correctly.
Best Regards
Leopold Knipp
Senior Support Specialist
Re: Generating Multi Instance alarms from the C# API
Postby mhargreaves »
Thanks Leopold for that information.
Once I have configured the alert_hdl config as a multiinstance alert, do you know what values I can use in the call to SetAlertValue? Are there any examples I can get hold of?
Re: Generating Multi Instance alarms from the C# API
Postby leoknipp »
How it works to generate a multi instance alert in API I do not know.
When using a CTRL script you have to set the config + attribute _alert_hdl.._event with the value DPATTR_ALERTEVENT_CAME.
DPATTR_ALERTEVENT_CAME is a constant value which represents the integer value 0.
The values for the constants you find in the WinCC OA documentation: Reference tables --> Data point configs --> _alert_hdl
Best Regards
Leopold Knipp
Senior Support Specialist