Reference | I/O Devices 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: 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: TwinCAT 2 203 Version: 1.7 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