FB_EnableExecute

Overview

Type:

Function block

Available as of:

V1.0.4.0

Functional Description

The function block FB_EnableExecute is a combination of the function blocks FB_EnableReady and FB_Execute.

By setting the input i_xEnable to TRUE, the function block starts the enabling process. The function block continues initialization and the output q_xActive is set to TRUE. Once the initialization is finished and the function block is ready, the output q_xReady is set to TRUE.

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 output q_xReady is FALSE or the function block is being executed.

Once the execution is finished, the output q_xBusy is set to FALSE and the output q_xDone or q_xError is set to TRUE according to the result.

The output q_xDone indicates a successful execution and remains TRUE until the next rising edge of the input i_xExecute.

In case an error is detected, the output q_xReady is set to FALSE and the output q_xError is set to TRUE. The function block must be disabled in order to acknowledge the error state.

By setting the input i_xEnable to FALSE, the function block starts the disabling process. The function block must be called as long as the output q_xActive is TRUE.

Interface

Input

Data type

Description

i_xEnable

BOOL

Activation and initialization of the function block.

i_xExecute

BOOL

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

Output

Data type

Description

q_xActive

BOOL

If the function block is active, this output is set to TRUE.

q_xReady

BOOL

If the initialization is successful, the output is set to TRUE.

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.

Signal Diagrams

Signal diagram during successful execution:

Signal diagram when an error has been detected while enabling:

Signal diagram when an error has been detected while executing:

State Machine Diagram

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