EtherCAT Slave  1.06.01

◆ EC_API_SLV_PDO_createEntry()

uint32_t EC_API_SLV_PDO_createEntry ( EC_API_SLV_SHandle_t pEcSlaveApi_p,
EC_API_SLV_SPdo_t pPdo_p,
char *  pName_p,
EC_API_SLV_SCoE_ObjEntry_t pObjectEntry_p 
)

This function maps an object entry from the Object Dictionary as a PDO.

Parameters
[in]pEcSlaveApi_pThe pointer to the EtherCAT API instance.
[in]pPdo_ppointer to the PDO instance.
[in]pObjectEntry_ppointer to SdoEntry instance.
Returns
uint32_t Returns the API error code.
Example
#include <ecSlvApi.h>
TPdo *ptRxPdo;
TSdoEntry* ptSdoEntry;
EC_API_SLV_getSdoEntry(ptEcSlvApi, 0x2002, 2, &ptSdoEntry);
EC_API_SLV_PDO_create(ptEcSlvApi, "RxPDO", 0x1600, &ptRxPdo);
EC_API_SLV_PDO_createEntry(ptEcSlvApi, ptRxPdo, ptSdoEntry);
Examples
ecSlvCiA402.c.
EC_API_SLV_PDO_create
uint32_t EC_API_SLV_PDO_create(EC_API_SLV_SHandle_t *pEcSlaveApi_p, char *pName_p, uint16_t mapIndex_p, EC_API_SLV_SPdo_t **pOutPdo_p)
Creates an empty PDO.
Definition: ecSlvApi_ProcDataStub.c:86
EC_API_SLV_PDO_createEntry
uint32_t EC_API_SLV_PDO_createEntry(EC_API_SLV_SHandle_t *pEcSlaveApi_p, EC_API_SLV_SPdo_t *pPdo_p, char *pName_p, EC_API_SLV_SCoE_ObjEntry_t *pObjectEntry_p)
This function maps an object entry from the Object Dictionary as a PDO.
Definition: ecSlvApi_ProcDataStub.c:270