FB_BA_ATrigCOV

The function block FB_BA_ATrigCOV is used to detect a value change of a variable xValue of any type.
The size of the variable type is internally set to 4 bytes. When the value at xValue changes, the output bQ is set to TRUE for one cycle, likewise when a rising edge occurs at bForce. The block output bReady changes to TRUE if the linked variable at xValue does not exceed the limit of 4 bytes. If this limit is exceeded, an error message appears in the TwinCAT output window and in the error list. The function block will not check the variable xValue any further and will only respond to changes at the input bForce. The output bReady is then FALSE.
Syntax
FUNCTION_BLOCK FB_BA_ATrigCOV
VAR_INPUT
xValue : ANY;
bForce : BOOL;
END_VAR
VAR_OUTPUT
bReady : BOOL;
bQ : BOOL;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
xValue | ANY | Value to be monitored. It must not exceed 4 bytes. |
bForce | BOOL | A rising edge at this input forces a trigger pulse at the output. |
Outputs
Name | Type | Description |
---|---|---|
bReady | BOOL | Switches to TRUE if the variable applied to xValue does not exceed 4 bytes. |
bQ | BOOL | In case of a value change at xValue or a rising edge at bForce this output changes to TRUE for one PLC cycle. |
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT 3.1 4024.35 | Tc3_BA2_Common from V2.1.20.0 |