EtherCAT Slave  1.06.01

◆ EC_API_SLV_PDO_get()

uint32_t EC_API_SLV_PDO_get ( EC_API_SLV_SHandle_t pEcSlaveApi_p,
uint16_t  index_p,
EC_API_SLV_SPdo_t **  pOutPdo_p 
)

Search for PDO and fetch it.

Parameters
[in]pEcSlaveApi_pEtherCAT DTK instance.
[in]index_pindex number of the PDO
[out]pOutPdo_ppointer to the requested PDO
Returns
uint32_t Returns an error code if the PDO is not found.
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_get(S_ecSlvApiHdl, 0x1600, &ptRxPdo1600);
EC_API_SLV_SHandle_t
struct EC_API_SLV_SHandle EC_API_SLV_SHandle_t
EC_API_SLV_SHandle_t describes the EtherCAT Slave API.
Definition: ecSlvApi.h:135
EC_API_SLV_PDO_get
uint32_t EC_API_SLV_PDO_get(EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint16_t index_p, EC_API_SLV_SPdo_t **pOutPdo_p)
Search for PDO and fetch it.
Definition: ecSlvApi_ProcDataStub.c:134