Configuring PDO assignments

The process data object assignment (PDO assignment) of an EtherCAT slave determines which PDOs are transmitted via the Sync Manager channels. The configuration is set on the slave node using ConsumeXml. All PDOs must be passed in full in XML, including those that have not been modified, since missing entries are interpreted as being disabled.

Requirements

C# sample

ITcSmTreeItem ecSlave = sysManager.LookupTreeItem(@"TIID^EtherCAT Master^EL6695-0002");
ecSlave.ConsumeXml(pdoXml);

PowerShell sample

$ecSlave = $sysManager.LookupTreeItem("TIID^EtherCAT Master^EL6695-0002")
$ecSlave.ConsumeXml($pdoXml)

XML structure derived from the source

<TreeItem>
  <EtherCAT>
    <Slave>
      <ProcessData>
        <!-- Sm2: Outputs (RxPDO) -->
        <Sm2>
          <Type>Outputs</Type>
          <StartAddress>7168</StartAddress>
          <ControlByte>100</ControlByte>
          <Enable>0</Enable>
          <Pdo>5640</Pdo>
        </Sm2>
        <!-- Sm3: Inputs (TxPDO) -->
        <Sm3>
          <Type>Inputs</Type>
          <DefaultSize>2</DefaultSize>
          <StartAddress>36352</StartAddress>
          <ControlByte>32</ControlByte>
          <Enable>1</Enable>
          <Pdo>6657</Pdo>
          <Pdo>6664</Pdo>
        </Sm3>
        <!-- TxPdo #x1a01: excludes #x1a02 and #x1a03 -->
        <TxPdo Fixed="true" Sm="3">
          <Index>#x1a01</Index>
          <Name>SYNC Inputs</Name>
          <Exclude>#x1a02</Exclude>
          <Exclude>#x1a03</Exclude>
          <!-- <Entry> blocks shortened — read from ProduceXml -->
        </TxPdo>
        <!-- TxPdo #x1a02: excludes #x1a01 and #x1a03 -->
        <TxPdo Fixed="true">
          <Index>#x1a02</Index>
          <Name>SYNC Inputs</Name>
          <Exclude>#x1a01</Exclude>
          <Exclude>#x1a03</Exclude>
          <!-- <Entry> blocks shortened -->
        </TxPdo>
        <!-- TxPdo #x1a03: excludes #x1a01 and #x1a02 -->
        <TxPdo Fixed="true">
          <Index>#x1a03</Index>
          <Name>SYNC Inputs</Name>
          <Exclude>#x1a01</Exclude>
          <Exclude>#x1a02</Exclude>
          <!-- <Entry> blocks shortened -->
        </TxPdo>
      </ProcessData>
    </Slave>
  </EtherCAT>
</TreeItem>