How to connect Wincc OA with UDP Protocol?
Search
How to connect Wincc OA with UDP Protocol?
Hello Everyone
I just want to know how to communicate Wincc OA with UDP Protocol!!
I just want to know how to communicate Wincc OA with UDP Protocol!!
Re: How to connect Wincc OA with UDP Protocol?
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
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?
Can you please give some example code for the communication?
Re: How to connect Wincc OA with UDP Protocol?
Dear Sir,
Any updates ? Do you have any sample program for UDP read/write data from PLCs?
Please provide the same.
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?
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
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?
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?
I attached the results of our program.
Could You please go through the attached file and give me the solution?
- Attachments
-
- Challange_in_UDP_Comminication_at_WinCC_OA_V3.docx
- (1.5 MiB) Downloaded 379 times
-
- Posts: 634
- Joined: Mon Aug 02, 2010 10:37 am
Re: How to connect WinCC OA with UDP Protocol?
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.
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.
Last edited by gschijndel on Fri Sep 13, 2019 10:51 am, edited 1 time in total.
Reason: Fixed wrong functions
Reason: Fixed wrong functions
Re: How to connect Wincc OA with UDP Protocol?
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
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
- Attachments
-
- UDP_Program.zip
- (187.1 KiB) Downloaded 336 times
-
- Posts: 634
- Joined: Mon Aug 02, 2010 10:37 am
Re: How to connect Wincc OA with UDP Protocol?
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?
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?
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
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
- Attachments
-
- Program.zip
- (189.24 KiB) Downloaded 364 times