How to access OPC from Xojo (REAL Studio, REALbasic): Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
[[Category:COM]] [[Category:VB6]] [[Category:Xojo]] | [[Category:COM]] [[Category:REALbasic]] [[Category:VB6]] [[Category:Xojo]] | ||
It is possible to use QuickOPC-COM in an application written in Xojo, http://www.xojo.com/index_xojo.php (under Windows only). We have verified this originally with REAL Studio 2010r5, and converted to REAL Studio 2011r1.1, and later versions. The project that corresponds to the VB6 application "Quick Start", and simply reads and displays a value of an OPC item on a form, is ReadAndDisplayValue.xojo_binary_project, and the form looks like this: | It is possible to use QuickOPC-COM in an application written in Xojo, http://www.xojo.com/index_xojo.php (under Windows only). We have verified this originally with REAL Studio 2010r5, and converted to REAL Studio 2011r1.1, and later versions. The project that corresponds to the VB6 application "Quick Start", and simply reads and displays a value of an OPC item on a form, is ReadAndDisplayValue.xojo_binary_project, and the form looks like this: | ||
Revision as of 18:14, 13 August 2016
It is possible to use QuickOPC-COM in an application written in Xojo, http://www.xojo.com/index_xojo.php (under Windows only). We have verified this originally with REAL Studio 2010r5, and converted to REAL Studio 2011r1.1, and later versions. The project that corresponds to the VB6 application "Quick Start", and simply reads and displays a value of an OPC item on a form, is ReadAndDisplayValue.xojo_binary_project, and the form looks like this:
We have included this example with the product.
The actual piece of code that does the work is as simple as in most other languages:
' Create EasyOPC-DA component Dim EasyDAClient As New OleObject ("OPCLabs.EasyOpc.DataAccess.EasyDAClient") ' Read item value and display it Me.TextField1.Text = EasyDAClient.ReadItemValue("", "OPCLabs.KitServer.2", "Demo.Single")
A corresponding example for OPC Unified Architecture is also shipped with the product.
Note - Earlier URL: http://www.realsoftware.com