You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old July 21st, 2021, 11:25 AM   #1
OWEN.DAVID
Member
Spain

OWEN.DAVID is offline
 
Join Date: Aug 2018
Location: MALLORCA
Posts: 21
UDP to EIP with CompactLogix

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
  Reply With Quote
Old July 21st, 2021, 01:10 PM   #2
Contr_Conn
Member
United States

Contr_Conn is offline
 
Contr_Conn's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 2,286
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.
  Reply With Quote
Old July 21st, 2021, 01:27 PM   #3
OWEN.DAVID
Member
Spain

OWEN.DAVID is offline
 
Join Date: Aug 2018
Location: MALLORCA
Posts: 21
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.
  Reply With Quote
Old July 21st, 2021, 01:53 PM   #4
dmroeder
Lifetime Supporting Member
United States

dmroeder is offline
 
dmroeder's Avatar
 
Join Date: Apr 2006
Location: Vancouver, WA
Posts: 2,856
Quote:
Originally Posted by Contr_Conn View Post
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.
  Reply With Quote
Old July 21st, 2021, 01:55 PM   #5
Contr_Conn
Member
United States

Contr_Conn is offline
 
Contr_Conn's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 2,286
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.
  Reply With Quote
Old July 21st, 2021, 02:04 PM   #6
OWEN.DAVID
Member
Spain

OWEN.DAVID is offline
 
Join Date: Aug 2018
Location: MALLORCA
Posts: 21
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?
  Reply With Quote
Old July 21st, 2021, 02:18 PM   #7
Contr_Conn
Member
United States

Contr_Conn is offline
 
Contr_Conn's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 2,286
Quote:
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.
  Reply With Quote
Old July 21st, 2021, 02:23 PM   #8
OWEN.DAVID
Member
Spain

OWEN.DAVID is offline
 
Join Date: Aug 2018
Location: MALLORCA
Posts: 21
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.distributordatasolutio...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.rockwellautomatio...t002_-en-p.pdf
Attached Images
File Type: png Screenshot 2021-07-21 201732.png (160.6 KB, 56 views)
  Reply With Quote
Old July 21st, 2021, 02:25 PM   #9
OWEN.DAVID
Member
Spain

OWEN.DAVID is offline
 
Join Date: Aug 2018
Location: MALLORCA
Posts: 21
ok, great, so there is hope afterall!
  Reply With Quote
Old July 21st, 2021, 02:45 PM   #10
Contr_Conn
Member
United States

Contr_Conn is offline
 
Contr_Conn's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 2,286
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.
  Reply With Quote
Old July 21st, 2021, 03:04 PM   #11
OWEN.DAVID
Member
Spain

OWEN.DAVID is offline
 
Join Date: Aug 2018
Location: MALLORCA
Posts: 21
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.
Attached Images
File Type: png Screenshot 2021-07-21 205856.png (69.2 KB, 8 views)
File Type: png Screenshot 2021-07-21 210312.png (68.0 KB, 6 views)
  Reply With Quote
Old July 21st, 2021, 03:16 PM   #12
OWEN.DAVID
Member
Spain

OWEN.DAVID is offline
 
Join Date: Aug 2018
Location: MALLORCA
Posts: 21
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?
Attached Images
File Type: png Screenshot 2021-07-21 211225.png (120.9 KB, 55 views)
  Reply With Quote
Old July 21st, 2021, 03:35 PM   #13
OWEN.DAVID
Member
Spain

OWEN.DAVID is offline
 
Join Date: Aug 2018
Location: MALLORCA
Posts: 21
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!
Attached Images
File Type: png Screenshot 2021-07-21 213047.png (15.4 KB, 8 views)
File Type: png Screenshot 2021-07-21 213013.png (20.4 KB, 7 views)

Last edited by OWEN.DAVID; July 21st, 2021 at 03:37 PM. Reason: humility
  Reply With Quote
Old July 21st, 2021, 04:06 PM   #14
Contr_Conn
Member
United States

Contr_Conn is offline
 
Contr_Conn's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 2,286
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 by Contr_Conn; July 21st, 2021 at 04:18 PM.
  Reply With Quote
Old July 22nd, 2021, 09:12 AM   #15
Contr_Conn
Member
United States

Contr_Conn is offline
 
Contr_Conn's Avatar
 
Join Date: Sep 2003
Location: Ohio
Posts: 2,286
Maybe you can move to 5380 controller that supports large connection natively?
I will test this later to make sure that it works.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
CompactLogix to UDP device Dayvieboy LIVE PLC Questions And Answers 10 February 3rd, 2019 03:17 PM
CompactLogix to Eaton DG1 EIP RBergmann LIVE PLC Questions And Answers 2 September 18th, 2018 10:46 AM
Messaging over Ethernet between MicroLogix1500/NET-ENI and CompactLogix davidwarrenabaxis LIVE PLC Questions And Answers 6 January 25th, 2016 12:23 PM
Allen-Bradley L1 Processor... rdrast LIVE PLC Questions And Answers 12 September 17th, 2013 01:44 AM
EthernetIP and Compactlogix with third party I/O markw LIVE PLC Questions And Answers 8 November 8th, 2011 08:00 AM


All times are GMT -4. The time now is 01:11 AM.


.