Opc data Access Automation Specification



Download 1,93 Mb.
Pdf ko'rish
bet73/107
Sana03.01.2022
Hajmi1,93 Mb.
#317185
1   ...   69   70   71   72   73   74   75   76   ...   107
Bog'liq
OPC DA Auto 2.02 Specification

4.4.5.3

 

AsyncRead 

Description 

Read one or more items in a group. The results are returned via the AsyncReadComplete event 

associated with the OPCGroup object. 

Reads are from ‘DEVICE’ and are not affected by the ACTIVE state of the group or item. 

Syntax 


AsyncRead( NumItems As Long, ServerHandles() As Long, ByRef Errors() As Long, 

TransactionID As Long, ByRef CancelID As Long) 

 

 

Part Description 



NumItems 

The number of items to be read. 

ServerHandles 

Array of server item handles for the items to be read 

Errors 

Array of Long’s indicating the status of the individual items to be 

read.  

TransactionID 

The client specified transaction ID. This is included in the 

‘completion’ information provided in the Corresponding Event. 

CancelID 

A Server generated transaction ID. This is provided to enable the 

client to cancel the “transaction”. 

55 


 


OPC Data Access Automation Specification2.02 

 

Remarks 



The AsyncRead requires the OPCGroup object to have been dimensioned with events (Dim 

WithEvents xxx As OPCGroup) in order for the results of the AsyncRead operation to be returned to 

the automation client application.  The AsyncReadComplete event associated with the OPCGroup 

object will be fired (called) by the automation server with the results of the AsyncRead operation.  

See Also 

IOPCAsyncIO2::Read from the OPC Data Access Custom Interface Specification 

Example Private 

Sub 


AsyncReadButton_Click() 

Dim NumItems As Long  

Dim ServerIndex As Long  

Dim ServerHandles(10) As Long  

Dim Values() As Variant  

Dim Errors() As Long  

Dim ClientTransactionID As Long  

Dim ServerTransactionID As Long 

Dim Qualities() As Variant  

Dim TimeStamps() As Variant 

NumItems = 10 

ClientTransactionID = 1975 

For ServerIndex = 1 to NumItems 

‘ set up which items to be read 

ServerHandles(ServerIndex) = AnOPCItemServerHandles(ServerIndex) 

Next ServerIndex 

OneGroup.AsyncRead NumItems, ServerHandles, Errors, ClientTransactionID , 

ServerTransactionID  

End Sub 

 


Download 1,93 Mb.

Do'stlaringiz bilan baham:
1   ...   69   70   71   72   73   74   75   76   ...   107




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish