RTU Framer - server Multipoint rs485 line #2597
-
Hi, I need to expand the functionality of the RTU framer and notice this warning Can someone expand on that? What is the challenge on using it as a server in a multipoint line and is there any proposed solution? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
The problem is identifying the packets. RTU framer do not have distinct prefix/suffix nor does it have a length field...the only detection is a pause of 3.5 chars between each packet. |
Beta Was this translation helpful? Give feedback.
-
You can find several PRs trying to solve the issue as well as plenty of discussion not only with pymodbus but other projects as well. |
Beta Was this translation helpful? Give feedback.
-
Thank you Jan. There's nothing wrong with the current RTU framer (apart from the limitation you mentioned above). The way it works is starting with an "id" of 250, and then 2 bytes of actual id. Changes are simple, I'm just adding another framer on my fork. (dev...ArFe:pymodbus:dev). I'm ok with updating it if necessary (if you change how the framers work). I love how this is separate from the PDU, so the changes are much simpler. I had to do the same for JS, and the changes were much more extensive and spread throughout the code. On my question, I'm assuming that the best approach to solve the problem would be providing unit id to the framer, and then using info on function code and number of registers to determine the size of the frame. I don't have all the details figure out, but I could try something like that if you think it would worth it. |
Beta Was this translation helpful? Give feedback.
The problem is identifying the packets. RTU framer do not have distinct prefix/suffix nor does it have a length field...the only detection is a pause of 3.5 chars between each packet.