Dz! Posted February 24, 2020 Report Share Posted February 24, 2020 (edited) I try to exchange some data between Unistreams using MODBUS. Communication is one-way, only reads, no writes. I have 12 periodic INT32 reads (at rate of 500ms) set up + 124 periodic single bit reads (at rate of 250ms). At bit 114 it fails with status 2. All other bit reads finish with status 0. Suggested queue length reads 16. No extension. I'm reading 2 slaves of the same type an software version, and both perform exactly the same. I tried with 3rd party MODBUS scanner software, and there is no problem reading the address. EDIT: I found the answer as well. The very final bit (bit 123) was not defined on the slave. Thus it was simple 'read past end of data', and by saying status 2, at some place not far from the end, it simply informs that last byte of packed bit data could not be correctly read. That's a good lesson learnt working with bit data on MODBUS. However the question still stands - is there any practical limit (in terms of available processing time), how many bytes could be exchanged using MODBUS TCP? Edited February 24, 2020 by Dz! Found solution Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted February 24, 2020 MVP 2022 Report Share Posted February 24, 2020 Of course there is a practical limit, but I haven't run into it. When you consider that Ethernet runs at 100 Mbit/s, simple math says that in 500ms you could exchange 50 Mbits. Of course there is overhead, so I'll divide that by 2, giving 25 Mbits. Divide that by the 32 bits for your INT32 registers, then you get 781,250 INT32s can be exchanged. I'm sure there are other factors of importance here and there is a MODBUS limit of 256 bytes per request, which will be your primary limiting parameter. 1 Quote Link to comment Share on other sites More sharing options...
Dz! Posted February 26, 2020 Author Report Share Posted February 26, 2020 Thanks Flex727 for very in-depth explanation. But a question was a bit different than your answer. Yes I know the limits of Ethernet, but is there a limitation on the side of CPU power of the PLC? MODBUS is a high level communication protocol, which, I assume, could not be run completely in DMA. Thus it digs into CPU power available for running system processes and user program, which at one point could start lagging due to high communications overhead. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted February 26, 2020 MVP 2022 Report Share Posted February 26, 2020 3 hours ago, Dz! said: but is there a limitation on the side of CPU power of the PLC? I have run large MODBUS data exchanges between two PLCs on every PLC scan (not every 500ms, but at a rate of about 7ms - the scan time of the running program) without any issues whatsoever. I don't believe there is any issue to be concerned with. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.