PDO Mapping

Process Data Object (PDO) is a type of data object used to exchange data between the E-CAT MainDevice and its SubDevice (drives or IOs) during each EtherCAT communication cycle. Through PDO mapping, the MainDevice can place the required input and output data into the PDOs according to its control requirements for the SubDevices.

Users can configure PDO mapping for SubDevices using wRTOS E-CAT ESI Import Tool or through programmatic configuration.

  • wRTOS E-CAT ESI Import Tool: This tool allows users to import ESI (EtherCAT SubDevice Information) files for their hardware or modify ESI data and save it to the ESI database. It offers four data configuration modes that automatically generate the necessary commands for process data exchange. For more details, please refer to Process Data.
    • Default mode: Uses the default PDO combinations specified in the device's ESI file for process data exchange.
    • Manual mode: Allows users to manually select PDOs and corresponding variables for process data exchange.
    • Access Mode: Enables selection of different PDO combinations based on Access Modes.
    • E-CAT API mode: Uses E-CAT API calls to automatically select variables for process data exchange.
  • Programmatic Configuration: This method is intended for advanced users or specific use cases. If you know the required SDO commands, you can manually configure PDO mapping programmatically. The following section provides step-by-step guidance on how to programmatically create a PDO mapping.

Programmatically Creating a PDO Mapping

You can use RtecatOverrideSubDevicePdoConfiguration to programmatically set the PDO configuration of a SubDevice. This function allows you to override a SubDevice's input and output PDO lengths with custom values.

Note: This function must only be used when the MainDevice is in the Init or PreOP state.

To configure PDO mapping programmatically:

  1. Start wRTOS E-CAT ESI Import Tool, choose a target device, and select the Process Data tab in the right-side pane. Disable (clear selection of) the PDO configuration and PDO assignment options, regardless of the selected mode (Default, Manual, Access Mode or E-CAT API). This prevents the E-CAT MainDevice from attempting to create a PDO mapping.
  2. In your application, call RtecatRequestState and set the MainDevice state to ecatPreOP.
  3. Use mailbox commands to scan and configure the PDO configuration as needed.
  4. Use RtecatOverrideSubDevicePdoConfiguration to update the input and output length of the SubDevice.
  5. Call RtecatRequestState and set the state to ecatOP.