Troubleshooting/diagnostics

1. Check the hardware and software requirements described in this documentation (TwinCAT version, CE image version etc.).

2. Check the software installation hints described in this documentation (e.g. installation of CAB files on CE platform).

3. In the event of connection problems the PING command can be used to ascertain whether the external communication partner can be reached via the network connection. If this is not the case, check the network configuration and firewall settings.

4. Check the network address and port number parameter that are transferred to the function F_CreateServerHnd() or to the FB_ClientServerConnection()/FB_ServerClientConnection() function block for correctness.

5. Check whether the function block issues an error code. The documentation for the error codes can be found here: Overview of error codes.

6. Check the protocol parameters that are transferred to the function block (iK, iW, t0, t1, t2, t3, APDULength etc.). Compare them to the parameters set in the communication partner.

7. Check the configured address lengths (instance of ST_IEC870_5_101TBuffer, TX/RX data buffer): ASDU address octet size, information object address octet size, cause of transfer octet size, max ASDU size. Compare them to the parameters set in the communication partner.

8. Check the data point configuration (type, information object addresses etc.).

9. Check if the communication partner issues an error code.

10. Activate the debug output during connection establishment and/or of ASDU data. Open the TwinCAT System Manager and activate the LogView window. Analyze/check the debug output strings.

11. Check the usage of FB_SocketCloseAll() function block and the usage of the LISTEN_MODE_CLOSEALL parameter in your PLC application.

If your application is working with more than one TCP/IP connections (server/clients) than you have to use one instance of FB_SocketCloseAll() function block to close old/opened connections. Activate this function block instance only once at program start and don't use the LISTEN_MODE_CLOSEALL parameter.

12. Sniffer tools such as Wireshark enable logging of the entire network communication. The log can then be analyzed by Beckhoff support staff.