This article goes about EtherCAT networks commissioned with TwinCAT where a "Sync Manager Watchdog" timeout occurs when the slave should move to OPERATIONAL state.
APPLICABLE PRODUCTS
All HMS products with an EtherCAT slave interface
QUESTION
When the EtherCAT master commands a slave to move to OPERATIONAL state, it may occur that the slave gets stuck in ERROR SAFEOP state, showing this error message in TwinCAT:
POSSIBLE CAUSE
In order to circumvent this problem, it may help to activate the option "Wait for WcState is Ok" in the EtherCAT advanced settings of the slave:
BACKGROUND
In TwinCAT, the flag WcState (working counter state) coordinates two state machines running independently.On one hand, the master controls each slave's state via the EtherCAT State Machine (with their states INIT, PREOP, SAFEOP, OP). On the other hand, there's the state machine of the PLC, which needs to set the output process data to their initial values as soon as the slaves reach OP state.
By activating the TwinCAT option "Wait for WcState is Ok", the EtherCAT master first waits for the output process data to be set before it transitions the slave to OP state.
If this option is missing, it may occur that the error "'SAFEOP to OP!' failed!" is thrown and the slave gets stuck in SAFEOP. The SAFEOP state only allows reading input process data. And since the slave does not receive output process data, the Sync Manager watchdog is triggered in direct consequence.
If you're a developer in-designing Anybus CompactCom embedded interfaces, it is possible to activate this option for the slave in the ESI file as a TwinCAT vendor-specific option. See below for a clip of the Anybus CompactCom 40 EtherCAT ESI file:
<Devices>
<Device Physics="YY">
<Type ProductCode="#x00000034" RevisionNo="#x00010009">Anybus-CC EtherCAT</Type>
<Name LcId="1033"><![CDATA[Anybus-CC EtherCAT]]></Name>
<Info>
<Mailbox>
<Timeout>
<RequestTimeout>100</RequestTimeout>
<ResponseTimeout>6000</ResponseTimeout>
</Timeout>
</Mailbox>
<!-- Activate "Wait for WcState is Ok" in TwinCAT -->
<VendorSpecific>
<ErrorHandling>
<AutoRestoreAfterWcOk>1</AutoRestoreAfterWcOk>
</ErrorHandling>
</VendorSpecific>
<!--Activate "Wait for WcState is Ok" in TwinCAT (end) -->
</Info>
<GroupType>Embedded modules</GroupType>
<Fmmu>Outputs</Fmmu>
<Fmmu>Inputs</Fmmu>