Page 1 of 2

How to connect Wincc OA with UDP Protocol?

Posted: Thu Jun 28, 2018 11:49 am
by Kalai123
Hello Everyone

I just want to know how to communicate Wincc OA with UDP Protocol!!

Re: How to connect Wincc OA with UDP Protocol?

Posted: Thu Jun 28, 2018 11:58 am
by mkerk
Hi,
you can try to use the WinCC OA UDP CONTROL functions: udpRead(), udpWrite(), udpOpen(), udpClose().
Please refer to the WinCC OA documentation for detailed information about these functions.

Br,
Mousser

Re: How to connect Wincc OA with UDP Protocol?

Posted: Fri Jun 29, 2018 8:06 am
by Kalai123
Can you please give some example code for the communication?

Re: How to connect Wincc OA with UDP Protocol?

Posted: Fri Jul 20, 2018 6:29 am
by Kalai123
Dear Sir,

Any updates ? Do you have any sample program for UDP read/write data from PLCs?
Please provide the same.

Re: How to connect Wincc OA with UDP Protocol?

Posted: Fri Jul 20, 2018 11:04 am
by leoknipp
As written by Mousser Kerkeni the UDP CTRL functions are described in the WinCC OA Documentation.
At the description of the functions you will also find some simple examples how to use the functions.

Maybe your PLC also supports some other standard protocols, e.g. OPC DA.
If you know the protocol you can have a look if WinCC OA has a driver which supports the protocol.
This is maybe a better approach than to implement the PLC communication on your own.

Best Regards
Leopold Knipp
Senior Support Specialist

Re: How to connect WinCC OA with UDP Protocol?

Posted: Thu Nov 08, 2018 7:22 am
by Kalai123
https://www.winccoa.com/fileadmin/image ... 81108.docx I used UDP functions to connect with Wincc OA. But it is not working.

I attached the results of our program.

Could You please go through the attached file and give me the solution?

Re: How to connect WinCC OA with UDP Protocol?

Posted: Thu Nov 08, 2018 1:40 pm
by Gertjan van Schijndel
At 'udpOpen' you must specify your local address at which the data should be received (to which address the function should bind to).
In this case (single cast) it should be the address to which the partner sends the data to.

The 'host' and 'port' are out parameters of the 'udpRead' function, so assigning values is not needed. To keep receiving values 'udpRead' must be placed in a loop.
The 'udpClose' must use the actual value returned by 'udpOpen'. With the current code only the socket with id '0' (default value) is closed.

Re: How to connect Wincc OA with UDP Protocol?

Posted: Tue Dec 04, 2018 10:49 am
by Kalai123
I tried the program,like what is mentioned in the above instruction.

But i am not able to set the proper communication between PLC and SCADA.

I attached the program and results with this. Please let me know the step what i have to do further. https://www.winccoa.com/fileadmin/image ... rogram.zip

Re: How to connect Wincc OA with UDP Protocol?

Posted: Tue Dec 04, 2018 1:24 pm
by Gertjan van Schijndel
You have not specified a port to open, so that could be the reason why it is not working. It should be the port the partner is sending to.

Is 10.170.12.30 the local address of the host running this UDP program and is the partner sending its data to this address?

Re: How to connect Wincc OA with UDP Protocol?

Posted: Wed Dec 05, 2018 7:03 am
by Kalai123
10.170.12.30 is the ip address of the PLC.

10.170.14.100 is the ip address of the WinCC OA.

We considered the port number of WinCC OA is 4700 and PLC is 2001.

Here i attached the Data Block of PLC side, the program and the result of WinCC OA side.

In WinCC OA, we are not able to open the port even though the port number written in the program.

Please check the attachment and give us a solution for that.

Thanks in advance. https://www.winccoa.com/fileadmin/image ... rogram.zip