beckhoff TE1000 TwinCAT 3 — 5.1.1.3 ITcSysManager::LookupTreeItem

API | ITcSysManager Return value See also StartRestartTwinCAT 5.1.1.2 ITcSysManager::LinkVariables | ITcSysManager::LinkVariables The LinkVariables() method links two variables specified by their path names. The syntax of the path names must match the syntax described in LookupTreeItem. The method checks whether both items exist, are of the Variable type, and have compatible data types/sizes, and then sets the Mapping Modified flag. Signature HRESULT LinkVariables(BSTR bstrV1, BSTR bstrV2, long offs1, long offs2, long size); Parameter Return value Error codes TSM_E_ITEMNOTFOUND : One of the path names could not be resolved. TSM_E_INVALIDITEMTYPE : A referenced item is not a variable.

TSM_E_MISMATCHINGITEMS : The variables are not compatible with each other (type/size). E_ACCESSDENIED : System Manager is disabled. See also LookupTreeItem: path name syntax UnlinkVariables: Remove an existing link 5.1.1.3 ITcSysManager::LookupTreeItem | ITcSysManager::LookupTreeItem Searches the project tree for an element based on its path name (e.g. TIID^Device 1^Box 1 ) and returns the matching Tree Item. Supports searching within nested projects. If errors occur, a detailed IErrorInfo entry is created. TE1000 38 Version: 1.7.0 Name Type Description pStarted VARIANT BOOL* _ [out, retval] VARIANT TRUE, if the TwinCAT system is _ running.

(HRESULT) HRESULT S OK if successful, otherwise an error code. _ Name Type Description bstrV1 BSTR [in] Path name of the first variable. The full path name is required; each branch must be separated by a caret (^) or tab. bstrV2 BSTR [in] Path name of the second variable. The syntax is the same as for bstrV1. offs1 long [in, defaultvalue(0)] Bit offset of the first variable (used when the variables are of different sizes or only part of them is to be linked). offs2 long [in, defaultvalue(0)] Bit offset of the second variable. size long [in, defaultvalue(0)] Number of bits to be linked. If set to 0, the smaller of the two variable sizes is used.

Name Type Description (HRESULT) HRESULT S OK if successful, otherwise an error code. _