|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
OPC Programming with C++Builder
A number of Delphi OPC solutions also support C++Builder. Visit our Delphi page for more information on dOPC and Prosys Sentrol. The code samples on this page have been generously provided by Rusman Rusyadi. Thanks Rusman! Most were developed with C++Builder 4, though the first sample, Using the OPC Custom Interfaces Directly, is updated for C++Builder 6.
Building an OPC ClientUsing the OPC Custom Interfaces DirectlyThis is certainly the most flexible approach, and may consequently require more coding than the alternatives discussed below. This sample was originally published by Ionel Munoz via the CodeCentral site. It has been extended here to include:
More recently, Ionel Munoz also contributed to the update for C++Builder 6. Download the ZIP file for C++Builder 6. Using ActiveX Control from SoftingMaking use of an ActiveX control minimizes the amount of coding required, but also offers the least flexibility. The sample code shows how to use Softing's SOAXC ActiveX control. SOAXC is a component of Softing's OPC Toolbox ActiveX. Using WinTECH Client ToolkitThis approach offers a good compromise between flexibility and coding efficiency. The client programmer has no need to understand low-level COM programming, as the DLL totally encapsulates this functionality. The first sample client allows you to connect to a local or remote server, create one or more groups using various update rates, and scan data items for display. You may also write values back to the server. The second demo client utilizes some of the advanced features of the WinTECH toolkit. The browsing operation of this client is more refined, presenting item names in the hierarchical format. Using WinTECH Client Toolkit - Alarms & Events ClientThis demo is a simple Alarms & Events client that demonstrates the basic API of the WinTECH Client Toolkit. Building an OPC ServerUsing WinTECH Server ToolkitThis demo is a simple OPC Server application that demonstrates the basic API of the WinTECH Server Toolkit. It is compatible with OPC 1.0 and 2.0 clients. Using MatrikonOPC's Server ToolkitOPC Genie (Generic Information Exchange) enables the exchange of process data between OPC compliant applications and any device that supports serial or Ethernet communication. This flexibility enables you to develop an OPC server without sacrificing throughput or data integrity. Simply configure OPC Genie with the required protocol and all the data will be exposed via OPC! OPC UtilitiesTechniques for Listing OPC ServersThis sample shows how to obtain a listing of OPC servers from a local or remote machine using three different techniques:
|
OPC Servers & OPC Clients Free OPC Tutorial, Downloads, Webcasts, Live Advice www.MatrikonOPC.com OPC Training Hands-on experience with OPC Learn from those who do! www.OPCTraining.com | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||