Search code examples
javamodbus-tcp

The right way, to continuously query a Modbus in Java (JAMOD)


I wanted to ask how to query every second Modbus, using the JAMOD library. Decided to make a preliminary connection to Modbus and then, within a loop while(true) query the Modbus. After interrogating the device, use a Thread.sleep (1000); is the right way? Thank you.


Solution

  • You should create a Thread (something that implements Runnable).

    See this answer : https://stackoverflow.com/a/426795/362332