EtherCAT SubDevice
 
Loading...
Searching...
No Matches

◆ EC_API_SLV_CoE_getObjectEntry()

uint32_t EC_API_SLV_CoE_getObjectEntry ( EC_API_SLV_SHandle_t pHandle,
uint16_t  index,
uint8_t  subIndex,
EC_API_SLV_SCoE_ObjEntry_t **  ppObjectEntry 
)

This function returns object entries from the Object Dictionary.

Get Object Entry from Object Dictionary. It is useful to map it aftewards as a PDO

Parameters
[in]pHandleThe pointer to the EtherCAT API instance.
[in]indexThe index number of the Object.
[in]subIndexThe subIndex number of the entry.
[out]ppObjEntryThe pointer to object entry instance.
Returns
uint32_t Returns the API error code.
Example
#include <ecSlvApi.h>
TPdo *ptRxPdo;
EC_API_SLV_CoE_getObjectEntry(ptEcSlvApi, 0x2002, 2, &ptObjEntry);
EC_API_SLV_PDO_create(ptEcSlvApi, "RxPDO", 0x1600, &ptRxPdo);
EC_API_SLV_PDO_createEntry(ptEcSlvApi, ptRxPdo, "example", ptObjEntry);
uint32_t EC_API_SLV_CoE_getObjectEntry(EC_API_SLV_SHandle_t *pHandle, uint16_t index, uint8_t subIndex, EC_API_SLV_SCoE_ObjEntry_t **ppObjectEntry)
This function returns object entries from the Object Dictionary.
Definition ecSlvApi_CoE.c:661
uint32_t EC_API_SLV_PDO_create(EC_API_SLV_SHandle_t *pHandle, char *pName, uint16_t mapIndex, EC_API_SLV_Pdo_t **pOutPdo)
Creates an empty PDO.
Definition ecSlvApi_pdo.c:416
uint32_t EC_API_SLV_PDO_createEntry(EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, char *pName, EC_API_SLV_SCoE_ObjEntry_t *pObjEntry)
This function maps an object entry from the Object Dictionary as a PDO.
Definition ecSlvApi_pdo.c:827
Definition ecSlvApiInternal.h:129
See also
EC_API_SLV_CoE_getObject EC_API_SLV_PDO_create EC_API_SLV_PDO_createEntry
Examples
ESL_cia402Demo.c, and ecSubDeviceCiA402.c.