BackgroundTask (FB)¶
FUNCTION_BLOCK FINAL BackgroundTask EXTENDS FBF.InstanceBase IMPLEMENTS IBackgroundTask, ICmpEventCallback
Encapsulates all the details of managing a iec task in the context of the runtime system.
A running background task can be controlled via the methods of IBackgroundTask.
Note
- Watchdog Sensitivity:
- If the actual cycle time of a task exceeds the currently - udiWatchdogTime, the currently defined- usiWatchdogSensitivityvalue is taken into account:- Sensitivity 0, 1 => exception in cycle 1 
- Sensitivity 2 => exception in cycle 2 
- Sensitivity n => exception in cycle n 
- Single Timeout => Exception if the actual cycle time is longer than - usiWatchdogSensitivityx- udiWatchdogTime.
 
- InOut:
- Scope - Name - Type - Comment - Input Const - tgTaskGroup- anAppName- tnTaskName- usiTaskPrio- USINT- udiTaskInterval- UDINT- Taskinterval in µs - xWatchdogEnabled- BOOL- TRUE=> Watchdog will be enabled- udiWatchdogTime- UDINT- Watchdog Time in µs - usiWatchdogSensitivity- USINT- Defines the behavior of a task watchdog when exceeding the - udiWatchdogTime. (See note above)- Input - xEnable- BOOL- TRUE: Activates the defined operation- FALSE: Aborts/resets the defined operation- itfParams- SHD.ISharedQueue- Parameter Queue feeding the IAsyncActionProvider.AsyncAction - itfAction- Specifies the action executed in the context of this background task - Output - xBusy- BOOL- TRUE: Operation is running- xError- BOOL- TRUE: Error condition reached- eErrorID- If - xErroris- TRUE=> Information about the current error condition- itfResult- SHD.ISharedArea- Current states and results of the background task - dwCurrentCycleTime- DWORD- dwAverageCycleTime- DWORD- dwMaxCycleTime- DWORD- dwMinCycleTime- DWORD- dwCycleCounter- DWORD
Properties:
Methods:
Structure: