Beckhoff Automation GmbH & Co. KG — 8.13 How to scan devices and boxes

How to Sample (vbscript): Set tsm = CreateObject("TCatSysManager.TcSysManager") Call tsm.OpenConfiguration("c:\test.wsm") Set Item = tsm.LookupTreeItem("TINC^NC-Task 1SAF^Axes^Axis 1") Call Item.ConcumeXml(" TIID^Device1 (FC750x)^Box 1 (SercosAxis ) ") See Also How to... section [ } 69] , ITcSysManager [ } 30] , LookupTreeItem [ } 35] , ITcSmTreeItem [ } 37] , ConsumeXml [ } 61] Built on Tuesday, Mai 01, 2001 8.12 How to exchange a fieldbus device and move all childs to the new one Requirements To exchange a fieldbus device and move all childs to the new one, an instance of the TwinCAT System Manager must be created and a configuration has to be opened.

The LookupTreeItem [ } 35] method of the ITcSysManager [ } 30] interface returns a ITcSmTreeItem [ } 37] interface pointer implemented by the old fieldbus device. This interface contains a ExportChild [ } 64] and a ImportChild [ } 64] method of the tree item. Procedure The ProgId " TCatSysManager.TcSysManager " can be used to create an instance of the System Manager that implements the ITcSysManager [ } 30] interface. Sample (vbscript):

set tsm = CreateObject("TCatSysManager.TcSysManager") call tsm.OpenConfiguration("c:\exchange.wsm") set item = tsm.LookupTreeItem("TIID") set itemNew = item.CreateChild("Device 2 (FC310x)",38) set itemOld = tsm.LookupTreeItem("TIID^Device 1(CP5412)") for i = 1 to itemOld.ChildCount call itemOld.ExportChild(itemOld.Child(i).Name) call itemNew.ImportChild() next set itemOld = nothing call item.DeleteChild("Device 1 (CP5412)") call tsm.SaveConfiguration("c:\exchange2.wsm") See Also How to...

section [ } 69] , ITcSysManager [ } 30] , LookupTreeItem [ } 35] , ITcSmTreeItem [ } 37] , ExportChild [ } 64] , ImportChild [ } 64] Built on Tuesday, Mai 01, 2001 8.13 How to scan devices and boxes Requirements When creating a new configuration, it is often necessary to align the TwinCAT XAE configuration to the actually available hardware. One option to fulfill this is to start a new TwinCAT XAE configuration from scratch and process the following steps: Creation of a new TwinCAT XAE configuration Setting the address of the target system Scan of the available devices Automation Interface 77 Version: 1.2