Posted 13 Nov 2018 Does anyone have a simple example for download to see how to make a UDP connection ? I want to make a connection to a NAS harddisk system for wake-on-LAN. I used the UDP_open, UDP_send and UDP_close function blocks. But UDP_open gives always the result NG with error code 1025. I can´t find the reason why it doesn´t works. Share this post Link to post Share on other sites
Posted 13 Nov 2018 You should post your code, perhaps we can tell what the issue is. Here is a sample though: socket services FB Example.cxp Share this post Link to post Share on other sites
Posted 14 Nov 2018 (edited) thanks for your reply here is the (reduced) program now only the "wake-on-LAN"-sequence is still inside I tried to open an UDP connection with the internal ethernet card at the CPU, but the function block gives always the result NG with error code 1025. What is the reason ? What is wrong ? Made the test with unit number 1 (as used in the hardware config) and with 0 (in the manual I could read that the internal board needs a 0). But always unable to open the UDP connection. LP2100_32_20181113_UDP.cxp Edited 14 Nov 2018 by mash Share this post Link to post Share on other sites
Posted 15 Nov 2018 You have a couple of issues with your setup. 1) You point your UDP open function block at unit 0. When I open your I/O table, I don't see a unit 0. The built in EIP port is set to 1 and the CJ1W-EIP21 is set to unit 12. 2) Number 1 does not really matter though because only the ETN21 module supports socket services. I do not see an ETN21 in your I/O table. See the chart below for details on socket services support by module: 1 person likes this Share this post Link to post Share on other sites
Posted 16 Nov 2018 1) I already tried with &0 , &1 , &12 , but always with the same result 2) I see ! now I understand why it doesn´t works. Thanks for your support. kind regards, Michael Malsch Share this post Link to post Share on other sites
Posted 19 Nov 2018 ok, thank you for your support ! now I was able to use the function blocks for UDP open, send and close Share this post Link to post Share on other sites