Additional Diagnostic information

Additional Diagnostic information 1:

FrmXState: Variable of type WORD (or UINT), that shows the state of the frame X. For each EtherCAT command in the frame, a bit is reserved in FrmXState:

Bit

Description

0 (0x0001)

1. EtherCAT command not sent (NOP requested)

1 (0x0002)

2. EtherCAT command not sent (NOP requested)

2 (0x0004)

3. EtherCAT command not sent (NOP requested)

...

 

14 (0x4000)

15. EtherCAT command not sent (NOP requested)

15 (0x8000)

complete frame not sent

FrmXWcState: Variable of type WORD(or UINT), that shows the working counter states of the individual EtherCAT commands of the cyclic frame X. For each EtherCAT command in the frame, a bit is reserved in FrmXWcState:

Bit

Description

0 (0x0001)

wrong working counter of 1. EtherCAT command received

1 (0x0002)

wrong working counter of 2. EtherCAT command received

2 (0x0004)

wrong working counter of 3. EtherCAT command received

...

 

14 (0x4000)

wrong working counter of 15. EtherCAT command received

15 (0x8000)

complete frame missing

An EtherCAT frame can consist of one or more EtherCAT commands. Each of these commands has an expected working counter value. In other words, the master knows, how many slave devices are addressed by an individual command and can calculate the expected working counter. If the master receives a wrong working counter this indicates that one or more slaves have a problem. In this case the corresponding bit in FrmXWcState is set.

In the Example above only one frame (Frame0) is sent cyclically during process data communication. In the "EtherCAT" tab of the EtherCAT device one can see the individual cyclic frames and the EtherCAT commands contained in them:

Additional Diagnostic information 2:

The first command is a Logical Read Write command and the second is a broadcast read command. The LRW command is responsible for reading the inputs and writing to the outputs of one or more slave devices. The BRD(Broad Cast Read) command reads out the combined states of all slaves.

Slave Count: Number of slave devices connected to the EtherCAT master.

DevState: Device status information as WORD (or UINT) variable, assumes the following values:

Bit

Description:

0 (0x0001)

Link error detected.

1 (0x0002)

I/O locked after link error (I/O reset required)

2 (0x0004)

Link error (redundancy adapter)

3 (0x0008)

Missing one frame (redundancy mode)

4 (0x0010)

Out of send resources (I/O reset required)

5 (0x0020)

Watchdog triggered

6 (0x0040)

Ethernet driver (miniport) not found

7 (0x0080)

I/O reset active

8 (0x0100)

At least one device in 'INIT' state

9 (0x0200)

At least one device in 'PRE-OP' state

10 (0x0400)

At least one device in 'SAFE-OP' state

11 (0x0800)

At least one device indicates an error state

12 (0x1000)

DC not in sync

The bits 8-11 of the device state variable indicate if one or more Slave devices are in a specific state. During process data communication the slaves are in the state Operational. In this case bits 8-11 are set to 0. If one slave device is in the Init state instead of Operational, the bit 8 would be set (DevState = 0x0100).

EtherCAT Slave Device

Additionally, to diagnostics inputs of the EtherCAT device, each slave device as a optional diagnostic input variable called WcState:

Additional Diagnostic information 3:

WcState: Variable of type BOOL, that shows the working counter state of the EtherCAT slave device. A value of 0 indicates a valid working counter and a value of 1 an invalid working counter. If the working counter is invalid, this indicates that the EtherCAT command, that is responsible for updating the inputs and outputs for this device, has an incorrect working counter. Because this command can address more than 1 slave device, the variable WcState of all involved devices will be set to invalid and one cannot determine the device that causes the problem with the help of this variable. To determine if an individual slave device has a problem, one can read out the state of the device with the help of the InfoData.State variable.

Additional Diagnostic information 4:

If 'Info Data' is enabled (see Master Settings), the 'Info' device image is added to the EtherCAT device. Additionally, an entry 'InfoData' is added to the EtherCAT device and to the connected EtherCAT slave devices. 'InfoData' contains input variables, that supply information about the EtherCAT device, that normally do not change very often. Variables mapped to the 'Info' images are not updated cyclically but only if the image has changed.

ChangeCnt: The ChangeCnt shows how often the contents of the image has changed.

DevId(optional): This is the device id of the EtherCAT device.

AmsNetId(optional): The AmsNetId is a parameter necessary for communicating with the EtherCAT master device via ADS. The ADS port of the EtherCAT master is always 0xFFFF(65535) and the Ads Port of an EtherCAT slave device is equal to the fixed address (see EtherCAT Addr) of the slave.

EtherCAT Slave Device

Additional Diagnostic information 5:

State: The 'State' variable holds the current EtherCAT state and link status of the EtherCAT slave device.

Value

Description

0x___1

Slave in 'INIT' state

0x___2

Slave in 'PREOP' state

0x___3

Slave in 'BOOT' state

0x___4

Slave in 'SAFEOP' state

0x___8

Slave in 'OP' state

0x0010

Slave signals error

0x0020

Invalid vendorId, productCode... read

0x0100

Slave not present

0x0200

Slave signals link error

0x0400

Slave signals missing link

0x0800

Slave signals unexpected link

0x1000

Communication port A

0x2000

Communication port B

0x4000

Communication port C

0x8000

Communication port D

AdsAddr( optional ): The variable 'AdsAddr' holds the Ams netId and Ams port of the slave device. These are necessary parameters for communicating with the EtherCAT slave device via ADS. The variable 'AdsAddr' is added by default if the slave supports a mailbox.

Chn0( optional for drives only): Drive channel.

Additional non cyclic diagnostic information can be found on the Online tab of the EtherCAT device.