beckhoff TE1000 TwinCAT 3 — 5.41 ITcEnumModuleInstances

API | ITcEnumModuleInstances Methods 5.40.1.1 ITcEtherCATSlave::LookupCoeVariable | ITcEtherCATSlave::LookupCoeVariable Searches for the CoE variable with the specified CANopen index and subindex and creates it if necessary. inOut selects the direction (input/output). Returns the result as an ITcSmTreeItem. Signature HRESULT LookupCoeVariable( [in] long inOut, [in] USHORT index, [in] BYTE subIndex, [out, retval] ITcSmTreeItem** pipItem); Parameter Return value Error codes E_POINTER : pipItem is NULL . TSM_E_ITEMDELETED : The corresponding Tree Item has already been deleted.

5.41 ITcEnumModuleInstances | ITcEnumModuleInstances ITcEnumModuleInstances is the typed COM enumerator for ITcModuleInstance2 [ } 140] objects. It is generated as a snapshot of all TCom objects whose module type name matches the type name being searched for, regardless of case. Chain of inheritance ITcEnumModuleInstances Interface versions TE1000 151 Version: 1.7.0 Method Description LookupCoeVariable Retrieves or creates the CoE variable with the specified index/subindex. Name Type Description inOut long [in] Direction: input (1) or output (0) in the CoE process image. index USHORT [in] CANopen object index. subIndex BYTE [in] Subindex within the CoE object.

Name Type Description pipItem ITcSmTreeItem** [out, retval] Tree Item of the CoE variable; NULL and S FALSE if no variable exists. _ (HRESULT) HRESULT S OK if successful, return, S FALSE if no variable was _ _ found, otherwise an error code. Version Newly introduced Index ITcEnumModuleInst ances Typed enumerator over module instances: Next, Skip, Reset, and Clone. ITcEnumModuleInstances