Hello,
I have been working on some multiinstance related issue. My client's PLC writes alerts the following way:
They write the pending alerts of a PLC on a dyn_int DPE, where each value means alert code, so when the dyn_int changes I create by CTRL a multiinstance alert (in another DPE, typed INT) for each entry the array has.
When a change comes in the array of codes, I want to query the alarms in the multiinstance DPE, and then remove from there the alerts which are no longer in the array, or raise a new alert if it is in the array but not in the DPE:_alert_hdl.._alerts.
That is my intention but I am having troubles because I am not sure about what to put in the alertSet function. The 3rd and 4th are of course, DPE:_alert_hdl.2._event, DPATTR_ALERTEVENT_WENT (or CAME) but I do not know what to put in alertTime and count, in both cases, when it comes and when it goes.
I keep getting this error at the log 23, Setting/modifying attributes failed and I guess it is due to this alertTime and count.
Clarification: All the multiinstance thing is done by CTRL code, with nothing to do with the driver.
I am using the first version of 3.18. Any help is appreciated.
How to handle multiinstance
Search
Re: How to handle multiinstance
If you want to modify a pending alert instance using alertSet() you have to pass the alert time (time when the alert was raised) and the count information.
This information you can get by doing a dpQuery() with SELECT ALERT do get the current alarm information for a specific DP element.
Best Regards
Leopold Knipp
Senior Support Specialist
This information you can get by doing a dpQuery() with SELECT ALERT do get the current alarm information for a specific DP element.
Best Regards
Leopold Knipp
Senior Support Specialist