4 working counter, Working counter, Table 5: working counter increment – BECKHOFF EtherCAT Technology Section I User Manual

Page 28

Advertising
background image

EtherCAT Protocol

I-8

Slave Controller

– Technology

2.4

Working Counter

Every EtherCAT datagram ends with a 16 Bit Working Counter (WKC). The Working Counter counts
the number of devices that were successfully addressed by this EtherCAT datagram. Successfully
means that the ESC is addressed and the addressed memory is accessible (e.g., protected
SyncManager buffer). EtherCAT Slave Controllers increment the Working Counter in hardware. Each
datagram should have an expected Working Counter value calculated by the master. The master can
check the valid processing of EtherCAT datagrams by comparing the Working Counter with the
expected value.

The Working Counter is increased if at least one byte/one bit of the whole multi-byte datagram was
successfully read and/or written. For a multi-byte datagram, you cannot tell from the Working Counter
value if all or only one byte was successfully read and/or written. This allows reading separated
register areas using a single datagram by ignoring unused bytes.

The Read-Multiple-Write commands ARMW and FRMW are either treated like a read command or like
a write command, depending on the address match.

Table 5: Working Counter Increment

Command

Data Type

Increment

Read command

No success

no change

Successful read

+1

Write command

No success

no change

Successful write

+1

ReadWrite command

No success

no change

Successful read

+1

Successful write

+2

Successful read and write

+3

Advertising