Diagnosis Methods

For more information about troubleshooting, refer to the following views in CODESYS or external software, each depending on the case:

Status dialog in the device configurator

If the object of the PROFINET controller or sPROFINET device has a red symbol in the device tree, or if no communication is taking place at all, then take a look at the Status tab in the device configuration dialog.

../_images/7c3c9e37db77e834c0a8646312add489

Here we are looking at the controller only. The same basically applies to the device.

The most important fields in the diagnosis structure displayed here are as follows:

:guilabel:`Controller status`\ :

Current status of the controller; the individual values correspond to the enumeration Profinet.ControllerState:

../_images/4a049327db7b4161c0a864635bb5a513

Specific conclusions about problem sources can often be drawn from these values, for example for license issues or doubled station names.

The status value is also available in the PLC application:

../_images/581c3955db7c6c9fc0a8646310c72c1f

:guilabel:`Received frames`\ / :guilabel:`Received RT frames`\ :

Under specific conditions, the controller status switches to “Run”, but communication is still not possible. The values Received frames / Received RT frames can provide more information:

Received frames shows the number of all Ethernet frames that were received over the Ethernet interface. Received RT frames shows the subset of the PROFINET RT frames.

If both counters remain at 0 after starting the controller although the device is in a network, then this indicates basic problems with the runtime system component SysEthernet.

If only Received frames increments but not Received RT frames although PROFINET devices are in the network, then this indicates a problem with the runtime system configuration (firewall, packet filter, etc.).

:guilabel:`Recv time`\ / :guilabel:`Send time`\ :

The maximum value and the average value are displayed here for both sending and receiving of the Ethernet frame. A performance indicator for the link to the Ethernet adapter (runtime system interface SysEthernet).

PROFINET IO slave configurator

In the case of a failed connection (slave symbol is red), the cause is displayed in the General tab of the device configuration dialog. (PNIOStatus according to PI Specification: Application Layer protocol for decentralized periphery Technical Specification for PROFINET IO, Version 2.3Ed2MU2, Date: February 2015, Order No.: 2.722)

../_images/433d87681518f3e3c0a8646346a9ced3

Task monitor (monitoring)

On weak systems or systems with a poor link to the Ethernet component (SysEthernet), connection disruptions can be caused by jitter or high cycle times.

The controller is affected above all. the device is not critical in this case.

The Monitoring tab in the Task configuration helps to detect these problems.

../_images/c4a1e1fedb7e5579c0a86463226fa4d3

The Profinet_IOTask is important because the PROFINET RT data packets are transmitted to at a constant transmission speed. If this transmission speed cannot be maintained, then the connection is terminated by the communication watchdog “DataHoldTimer” of the PROFINET devices.

As recommended values, the average cycle time should not exceed 250 µs and the maximum cycle time should not exceed 1 ms.

The Profinet_IOTask should therefore run as high priority, and they should not block other IEC tasks (same or higher priority). In the context of this task, no blocking or long-lasting calls should occur.

Log view of the PLC

In case of error in the configuration or an interruption of the connection, the PROFINET driver may provide more information in the log view of the device configurator of the PLC:

../_images/3d7b2608db8006dbc0a864632aa3494e

Wireshark

An established tool for network diagnostics in general is the free software Wireshark