...
Code Block | ||
---|---|---|
| ||
uint32_t AppECS_Write_ObjectInd(APP_DATA_T *ptAppData, CIFX_PACKET* ptPkt) { ... switch ( ptInd->tData.usIndex ) { ... case 0x1C12: lRet = OD_WriteInd_PDOAssignmentParameter(&tAppECSData, ptAppData, ptReq); break; case 0x1C13: lRet = OD_WriteInd_PDOAssignmentParameter(&tAppECSData, ptAppData, ptReq); break; default: lRet = CIFX_INVALID_PARAMETER; break; } ... } |
Inside of the fuction function OD_WriteInd_PDOAssignmentParameter is the fuction OD_CalculatePdoOffsets() where the application uses the and Ecat_SetIoSizeReq().
That means, if the EtherCAT master writes a sync mangermangerobject to the ECS slave, the slave application will get this object and it needs to check wtich PDO the EhterCAT master wants and caclulate the new size PDO size.
...
After OD_CalculatePdoOffsets() the application calls Ecat_SetIoSizeReq()
The slave application allways needs to decide if the requested PDO data from EtherCAT master is possbil.
For example, if the slave has plugable input and output hardware. If the slave has only connected input hardware and in the EtherCAT master project is choosen output hardware, than the EtherCAT slave can handle only input data and no output data.