Other Parts Discussed in Thread: TMS320F28379D
Hello!
I successfully fired sample application for TIDM-DELFINO-ETHERCAT. Now I would like to change process data for my project. I prepared stack code using SSC and I created new application in Excel:
Next, I put ESI XML file in EtherCAT directory.
I prepared mapping too. Here is the code:
void APPL_InputMapping(UINT16* pData) { uint16_t j = 0; uint16_t *pTmpData = (uint16_t *)pData; uint16_t data; for (j = 0; j < sTxPDOassign.u16SubIndex0; j++) { switch (sTxPDOassign.aEntries[j]) { /* TxPDO */ case 0x1A00: // 8 bits data = Sinus0x6000; * (volatile uint16_t *)pTmpData = data; break; } } }
void APPL_OutputMapping(UINT16* pData) { uint16_t j = 0; uint16_t *pTmpData = (uint16_t *)pData;// allow byte processing uint16_t data = 0; for (j = 0; j < sRxPDOassign.u16SubIndex0; j++) { switch (sRxPDOassign.aEntries[j]) { /* RxPDO */ case 0x1600: //byte (8 bits) data = (*(volatile uint16_t *)pTmpData); Angle0x7000 = data; break; } } }
In CCS I can see that my variables were mapped:
But when I fire TwinCAT I can see error which means that SM configuration for input process data is invalid:
I have no idea what I am doing wrong. It's my second day when I am fighting with this and my ideas are done.
Do you know where I am doing a mistake?
I appreciate any help.
BR,
Dawid.