MangoAutomation / modbus4j

A high-performance and ease-of-use implementation of the Modbus protocol written in Java. Supports ASCII, RTU, TCP, and UDP transports as slave or master, automatic request partitioning and response data type parsing.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scan for nodes doesn't interpret modbus error responses as existent nodes

Puckfist opened this issue · comments

https://github.com/infiniteautomation/modbus4j/blob/master/src/com/serotonin/modbus4j/ModbusMaster.java#L202

The testSlaveNode method catches ModbusTransportException, which is wrapped around timeouts in MessageControl, but it's also possible the device would send an IllegalDataAddressException or IllegalFunctionException while extend ModbusTransportException

Thoughts on if that suggests a slave is indeed at that id?