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

◆ EC_API_SLV_PDO_create()

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.

PDO must be filled with content. Hence add the entries flagged as PDO mappable from the Object Dictionary

Parameters
[in]pHandleThe pointer to the EtherCAT API instance.
[in]pNameThis parameter is the name of the PDO
[in]mapIndexThe index number for the mapping object in the Object Dictionary. RxPDO: 0x01600-0x17FF - TxPDO: 0x1A00-0x1BFF
[out]pOutPdoThe pointer to the generated PDO instance
Returns
ErrorCode API Error Code
Example
#include <ecSlvApi.h>
// required variables
uint32_t retVal = 0;
EC_API_SLV_SHandle_t* S_ecSlvApiHdl;
TPdo* ptRxPdo1600;
// the Call
retVal = EC_API_SLV_PDO_create(S_ecSlvApiHdl, "RxPDO", 0x1600, &ptRxPdo1600);
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
Definition ecSlvApiInternal.h:331
Examples
ecSubDeviceCiA402.c.