beckhoff TE1000 TwinCAT 3 — 6.6.1 Adding EtherCAT devices

Samples | I/O ITcSmTreeItem devices = sysManager.LookupTreeItem("TIID"); // EtherCAT master (SubType 111) ITcSmTreeItem etherCatMaster = devices.CreateChild("EtherCAT Master", 111, null, null); // EtherCAT slave (SubType 130) ITcSmTreeItem etherCatSlave = devices.CreateChild("EtherCAT Slave", 130, null, null); PowerShell: $devices = $systemManager.LookupTreeItem("TIID") $ethercatMaster = $devices.CreateChild("EtherCAT Master", 111, $null, $null) $etherCatSlave = $devices.CreateChild("EtherCAT Slave", 130, $null, $null) Creating EtherCAT Boxes and Terminals with SubType 9099 With a few exceptions, all subordinate devices connected to an EtherCAT master use the common SubType 9099 .

The exact device variant is specified via the vInfo parameter as a product revision, which is stored in the device's ESI file. // Create EK1100 coupler ITcSmTreeItem ek1100 = etherCatMaster.CreateChild("Term 1 (EK1100)", 9099, "", "EK1100-0000-0017"); // Create EL-terminals under coupler ek1100Item.CreateChild("Term 2 (EL2004)", 9099, "", "EL2004-0000-0017"); ek1100Item.CreateChild("Term 3 (EL2004)", 9099, "", "EL2004-0000-0017"); // Create EL-terminal at specific position (after "Term 3") ek1100Item.CreateChild("Term 4 (EL2004)", 9099, "Term 3 (EL2004)", "EL2004-0000-0017"); PowerShell:

$ethercatMaster = $systemManager.LookupTreeItem("TIID^EtherCAT Master") $ethercatMaster.CreateChild("EK1100", 9099, "", "EK1100-0000-0017") In addition to a full product revision, a wildcard can also be used. If only "EK1100" is specified as vInfo , the Automation Interface automatically detects the latest revision number. The bstrBefore parameter contains the name of the previous child element, not the full path. CU1128 multi-port coupler The CU1128 is an EtherCAT switch that consolidates multiple separate EtherCAT segments into a single master connection. After creating the CU1128 node, TwinCAT automatically creates the physical ports as child nodes.

Slaves are created directly on the CU1128 node, not on the generated port nodes. C#: // Create CU1128 multi-port coupler ITcSmTreeItem cu1128 = etherCatMaster.CreateChild("A2P (CU1128)", 9099, "", "CU1128"); // Add slaves directly on the CU1128 node (not on child port items) cu1128.CreateChild("X2 (EK1100)", 9099, "", "EK1100-0000-0001"); cu1128.CreateChild("X3 (EK1100)", 9099, "", "EK1100-0000-0001"); PowerShell:

$cu1128 = $ethercatMaster.CreateChild("CU1128", 9099, $null, "CU1128") $cu1128_devA = $cu1128.get_Child(1) $cu1128_devB = $cu1128.get_Child(2) $ek1100_1 = $cu1128_devA.CreateChild("EK1100-1", 9099, $null, "EK1100") $ek1100_2 = $cu1128_devB.CreateChild("EK1100-2", 9099, $null, "EK1100") Exceptions for ItemSubType 9099 Some terminals require a different SubType. The following table lists exceptions: TE1000 245 Version: 1.7.0 I/O ItemSubType EP6002 9101 EL6001 9101 EL6002 9101 EP6001-0002 9101