[etherlab-users] Working counter interpretation
Gavin Lambert
gavinl at compacsort.com
Thu Feb 23 23:10:11 CET 2017
On 23 February 2017 22:53, quoth Christoph Schröder:
> I have a question regarding the WorkingCounter. The WC actually shows me
> an error (incomplete) despite everything working fine. If I use one slave I get
> the following message in the kernel log:
> > [Thu Feb 23 10:32:17 2017] EtherCAT 0: Domain 0: Working counter
> changed to 2/3.
> Why 2/3? I have only one slave and even if the master itself is counted too,
> shouldn't it be 2/2?
I suggest reading the EtherCAT specifications or supplementary documentation to answer these sorts of questions.
The master does not count. Each SyncManager in the slaves counts (each slave can have zero or more SMs -- most use two, but it depends on the type of slave). For read or write datagrams, each slave contributes +1 to the WC. However for read+write datagrams (which is how PDOs are usually transferred), a read by the master counts as +1 while a write by the master counts as +2. So a single slave that has both read and write PDOs mapped will typically count as 3, although other values are possible as well.
> 2. If the 3 is correct, what am I missing? I didn't loose any frames and
> communication works just fine (which is the reason why I never paid any
> attention to this odd value but I would like to use it for error handling).
Reducing from 3/3 to 2/3 means that the read was not successful but the write was; usually this means that the slave did not update the read SM since your prior datagram. This might mean that you are sending packets faster than its internal update cycle (which might be either free-run or based on a sync interval, depending on how it's configured). If it only happens once in a while it might be due to master-side timing jitter.
A working counter mismatch always indicates some kind of data transfer problem. How serious this is depends on what your slaves are doing and how problematic it is for the master and/or slave to miss an update, and how quickly it recovers.
More information about the Etherlab-users
mailing list