Hi Martin, again I’m struggling with the TCP_SOCKET FB. As I must work with the firmware 2021.0.3 I cannot switch to the TCP_SOCKET_2 type. I have connected 2 AXC F 2152 with the IP addresse 192.168.1.10 respectivly 192.168.1.11. The connection can be established in both directions, if I do not activate IS_SRV. When setting the input to TRUE I get the error code C206 (The selected IP address is not valid in this context). Have you an idea?
I have branched this question to a new thread. The original thread is here: https://www.plcnext-community.net/en/discussions-2-offcanvas/tcp-socket-does-not-switch-to-active.html
Hi Götz, [quote]The connection can be established in both directions, if I do not activate IS_SRV.[/quote]This makes sense. The second screen shot shows that you are connecting the TCP Client on the PLC to the web server on port 80 of the device with IP address 192.168.1.11. [quote] if I … activate IS_SRV … When setting the input to TRUE I get the error code C206 (The selected IP address is not valid in this context). [/quote]This also makes sense. In the first screen shot, if 192.168.1.10 is not the IP address of the local PLC, then you cannot set up a TCP Server on anything other than the local PLC. If that is the IP address of the local PLC, then you cannot set up a TCP server on Port 80 if the Web Server is running on the PLC, since that also uses Port 80 and you cannot have two servers bound to the same port. So, to set up a TCP Server: (a) Make sure the BIND_IP is the IP address of the local PLC, and (b) Make sure the BIND_PORT is not in use by another process.