Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想问如何使用 JAMOD 库每秒查询一次 Modbus。决定与 Modbus 建立初步连接,然后在循环中 while(true) 查询 Modbus。询问设备后,使用 Thread.sleep (1000);是正确的方法吗?谢谢你。
你应该创建一个Thread(东西implements Runnable)。
Thread
implements Runnable
看到这个答案:https ://stackoverflow.com/a/426795/362332