EtherCAT Slave
 
Loading...
Searching...
No Matches
SyncManager configuration

The SyncManagers are configured automatically by the SDK. However, the default configuration can be changed.

The SDK configures the SyncManagers without permitting the PDO assignments. However, to set it explicitly, use the following code.

EC_API_SLV_PDO_setAssignment(pAppInstance_p->ptEcSlvApi, false);

As a result, the SyncManager objects are flagged as Read Only.

SyncManager 0x1C12 and 0x1C13 with RO access

Moreover, the PDOs are not possible to be assigned to the SyncManagers. Notice that the SyncManagers contain the 'F' character, which means that they are fixed.

Assignment settings are fixed

Configure SyncManager Assignment

To permit changes on the SyncManager PDO assignment, use the following code.

EC_API_SLV_PDO_setAssignment(pAppInstance_p->ptEcSlvApi, true);

As a result, the SyncManager objects are flagged now as Read Write.

SyncManager 0x1C12 and 0x1C13 with RW access

Therefore, the PDOs are possible to be assigned to the SyncManagers and notice that the fixed mark is now gone.

Assignment settings

Limit the number of SyncManager subIndexes

It is possible to change the number of permitted SyncManager subIndexes by using the following code. It will permit assignments until a certain limit.

\code{.c}  
EC_API_SLV_PDO_setSyncManMaxSubIndex(pAppInstance_p->ptEcSlvApi, 2, 4);
EC_API_SLV_PDO_setSyncManMaxSubIndex(pAppInstance_p->ptEcSlvApi, 3, 4);
\endcode