DeltaV OPC Data Access Server functional overview > Barcode tutorial

Reference OPC in your project

  1. Start Visual Basic.
  2. From the File menu, click Open Project, and then select the Barcode.vbp file in the \DeltaV\samples\Opc\Start directory.
  3. Barcode.vbp is a project file to use as a starting point. The Microsoft Comm Control is the only Custom Control option selected.
  4. To open the References dialog, select References from the Project menu.
  5. If OPCAutomation 2.0 is in the list, skip to step 7.
  6. If OPCAutomation 2.0 is not on the list, click Browse to find the OPCDaAuto.dll file.
  7. Select the OPCAutomation 2.0 check box.
  8. To accept the settings in the References dialog, click OK.

All of the OPC objects are now available to your project. You can find a specific object and its methods and properties in the Object Browser.

Note

In Visual Basic 5, the Object Browser shows the object name for the default interfaces instead of the interface name. For example, IOpcItemMgtDisp shows up as Group and IOpcItemDisp shows up as Item. The IOPCItemMgtDisp is the default interface for the Group object. The IOpcItemDisp is the default interface for the Item object.