擅长:python、mysql、java
<p>modbus有几个python库:<code>pymodbus3</code>,<code>minimalmodbus</code>,<code>modbus-tk</code>。我建议你挑一个,用在你的项目上。在</p>
<p>我正在维护<a href="https://github.com/ljean/modbus-tk/" rel="nofollow noreferrer">modbus-tk</a>,所以这将是我的选择。:-)</p>
<p>您可以看看这个例子来读取寄存器:<a href="https://github.com/ljean/modbus-tk/blob/master/examples/tcpmaster_example.py" rel="nofollow noreferrer">https://github.com/ljean/modbus-tk/blob/master/examples/tcpmaster_example.py</a></p>
<p>我希望有帮助</p>