FB_Execute

Overview

Type:

Function block

Available as of:

V1.0.4.0

Functional Description

The function block FB_Execute provides the common behavior and the common inputs and outputs for implementing a function block, according to definition used for tasks that are executed once with a defined final state.

A rising edge of the input i_xExecute starts the execution of the function block. The function block continues execution and the output q_xBusy is set to TRUE. A rising edge at the input i_xExecute is ignored while the function block is being executed.

Once the execution is finished, one of the outputs q_xDone or q_xError remains TRUE until the input i_xExecute is set to FALSE. If the input i_xExecute is set to FALSE before the execution is finished, the output q_xDone or q_xError is set to TRUE for one cycle. One cycle indicates the period until the next call of the function block.

Interface

Input

Data type

Description

i_xExecute

BOOL

A rising edge of this input starts the execution of the function block.

Output

Data type

Description

q_xBusy

BOOL

If this output is set to TRUE, the function block execution is in progress.

q_xDone

BOOL

If this output is set to TRUE, the execution has been completed successfully.

q_xError

BOOL

If this output is set to TRUE, an error has been detected.

The function block FB_Execute provides the properties timTimeout and xTimeoutExpired. For a description, refer to the chapter Properties.

Signal Diagrams

Signal diagram during successful execution:

Signal diagram when an error has been detected:

State Machine Diagram

The state machine diagram illustrates the procedures, methods, states and state transitions that are defined for this function block.