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

I am currently am in a PLC class and need urgent help on how the ladder logic would be laid out. I understand how to get the traffic lights to...
Replies
19
Views
386
Hello, If the date on the license manager of tia Portal has expired, can I still work with it? or is this just to keep the program up to date...
Replies
7
Views
185
Does anyone know why my one string is displaying this way? It is causing issues with my HMI displaying it.
Replies
4
Views
258
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
645
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
440
Back
Top Bottom