UDP to EIP with CompactLogix

OWEN.DAVID

Member
Join Date
Aug 2018
Location
Monmouthshire
Posts
31
800 byte UDP packets are too large to be handled by the compact logix 5370 controllers.

The processor sockets buffer is in the region of 470bytes. If it receives a larger message my understanding is that we cannot even access the first bytes of the truncated message. In other words if we overflow the buffer then all bytes are inaccessible.

Given the UDP data source in our system is a black box and we cannot modify the incoming packet size or structure what options are there for getting the data into the controller?


So far I have come up with,

*Anybus / ProSoft module with compatible networks - any ideas what the UDP sockets network would be called or a standard protocol that could work with raw UDP packets?

*Using a c or python script to intercept the long packets and retransmit the data in UDP shorter packets that the 5370 controller can access (via a network PC)

*Using the excellent pylogix python library to act as a gateway from UDP to CIP in place of a hardware module.


Are there any other sensible options that I am missing? Thanks
 
You may be able to use "Large Message" option to get almost 4K bytes. I just don't remember if it works in 5370 controllers and what exact message it should be enabled on.
 
Yes, the latest sockets PDF from rockwell suggests that this is true.

However, an earlier version of the same document that I found online explicitly states that the 5370 series or at least our controller (1769-L33ER) doesn't support Large Sockets.

I recall exploring this quite deeply at the time and exhausting the different combination of settings. I ran tests with a spare controller and found the limit to be true, if not one or two bytes different. I probably should have thought to make a report of my tests for posterity.
 
You may be able to use "Large Message" option to get almost 4K bytes. I just don't remember if it works in 5370 controllers and what exact message it should be enabled on.

It for sure works on all 5370 controllers. Almost all of my pylogix testing is on a 5370. Maybe it's a UDP limitation.
 
5370 V20 or higher support large connection for sure.
You don't even need to enable it there.

What is the error code that you are getting?
What is controller firmware revision?

I can try it tomorrow.
 
For UDP we are in the Open Sockets domain.

The 5370 series caps this at 500bytes per message. Other controller series can work with the 4k 'large sockets'.

As you can imagine, the UDP to CIP data transfer took only a few lines of code using the sockets and pylogix python libraries. However this now sits on top of a windows OS.

What is the most robust hardware setup for pylogix that compares to a typical hardware module? Would it be a rPi or similar?
 
The 5370 series caps this at 500bytes per message. Other controller series can work with the 4k 'large sockets'.
This is incorrect statement. Sockets in 5370 support Large Connection since V20.
 
I wrapped up my testing a few months ago. It was on a 1769-l33er with firmware 30.02

The UDP packet is 800 bytes and we are joining a Multicast broadcast.

I expect that it was the standard ER bit indicating that the buffer was overfull.

-----

https://media.distributordatasoluti...mbedded_Switch_Technology_ENET-UM001_EN_1.pdf

check page 61. This from the 2014 version.


----

The 2020 version of the same file which doesn't seem to go into the same detail.


https://literature.rockwellautomation.com/idc/groups/literature/documents/at/enet-at002_-en-p.pdf

Screenshot 2021-07-21 201732.png
 
If I recall correctly, UDP read of an empty buffer will give you an error. This is different from TCP read that gives DN bit with Zero length.
That is why error code is important.
 
I have loaded my testing project file and have run the spare controller in the system.

If we set the ReadParams.BufLen tag too high then we see the following error message in the dialog box: Reply Data Too Large

400 bytes was fine 500 not.

Screenshot 2021-07-21 205856.png Screenshot 2021-07-21 210312.png
 
Finally, if we read the 2014 Rockwell PDF again we see the following:

All CompactLogix 5370 controllers must use unconnected MSG instructions. If
you are configuring a message for a CompactLogix 5370 controller, make sure
the Connected checkbox on the Message Configuration dialog box is cleared.​

Then..

A large connection is only available with connected MSG instructions.​



Do you have reason to believe this restriction was lifted in more recent firmware?

Screenshot 2021-07-21 211225.png
 
Otherwise, from final testing,

*we can read 486 bytes maximum, 487 bytes throws the error

*the socket object recognises the size of the test packet of 630 bytes

*the socket object has a read buffer size of 8kb!


So it would seem we are up against a pretty hard limit. edit: or incompetence on my side - I am somewhat new to this domain!

Screenshot 2021-07-21 213047.png Screenshot 2021-07-21 213013.png
 
Last edited:
Yep, I see the same results with L18 in V30.
486 bytes max
You can't use Connected, I am aware of that, but I recall that all internal CIP messages support Large Connection automatically
 
Last edited:
Maybe you can move to 5380 controller that supports large connection natively?
I will test this later to make sure that it works.
 

Similar Topics

Hello all, I am working on a project utilizing an s7-1200 cpu and Tia Portal v17. I currently have an external PCB with some sensors on it (and...
Replies
1
Views
705
Hi PLCTalk Family, I am currently using S71200 for UDP communication in one of our projects. Recently due to the chip shortage looking out to...
Replies
3
Views
1,231
Hi all, I was trying to communicate FX3GE PLC with KEPServer / Kepware via UDP protocol but did not succeed. Does anybody has any solution or...
Replies
2
Views
1,024
Hello, I am using a 1756-EN2T and tryin to communicate with a device that accepts ASCII string over ehternet usin UDP. Do packets sent using CIP...
Replies
8
Views
1,738
Hi there, I have a scenario and wonder how it would work. Or how udp work in general. I have a plc , and many pcs (100) that multicast to the plc...
Replies
3
Views
1,708
Back
Top Bottom