beckhoff TE1000 TwinCAT 3 — 5.31.2.1 ITcModuleManager2::LookupModule

API | ITcModuleManager Signature HRESULT SetOnlineModuleParaDWORD(ULONG oid, ULONG pid, ULONG data); Parameter Return value Error codes ADS error code: ADS write access to the target system failed. 5.31.2 ITcModuleManager2 | ITcModuleManager2 Inherits from: ITcModuleManager Expanded by: ITcModuleManager3 ITcModuleManager2 adds the type-based search for module instances. The search compares the ModuleTypeName of each module instance (case-insensitive) with the type name being searched for. Methods 5.31.2.1 ITcModuleManager2::LookupModule | ITcModuleManager2::LookupModule Calls TryLookupModule and returns S_OK if there is at least one match.

If no module is found, the method returns E_INVALIDARG and sets an ErrorInfo with a message stating that the module type was not found. Signature HRESULT LookupModule(BSTR bstrModuleType, ITcEnumModuleInstances** pipModules); Parameter Return value TE1000 133 Version: 1.7.0 Name Type Description oid ULONG [in] ADS IndexGroup or object ID of the target module. pid ULONG [in] ADS index offset or parameter ID. data ULONG [in] Value to be written. Name Type Description (HRESULT) HRESULT S OK if successful, otherwise an error code. _ Method Description LookupModule Returns all instances of a module type or an error if none are found.

TryLookupModule Returns all instances of a module type and reports “not found” via pbFound. Name Type Description bstrModuleType BSTR [in] Sought-after module type name. Name Type Description pipModules ITcEnumModuleInstances [} 151]** [out, retval] Enumerator of the found module instances. (HRESULT) HRESULT S OK if successful, otherwise an error code. _