Opc data Access Automation Specification



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

4.4.5.4

 

AsyncWrite 

Description 

Write one or more items in a group. The results are returned via the AsyncWriteComplete event 

associated with the OPCGroup object. 

Syntax 

AsyncWrite(NumItems As Long, ServerHandles() As Long, Values() As Variant, ByRef Errors() 

As Long, TransactionID As Long, ByRef CancelID As Long) 

 

Part Description 



56 

 



OPC Data Access Automation Specification2.02 

NumItems 

The number of items to be written. 

ServerHandles 

Array of server item handles for the items to be written. 

Values 


Array of values. 

Errors 


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

written.  

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”. 

 

Remarks 


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

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

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

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

See Also 

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

Example Private 

Sub 


AsyncWriteButton_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 

NumItems = 10 

For ServerIndex = 1 to NumItems 

ClientTransactionID = 1957

 

‘ set up which items to be write 



ServerHandles(ServerIndex) = AnOPCItemServerHandles(ServerIndex) 

Values(ServerIndex) = ServerIndex * 2  ‘any random value for this example would suffice 

Next ServerIndex 

OneGroup.AsyncWrite NumItems, ServerHandles, Values, Errors, ClientTransactionID , 

ServerTransactionID 

End Sub 


57 

 



OPC Data Access Automation Specification2.02 


Download 1,93 Mb.

Do'stlaringiz bilan baham:
1   ...   70   71   72   73   74   75   76   77   ...   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