pyModbusTCP
pyModbusTCP copied to clipboard
Device Identification objects
Thank you very much for your package. Is it possible to read the Device Identification information? E.g. serial number of TH probes etc.
Thank you,
I tried copy/adapting read_holding_registers in client.py but it's obviously a bit more complicated than that ...
This is now available in pyModbusTCP version 0.2.1.
from pyModbusTCP.client import ModbusClient
mc = ModbusClient(host='myserver.example.com')
dev_id_resp = mc.read_device_identification()
print(f'vendor={dev_id_resp.vendor_name}')
more: https://pymodbustcp.readthedocs.io/en/latest/package/class_ModbusClient.html#pyModbusTCP.client.ModbusClient.read_device_identification