Siemens TIA - UDP Messaging

DJShardy

Member
Join Date
May 2018
Location
Melbourne
Posts
13
Hey,

I have just finished doing a project with a Compact logix CPU sending messages (instructions) over UDP to a third party sensor. Did this to change the parameters from the PLC. We call it "Open Socket". - Can upload the program if you're interested.

Now I thought it would be a good idea to work out how to do this with a Siemens S7-1200/1500.

Has anyone done this?

I was looking at TCON, TSEND, TRCV However in the help files it only mentions TCP and not UDP.

So, I dug deeper and seen UCON, USEND etc. It Mentions "uncoordinated" I guess UDP is uncoordinated so it sounds like what I need?

I'll keep chipping away at this but feel free if you've done this before to drop any hints/tips in.

Thanks
 
There is a parameter within TCON_Param : CONNECTION_TYPE (17: TCP/IP, 18: ISO on TCP, 19: UDP), so that should be it.
 
TCP sockets are connected sockets, that means a previous client-server connection must be established before sending or receiving data.

Instead UDP are Unconnected sockets, that means the packets are send directly to an IP / Port without previous connection, but there is no confirmation of whether the other side has really received the package.

In your case there is no confirmation if the sensor parameters have been really changed.
 
Thanks for the replies. So it seems like I can use the Tcon blocks?

Yeah I have half an idea of how it works. With respect to not knowing if the settings were changed. Each message I send the sensor will send one back with a confirmation. So I can send a message and ask the current settings and it will tell me.
 
It is possible to have this done... I worked in a distributed system with Siemens CPU's where all comms were done on UDP Multicasts.

I did this on Step7, so you would have to create the connection on the network config and then use it with the normal function blocks.
 
When creating the connection in TIA, select UDP connection. Then use simple TUSEND block to send data. TURCV to receive.
 

Similar Topics

Does anyone know why my one string is displaying this way? It is causing issues with my HMI displaying it.
Replies
4
Views
235
Context: PLC= S7-1212C, HMI=KTP1200 Basic. Hi again, When the "REPORT" button is pressed (on a different screen), it takes the operator to the...
Replies
7
Views
589
Context: PLC= S7-1212C, HMI=KTP1200 Basic. Hi, The operator has reported that, from time-to-time, when he presses the "Generate Report" button...
Replies
5
Views
409
General Question: The PLC and HMI that I've been working on (a laser measurement system) is soon to be transported to the site where it will be...
Replies
2
Views
660
Hi everyone I've created an FC that includes the blocks TCON, TDISCON, TSEND and TRCV. This block has to be as generic as possible across...
Replies
15
Views
1,410
Back
Top Bottom