modbus server implementation on raspberry to enable/disable GPIO pins via serial modbus client #2746
-
Dearest community. facing the challenge of implementing the topic I thought this should not be to hard. I am working my way thought the examples of pymodbus, in particular server_*.py now and I am wondering if anyone here in the community was facing the same challenge and is willing to share the code with me or write suggestions on how to solve it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
I think you should rather be looking at pyserial, since Pymodbus do not handle the lower serial communication. The lowest level in Pymodbus serialtransport.py but that merely handles addition of asyncio. Since Pymodbus server is totally asynchronous you probably will find it rather difficult to sync the gpio with the actual transmission of data. The way Pymodbus interfaces with pyserial have not changed over the last couple of years, so you should be able to look at old examples. |
Beta Was this translation helpful? Give feedback.
I think you should rather be looking at pyserial, since Pymodbus do not handle the lower serial communication.
The lowest level in Pymodbus serialtransport.py but that merely handles addition of asyncio.
Since Pymodbus server is totally asynchronous you probably will find it rather difficult to sync the gpio with the actual transmission of data.
The way Pymodbus interfaces with pyserial have not changed over the last couple of years, so you should be able to look at old examples.