Part Number: AM2434
Hi,
i have a problem with the ethercat subdevice / Beckhoff Slave example. My setup is the AM2434-LP running the ethercat_subdevice_beckhoff_ssc... with industrial_comms_sdk_2025_0_0_8 and mcu_plus_sdk_11_1_0_19, directly connected over an ethernet cable to a dedicated laptop running twincat3. I use the TIESC-004 esi configuration with DC-Sync Mode and 1khz CycleTime. I overwrite the first input pdo entry with a simple 8bit counter as seen here:
void APPL_InputMapping(uint16_t *pData)
{
uint16_t j = 0;
uint8_t *pTmpData = (uint8_t *)pData;
volatile static uint8_t testCounter = 0;
for(j = 0; j < sTxPDOassign.u16SubIndex0; j++)
{
switch(sTxPDOassign.aEntries[j])
{
/* TxPDO 1 */
case 0x1A00:
*pTmpData++ = testCounter;
break;
case 0x1A03: // attention: maybe a non-aligned byte access...
*pTmpData++ = sAI1Inputs.info1 & 0xFF;
*pTmpData++ = (sAI1Inputs.info1 & 0xFF00) >> 8;
*pTmpData++ = (sAI1Inputs.info1 & 0xFF0000) >> 16;
*pTmpData++ = (sAI1Inputs.info1 & 0xFF000000) >> 24;
*pTmpData++ = sAI1Inputs.info2 & 0xFF;
*pTmpData++ = (sAI1Inputs.info2 & 0xFF00) >> 8;
break;
}
}
testCounter++;
}
This variable is linked inside twincat and logged via a measurement project. The plotted data shows delayed or missing counter values as seen in the attached images as red lines. The most data errors occour with the Master Sync ShiftTime of 10% and least with 40%.
What causes this and how can i fix this? Also this error only happens in dc-sync mode, freerun works without an issue.



Best regards
Lucas