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.

LP-AM243: EC_API_SLV_CoE_getObjectData does not refer subindex

Part Number: LP-AM243


Tool/software:

Hi Team,

I'm developing using "ethercat_slave_demo" of SDK ver.09_02_00_15.

There are two APIs, EC_API_SLV_CoE_getObjectData and EC_API_SLV_CoE_setObjectData In ecSLvApi_CoE.h,
This has a problem that EC_API_SLV_CoE_setObjectData refer subIndex,  but EC_API_SLV_CoE_getObjectData does not refer subindex.
I want to use EC_API_SLV_CoE_getObjectData like EC_API_SLV_CoE_setObjectData referring subIndex.
 

Best regards,

Oyama

  • Hi,

    Sorry for the delay. I’ve assigned your query to the concerned team for further clarification.

    Regards,

    Aaron

  • Hello Oyama,

    The API EC_API_SLV_CoE_setObjectData is used to write object data to the Object Dictionary. This API is intended for complete access. The data must include the sub-index 0 value, if sub-index 0 is used. Valid sub-index values are 0 or 1. The API EC_API_SLV_CoE_getObjectData is used to read the object data from the object dictionary. This function is intended for complete access, and it reads the data starting from sub-index 0. 
    To get the object entry information please use the API 
    EC_API_SLV_CoE_getObjectEntry, which gets the specific object entry from the object dictionary. This API has index and sub-index as parameters.

    Kind Regards,
  • Hello Harasha,

    Thank you, I understood about EC_API_SLV_CoE_setObjectData and EC_API_SLV_CoE_getObjectData.

    When using EC_API_SLV_CoE_getObjectEntry, this function writes data in the Entry "EC_API_SLV_SCoE_ObjEntry_t  **ppObjectEntry",

    but EC_API_SLV_SCoE_ObjEntry_t  is undefined struct, isn't it? (or inaccessible from user.)

    Debagging this function, and I could not read some data from ppObjectEntry after use EC_API_SLV_CoE_getObjectEntry. 

    Please tell me how to read information from ppObjectEntry,

    and it is safe to call EC_API_SLV_CoE_getObjectEntry many times?

     

    Best regards,

    Oyama

  • Hello Oyama,

    Yes. The struct EC_API_SLV_SCoE_ObjEntry_t is not accessible to the users. But the information related to the struct EC_API_SLV_SCoE_ObjEntry_t can be found at EtherCAT Documentation - EC_API_SLV_CoE_ObjEntry Struct Reference

    Kind Regards,