COUNT – Controlled counter
Block SymbolLicensing group: STANDARD
Function Description
The COUNT block is designed for bidirectional pulse counting – more precisely, counting rising
edges of the UP and DN input signals. When a rising edge occurs at the UP (DN) input, the cnt
output is incremented (decremented) by 1. Simultaneous occurrence of rising edges
at both inputs is indicated by the error output E set to on. The R1 input resets
the counter to 0 and no addition or subtraction is performed unless the R1 input
returns to off again. It is also possible to set the output cnt to the value n0 by the
SETH input. Again, no addition or subtraction is performed unless the SETH input
returns to off again. The R1 input has higher priority than the SETH input. The input
prevents both incrementing and decrementing. When the counter reaches the value
, the Q
output is set to on.
This block propagates the signal quality. More information can be found in the 1.4 section.
Input
R1 | Block reset | Bool |
n0 | Value to set the counter to | Long (I32) |
SETH | Set the counter value | Bool |
UP | Incrementing input signal | Bool |
DN | Decrementing input signal | Bool |
HLD | Counter freeze | Bool |
|
|
|
nmax | Counter target value | Long (I32) |
Output
cnt | Total number of pulses | Long (I32) |
SGN | Sign of the cnt output | Bool |
|
|
|
Q | Counter state | Bool |
|
|
|
E | Error indicator | Bool |
|
|
|
[Previous] [Back to top] [Up] [Next]
2024 © REX Controls s.r.o., www.rexygen.com