Internal error codes of the TwinCAT TCP/IP Connection Server

Code (hex)

Code (dec)

Symbolic constant

Description

0x00008001

32769

TCPADSERROR_NOMOREENTRIES

No new sockets can be created (for FB_SocketListen and FB_SocketConnect).

0x00008002

32770

TCPADSERROR_NOTFOUND

Socket handle is invalid (for FB_SocketReceive, FB_SocketAccept, FB_SocketSend etc.).

0x00008003

32771

TCPADSERROR_ALREADYEXISTS

Is returned when FB_SocketListen is called, if the TcpIp port listener already exists.

0x00008004

32772

TCPADSERROR_NOTCONNECTED

Is returned when FB_SocketReceive is called, if the client socket is no longer connected with the server.

0x00008005

32773

TCPADSERROR_NOTLISTENING

Is returned when FB_SocketAccept is called, if an error was registered in the listener socket.