- Posts: 33
- Thank you received: 3
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.
Console Application - Subscribing To Large Number of Tags and Storing of Values
- neilcooley
-
Topic Author
- Offline
- Platinum Member
-
Please Log in or Create an account to join the conversation.
Yes, the dictionary object is the right choice here. There is no need to be concerned about the speed, it is more than satisfactory for this purpose.
Please have a look at the code below, I hope it helps:
We also have pre-existing example of "loggers". They use somewhat different approach from what you suggested, but are still worth looking at:
- opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...le%20-%20LogAsStringToSql.html
- opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...ole%20-%20LogAsUnionToSql.html
- opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...le%20-%20LogToSqlEnhanced.html
Best regards
Please Log in or Create an account to join the conversation.
- neilcooley
-
Topic Author
- Offline
- Platinum Member
-
- Posts: 33
- Thank you received: 3
Many thanks for the prompt reply.
I wish to subscribe to the data and update a internal table, the idea is then every 5 seconds we log the values to a database (SQL, or MYSQL, or Access) or a CSV file - the destination is undecided but for now we can assume its a database.
Currently I am using VB.Net. I have seen that a dictionary object might be what i am looking for but i dont know if this would be fast enough to store the data values.
Neil
Please Log in or Create an account to join the conversation.
can you describe a bit more about how the values will then be processed. I mean, if you had the code that keeps the data structure updated, what then? Do you want to have some code that also reacts to every change, or do you want to have some parallel processing that would, for example, periodically examine the data as a whole and do something processing on them? Maybe a wider picture of what you want to achieve would help.
It is certainly doable, and too complicated. If I do not find an example, I would be happy to create one.
Is it in C# ?
Best regards
Please Log in or Create an account to join the conversation.
- neilcooley
-
Topic Author
- Offline
- Platinum Member
-
- Posts: 33
- Thank you received: 3
I am a regular user of OPC Labs for WinForms and quite regular use a list view to display the real time status of the values.
I am now developing a console application and whilst i know how to register multiple tagas and fire the change event, i am wondering if there is a example that shows how to store the tag name, value, quality and timestamp into a array list which then updates when the change event occurs?
Do you have a example or suggestions?
Neil
Please Log in or Create an account to join the conversation.