This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6442: ESI file parser in EtherCAT slave stack

Part Number: AM6442

Dear TI-Team,

According to the documentation (EtherCAT Slave: CiA 402 Example (ti.com)) the function EC_API_SLV_parseEsiFile should be called, but I cannot find it in the source code in ecSlvCiA402.c of the example.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
EC_API_SLV_cbRegisterUserApplicationRun (pAppInstance_p->ptEcSlvApi, EC_SLV_APP_CIA_applicationRun, pAppInstance_p);
#endif
#if (defined GPIO_TEST_PINS) && (1==GPIO_TEST_PINS)
#if (defined GPIO_TEST_PROFILE_SEL) && (defined GPIO_TEST_PROFILE_2) && (GPIO_TEST_PROFILE_2 == GPIO_TEST_PROFILE_SEL)
EC_API_SLV_cbRegisterMeasurement(pAppInstance_p->ptEcSlvApi, EC_SLV_APP_measurement, pAppInstance_p);
#endif
#endif
error = (EC_API_EError_t)EC_API_SLV_init(pAppInstance_p->ptEcSlvApi);
if (error != EC_API_eERR_NONE)
{
OSAL_printf("Slave Init Error Code: 0x%08x\r\n", error);
/* @cppcheck_justify{misra-c2012-15.1} goto is used to assure single point of exit */
/* cppcheck-suppress misra-c2012-15.1 */
goto Exit;
}
EC_API_SLV_run(pAppInstance_p->ptEcSlvApi);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Could you give me a hint?

Thanks and regards,
Jonas

  • Hi Jonas,

     Thank you for reaching out to us. After checking with our developers, you are right, the API "EC_API_SLV_parseEsiFile()" is not called because it plainly does not exist. The documentation is therefore not up to date and will be adjusted by us. It refers to a now changed form of the demo.

     Please refer to the program flow of the code, you do not need this API for this demo. The "new" process is as follows:

     [...]

    EC_SLV_APP_CIA_populateBoardFunctions()

    -->

    EC_SLV_APP_CIA_populateSlaveInfo()

    -->

    EC_SLV_APP_populateCiA402Functions()

    -->

    EC_SLV_APP_populateRxPDO()

    -->

    EC_SLV_APP_populateTxPDO()

    -->

    EC_API_SLV_cbRegisterUserApplicationRun()

    -->

    EC_API_SLV_init()

    -->

    EC_API_SLV_run()

     Within the function "EC_SLV_APP_populateRxPDO()" the actual APIs for creating the PDOs such as "EC_API_SLV_PDO_create()" are then called.

     Sorry for the confusion around this section.

     Thank you,

    Paula

  • Hi Paula,

    thanks for the quick reply.

    So I understand that there is no function for parsing ESIs in the EtherCAT slave stack? Are there any plans to implement this in future releases?

    Regards,
    Jonas

  • Hi Jonas, I got the feedback that currently there’s no function to parse the ESI files in the slave stack and it is also not planned to implement it in the near future.

    Basically, it would be a function with a XML parser which, depending on the elements of the file, would call the required existing slave stack APIs in a way a manual configuration wouldn’t be needed anymore.

    thank you,

    Paula

  • Understood, many thanks, Paula

  • Hi Paula,

    I came across a function called EC_API_SLV_ESI_parseFile in the ind_comms_sdk_am243x_09_02_00_08. Can this function be used to load a custom ESI file into the slave system?

    Additionally, in the example demo named ethercat_slave_cia402_demo imported from the SDK, I am unsure about how it loads the TI AM243X.R5F CiA402.xml file to the demo. Does it load implicitly? If I were to use the EC_API_SLV_ESI_parseFile function to load a custom ESI file, would it override the old ESI configuration used in the demo?

  • Hi Zhaofei, let me create a new thread as this is already closed and might get overlooked

    thank you,

    Paula

  • Actually Zhaofei, please create a new thread as this might be a cleaner way to do it instead of splitting current thread. Thanks for your help.

    Paula