PDO Assignments konfigurieren

Das Process Data Object Assignment, kurz PDO Assignment, eines EtherCAT-Slaves legt fest, welche PDOs über die Sync-Manager-Kanäle übertragen werden. Die Konfiguration wird per ConsumeXml auf dem Slave-Knoten gesetzt. Dabei müssen alle PDOs vollständig im XML übergeben werden, einschließlich der unveränderten, da fehlende Einträge als deaktiviert interpretiert werden.

Voraussetzungen

C# Beispiel

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

PowerShell Beispiel

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

XML-Struktur aus Quelle belegt

<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>