How to create/change a linkage of a nc axis, encoder or drive to an I/O device, box or terminal

Requirements

To create/change a linkage of a nc axis, encoder or drive to an I/O device, box or terminal in a configuration, an instance of the TwinCAT System Manager has to be created and a configuration has to be opened. 

Procedure

The ProgId "TCatSysManager.TcSysManager" can be used to create an instance of the System Manager that implements the ITcSysManager interface.  

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("<TreeItem><NcAxisDef><IoItem><PathName>TIID^Device1 (FC750x)^Box 1 (SercosAxis)</PathName></IoItem></NcAxisDef></TreeItem>")

See Also

How to... section, ITcSysManager, LookupTreeItem, ITcSmTreeItem, ConsumeXml

Built on Tuesday, Mai 01, 2001