Search code examples
javamodbus

Avoid modbus message coming from meter device


We are using Jamod RTU for capturing raedings of variuos electric meters connected serially. We have set modbus timeoutexception = 1200ms. Now what is happening, when we are pinging one meter and we dont get the result (or reading), we move to next one connected in the same series. But sometimes, the previous meter sends the reading back to the application and the reading of that meter is save for the new or the next one.

To solve this issue, we have reduced network timeout in nport administrator (for managing com ports) from 5000 to 500 ms. But I dont think that is the permanent solution. Is there any way to avoid that late coming message or mark every message with its corrosponding meter?


Solution

  • Each MODBUS reply has device source address embedded inside the message. Reading it solves your problem.