Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UDP Commands to/from a CompactLogix Controller

Status
Not open for further replies.

LemmingRebel

Electrical
Jul 4, 2007
9
0
0
US
Does anyone have experience using an MSG instruction to send and receive messages by way of UDP? In the document "enet-um527_-en-p.pdf" (a google search will locate it for you) I am lead to believe that it is possible, though the document does not outline Source Element parameters. They say to use a user-defined type for it....but what parameters do you pass? I am trying to send and receive these messages between the PLC and a PC.

With UDP messages on a PC, all I need are the IP address, a port, and the message. What other parameters does the PLC need?
 
Replies continue below

Recommended for you

Looking at that document, there seems to be some parameters listed in page 131, though I admit it's a bit vague. It looks like you need to do at least 3 MSG transactions with the web server card just to send one UDP message (CreateSocket, OpenConnection, Write). I would assume that once the socket and connection are open, you could continue sending the write commands as long as the connection never dies.

The MSG commands have some examples of how to configure them, including the user defined types:
- CreateSocket - page 141
- OpenConnection - page 143
- Write - page 151

Does that get you any closer? I don't have an EWEB module here to test with, so I can't try it.

As an alternative:

I have had to communicate with a PC over ethernet from a ControlLogix before and was successful with a 3rd party card from Prosoft called the MVI56-GEC. Here's the product page:
However, that application used TCP/IP, not UDP. I don't believe that product will support UDP.



Scott Whitlock
PLC Programming Articles:
 
Status
Not open for further replies.
Back
Top