Write Array Tag
Home Product
Details Free 
Demo Pricing &
Ordering Related
Products Support About Us

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

Copyright Software Toolbox, Inc., 1996-2004, All Rights Reserved Worldwide.
148A East Charles Street, Matthews, North Carolina, USA 28105
Phone: 704-849-2773 or 1-888-665-3678 (US), Fax: 704-849-6388
sales@softwaretoolbox.com | support@softwaretoolbox.com