5394
XL2; EtherCAT drive communication - fault recovery, dual-family support, diagnostics.
XL200

EtherCAT drive communication - fault recovery, dual-family support, diagnostics, and a communication lock-up fix

This updates the machine's EtherCAT motion network - both the task that brings the servo drives up and runs them, and the shared communication library beneath it. It continues the drive-communication work from earlier in the summer.

Main fix - a communication lock-up with Bosch drives. The machine and each drive each keep their own message-sequence counter, and by the EtherCAT standard those two counters are independent. The old code wrongly assumed a drive would echo the machine's counter; once a Bosch "IndraDrive" unit's counter drifted out of step, the machine began throwing away the drive's perfectly valid replies - which looked like the drive's command channel going dead. Replies are now matched by what they actually answer rather than by counter, removing a hard-to-reproduce stall.

What the machine can now do:

  • Recover cleanly from a drive fault. When a drive faults and the machine has to clear it, the clear now follows the official drive-profile handshake and completes reliably on the first attempt, with a time limit so it can never hang. The earlier method could take several tries or leave the drive's command channel stuck.
  • Run both Bosch drive families - the older IndraDrive and the newer "ctrlX" - each set up the way its own factory description specifies, with the machine reading the setting back from the drive to confirm it took.
  • Aim its network timing using values the drive actually publishes, and refuse to run rather than run degraded if that timing cannot be met.
  • Report on its own communication health in detail, including a check - taken from the network hardware itself - that it sends exactly one message per cycle. This built-in instrumentation is what proved a long-studied intermittent "missed feedback" event lies inside the drive, not in the machine, and produced the evidence for an open inquiry with Bosch. The detailed per-message diagnostics are compiled into bench builds only, not production.

Cleanup: the temporary investigation code written to characterize that event has been removed or switched off for production - the one-off timing experiments are gone, and the remaining diagnostic probes build only for the bench.