Samples | I/O $references = $systemManager.LookupTreeItem("TIPC^Untitled1^Untitled1 Project^References") $libraries = $references.ScanLibraries() ForEach( $lib in $libraries ) { $lib.Name } Freezing the placeholder version C#: ITcSmTreeItem references = systemManager.LookupTreeItem("TIPC^Untitled1^Untitled1 Project^References "); ITcPlcLibraryManager libManager = (ITcPlcLibraryManager) references; libManager.FreezePlaceholder(); // freeze version of all placeholders libManager.FreezePlaceholder("Placeholder_NC"); // freeze version of a specific placeholder PowerShell:
$references = $systemManager.LookupTreeItem("TIPC^Untitled1^Untitled1 Project^References") $references.FreezePlaceholder() $references.FreezePlaceholder("Placeholder_NC") The version is locked at the Effective Resolution. If the Effective Resolution is set to "*" , the latest version available in the system will be used. Working with repositories The Automation Interface contains methods for managing PLC library repositories. C#:
ITcSmTreeItem references = systemManager.LookupTreeItem("TIPC^Untitled1^Untitled1 Project^References "); ITcPlcLibraryManager libManager = (ITcPlcLibraryManager) references; libManager.InsertRepository("TestRepository", @"C:\Temp", 0); libManager.InstallLibrary("TestRepository", @"C:\SomeFolder\TcTestLibrary.library", false); libManager.UninstallLibrary("TestRepository", "Tc2_MDP", "*", "Beckhoff Automation GmbH"); libManager.RemoveRepository("TestRepository"); PowerShell:
$references = $systemManager.LookupTreeItem("TIPC^Untitled1^Untitled1 Project^References") $references.InsertRepository("TestRepository", "C:\Temp", 0) $references.InstallLibrary("TestRepository", "C:\SomeFolder\TcTestLibrary.library", $false) $references.UninstallLibrary("TestRepository", "Tc2_MDP", "*", "Beckhoff Automation GmbH") $references.RemoveRepository("TestRepository") 6.6 I/O | I/O 6.6.1 Adding EtherCAT devices | Adding EtherCAT devices EtherCAT slaves are created via CreateChild on an EtherCAT master or a higher-level slave node. The SubType and device name from the ESI catalog determine the device type. Requirements An EtherCAT master is present in the I/O configuration.
The device's ESI files are registered in TwinCAT. Creating EtherCAT devices To create an EtherCAT master or slave, call CreateChild on the I/O node TIID . The SubType determines the type. EtherCAT masters use 111 , while EtherCAT slaves use 130 . Configuring network variables [ } 249] via an automation protocol is described in a separate article. C#: TE1000 244 Version: 1.7.0