SITEMAP   PRIVACY   JAPANESE
FAWEB
  JAPAN   HOME  |  Product  |  Support  |  Knowledge  |  Download  |  Sales  |  Company  |  Contact
OPC Server

OPC Server
Top Page
Feature
Datasheet
Support PLC
Introduction
Release Note
SCADA List
Sales Partners
FAQ
Price
Ability
Sample
Tips
   DCOM Config
   WinXP/SP2 Config
   OPCENUM Service
   OPC Client Labs
   FinsGateway
SCADA Setting
Manual/Demo

OnlineShop

OPC-F Member
You are Here : HOME > Product > OPC Server > Technical Guide - OPC Client Labs BACK

opc


OPC Client Labs


Forward
This page is explained with implementation of OPC Client program (VB6.0) accessing to OPC Server.

Notice
Concerning the specification of OPC is decided on OPC Foundation, the purpose of this page is that the implement user using our OPC Server can be easy to program.

We don't guarantee and support for sample code or description on this site. When using this code, please verify all functions enough.

The sample code will be able to download following.
OPC Client Sample opctestapp.zip(38KB)


OPC Layer


OPC Server and Client application communicates through COM interface. The super class is OPC Server object. it will be able to access OPC Group Object or OPC Item object.


Register OPC Automation DLL
When setup our OPC Server, some DLL is registered automatically. For access to OPC Server from Visual Basic, it needs to check "OPC Automation 2.0".


Declare OPC Objects (OPC Server / OPC Group / OPC Item)
For hooking events of OPC Server, add to "WithEvents" in dimension statement or event handler named "OBJECTNAME_EVENTNAME".



Get OPC Server List
It is able to get installed OPC Server name by using OPC Server object. In this sample, it shows OPC Server name in list box and operator can select the target server.



Connect and Browse
It is able to get device name registered in OPC Server by using OPC Server object. You can make the Group under device and OPC Server object is enabled to access this lower layer.



Create OPC Group Object and Add Tags
For accessing client application to physical device data, it needs to generate OPC Group object in OPC group collection. The OPC Group object can configure update interval of tags. Normally, the device of accessing same cycle will register in same group. Also, you should be carefully CPU performance to create over groups because OPC Server create a thread for each group.



Advise and Callback
Implements event handler of OPC Group object for advice mode. The OPC Server read data for each cycle and if changing the value, callback to client application. The quality flag is normally '0xC0', when occurred error, it will be turn to other value.



Sync Read/Write and ASync Read/Write
The OPC has two ways of data access, Synchronize and Asynchronous. In Synchronize, the client application must be wait for completing server work. But the client application can confirm server transaction is normally completed because the OPC Server returns the result on completing the communication work. This is a normally style of procedure.

In Asynchronous mode, the OPC Server turns the handle to client as soon as receiving the request and proceed the transaction on background. After completing this work, calls handler of client application. Asynchronous mode cut down wait time for communication and be able to run client application.
Caution: Asynchronous access is enabled under advice mode.



Cache Read
In cache read operation, OPC Server doesn't access the physical device and return the last data on memory. The OPC Server read and caches the value every each time.It will be able to access on high speed if not need newest value.


BACK

Copyright © 1998-2006 TAKEBISHI Corporation All rights reserved.

FAWEB.NET
TAKEBISHI Corporation
29 Mamedacho Nishikyogoku Ukyoku Kyoto 615-8501, JAPAN
TEL: +81-75-325-2171 / FAX: +81-75-325-2273 fa-support@takebishi.co.jp