beckhoff TwinCAT 3 — 12.8.3 Interface ITcCyclic

Programming Reference | Interfaces Return value If successful, S_OK ("0") or another positive value will be returned, cf. Return values [ } 161] . Extended messages refer in particular to the column HRESULT in ADS Return Codes [ } 323] . The method returns E_FAIL if the entry is not in the internal list. Parameter Comparable with the AddPostModule() method, the smart pointer is used for the cyclic caller as a list item if the module instance is to be removed from the cyclic caller. Declaration and use of the Smart Pointer:

ITcPostCyclicCallerInfoPtr m_spPostCyclicCaller; if ( m_spPostCyclicCaller ) { m_spPostCyclicCaller->RemovePostModule(m_spPostCyclicCaller); } m_spPostCyclicCaller = NULL; 12.8.2 Return values | Return values ITc interfaces methods generally return an HRESULT. The following return values can be returned in the case of ITc interfaces: In addition, there is a possibility for ADS Return Codes [ } 323] to be returned as HRESULT. These are also available as macros in the SDK, where they are known, for example, as ADS_E_BUSY for the ADS Error Code ADSERR_DEVICE_BUSY.

12.8.3 Interface ITcCyclic | Interface ITcCyclic The ITcCyclic interface is implemented by TwinCAT modules that are called once per task cycle. Syntax TCOM_DECL_INTERFACE("03000010-0000-0000-e000-000000000064", ITcCyclic) struct__declspec(novtable) ITcCyclic : public ITcUnknown TwinCAT 3 161 Version: 1.19.1 Name Type Description pEntry STcPostCyclicEntry Refers to the list item to be removed from the internal list of the cyclic caller.

Name HRESULT S OK _ 0x0000 0000 S FALSE _ 0x0000 0001 E NOTIMPL _ 0x8000 4001 E NOINTERFACE _ 0x8000 4002 E POINTER _ 0x8000 4003 E ABORT _ 0x8000 4004 E FAIL _ 0x8000 4005 E UNEXPECTED _ 0x8000 FFFF E ACCESSDENIED _ 0x8007 0005 E HANDLE _ 0x8007 0006 E OUTOFMEMORY _ 0x8007 000E E INVALIDARG _ 0x8007 0057