You are not registered yet. Please click here to register!

plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!

Go Back - Interactive Q & A > - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Thread Tools Display Modes
Old June 23rd, 2018, 12:20 AM   #1

DJShardy is offline
Join Date: May 2018
Location: Melbourne
Posts: 10
Siemens TIA - UDP Messaging


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.

  Reply With Quote
Old June 23rd, 2018, 04:58 AM   #2

m_turk is offline
Join Date: Jan 2008
Location: ZG
Posts: 176
There is a parameter within TCON_Param : CONNECTION_TYPE (17: TCP/IP, 18: ISO on TCP, 19: UDP), so that should be it.
  Reply With Quote
Old June 23rd, 2018, 06:13 AM   #3

lfe is offline
Join Date: Jun 2007
Location: Barcelona
Posts: 347
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.
Suppanel HMI
  Reply With Quote
Old June 23rd, 2018, 08:38 AM   #4

DJShardy is offline
Join Date: May 2018
Location: Melbourne
Posts: 10
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.
  Reply With Quote
Old June 24th, 2018, 06:12 AM   #5
United Kingdom

cardosocea is offline
Join Date: Nov 2016
Location: Fields of corn
Posts: 1,220
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.
  Reply With Quote
Old June 25th, 2018, 04:10 AM   #6

Jeebs is offline
Join Date: Feb 2007
Location: Leuven
Posts: 1,043
When creating the connection in TIA, select UDP connection. Then use simple TUSEND block to send data. TURCV to receive.
  Reply With Quote
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Siemens HMI, TIA portal programming samvivi7 LIVE PLC Questions And Answers 7 March 20th, 2018 04:49 PM
Siemens TIA portal software Jim G. LIVE PLC Questions And Answers 6 July 21st, 2017 01:31 AM
Siemens TIA Portal V13 Help Nan LIVE PLC Questions And Answers 7 May 18th, 2017 01:40 PM
Siemens TIA & WinCC for SCADA orense LIVE PLC Questions And Answers 5 May 13th, 2013 05:06 PM
Siemens TIA Portal-New User lostcontrol LIVE PLC Questions And Answers 7 July 8th, 2011 11:13 AM

All times are GMT -5. The time now is 09:35 PM.