with this modified code, I get the 'failed to write' error - (the original code is commented out)
Private Sub TC_Seal_Button4MouseDown(sender As System.Object, e As System.EventArgs) Handles TC_Seal.Button4MouseDown
Dim Value As String
Try
'Value = ModbusRTUCom1.Read("40001", 1)(0)
Value = TC_Seal.PLCAddressValueSP
Try
'Value += 1
Value = Value + 1
'ModbusRTUCom1.Write("40001", Value)
TC_Seal.PLCAddressValueSP = Value
Catch ex As Exception
MsgBox("Failed to write")
End Try
Catch ex As Exception
MsgBox("Failed to read - " & ex.Message)
End Try
End Sub
I tried the " value +=1 " first with same result and then commented out to try current version