Flask pymodbus implementation #1238
-
ello, I am student and I working on integration of Raspberry Pi as Modbus client for industrial TCP connection. Here is my test connection function import json from pymodbus.client import ModbusTcpClient clientStatusController BEGINdef clientStatusController(request_data=False): if not request_data: open_client=False LOGGING CANCELED logging.debug(request_data)try: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Please read the documentation on how to use pymodbus or use one of the examples (like https://github.com/riptideio/pymodbus#example-code). Creating an object of ModbusTcpClient does not make a connection. Secondly you cannot use json directly with the modbus protocol, you need to call a modbus service, like e.g. ReadHoldingRegister() |
Beta Was this translation helpful? Give feedback.
Please read the documentation on how to use pymodbus or use one of the examples (like https://github.com/riptideio/pymodbus#example-code).
Creating an object of ModbusTcpClient does not make a connection.
Secondly you cannot use json directly with the modbus protocol, you need to call a modbus service, like e.g. ReadHoldingRegister()