|
|
|
|

|
|
Back to all documents
Tutorial - Getting Started with C# and the OPCData.NET Components
The following tutorial takes you step-by-step setting-up C# 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
- Open Visual Studio.NET 2003.
- Create a new Project by going to the "File" menu and choosing "New" and then "Project" from the sub-menu.
- The templates window will open, we will create a Windows Forms application.
- 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 its assembly:
- In the "Solution Explorer", simply right-click on the "References" item, as shown in the screen to the below:
- The "Add Reference" screen will open:
- Click on the "Browse" button as shown in the above screen.
- 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
- Click the "Open" button and select that assembly and return to the previous screen.
- Click the OK button to close the references window and return back to the development environmnet.
Using the OPC Web Client
- Double-click the Form to go to the Code view
- You will now be inside the form constructor.
Move the cursor into the middle of the constructor so that it is on the blank line. as shown below:

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

|
|
|