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

|
|
|
|
|

|
|
 Web Based Applications using the OPC Web Client Web Service
Objective
Write new values of a Tag Array from a web-page.
This example assumes that you have the Software Toolbox TOPServer installed, and the modified project "simdemo.opf"
is loaded within the TOPServer.
Source Code
ASP.NET
Try ' 'define our OPC Web Client
Dim objOWC As New OPCLabs.EasyOPCDANet.EasyDAWS '
'now to create an array of values to write to our tag Dim arrValues() As Integer = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} '
'now to write the array to the tag objOWC.WriteItemValue( _ strPCName, _
strOPCServer, _ strTag, _ arrValues) '
'now to make sure there was no error If Err.Number = 0 Then
Response.Write("Array Write successful!") Else
Response.Write("Error (" & Err.Number & ") " & Err.Description) End If '
'now to dispose of our object objOWC = Nothing ' Catch ex As Exception
' 'display an exception to screen Response.Write(ex.Message)
End Try
|
|

|
|
|
|

|
|
|