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.
VB.NET example - OPC data with ListView

Please Log in or Create an account to join the conversation.
- neilcooley
-
- Offline
- Platinum Member
-
- Posts: 33
- Thank you received: 3
Many thanks for the demo, I have now integrated the code into my own project and all I can say is what an improvement it is using your SDK over other companies.
Many thanks for the demo and I hope to do business with you in coming days.
Neil
Please Log in or Create an account to join the conversation.
VS project (zipped):
Screen snapshot:
Relevant code parts:
Please Log in or Create an account to join the conversation.
In your request you wrote “reading”, so I interpreted as an explicit Read operation, that’s what it usually means.
No problem though, I will supply an example with a subscription and callback.
Best regards,
Please Log in or Create an account to join the conversation.
Sent: Thursday, August 07, 2014 7:01 PM
To: Zbynek Zahradnik
Subject: RE: OPC Labs Contact Form - opc to listview
[...]
I found the example but I was expecting a call back when values changed, is this possible?
I have approx. 500 tags so I need a method with a call back when data changes.
N.
Please Log in or Create an account to join the conversation.
There are three items pre-populated in the ListView, with their Item IDs. Each item also has sub-items, for the VTQ (value-quality-timestamp), and a possible exception (error indication).
When the Read button is pressed, the code takes the OPC item IDs from the list view, assembles an array of arguments which allows all items be read in a single operation (for good performance), and then calls EasyDAClient.ReadMultipleItems. The resulting array is then used to update the sub-items in the list view.
The relevant pieces of code are here:
The project (zipped) is attached.
We probably have to do this iteratively: If this is not quite what you wanted and does not give you enough to start on your own, let me know which parts are missing, and I will provide further examples or guidance.
One thing that may not be addressed in this version: You mentioned that you want it to operate “asynchronously”.
There are at least two possible interpretations:
1. You want that OPC methods for asynchronous reading/writing are used, between the OPC client and the OPC server. This is already taken care: We use asynchronous methods whenever possible, by default (can be changed by a parameters passed to EasyDAClient).
2. You want the OPC operation appears asynchronous to your application – e.g. the Read would be performed while the user interface stays responsive, and the list view is updates upon the arrival of the data. Currently we do not give you API to do this (besides subscriptions which is a bit of different story), but it can be done using a separate thread. Is this what you wanted?
Best regards
Please Log in or Create an account to join the conversation.
Sent: Monday, July 28, 2014 10:05 PM
To: Zbynek Zahradnik
Subject: Re: OPC Labs Contact Form - opc to listview
Hi
It's a list view for windows form !
Basically if you could do a simple example involving multiple tags reading async and value/quality/time stamp into a list view that would be nice, also several items writing async to the data source!
...
Please Log in or Create an account to join the conversation.
Dear Sir,
Thank you for your interest in our products.
We probably do not have a ready-made example directly with a ListView (BTW, is that a ListView for Windows Forms, or Web Forms?), but I am ready to work with you to resolve any issues you run into, or even perhaps create an example for you, if you can describe a bit more about the requirements.
...
Best regards,
Please Log in or Create an account to join the conversation.
Sent: Sunday, July 27, 2014 9:50 PM
...
Subject: OPC Labs Contact Form - opc to listview
...
I am wondering fdo you have any VB.Net examples showing your SDK working with a ListView and reading/writing asynchronous ?
Please Log in or Create an account to join the conversation.