Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Subscribe for Alarms and sort by date and time

More
09 Apr 2020 07:08 #8363 by support
I see.

There is nothing in the component to directly provide you with the ordering.
If that is a requirement, you need to write the logic yourself.

Best regards

Please Log in or Create an account to join the conversation.

More
09 Apr 2020 06:34 #8362 by chris.debono
Thank you very much for your explanation. The issue I have is that when I run the application the first set of active alarms are retrieved ordered with the message not date but afterwards, all new alarms are ordered as generated and in some cases, as you explained sometimes I have 00:14, 00:15, 00:18, 00:16

Please Log in or Create an account to join the conversation.

More
08 Apr 2020 14:44 #8360 by support
Hello,

I am not quite sure what you mean by "The alarms are retrieved sorted by the Event.Message...". In fact, the alarms are delivered to you in the order the OPC server ships them to the OPC client, which is normally the order it they are generated/incoming.

There is, however, no guarantee in the OPC specs that the alarms will arrive in any particular order.

If you want to be sure you process the alarms ordered by date&time, you need to write code on your side to do so. There are properties in the incoming data that contain the necessary information - in OPC Classic, it is the eventArgs.EventData.Time that you can use.

Be aware that ordering live data is not the same as ordering data that you already have in full. The issue here is that you never know whether a new piece data will not come which would invalidate your previous ordering. For example, if you have received data with time 11, 23, 18, you may order it to become 11, 18, 23, but at any later point, at least theoretically, you may receive an alarm with time e.g. 15, and that would invalidate you previous result, because the correct answer to "what are the alarms ordered by time" now would be 11, 15, 18, 23. Any realistic usage will therefore 1) need to put a limit to how much of the ordering will actually do in such situations,and 2) lead to a "lag" before the "final" ordered result is known, in order to allow for out-of-order alarms be inserted into the right place.

Regards

Please Log in or Create an account to join the conversation.

More
08 Apr 2020 12:47 #8359 by chris.debono
I am developing an application which subscribes for alarms. The alarms are retrieved sorted by the Event.Message, is there a way to sort these alarm by date and time please?

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.242 seconds