ITcSysManager

ITcSysManager is the main interface of the TwinCAT Automation Interface. This interface allows basic operations to configure TwinCAT 3 XAE and consists of several methods for doing so. Over the years, the ITcSysManager interface has been extended with more functionalities to give customers a better way to access all Automation Interface features. However, due to restrictions in the COM object model, these features needed to be added as separate interfaces to the Automation Interface. Therefore, each time a new set of features was added, these features were assembled in a new interface which was named ITcSysManagerX, where X is a number which is incremented each time a new interface was added. The following tables explain which methods are part of the ITcSysManager interface and which have been added to each new "feature-set" interface.

Methods

ITcSysManager methods

Description

Available since

NewConfiguration

Generates a new configuration

TwinCAT 2.11

OpenConfiguration

Loads a prior created configuration file (WSM file)

TwinCAT 2.11

SaveConfiguration

Saves the configuration in a file with the given name or with the current name

TwinCAT 2.11

ActivateConfiguration

Activates the configuration (same as "Save To Registry")

TwinCAT 2.11

LookupTreeItem

Looks up to a configuration item (item in the tree) by name and returns a ITcSmTreeItem interface

TwinCAT 2.11

StartRestartTwinCAT

Starts or Restarts the TwinCAT System

TwinCAT 2.11

IsTwinCATStarted

Evaluates if the TwinCAT System is running

TwinCAT 2.11

LinkVariables

Links two variables given by names

TwinCAT 2.11

UnlinkVariables

Clears the link between two variables given by names or all links from one variable.

TwinCAT 2.11

ITcSysManager2 methods

Description

Available since

SetTargetNetId

Set the target NetId of the currently opened TwinCAT configuration.

TwinCAT 2.11

GetTargetNetId

Gets the target NetId of the currently opened TwinCAT configuration.

TwinCAT 2.11

GetLastErrorMessages

Get the last error messages which occurred in the TwinCAT subsystem.

TwinCAT 2.11

ITcSysManager3 methods

Description

Available since

LookupTreeItemById

Looks for a configuration tree item with the specifed Item id.

TwinCAT 2.11

ProduceMappingInfo

Produces a Xml-Description of the actual configuration mappings.

TwinCAT 3.1

ClearMappingInfo

Clears the mapping info.

TwinCAT 2.11

Comments

The ITcSysManager interface contains two methods used for navigating within TwinCAT XAE: ITcSysManager::LookupTreeItem and ITcSysManager3::LookupTreeItemById. A detailed explanation of browsing TwinCAT XAE can be found in the chapter TreeItem Browsing Models.

Note

The three methods ITcSysManager::NewConfiguration, ITcSysManager::OpenConfiguration and ITcsSysManager::SaveConfiguration are only available in Compatiblity Mode. Calling them in standard mode will throw an E_NOTSUPPORTED Exception.

The ITcSysmanager and the ITcSmTreeItem interface allows full access to a TwinCAT configuration. In the How to... section of this documentation there is a long (but incomplete) list of samples how to manipulate a TwinCAT configuration automatically.

Version information

Required TwinCAT version

This interface is supported in TwinCAT 2.11 and above