beckhoff TE1000 TwinCAT 3 — 6.6.13 Configuring the CANopen system

Samples | I/O Write-Host "Available slaves: $($profiSlave.ResourcesCount)" $profiSlave.ClaimResources(1) The index of ClaimResources starts at 1. Different SubType values apply to other PROFIBUS cards, such as the FC310x series. These are listed in the Automation Interface documentation under “Device SubTypes”. Changing the fieldbus address The fieldbus address of a PROFIBUS box is its station number on the bus. It is modified by calling ConsumeXml with the desired number as the value. C#: ITcSmTreeItem item = sysMan.LookupTreeItem("TIID^Device 1 (FC310x)^Box 1 (BK3100)"); item.ConsumeXml("44"); PowerShell:

$item = $sysMan.LookupTreeItem("TIID^Device 1 (FC310x)^Box 1 (BK3100)") $item.ConsumeXml("44") 6.6.13 Configuring the CANopen system | Configuring the CANopen system CANopen masters and slaves are created under the I/O node via CreateChild . The SubType determines the device type. The EtherCAT-based EL6751 and EL6751-0010 cards use SubTypes 87 and 98, respectively. After creation, the corresponding hardware resource is assigned using ClaimResources . If the network configuration is available as a DBC file, TwinCAT can automatically create the slaves defined in it. Requirements A TwinCAT solution is open, and a DTE connection is active.

ITcSysManager was initialized as a COM object in an STA thread. The EL6751 is available as a master, and the EL6751-0010 is available as a slave. for DBC file import: TwinCAT 3.1, Build 4018 or later. C# sample The master and slave are created under the I/O node TIID with CreateChild . Immediately after creation, ClaimResources assigns the first available hardware resource to the device.

ITcSmTreeItem devices = sysManager.LookupTreeItem("TIID"); // CANOpen master (SubType 87 = EL6751) ITcSmTreeItem canMaster = devices.CreateChild("Device 2 (EL6751)", 87, "", null); canMaster.ClaimResources(1); // CANOpen slave (SubType 98 = EL6751-0010) ITcSmTreeItem canSlave = devices.CreateChild("Device 3 (EL6751-0010)", 98, "", null); canSlave.ClaimResources(1); PowerShell sample $devices = $sysManager.LookupTreeItem("TIID") $canMaster = $devices.CreateChild("Device 2 (EL6751)", 87, "") $canMaster.ClaimResources(1) $canSlave = $devices.CreateChild("Device 3 (EL6751-0010)", 98, "") $canSlave.ClaimResources(1) TE1000 263 Version: 1.7.0