EtherCAT SubDevice
 
Loading...
Searching...
No Matches
PDO Configuration

Overview

The process data transferred by an EtherCAT subdevice during each cycle (Process Data Objects, PDOs) are user data which the application expects to be updated cyclically or which are sent to the subdevice. To this end the EtherCAT MainDevice (Beckhoff TwinCAT) parameterizes each EtherCAT subdevice 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 subdevice. Incorrect configuration can prevent successful start-up of the subdevice.

Functions

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.
 
uint32_t EC_API_SLV_PDO_get (EC_API_SLV_SHandle_t *pHandle, uint16_t index, EC_API_SLV_Pdo_t **pOutPdo)
 Search for PDO and fetch it.
 
uint32_t EC_API_SLV_PDO_getOffset (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, uint16_t *pOffset)
 This function return the offset of the PDO in the process image in bytes.
 
uint32_t EC_API_SLV_PDO_getLength (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, uint16_t *pLength)
 This function returns the Byte size of a PDO.
 
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.
 
uint32_t EC_API_SLV_PDO_getEntry (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, uint8_t subIndex, EC_API_SLV_SPdoEntry_t **ppPdoEntry)
 PDO get entry.
 
uint32_t EC_API_SLV_PDO_setData (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, uint32_t length, uint8_t *pData)
 Write PDO content into Process Image. All PDO entries are written in a data chunk.
 
uint32_t EC_API_SLV_PDO_getData (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, uint32_t length, uint8_t *pData)
 Read PDO content from Process Image, all entries are read in a data chunk.
 
uint32_t EC_API_SLV_PDO_setEntryData (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, uint8_t subIndex, uint32_t length, uint8_t *pData)
 Write data to an individual PDO Entry Variable.
 
uint32_t EC_API_SLV_PDO_getEntryData (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, uint8_t subIndex, uint32_t length, uint8_t *pData)
 Read data from an individual PDO Entry Variable.
 
uint32_t EC_API_SLV_PDO_setFixed (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, bool fixed)
 This is the function to set a PDO as fixed or not. Download of PDO Configuration during start up.
 
uint32_t EC_API_SLV_PDO_setAssignment (EC_API_SLV_SHandle_t *pHandle, bool assignment)
 Enable or disable PDO assignments of the SyncManagers. Download of PDO assignment (e.g. 0x1C12, 0x1C13, etc) during start up.
 
uint32_t EC_API_SLV_PDO_addPadding (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, uint8_t length)
 Add padding to the PDO Mapping.
 
uint32_t EC_API_SLV_getInputProcDataLength (EC_API_SLV_SHandle_t *pHandle, uint32_t *pLength)
 Read the input process data length.
 
uint32_t EC_API_SLV_getOutputProcDataLength (EC_API_SLV_SHandle_t *pHandle, uint32_t *pLength)
 Read the output process data length.
 
uint32_t EC_API_SLV_PDO_getEntryCount (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, uint8_t *pCount)
 Read PDO entry count.
 
uint32_t EC_API_SLV_PDO_getEntryDataLength (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, uint8_t subIndex, uint32_t *pLength)
 Read PDO entry data length.
 
uint32_t EC_API_SLV_setInputData (EC_API_SLV_SHandle_t *pHandle, uint32_t length, uint8_t *pInputData)
 Write input process data to the EtherCAT Master.
 
uint32_t EC_API_SLV_getOutputData (EC_API_SLV_SHandle_t *pHandle, uint32_t length, uint8_t *pOutputData)
 Read output process from the EtherCAT Master.
 
uint32_t EC_API_SLV_PDO_enable (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo)
 Enable PDO assignment to syncManager.
 
uint32_t EC_API_SLV_PDO_enabled (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, bool *pEnabled)
 PDO assignment to syncManager.
 
uint32_t EC_API_SLV_PDO_disable (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo)
 Disable PDO assignment to syncManager.
 
uint32_t EC_API_SLV_PDO_registerAssignmentChanges (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_PDO_CBAssignmentChanges_t cbFunc, void *pContext)
 Report PDO assignment changes.
 
uint32_t EC_API_SLV_PDO_registerMappingChanges (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_PDO_CBMappingChanges_t cbFunc, void *pContext)
 Report PDO mapping changes.
 
uint32_t EC_API_SLV_PDO_getMappingInfo (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, uint8_t *pCount, EC_API_SLV_PDO_SEntryMap_t *pPdoMapArray)
 Read PDO mapping information.
 
uint32_t EC_API_SLV_PDO_getAssignmentInfo (EC_API_SLV_SHandle_t *pHandle, bool rx, uint8_t *pCount, uint16_t *pPdoIndexArray)
 Read Assigned PDOs to SyncManager.
 
uint32_t EC_API_SLV_PDO_setMaxSubIndex (EC_API_SLV_SHandle_t *pHandle, EC_API_SLV_Pdo_t *pPdo, uint8_t pMaxSubIndex)
 Set Maximum permitted subIndexes for a PDO.
 
uint32_t EC_API_SLV_PDO_setSyncManMaxSubIndex (EC_API_SLV_SHandle_t *pHandle, uint8_t syncMan, uint8_t maxSubIndex)
 Set Maximum permitted subIndexes for a PDO.