EtherCAT Slave  1.06.01
PDO Configuration

Overview

The process data transferred by an EtherCAT slave during each cycle (Process Data Objects, PDOs) are user data which the application expects to be updated cyclically or which are sent to the slave. To this end the EtherCAT master (Beckhoff TwinCAT) parameterizes each EtherCAT slave during the start-up phase to define which process data (size in bits/bytes, source location, transmission type) it wants to transfer to or from this slave. Incorrect configuration can prevent successful start-up of the slave.

Functions

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. More...
 
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. More...
 
uint16_t EC_API_SLV_PDO_getOffset (EC_API_SLV_SPdo_t *pPdo_p)
 This function return the offset of the PDO in the process image in bytes. More...
 
uint16_t EC_API_SLV_PDO_getLength (EC_API_SLV_SPdo_t *pPdo_p)
 This function returns the Byte size of a PDO. More...
 
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. More...
 
uint32_t EC_API_SLV_PDO_setData (EC_API_SLV_SHandle_t *pEcSlaveApi_p, EC_API_SLV_SPdo_t *pPdo_p, uint32_t length_p, uint8_t *pData_p)
 Write PDO content into Process Image. All PDO entries are written in a data chunk. More...
 
uint32_t EC_API_SLV_PDO_getData (EC_API_SLV_SHandle_t *pEcSlaveApi_p, EC_API_SLV_SPdo_t *pPdo_p, uint32_t length_p, uint8_t *pData_p)
 Read PDO content from Process Image, all entries are read in a data chunk. More...
 
uint32_t EC_API_SLV_PDO_setEntryData (EC_API_SLV_SHandle_t *pEcSlaveApi_p, EC_API_SLV_SPdo_t *pPdo_p, uint8_t subIndex_p, uint32_t length_p, uint8_t *pData_p)
 Write data to an individual PDO Entry Variable. More...
 
uint32_t EC_API_SLV_PDO_getEntryData (EC_API_SLV_SHandle_t *pEcSlaveApi_p, EC_API_SLV_SPdo_t *pPdo_p, uint8_t subIndex_p, uint32_t length_p, uint8_t *pData_p)
 Read data from an individual PDO Entry Variable. More...
 
uint32_t EC_API_SLV_PDO_setFixedMapping (EC_API_SLV_SHandle_t *pEcSlaveApi_p, bool fixed_p)
 This is the function to set a PDO as fixed or not. Download of PDO Configuration during start up. More...
 
uint32_t EC_API_SLV_PDO_setAssignment (EC_API_SLV_SHandle_t *pEcSlaveApi_p, bool assignment_p)
 Enable or disable PDO assignments of the SyncManagers. Download of PDO assignment (e.g. 0x1C12, 0x1C13, etc) during start up. More...
 
uint32_t EC_API_SLV_PDO_addPadding (EC_API_SLV_SHandle_t *pEcSlaveApi_p, EC_API_SLV_SPdo_t *pPdo_p, uint8_t length_p)
 Add padding to the PDO. More...
 
uint32_t EC_API_SLV_getInputProcDataLength (EC_API_SLV_SHandle_t *pEcSlaveApi_p)
 Read the input process data length. More...
 
uint32_t EC_API_SLV_getOutputProcDataLength (EC_API_SLV_SHandle_t *pEcSlaveApi_p)
 Read the output process data length. More...
 
uint8_t EC_API_SLV_PDO_getEntryCount (EC_API_SLV_SPdo_t *pPdo_p)
 Read PDO entry count. More...
 
uint32_t EC_API_SLV_PDO_getEntryDataLength (EC_API_SLV_SPdo_t *pPdo_p, uint8_t subIndex_p)
 Read PDO entry data length. More...
 
uint32_t EC_API_SLV_setInputData (EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint32_t length_p, uint8_t *pInputData_p)
 Write input process data to the EtherCAT Master. More...
 
uint32_t EC_API_SLV_getOutputData (EC_API_SLV_SHandle_t *pEcSlaveApi_p, uint32_t length_p, uint8_t *pOutputData_p)
 Read output process from the EtherCAT Master. More...
 
uint32_t EC_API_SLV_PDO_enable (EC_API_SLV_SHandle_t *pEcSlaveApi_p, EC_API_SLV_SPdo_t *pPdo_p)
 Enable PDO assignment to the syncManager. More...
 
uint32_t EC_API_SLV_PDO_disable (EC_API_SLV_SHandle_t *pEcSlaveApi_p, EC_API_SLV_SPdo_t *pPdo_p)
 Disable PDO assignment to the syncManager. More...
 
uint32_t EC_API_SLV_PDO_enabled (EC_API_SLV_SHandle_t *pEcSlaveApi_p, EC_API_SLV_SPdo_t *pPdo_p, bool *pEnabled_p)
 Return if the PDO is assigned to the syncManager. More...