Loading PDO information from the EtherCAT device

Some EtherCAT slaves have a dynamic CoE interface whose PDO configuration is not statically defined in the ESI file. In this case, the PDO information can be retrieved directly from the connected device. In addition, the complete CoE object directory – the online dictionary – can be loaded via an SDO upload. This is useful for determining a device's actual object indexes and types.

Requirements

C# sample

ITcSmTreeItem ecSlave = sysManager.LookupTreeItem(@"TIID^EtherCAT Master^EK1100^Term 3 (EL5101)");

// Load PDO information from device
// (corresponds to "Load PDO Info from Device" in TwinCAT XAE)
ecSlave.ConsumeXml(
    @"<TreeItem><EtherCAT><Slave><Mailbox><CoE>
        <LoadPdoInfoFromDevice>1</LoadPdoInfoFromDevice>
    </CoE></Mailbox></Slave></EtherCAT></TreeItem>");

// Load online dictionary from device
// (corresponds to CoE dictionary upload via SDO)
ecSlave.ConsumeXml(
    @"<TreeItem><EtherCAT><Slave><Mailbox><CoE>
        <LoadOnlineDictionary>1</LoadOnlineDictionary>
    </CoE></Mailbox></Slave></EtherCAT></TreeItem>");

PowerShell sample

$ecSlave = $sysManager.LookupTreeItem("TIID^EtherCAT Master^EK1100^Term 3 (EL5101)")

# Load PDO information from device
$ecSlave.ConsumeXml("<TreeItem><EtherCAT><Slave><Mailbox><CoE><LoadPdoInfoFromDevice>1</LoadPdoInfoFromDevice></CoE></Mailbox></Slave></EtherCAT></TreeItem>")

# Load online dictionary from device
$ecSlave.ConsumeXml("<TreeItem><EtherCAT><Slave><Mailbox><CoE><LoadOnlineDictionary>1</LoadOnlineDictionary></CoE></Mailbox></Slave></EtherCAT></TreeItem>")
Loading PDO information from the EtherCAT device 1:

LoadPdoInfoFromDevice loads the slave's PDO configuration directly via EtherCAT. This is useful if the device is not listed in the ESI database or has configurable PDOs. LoadOnlineDictionary loads the complete CoE object directory via SDO upload. Both operations require an active EtherCAT connection to the slave.