Skip to content

Ethernet Socket Error 206.

Ethernet Socket Error 206.

Hello, i am working with socket tcp, and i am getting error 206, when trying to use it as server.

I have my PLC on 192.168.255.200, and I am trying to use Dest_ip 192.168.255.210, using Bind_ip as 192.168.255.249. Range of PLC is 192.168.255.200 to 192.168.255.254.

 

Why i am getting error 206?.

 

Best regards.

Comments

  • Hello,

    The documentation for that FB tells me that error code 0x206 means "The selected IP address is not valid in this context."

    I am guessing that the reason for this is that the IP address that is given in the BIND_IP parameter must be a valid IP address on the PLC. This is the IP address on which the TCP_SOCKET FB will listen for connection requests.

    In this case you have two options:

    1. Change the BIND_IP parameter to 192.168.255.200, the IP address of the PLC (this is the recommended solution), or
    2. Configure the Ethernet adapter on the PLC to include the IP address that you are passing as BIND_IP (192.168.255.249).

    Hope this helps.

    Martin.

     

  • ... also:

    • When using the TCP_SOCKET as a server, the DEST_IP parameter sets the IP address(es) that the server will accept connections from. Please check that you really want to set this to a single address, and therefore only accept connections from a single TCP client.
    • When you say the "Range of PLC is 192.168.255.200 to 192.168.255.254", I guess you mean the IP address range that you set in the PLCnext Engineer project properties? This is simply a range that PLCnext Engineer uses to automatically assign IP addresses to devices (if necessary), and to check that all devices in the project have an IP address in the expected range. This range of IP addresses are not all applied to the PLC itself.

    Hope this makes things clearer ...

    Martin.

  • Hello,

    This is my config, using "255.200" gives same error. I know that i need to comunicate to "192.168.255.210" only to this direction.

    I have another question, this socket is CIP socket?

     

    King regards.

  • Hello,

    The BIND_IP parameter must be the IP address of the PLC, which I thought was 192.168.255.200 (from the original post), but the screen shot in your latest post shows the IP address of the PLC as 192.168.255.2.

    Can you please confirm what the IP address of the PLC is, and that you see this problem when the BIND_IP parameter is set to the IP address of the PLC?

    Martin.

  • Thank you Martin, was my mistake. Now its working.

    This works on Enthernet/IP under CIP protocol?

  • Great to hear that it's working.

    The TCP function blocks you are using (and their UDP counterparts) operate at the Transport layer (layer 4) of the ISO/OSI model. The Ethernet/IP stack operates at layers 5 to 7. So these function blocks are not designed to implement applications like Ethernet/IP.

    There is an Ethernet/IP stack already implemented on the AXC F 2152, which allows it to operate as an Ethernet/IP device. The Ethernet/IP stack is started by the PLCnext Control on startup, so you do not need to implement this yourself.

    There has been some discussion about this already on the forum - here:

    https://www.plcnext-community.net/index.php?option=com_easydiscuss&view=post&id=1562&Itemid=221&lang=en

    Hope this helps.

    Martin.

Sign In or Register to comment.