IF_Async - General Information

Overview

Type:

Interface

Available as of:

V1.0.0.0

Versions:

Current version

Task

The interface IF_Async is used to pass the function to be outsourced to the additional task and report its execution.

This interface must be implemented in your customized function block. The method Job and the Get and Set accessors of property xDone are created implicitly for this function block.

The implementation parts of the method Job and the Get and Set accessors of the property xDone must be completed inside by you.

Methods

Name

Description

Job

Method to be executed in asynchronous task.

Properties

Name

Data type

Accessing

Description

xDone

BOOL

Read

Signals whether IF_Async.Job() has been executed successfully.

Accessor Method Set

The accessor method Set of the property xDone is called by the AsyncManager and is used to report the execution of the method Job.

It is set to FALSE, when passing your function block by calling the method Start.

It is set to TRUE after the method Job was executed once in the additional task.

The implementation part of the accessor method must be completed by yourself. It must implement at least an assignment to a local variable so that the set value from the last call is stored for later processing.

Implementation example:

THIS^.xDoneLocal := xDone;

The variable xDoneLocal is defined in the declaration part of your function block and is set to TRUE when the execution of the method Job is done.

Accessor Method Get

The accessor method Get of the property xDone is reserved for the use in your application. There is no call of this method in the AsyncManager.

The implementation part of the accessor method must be completed by yourself. For consistency in your application, the accessor method has to return the value which was previously set by the AsyncManager.

Implementation example:

xDone := THIS^.xDoneLocal;

This example complies to the example presented for accessor method Set. The variable xDoneLocal is defined in the declaration part of your function block and is set to TRUE when the execution of the method Job is done.