Change PDO Mappings for a Third Party EtherCAT XML File

Updated Apr 5, 2023



  • LabVIEW


  • NI-Industrial Communications for EtherCAT

In LabVIEW, you can control third-party EtherCAT slaves from a Real-Time host. Any Real-Time target with multiple Ethernet adapters can typically be used as an EtherCAT master capable of communicating with EtherCAT slaves. For a complete list of supported EtherCAT masters from NI (as of EtherCAT driver 20.0), please refer to the NI-Industrial Communications for EtherCAT® Readme. Usually when you use an EtherCAT slaves you have to map a new PDO (Process Data Object) configurations. PDO mapping defines which application objects are transmitted within a PDO. In order to do that you have to modify the .xml file. In the following document you will learn how to modify the .xml file for changing PDO mapping. In order to understand this guide you have to know what is a PDO and how to manage EtherCAT slave in LabVIEW.

Note that changing PDO mappings requires editing EtherCAT slave-manufacturer-defined XMLs. As such, performing this manually is not officially supported and should be performed by the slave manufacturer instead.

To change PDO mappings for third party EtherCAT you can follow the steps below:

  1. You need to figure out exactly what revision of device you are using. This can be found in the LabVIEW Project Explorer by right-clicking on the EtherCAT slave>>Properties. From there you should be able to see the revision as show in Figure 1

Figure 1 - LabVIEW Revision Information
  1. Obtain the .xml configuration files from the third party manufacturer. 
  2. Open the .xml file in an .xml editor, such as XML Notepad.
  3. Locate the appropriate device within the .xml. There can be multiple device revisions in the same file. You need to assure that you are going to modify the correct device (Figure 2). This information must match the information found in step 1.

Figure 2 - XML Revision Number
  1. Determine which PDO mapping you would like to activate and which is active. To do so look at the PDO mappings under the appropriate device .xml and look for the SM tag (Sync Managers tag), which indicates which mapping is active, and the PDO tag you want to activate. (Figure 3)

Figure 3 - Active PDO
  1. Drag the SM tag to the mapping you want to activate. Only one PDO transmit section should have the SM tag. (Figure 4)

Figure 4 - New active PDO
  1. Save the changes and delete the old .xml file from C:\Program Files (x86)\National Instruments\Shared\IndComECAT\DD
  2. Re-import the new .xml file into the LabVIEW project. You should see the new PDO mapping now.
    Note: Do not modify anything else but the SM tag.
  3. If you followed correctly this document you'll able to see your PDO as shown in the Figure 5:

Figure 5 - LabVIEW 3rd party Slave Example PDO
Pay attention that there are a total of four Sync Managers in the .xml file. Two Sync Managers are responsible for coordinated SDO communication (Service data objects) and do not need to be modified to change the PDO mapping. The active Transmit (TX) and Receiving (RX) PDOs are controlled by two Sync Managers.
The two sync managers controlling PDO communication must be changed in the .xml file to point to the correct PDO mapping. This is accomplished by moving the SM tag in the .xml file to the appropriate PDO mapping.