Hi.
I have this problem now - can you help me?
my code is:
Imports System.IO.Ports
Imports Modbus.Device
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Button1.Click
Dim msCom As New SerialPort
Dim md As ModbusSerialMaster
msCom = New SerialPort("COM1")
msCom.BaudRate = 19200
msCom.DataBits = 8
msCom.Parity = Parity.None
msCom.StopBits = StopBits.Two
msCom.Open()
Dim retorno() As UShort
md = ModbusSerialMaster.CreateRtu(msCom)
retorno = md.ReadHoldingRegisters(1, 823, 1)
Label1.Text = retorno(0)
msCom.Close()
End Sub
End Class
But when i execute return me this error:
"The type initializer for 'Modbus.IO.ModbusRtuTransport' threw an
exception." - this line (md = ModbusSerialMaster.CreateRtu(msCom))
what could it be????
Thanks