rossmann-engineering / EasyModbusTCP.NET

Modbus TCP, Modbus UDP and Modbus RTU client/server library for .NET implementations
928 stars 402 forks source link

Infinite Loop when node is not present. #30

Open bcooper87 opened 4 years ago

bcooper87 commented 4 years ago

I am running into an issue when I try to read a holding register. If the address is not present it just keeps calling the same registers and never throws an error that there is no response. Is there a way I can scan addresses for their presence and not get suck in this loop or is there a timeout setting that I am using. I am using Modbus RTU with a serial port.

bcooper87 commented 4 years ago

If I step through it from the start it works as intended. If I only do break points, every time it stops at them, countRetries is reset to 0.

bcooper87 commented 4 years ago

This only happens if the address is 0. Which is a broadcast address.