beckhoff TE1000 TwinCAT 3 — 6.6.12 Configuring the PROFIBUS system

Samples | I/O C:\novram_backup.xml "@) # Import NOVRAM content from file $device.ConsumeXml(@" C:\novram_backup.xml "@) Available starting with TwinCAT Build 4018.10. The device must be accessible while it is running. The path in / is a file system path on the computer where TwinCAT Engineering is running and the Automation Interface code is being executed. 6.6.12 Configuring the PROFIBUS system | Configuring the PROFIBUS system PROFIBUS masters and slaves are created under the I/O node using CreateChild . The SubType identifies the specific device. SubTypes 86 and 97 apply to the EtherCAT-based PROFIBUS cards EL6731 and EL6731-0010, respectively.

After the device has been created, the desired hardware resource is selected using ClaimResources . ClaimResources assigns the physical adapter on which the fieldbus operates to the device. Requirements A TwinCAT solution is open, and a DTE connection is active. ITcSysManager was initialized as a COM object in an STA thread. EL6731 (as the master) and EL6731-0010 (as the slave) are available in the ESI library. C# sample The master and slave are created under the I/O node TIID with CreateChild . ResourcesCount then returns the number of hardware resources found. The ClaimResources statement assigns a specific resource to the device.

ITcSmTreeItem devices = sysManager.LookupTreeItem("TIID"); // Create Profibus master (SubType 86 = EL6731) ITcSmTreeItem profiMaster = devices.CreateChild("Profibus Master (EL6731)", 86, "", null); // Check available resources and claim hardware resource Console.WriteLine("Available masters: " + profiMaster.ResourcesCount); profiMaster.ClaimResources(1); // Index 1 = first available resource // Create Profibus slave (SubType 97 = EL6731-0010) ITcSmTreeItem profiSlave = devices.CreateChild("Profibus Slave (EL6731-0010)", 97, "", null); Console.WriteLine("Available slaves:

" + profiSlave.ResourcesCount); profiSlave.ClaimResources(1); PowerShell sample $devices = $sysManager.LookupTreeItem("TIID") # Create Profibus master (SubType 86 = EL6731) $profiMaster = $devices.CreateChild("Profibus Master (EL6731)", 86, "") Write-Host "Available masters: $($profiMaster.ResourcesCount)" $profiMaster.ClaimResources(1) # Index 1 = first available resource # Create Profibus slave (SubType 97 = EL6731-0010) $profiSlave = $devices.CreateChild("Profibus Slave (EL6731-0010)", 97, "") TE1000 262 Version: 1.7.0