This documentation is out of date.

The new version of the documentation is here: https://cannylogic.com/docs

Counter

From CANNY Wiki
Revision as of 05:32, 27 November 2015 by MEGA (Talk | contribs)


Jump to: navigation, search
Appearance
5 9 1 2.png
Symbol
COUNT
Group
Built-in Function Blocks#Counters and Edge Detectors
Inputs
Increment: Logical
Decrement: Logical
Reset: Logical
Outputs
Результат: Integer
Version CANNY Lab
from 0.6b
Icon

At zero value on input "Reset": on each rising edge (change in values from zero to non-zero) on the input "increment" is adding 1 to the "Result" value, and on each rising edge (change in values from zero to non-zero) at the input to "Decrement" is subtracted 1 from the output.

At non-zero value on input "Reset", sets the output value to zero.


Features

Выходное значение 16-и битное, с переполнением. Иными словами: выходное значение не может превысить 65535 или стать отрицательным числом. В случае увеличения выходного значения равного 65535 на единицу, результатом будет ноль, а в случае уменьшения выходного значения равного нулю на единицу, результатом будет 65535.

Examples

Step 1
Step 2
Step 3
Step 4
Step 5

See also

Rising edge detector

Falling edge detector

Built-in Function Blocks