Tutorial - using with VB.NET
Home Product
Details Free 
Demo Pricing &
Ordering Related
Products Support About Us

Back to all documents

Tutorial - Getting Started with Visual Basic.NET and the OPCData.NET Components

The following tutorial takes you step-by-step setting-up the Visual Basic.NET to be able to use the OPCData.NET Components. This tutorial shows you how to create a simple application that when started-up will display the value of a Tag. This tutorial assumes that you are using Visual Studio.NET 2003 edition, although 2002 is supported, the steps are essentially the same.

Creating a new project

  1. Open Visual Studio.NET 2003.
  2. Create a new Project by going to the "File" menu and choosing "New" and then "Project" from the sub-menu.
  3. The templates window will open, we will create a Windows Forms application.
  4. Give your project a name, or accept the default.

Referencing the OPC Web Client

In order to use the OPCData.NET Components, we need to reference the OPC Web Client assembly:

  1. In the "Solution Explorer", simply right-click on the "References" item, as shown in the screen to the below:
  2. The "Add Reference" screen will open:

  3. Click on the "Browse" button as shown in the above screen.
  4. A file-open dialog will open where you will need to browse and select the OPC Web Client assembly, which is in the default location of:

    C:\Program Files\Software Toolbox\OPC Web Client 3.00\EALibraries\Assemblies\

    and the assembly is named: OPCLabs.EasyOPCDANet.dll
  5. Click the "Open" button and select that assembly and return to the previous screen.
  6. Click the OK button to close the references window and return back to the development environmnet.

Using the OPCData.NET Components

  1. Double-click the Form to go to the Code view
  2. You will now be inside the "Form_load()" event.
    Move the cursor into the middle of the "Sub" so that it is on the blank line. as shown below:
     

     
  3. Now you can copy & paste any of the code from the tutorials section.

Copyright Software Toolbox, Inc., 1996-2004, All Rights Reserved Worldwide.
148A East Charles Street, Matthews, North Carolina, USA 28105
Phone: 704-849-2773 or 1-888-665-3678 (US), Fax: 704-849-6388
sales@softwaretoolbox.com | support@softwaretoolbox.com