Support and Services

Visual Basic OPC Client Examples

Simple Visual Basic OPC Client OPC Code Download for VB, VB .NET, C++

The Simple OPC Client example demonstrates how to use the automation interface in Visual basic 5.0 or better. The example largely follows the code structure found in the OPC Automation Interface 2.0 specification. The code is well commented and contains recomendations on how you might develop your own customer OPC application. This example is great if you need to do some very simple OPC connectivity. The example only demonstrates a single OPC server connection with only a single OPC group and a fixed list of OPC items. The number of OPC items can be expanded easily. This example and its source code is provided as part of the KEPServerEX OPC Server download.

Simple Visual Basic OPC Client


Complex Visual Basic OPC Client

The Complex OPC Client example demonstrates how to use the automation interface in Visual basic 5.0 or better. This example was written to provide a robust full featured model for using OPC server technology in your Visual Basic applications.

The example code uses the OPC Automation Interface 2.0 specification and expands upon the object model provided by providing a set of VB class objects that wrap and augment the automation interface. One of the big problems many developers face is how to connect with multiple OPC servers, add multiple groups with multiple OPC items, and keep track of all of the change events to keep the high levels of performance that OPC can provide. The Complex OPC example gives you that foundation. No OPC client is complete without OPC tag browsing. The Complex OPC Client example implements a complete tag browsing interface with filtering.

The example uses only standard VB controls such as the tree control and list view. Other than the OPC Automation interface objects, no other controls should be needed. This example and its source code is provided as part of the KEPServerEX OPC Server download.

Complex Visual Basic OPC Client

Using Modems and Visual Basic with KEPServerEX
Download Visual Basic source code for modem example
Visual Basic OPC Client Example and KEPServerEX
Have questions, check out the Knowledge Base.