beckhoff TE1000 TwinCAT 3 — 6.6.15 Configuring the PROFINET system

Samples | I/O 6.6.15 Configuring the PROFINET system | Configuring the PROFINET system PROFINET devices are created under the I/O node using CreateChild . The path to the device's GSDML file is passed as the vInfo parameter. The GSDML file describes the modules available on a device. Modules are created later under the API node of the PROFINET box, with the SubType determining their position in the GSDML module list. Requirements A TwinCAT solution is open, and a DTE connection is active. ITcSysManager was initialized as a COM object in an STA thread. A PROFINET controller is included in the solution. A GSDML file for the PROFINET device is available.

SubType overview for PROFINET controllers and devices To create PROFINET I/O devices – that is, controllers and devices – you can use the CreateChild() method. The SubType specifies the actual device type. SubType overview for PROFINET boxes Beckhoff's own PROFINET fieldbus couplers require the following SubTypes: C# sample First, the PROFINET controller is created under the I/O node TIID . Below that is the PROFINET box, whose GSDML path – with the DAP ModId suffix #0x3 – is passed as vInfo . The box's API node is created automatically and accessed via LookupChild("API") . The modules are listed below it along with their slot numbers.

ITcSmTreeItem io = sysManager.LookupTreeItem("TIID"); // Create ProfiNET controller (SubType 113) ITcSmTreeItem profinetCtrl = io.CreateChild("Profinet Controller", 113, null, null); // Create ProfiNET box: vInfo = path to GSDML file with DAP-ModId suffix (#0x3) // Note: Since TC 4026 the default TwinCAT installation path has changed. // Verify the GSDML path on the target system before use. ITcSmTreeItem profinetEL6631 = profinetCtrl.CreateChild("EL6631", 9130, null, @"C:\TwinCAT\3.1\Config\Io\Profinet\GSDML-V2.31-beckhoff-EL6631-20140508.xml#0x3"); // Look up API node (created automatically) ITcSmTreeItem api = profinetEL6631.LookupChild("API"); // Remove existing modules (optional:

reset configuration) foreach (ITcSmTreeItem module in api) api.DeleteChild(module.Name); TE1000 266 Version: 1.7.0 Name SubType PROFINET controller (RT) 113 PROFINET controller CCAT (RT) 140 PROFINET controller EL6631 (RT, EtherCAT) 119 PROFINET controller EL6632 (RT + IRT, EtherCAT) 126 PROFINET device (RT) 115 PROFINET device CCAT (RT) 142 PROFINET device CCAT (RT + IRT) 143 PROFINET device EL6631 (RT, EtherCAT) 118 Device SubType BK9102 9125 BK9300 9128 BK6631 / EL6631 9130