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

Advanced OPC
Inside MELSEC
Advanced OPC
Wonder World
You are Here : HOME > Knowledge Base > Advanced OPC BACK

The OPC client is and there are a synchronous access and an asynchronous access from the OPC server as reading data and a writing method. Easily it reads and it is possible to write it by using the same period access (SyncRead and SyncWrite method) when the OPC client that uses the OPC automation interface by Visual Basic and Excel is developed.
Commentor
Commentor / M.Ike


Synchronous access and Asynchronous access
Synchronous access and Asynchronous access When the client demands, the server completes processing in the method in a synchronous access. Therefore, the demand method is executed at once and reflected. On the other hand, processing is not returned to the client side until the processing of the server side is completed.

Processing stagnates on the server side when a large amount of data is processed or abnormality occurs by the communication with object PLC, and as a result other processing of the client side will be waited for. There is the following methods to evade such an evil.


1. Cache reading(Writing is improper)
Synchronous and Asynchronous As for the SyncRead method, the device reading and Cache reading can be selected. The server becomes a response waiting from the object device when a large amount of data is processed so that the device reading may directly access the object device and read out data or the communication abnormality is generated, and processing doesn't return to the client.

On the other hand, the server does the data reading from the object device at a constant asynchronous from the demand from the client, cycle, and can update memory (Cache) of data in the server. To access the internal data memory always updated, the Cache reading will be completed in a short time compared with the device reading. When the Cache reading is done, it is necessary to set the IsActive property of the OPC group object to True, and to always update it effectively. Moreover, the load might always go up when there are a lot of numbers of items because it always updates all items registered to the OPC group.


2. Asynchronous Access
Synchronous and Asynchronous Processing is never waited for on the client side so that the demand may be received from the client and the server may return the client the steering wheel at once when it uses an asynchronous access (AsyncRead and AsyncWrite method).
As for an asynchronous access, it is insufficient only to execute the method, and however, the data reading etc. should receive the notification of the processing completion from the server because the processing result is necessary, and do the completion processing on the client side.

First of all, the IsSubscribed property of the OPC group object is set to True, and the communication road is established for the notification of asynchronous processing. Moreover, the event is made effective adding the WithEvents key word by the declaration of the OPC group. And, the completion processing to an asynchronous demand is described in processing completion notification event (AsyncReadComplete,AsyncWriteComplete).

Synchronous and Asynchronous Additionally, data can be transmitted by notifying the client if data had changed when the server updated the cash of internal though there are no a kind of asynchronous reading reading demand from the client. As for the client, the latest data can be received from the server at any time by using this data change notification event (DataChange).


Thus, let's use the function properly by the usage and construct the best client application though there are both merits and demerits in a synchronous access and an asynchronous access respectively.


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