The function block FB_EnableReady provides the common behavior and the common inputs and outputs for implementing a function block, according to the definition for binding a resource. The resource is bound as long as the function block is enabled.
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, the output q_xReady is set to TRUE.
If an error is detected, the output q_xReady is set to FALSE and the output q_xError is set to TRUE. The output q_xError remains TRUE until the function block is disabled.
Input |
Data type |
Description |
---|---|---|
i_xEnable |
BOOL |
The function block is activating. |
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, this output is set to TRUE. |
q_xError |
BOOL |
If this output is set to TRUE, an error has been detected. |
Signal diagram during successful execution:
Signal diagram when an error has been detected:
The state machine diagram illustrates the procedures, methods, states and state transitions that are defined for this function block.
For a legend describing the elements of the state machine diagram, refer to Legend of State Machine Diagrams.
For further information on the methods implemented, refer to the chapter Methods.