Replies: 1 comment 2 replies
-
I just had a quick look and I can see that the request asks for 21 items, however the response only contains 20 ... so the response of PLC4X is actually correct. Just not sure if this is an implementation-error on your python s7 simulator (which I do suspect is the case) or if we haven't implemented a special case. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Original post: https://stackoverflow.com/questions/78724013/apache-plc4x-s7-error-the-number-of-requested-items-doesnt-match-the-number-of
Hello everyone. I want to read data from a snap7 Python simulator I have set up locally (source: https://python-snap7.readthedocs.io/en/1.3/API/server.html) with a service written in Java 17 (Spring Boot 2.5.0). My goal is to read about 1000 tags per second, or as fast as possible.
I am using PLC4X 0.12.0, and I have followed the instructions from the documentation and can read values normally up to a point. If I add more than 18 tagAddresses to the same connection, the application hangs, and I get the exception:
I can solve it by breaking down my list of tag addresses in batches, and then it works, but I was wondering if I was doing something wrong, or if this is intentional, maybe the simulator is at fault (I only changed some of the values I can read). I tried changing some settings in the simulator server code to check if it restricts packets sent somehow but no luck (fiddled with max pdu length, max connections, mpi rate, max bus rate, server size etc)
This is my wireshark capture (The packets that interest are from port 1102 from which the simulator runs. For them to show as S7 I used right click on packet -> decode as ->click on current -> choose TPKT)
wireshark1.zip
Thank you for your time and help.
My code:
Beta Was this translation helpful? Give feedback.
All reactions