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.
Wait for Some time before getting Same Event Notification
This is more a question of a general programming nature, not directly having to do with OPC or QuickOPC. You clearly should not unsubscribe from OPC events just because you want to delay a display of them for some time. I think that the best solution is separate the two things (the data in the grid from the data about the events themselves). You can create a data structure that will hold the data about the events that had arrived.
When an OPC event notification arrives, and it denotes a transition to an active state, you will store this information in your data structure, AND you will start a 10-second timer (using something like msdn.microsoft.com/en-us/library/system.timers.timer(v=vs.110).aspx , or similar class).
When this timer elapses, you will check the data structure, and if the event is still there, you would display in in the grid.
When an OPC notification arrives and it denotes a transition to an inactive state, you would remove the event from your data structure, and cancel the timer and/or remove the event from the grid, depending on whether it has already been displayed, or whether it is just in its "delayed, waiting" state.
What do you think?
Please Log in or Create an account to join the conversation.
To be more precise and clear...
We are developing an application, where we are listening to some vibrations values and if vibration level is 0, then only record those entries in the DataGridView. I have completed till this point and successfully entered in DataGridView
However my requirement is that I don't want to record in Grid straightaway, if that vibration values remains 0 for certain duration (10 seconds in this case), then only insert that entry.
How can i achieve this task in efficient manner ?
Please Log in or Create an account to join the conversation.
What precisely, in your requirements, is "the same event" - i.e. which properties of the event must be same, and which can be different? Because, for example, the time will probably always differ.
Second, are we talking about Condition events, right? If so, these events are sent when the condition state changes (such as, for example, from inactive to active, or then to acknowledged etc.). They are not sent when the condition state remains the same - and therefore, two "same" events cannot follow each other. Please comment. Maybe you are trying to determine whether, for example, the event is still in Active state for certain duration (10 seconds?)
Best regards
Please Log in or Create an account to join the conversation.
Hi,
In one of my projects, I have to keep a track of all active events in a DataGrid,
The catch here is if the same event happens after lets say 10 seconds again,then only display in the Grid
here is my Source Code...
However I am not sure if this the best way to achieve my requirement, What could be the the best way to achieve it?
Please Log in or Create an account to join the conversation.