FB_COUNTER
Description Function Block
The FB_COUNTER
function block is used to implement an incrementing and decrementing counter. The ActValue
specifies the current internal counter value. The counter can be parameterized by means of the PresetValue
and CounterLimit
inputs.
For a logic 1
signal at the bReset
input, the internal counter value is set to the value which is parameterized by means of PresetValue
. For a rising edge at the bCountUp
input, the internal counter value is incremented by 1
. For a rising edge at the bCountDown
input, the internal counter value is decremented by 1
. As soon as the counter value specified in CounterLimit
is reached, the bCounterOut
output is set. When the counter value reaches 0
, the bCounterZero
output is set.
When the TwinSAFE group is started (Run=1), ActValue
is set to PresetValue
. When the group is stopped, ActValue
is set to 0
.
EL6900
The FB_COUNTER
function block is not supported by the EL6900.

Name | Data Type | Initial Value | Description, Parameter Values |
---|---|---|---|
|
|
| Rising edge resets the counter to the |
|
|
| Rising edge increments the internal counter value by |
|
|
| Rising edge decrements the internal counter value by |
|
|
| Initialization value to which the counter is set at Reset. Only a constant value is permitted (no variable) |
|
|
| When this value is reached, the Only a constant value is permitted (no variable) |
Name | Data Type | Initial Value | Description, Parameter Values |
---|---|---|---|
|
|
| Set to |
|
|
| Set to |
|
|
| Current value of the internal counter value Permitted data types: |
|
|
|
|