Reflex Function Block: 2 Threshold Counter
(Original Document)
Role
This counting function is used to detect when a th1 or th2 threshold is crossed.
Structure
The following table shows the different interfaces of the block.
Name
Meaning
E
Enable input.
  • E = 0: Input Up frozen,
  • E = 1: Input Up enabled.
Up
Counter input.
Note: Maximum performance of the counter is 500 Hz with a 50% duty cycle (with the Up input directly controlled by the physical input (without filtering)).
RESET
Counter initialization input.
A Reset is required to acknowledge a change in the value of the threshold to be reached.
Sel
Selection of the counting threshold:
  • Sel = 0: Threshold th1 selected,
  • Sel = 1: Threshold th2 selected.
Note: The maximum value of a threshold corresponds to the maximum number of pulses (65536 pulses).
x
Counter physical output.
x Aux
Block internal auxiliary output.
Illustration
Operation
This table describes the different operating phases of the 2 threshold counter:
Phase
Description
1
On the rising edge of the RESET input:
  • counter initialization to 0,
  • the x and x Aux inputs switch to 0,
  • counter on the rising edge of the Up input is incremented.
2
On the rising edge of the Up input, the counter is incremented (value not accessible).
3
When the selected threshold is reached, the x and x Aux inputs switch to 1.
Illustration
The illustration below shows the timing chart for the 2 threshold Counter function block.