|
Please use our Code Center to obtain source-code and example projects/solutions:
http://codecenter.softwaretoolbox.com
|
|
|

|
|
|
|
|

|
|
Write Array-Tag Example, VB6This example assumes you have the TOPServer installed with the "simdemo.opf" project loaded.
The following example builds upon the Tutorial Using in VB6.
Within the "Form_Load()" event, place the following code:
' 'first, to create some values Dim intCounter As Integer
Dim intValues(0 To 9) As Integer For intCounter = 0 To 9 intValues(intCounter) = intCounter * 10 Next '
'create the opc web client object Dim objOPCWebClient As EasyDA3 ' 'now call the method to read a tag, specifying the
'name of the OPC Server and the Tag... objOPCWebClient.WriteItemValue "", "SWToolbox.TOPServer", _ "Channel_1.Device_1.TagArray_1
", "", intValues ' 'now display a value or an error... If Err.Number = 0 Then ' 'no errors, all was fine MsgBox "Wrote values successfully" Else ' 'an error occurred, so display an error message MsgBox "An error occurred: " & Err.Number
End If
|
|

|
|
|
|

|
|
|