5. Diagnosis Mode

5.1. Overview

EC-Inspector is a diagnosis application specifically developed to analyze EtherCAT networks that are controlled by an EtherCAT master. Automated control systems usually require high availability of the whole system. Due to the rough industrial environment this is often hardly to achieve.

If high availability shall be guaranteed for an automated control system it is important to verify and maintain the field bus. With EC-Inspector it is possible to take a look into the “health” of the EtherCAT system. Detection of signs of system degradation prior to running into a system failure will be of great benefit. In that case it is possible to exchange the problematic components (cables, slave devices).

Many aspects of diagnosis are covered by the EC-Inspector:
  • System analysis and maintenance

  • Error detection

  • Documentation

After switching into diagnosis mode of EC-Inspector, the user will see this page:
_images/diag-mode.png

5.2. Monitor

This section shows the current “health” state of the master and helps the user to analyze master related problems.

5.2.1. General (Monitor)

In this tab, the user can see the current state of the state machine of the master. He has also an overview over the current “health” state of his EtherCAT network:
_images/diag-master-general.png
State Machine
Current State:

Current state of the master

Requested State:

Requested state of the master

Information
Number of found slaves:

Number of slaves, which were found from monitor on the network

Number of slaves in configuration:

Number of slaves, which are configured in the ENI file

Number of DC slaves:

Number of slaves with DC support, which were found from master on the network

DC in-sync:

Signals that all slaves with DC support are correctly synchronized or not. If not all slaves are correctly synchronized, please refer the Message Window for more information.

Topology OK:

Signals that topology is “okay” or not. If topology is not “okay”, you have a mismatch between the configured bus and the currently connected bus. Please open the ‘Network Mismatch Analyzer’ (Menu Network Network Mismatch Analyzer) to solve the problem.

Link Connected:

Signals the link is connected.

Slaves in Master State:

Signals that all slaves are in master state.

Frame Counter
Sent frames:

Number of sent frames

Lost frames:

Number of lost frames

Cyclic frames:

Number of cyclic frames

Acyclic frames:

Number of acyclic frames

5.2.2. Process Data Image

In this tab, the user can see and change the values of the process variables. The variables will be forced to the value the user entered. The user can press release to release the variable. If one or two variables are selected, a chart of the values is shown. Also resize and zoom is possible to see more details. The chart will be updated every 250 milliseconds:
_images/diag-master-process-image.png

It is also possible to add the variables to a watch list (next chapter).

5.2.3. Watch list

In this tab, the user can monitor selected variables. He can go through the slaves and add variables to the watch list to monitor them. The user can also export or import the watch list, so changes can be saved:
_images/diag-master-watchlist.png

5.2.4. Data Acquisition Diagnosis

In this tab, the user can start and stop the DAQ recorders. Also he can see some statistics of running recorders.
_images/monitor-daq-diag.png

5.3. Slave

This section shows the current “health” state of the selected slave and helps the user to analyze slave related problems.

5.3.1. General (Slave)

In this tab, the user can see the current state of the state machine of the slave:
_images/diag-slave-general.png
State Machine
Current State:

Current state of the selected slave

Requested State:

Requested state of the selected slave

Error State
Current:

Slave error which occurred during state transition

5.3.2. Variables

In this tab, the user can see and change the values of the process variables. The variables will be forced to the value the user entered. The user can press release to release the variable. If one or two variables are selected, a chart of the values is shown. Also resize and zoom is possible to see more details. The chart will be updated every 250 milliseconds:
_images/diag-slave-variables.png

5.3.3. Extended Diagnosis

In this tab, the user can see the extended diagnosis information:
_images/diag-slave-extended.png

There will be a red ! to signalize that a counter is higher than 0. Except for the forwarded errors.

If an error counter is ‘-’ it was not read. If it is ‘0’ it is really zero. So there is a difference between ‘0’ and ‘-‘.

Common Error Counter
Processing Error Counter:

Indicates that slave received “not EtherCAT frames”, which are not allowed in the EtherCAT segment (of course acceptable in a test environment)

PDI Error Counter:

Counts if a PDI access has an interface error (read from register: 0x30D)

Port 0..3
  • Invalid Frame Counter of Port y (read from register: 0x0300+y*2)

  • RX Error Counter of Port y (read from register: 0x0300+y*2+8Bit)

  • Lost Link Counter of Port y (read from register: 0x0310+y)

  • Forwarded RX Error Counter of Port y (read from register: 0x0308+y)

Acknowledge warning

If one of the error counters increase there will be a warning in the tree, sigalized with an icon. With this button it is possible to acknowledge this warning. So the slave can be monitored again and the icon will come back with the next error.

To see this information the error counters must be read by the EtherCAT master. Only if this is activated the monitor is able to read this. Here is a quick overview on how to activate this function on different masters:

acontis EtherCAT Master:

To activate the error collection of the acontis EC-Master, the follwing API has to be called:

/* Slave statistics polling for error diagnostic */
EC_T_DWORD dwPeriodMs = 1000;
dwRes = ecatIoCtl(EC_IOCTL_SET_SLVSTAT_PERIOD, (EC_T_BYTE*)&dwPeriodMs, sizeof(EC_T_DWORD), EC_NULL, 0, EC_NULL);
if (dwRes != EC_E_NOERROR)
{
        EcLogMsg(EC_LOG_LEVEL_ERROR, (pEcLogContext, EC_LOG_LEVEL_ERROR, "ecatIoControl(EC_IOCTL_SET_SLVSTAT_PERIOD) returns with error=0x%x\n", dwRes));
        goto Exit;
}
Beckhoff TwinCAT:
At the EtherCAT master, select Properties and then select all hardware counters that you would like to monitor.
_images/twincat-error.png