EasyModbusTCP.NET icon indicating copy to clipboard operation
EasyModbusTCP.NET copied to clipboard

No try catch error when using none existing UnitIdentifier

Open KeepITSimpleSolutions opened this issue 2 years ago • 0 comments

I never get an exception when using an UnitIdentifier that does not exists...

In short.. IP = OK.... PORT = OK...

For x = 1 To CInt(Trim(args(3))) Try Dim modbusClient As New EasyModbus.ModbusClient(Trim(args(1)), Trim(args(2))) With { .UnitIdentifier = CByte(x), .ConnectionTimeout = 5000 } modbusClient.Connect() If modbusClient.Connected Then ... End If modbusClient.Disconnect() Catch ex As Exception Console.WriteLine("ERROR = " & ex.Message) End Try Next System.Threading.Thread.Sleep(10000)

KeepITSimpleSolutions avatar Feb 06 '23 15:02 KeepITSimpleSolutions