Multiple modbus clients over RS485 #2679
-
I am looking for some guidance for implementing pymodbus for several drivers. A short introduction to the setup: Now, everything is single threaded in the application so I am not worried about any concurrency issues and the drivers will therefore not fight for serial port access. However, I was recommended to use a global modbus client instance that each driver should access instead of a having multiple modbus client objects calling connect and close. Maybe I can get a better explanation from a modbus guru. Looking forward to the response :D |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Pymodbus do not work as client on a multiline as documented, nor do any normal application! This is due to the way modbus signals frame end/start, which is by pausing the communication. If you want to do this you need to have rs485 hardware directly connected (no usb converter) and write a device driver that detects the pause and somehow signals the pause to the application. pymodbus do not have a "modbus handler" that you can just call, you would need to rewrite asyncio transport base class. |
Beta Was this translation helpful? Give feedback.
Pymodbus do not work as client on a multiline as documented, nor do any normal application!
This is due to the way modbus signals frame end/start, which is by pausing the communication.
If you want to do this you need to have rs485 hardware directly connected (no usb converter) and write a device driver that detects the pause and somehow signals the pause to the application.
pymodbus do not have a "modbus handler" that you can just call, you would need to rewrite asyncio transport base class.