1
我有一個簡單的程序以檢索來自MODBUS數據,我想提取它..如何從pymodbus中提取數據?
from pyModbusTCP.client import ModbusClient
c = ModbusClient(host="192.168.1.64", port=502, auto_open=True)
regs = c.read_holding_registers(0, 4)
print (regs)
輸出:
[ 1 , 23 , 21 , 42 ]
如何提取輸出變量像
a = 1
b = 23
c = 21
d = 42
任何人都可以幫助我嗎?
yup ..事情我應該讀基本..謝謝兄弟.. –