-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message packing on OmronNJ/NX beyond max response size #454
Comments
I don't have an Omron, so take what I say with a grain of salt. From what I understand, Omron decided to behave differently than Rockwell in some key areas:
One of the results of all this is that you can request several tags at once, but if the results do not fit into the 1900 byte result packet, the whole bundled request seems to fail. I think this is what you are hitting. So while Omron is using CIP it is not using the Rockwell commands. Unfortunately, I have not found a good source of documentation for Omron on this. There is a Python library that supports Omron with CIP that could be a source of ideas. |
So I have been developing with libplctag for OmronNJ for a few months now and some of the behaviour you describe differs to what I have seen on my Omron NJ:
Yes this is my problem, I suppose this issue is about whether it would be a good idea to add checks to libplctag to stop users breaching this limit? Before packing requests together, the library could add up the size of each reads response data and only pack requests if their response data will fit in a single packet. Of course the library would have to do an initial read for each request to find out the sizes, but in the long run it would improve compatibility with PLCs which dont support fragmented reads and give better performance. |
I have been encountering a problem with packing of CIP requests when reading data from OmronNJ. libplctag is packing many read requests into a single request message, as I have requested. However, if the size of the response packet (the size of all of the data which is being read) is beyond the max packet size of 1996 bytes, then I receive error 0x1B, routing failure (response packet too large). This is mostly a problem when packing multiple large structures together. I am guessing this is only a problem on Omron as it does not support fragmented reads. Looking through the source code, I didn't see anywhere that libplctag checks to see if the combined size of the response message would fit in a single response packet, but i might have missed it? Would it make sense to individually read each item that is to be packed when the tags are initialized to see if they can be packed together? This is something the user can do, however it seems more like something libplctag should do, but I might be misunderstanding something. Cheers
The text was updated successfully, but these errors were encountered: