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

◆ EC_API_SLV_PDO_createEntry()

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.

Parameters
[in]pHandleThe pointer to the EtherCAT API instance.
[in]pPdopointer to the PDO instance.
[in]pNameentry name
[in]pObjEntrypointer to SdoEntry instance.
Returns
uint32_t Returns the API error code.
Example
#include <ecSlvApi.h>
TPdo *ptRxPdo;
TSdoEntry* ptSdoEntry;
EC_API_SLV_CoE_getObjectEntry(ptEcSlvApi, 0x2002, 2, &ptSdoEntry);
EC_API_SLV_PDO_create(ptEcSlvApi, "RxPDO", 0x1600, &ptRxPdo);
EC_API_SLV_PDO_createEntry(ptEcSlvApi, ptRxPdo, "example", ptSdoEntry);
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
Examples
ecSubDeviceCiA402.c.