Slave PDO mapping

Process Data Object (PDO) is a type of periodic data object that can be used to exchange data between an EtherCAT master (KINGSTAR Runtime) and EtherCAT slaves (drives or IOs) during each EtherCAT communication cycle. The master can monitor and control the slave devices through PDO mapping.

With KINGSTAR, users are able to perform PDO mapping of slaves through KINGSTAR ESI Import Tool or Programmatical Configuration.

In the following content, we will guide you on how to programmatically create a PDO mapping.

Programmatically create PDO mapping

OverrideSlavePdoConfiguration can be used to programmatically set the PDO configuration of a device. It allows users to create the PDO mapping of a slave by changing its input and output PDO length to the new values. Please note that this API should be used in the Init and PreOP states only.

To configure the PDO mapping of a slave:

  1. Start the KINGSTAR ESI Import Tool, select a device and then click the Process Data tab in the right-side pane. Disable (uncheck) the PDO configuration and PDO assignment options, regardless of the selected mode (Default, Manual, Access Mode or KINGSTAR EtherCAT API). This is to prevent KINGSTAR from attempting to create a PDO mapping.
  2. In your application, call RequestState and set the state to ecatPreOP.
  3. Use mailbox commands to scan and configure the PDO configuration as needed.
  4. Use OverrideSlavePdoConfiguration to update the input and output length of the slave.
  5. Call RequestState and set the state to ecatOP.

See also

RT and Win32 — KINGSTAR Fieldbus — Slave control

OverrideSlavePdoConfiguration

.NET API — iApi Interface — Slave control

OverrideSlavePdoConfiguration

.NET API — Api Class — Slave control

OverrideSlavePdoConfiguration (Local)

OverrideSlavePdoConfiguration (Remote)