Method ITcCyclic: CycleUpdate
The CycleUpdate method is normally called by a TwinCAT task after the interface has been logged in.
Syntax
HRESULT TCOMAPI CycleUpdate(ITcTask* ipTask, ITcUnknown* ipCaller, ULONG_PTR context)
Return value
If successful, S_OK ("0") or another positive value will be returned, cf. Return values. Extended messages refer in particular to the column HRESULT in ADS Return Codes.
At present, the return value is ignored by the TwinCAT tasks.
Parameter
Name | Type | Description |
|---|---|---|
ipTask | ITcTask | Refers to the current task context. |
ipCaller | ITcUnknown | Refers to the calling instance. |
Context | ULONG_PTR | Context contains the value that was passed to the ITcCyclicCaller::AddModule() method. |
Description
In a task cycle, the CycleUpdate() method is called after InputUpdate() has been called for all registered module instances. As a result, this method must be used to implement cyclic processing.