Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-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
Joined
Jul 4, 2007
Messages
9
Location
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?
 
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:
 
FYI -

Got it.

Sample application + sample ladder code (Logix 5000) found in TechNote #32962.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top