Configuration Creating EtherCAT boxes The second step involves creating EtherCAT boxes, for example an EK1100 EtherCAT Coupler. As the article about E-Bus SubTypes [ } 43] explains, every child item (there a few exceptions - see below) of an EtherCAT Master uses a common SubType (9099) and will be identified via the Product Revision, which needs to be used in the vInfo parameter of the ITcSmTreeItem [ } 37] :: CreateChild() [ } 62] method. Code Snippet (C#) ITcSmTreeItem ethercatMaster = systemManager.LookupTreeItem("TIID^EtherCAT Master"); ethercatMaster.CreateChild("EK1100", 9099, "", "EK1100-0000-0017"); In addition to the full product revision, you can also use a "wildcard".
If you only specify "EK1100" as vInfo, Automation Interface will automatically detect and use the newest revision number. Example: ITcSmTreeItem ethercatMaster = systemManager.LookupTreeItem("TIID^EtherCAT Master"); ethercatMaster.CreateChild("EK1100", 9099, "", "EK1100"); Creating EtherCAT terminals and insert into topology The creation of EtherCAT terminals is based on the same concepts as EtherCAT boxes. Every terminal also shares a common SubType and will be identified via the Product Revision, which needs to be used in the vInfo parameter of the ITcSmTreeItem [ } 37] :: CreateChild() [ } 62] method.
The parameter bstrBefore lets you choose the position on which the terminal should be inserted into the configuration. Code Snippet (C#) ITcSmTreeItem ek1100 = systemManager.LookupTreeItem("TIID^Device 1 (EtherCAT)^EK1100"); ek1100.CreateChild("Term 4 (EL2004)", 9099, "Term 3 (EL2004)", "EL2004-0000-0017"); Automation Interface 24 Version: 1.2