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.
Inputs
R1 | Block reset () | Bool |
n0 | Value to set the counter to (using the SETH input) | Long (I32) |
SETH | Set the counter value to n0 () | Bool |
UP | Incrementing input signal | Bool |
DN | Decrementing input signal | Bool |
HLD | Counter freeze | Bool |
|
|
|
nmax | Counter target value | Long (I32) |
Outputs
cnt | Total number of pulses | Long (I32) |
SGN | Sign of the cnt output | Bool |
|
|
|
Q | Target value indicator | Bool |
|
|
|
E | Indicator of simultaneous occurrence of rising edges at both inputs UP and DN | Bool |
[Previous] [Back to top] [Up] [Next]
2023 © REX Controls s.r.o., www.rexygen.com