Opc data Access Automation Specification



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

4.4.5.2

 

SyncWrite 

Description 

Writes values to one or more items in a group. The function runs to completion. The values are 

written to the DEVICE. That is, the function should not return until it verifies that the device has 

actually accepted (or rejected) the data. 

Syntax 


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

As Long) 

 

Part Description 



NumItems 

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 success of the individual item writes.. 

 

Remarks 


Writes are not affected by the ACTIVE state of the group or item. 

Example Private 

Sub 

WriteButton_Click() 



Dim Source As Integer 

Dim NumItems As Long  

Dim ServerIndex As Long  

Dim ServerHandles() As Long  

54 

 



OPC Data Access Automation Specification2.02 

Dim Values() As Variant  

Dim Errors() As Long  

NumItems = 10 

For ServerIndex = 1 to NumItems 

‘ set up which items to be written 

ServerHandles(ServerIndex) = AnOPCItemServerHandles(ServerIndex) 

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

Next ServerIndex 

OneGroup.SyncWrite NumItems, ServerHandles, Values, Errors 

For ServerIndex = 1 to NumItems 

‘ process the Errors 

TextBox(ServerIndex).Text = Errors(ServerIndex) 

Next ServerIndex 

End Sub 


Download 1,93 Mb.

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