Question about CIP Generic and UDP

Omnicode

Member
Join Date
Jun 2009
Location
Knoxville
Posts
7
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 Generic of socket type "2 - UDP" look like a normal UDP packet i would send from software on a PC?

CreateSocket and WriteSocket all execute without error but I get no response from my device.
 
If your device expects a string of ASCII characters it will not understand the CIP protocol.

UDP, like TCP, is only a transport layer, the chain of bytes that is sent and received is defined by the protocol used, and obviously both sides should use the same protocol.

This is independent of whether the UDP packet is sent from a PC or a PLC.

In your case you should probably compose and send the ASCII characters expected by the protocol of that device
 
If your device expects a string of ASCII characters it will not understand the CIP protocol.

UDP, like TCP, is only a transport layer, the chain of bytes that is sent and received is defined by the protocol used, and obviously both sides should use the same protocol.

This is independent of whether the UDP packet is sent from a PC or a PLC.

In your case you should probably compose and send the ASCII characters expected by the protocol of that device
Thank you. This is what I suspected. I now have to figure out how to send an ascii string to my device from the plc over Ethernet.
 
The CIP Generic is a CIP message between the logix processor and the EN2T module.


See for example the WriteSocket chapter of:
https://literature.rockwellautomation.com/idc/groups/literature/documents/at/enet-at002_-en-p.pdf


Does the resulting UDP packet look exactly the same as a regular UDP packet? yes.


You would need to open a socket with OpenConnection, in order to listen for a response via ReadSocket.


Looks like there's some sample applications on the knowledgebase, as lined to in the user manual.
 
The CIP Generic is a CIP message between the logix processor and the EN2T module.


See for example the WriteSocket chapter of:
https://literature.rockwellautomation.com/idc/groups/literature/documents/at/enet-at002_-en-p.pdf


Does the resulting UDP packet look exactly the same as a regular UDP packet? yes.


You would need to open a socket with OpenConnection, in order to listen for a response via ReadSocket.


Looks like there's some sample applications on the knowledgebase, as lined to in the user manual.
Thanks. I have that manual memorized by this point. Short of trying to intercept the packets comming from the EN2T and looking at them, Im at a loss to troubleshoot.
 
You can tell exactly what your sending on the EN2T by using the internet explorer interface. Just type in the IP of the EN2T and view the Diagnostics. I think there is a place where it shows what is being sent to your device.
 
Intercept makes sense then, and use wireshark.
Thanks for the input, all.

So I got online with my laptop with Wireshark and set it up to pose as the receiving device. UDP packets sent from test software on my work computer were received fine. I triggered MSG from plc and received none.

Turns out...in the week of programming the other aspects of the project, I had set my MSG tags up and configured them to use a different EN2T than the one facing outward.

I went and reconfigured my MSG tags with the new path and all works as planned now.

Thanks much!
 
Last edited:

Similar Topics

hi , I need to sorry for my bad English first. I'm newbie at plc programming ,I had been asked about E/IP protocol information for some system...
Replies
3
Views
405
I recently uploaded an aplication from a Panel View, created a new screen and now that I've downloaded it to the Panel View, all the texts have...
Replies
8
Views
73
I have never had the pleasure of working with a "Thermistor" until now and have a question. The Thermistor is a 10KOhm 4-20mA 2-wire device and I...
Replies
4
Views
118
Hi All, So I have a main routine with an instruction that's executed by XIC "Run" I have a JSR located on a rung below it. In the logic for that...
Replies
6
Views
229
I have a 120V relay, 120V DI card and a analog input. I was wanting to know if i could put a 24V DI and well as a 120V DI card on the same plc...
Replies
1
Views
92
Back
Top Bottom