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.

Examples in VB.NET - not just the very easy ones

More
28 Dec 2010 17:31 #166 by support
Hello once again.
We have updated the <a href="/LinkClick.aspx?fileticket=BMK41vQLPm8%3d&tabid=195">Bonus Pack (now in build 5.03.532.1) with new examples in Visual Basic. You can download and reinstall the Bonus Pack now. Specifically:

ADDED: HmiScreen - this is a good one if you want to use subscriptions
ADDED: EasyOpcDaNetDemo1 - this is the main "demo" application, rewritten into VB.NET. It shows the main functionality of the product, all in one package
ADDED: SubscribeToMany - shows the performance of subscriptions with large numbers of items
MODIFIED: MultipleItems - enhanced to read values back
ADDED: ArrayValues - writes an array of three 16-bit integers and reads the array back

The current (new) VS2010 examples in VB.NET, zipped, can also be downloaded using the link below; I would however suggest to use the full Bonus Pack, because it has proper relative references to assembly folders etc.
QuickOPCNet Examples VBNET VS2010.zip
With regard to your question about working with "arrays":

If you meant to operate on multiple OPC items in a single call, please read How to write into multiple OPC items using a single method call, and read multiple item values back.
If you wanted to transfer a value containing an array of elements to/from an OPC item of such type, please read <span style="line-height: 115%; font-family: "Calibri","sans-serif"; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">How to write into an OPC item that is of array type, and read the array value back.

<span style="line-height: 115%; font-family: "Calibri","sans-serif"; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">Best regards,
<span style="line-height: 115%; font-family: "Calibri","sans-serif"; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">Zbynek Zahradnik

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

More
28 Dec 2010 11:56 #162 by support
Hello,
as you may already know, source code to all examples is contained in "Bonus Pack" install; the current version (5.03) can be downloaded from <a href="/LinkClick.aspx?fileticket=iPlL0XramR4%3d&tabid=195">here. For convenience, I have also extracted C# examples in Visual Studio 2010, and zipped them into the following file:
QuickOpcNet Examples CSharp VS2010.zip
I will work on translating the missing examples into VB.NET, as suggested below, and also provide examples that work with arrays.

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

More
28 Dec 2010 11:45 #161 by support
From: D.
Sent: Tuesday, December 28, 2010 9:42 AM
To: Zbynek Zahradnik
Subject: AW: EasyOPC.Net

Hello Mr. Zahradnik,

thank you for the quick answer. It will also be helpful for me to get a C# samples. I am an "oldschool" C Programmer, so i understand the most thinks of C#. But VB ist easyier to handle with database connections.

Mit freundlichen Grüßen
Best Regards
D.
...


Von: Zbynek Zahradnik
Gesendet: Mo 27.12.2010 15:15
An: D.
Betreff: RE: EasyOPC.Net
Dear Sir,
Thank you for your interest in our products.

As you might have noticed, we tend to have more examples in C# rather than in VB.NET, but that does not mean that VB.NET is any less supported.

Would it be helpful to you if we re-write following existing C# examples to VB.NET (they are all WinForms app; I guess that's what your environment is)?

• EasyOpcDANetDemo1: This is a clone of the Demo application that ships with the QuickOPC.NET product. The application shows most product functions, including the browsing forms, OPC property access, and event-based subscriptions.
• HmiScreen: Windows Forms application that shows how to use implement an HMI screen by storing OPC Item IDs in the Tag property of screen controls, and animate the controls by subscribing to all items at once. Also shows a possibility how to write to an OPC item form the screen.
• SubscribeToMany: Demonstrates and measures performance with large number of subscribed OPC items. [optionally]

In addition, we can "throw in" an example of reading/writing arrays of values.

This can be probably be done by end of this week. I apologize that due to the holiday season it's somewhat difficult to do it faster.

Please let me know.

Yours sincerely,
Zbynek Zahradnik, OPC Labs


Original Message
From: ...
Sent: Sunday, December 26, 2010 5:21 PM
To: Zbynek Zahradnik
Subject: EasyOPC.Net

Hello,
i am testing your EasyOPC.Net tools. Do you have some more samples for VB2010, not just th very eays ones?
Maybe for handling subscriptions and reading / writing arrays of values ?

Thanks in advance.

D.

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

Moderators: support
Time to create page: 0.064 seconds