Beckhoff Automation GmbH & Co. KG — 5.2.1 Building an EtherCAT topology

Configuration Should you have trouble using the bstrBefore parameter, please try to insert the terminal on a "de- vice-level". See the following example. ITcSmTreeItem device= systemManager.LookupTreeItem("TIID^Device 1 (EtherCAT)"); device.CreateChild("Term 4 (EL2004)", 9099, "Term 3 (EL2004)", "EL2004-0000-0017"); The new terminal will then be inserted before "Term 3 (EL2004)" under the last inserted EtherCAT box. In addition to the full product revision, you can also use a "wildcard". If you only specify "EL2004" as vInfo, Automation Interface will automatically detect and use the newest revision number. See the following example.

ITcSmTreeItem ek1100 = systemManager.LookupTreeItem("TIID^Device 1 (EtherCAT)^EK1100"); ek1100.CreateChild("Term 4 (EL2004)", 9099, "Term 3 (EL2004)", "EL2004"); Exceptions to the ItemSubType 9099 There are a few exceptions to the ItemSubType 9099, e.g. the RS232 terminals EP6002 (ItemSubType 9101) and EL600X (ItemSubType 9101). The following table gives an overview about all exceptions and their corresponding ItemSubType. Changing the "Previous Port" of an EtherCAT terminal The Previous Port of an EtherCAT terminal determines the position of the terminal inside the EtherCAT topology. In TwinCAT XAE, the DropDown box automatically includes all available previous ports.

To configure this setting via Automation Interface, you can make use of the ITcSmTreeItem [ } 37] :: ProduceXml() [ } 60] and ITcSmTreeItem [ } 37] :: ConsumeXml() [ } 61] methods to modify the XML description [ } 20] of the corresponding EtherCAT terminal. This XML description therefore includes one or more XML nodes , where its attribute "Selected=1" determines, which previous port has been currently selected. Each previous port device is identified by its physical address. Example (XML description) ... ... ... B 1045 B 1023 ... ... ... Automation Interface 25 Version:

1.2 I/O ItemSubType Description EP6002 9101 RS232 / RS422 / RS485 interface terminal EL6001 9101 RS232 interface terminal EL6002 9101 RS232 interface terminal (2-Channel) EL6021 9103 RS422 / RS485 interface terminal EL6022 9103 RS422 / RS485 interface terminal (2-Channel)