![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/userdefault.png)
08/30/2018
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
Good Afternoon,
I have been spending some time developing a simple OPC UA client. Which primary task is to read tags from a S7-1500 PLC. I've managed using the Siemens.OPCUa.dll to connect to the server and read tag values. However I am finding it hard to Write values. I have included some simple code below which shows connecting to the server and reading tag values. If anyone could point me in the right direction for writing Boolean values to nodes/tags it would be much appreciated.
Public Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Serc = New Server()
Serc.Connect("opc.tcp://192.168.0.1:4840")
Dim nodei As NodeId
nodei = "ns=3;s=""one"""
Dim z = Serc.Session.ReadValue(nodei)
PingTextBox.Text = z.Value
End Sub
Thank you,
Lindsey Williams
1 Guest(s)