# Counter that will stop at a value but will keep increasing if lower than the value

UPDATE/TL;DR:
Here’s my latest idea, is there a way to switch an ON/OFF parameters to off when a mathCHOP value is at 10 and switch to on whenever that value drops under 10, all changes are in increments of 1. With this there will be a timed counter that will constantly count to 10 and stop at 10. (A button is there to decrease it by 1 each time it is pressed) So if the counter is at 10 and stopped, and the button was pressed 3 times, the counter will resume counting up 3 times and stop at 10 again.

ORIGINAL POST:
Hi, newbie here, trying to make a counter that counts up every time period (timer CHOP), but the value will stay max at 10.

Each time I press a button, it will decrease by one.

Heres the challenge I faced: I want it to keep increasing every time it reaches below 10 and also it will stop decreased at 0.

Example: counter goes up 1 from 0 every 5 seconds. After 5000 seconds it should only be 10. If I press the button once it will turn into 9, and at 5005 seconds it will be 10 again.

I was thinking about clamping using Limit CHOP, but if I clamp the value before combining them in math, it will no longer increase after being lowered, if I clamp the value after combining the downward counter and the time counter, then after a certain idling it will be impossible to be lowered than 10.

Your demand is not so clear…
but some path:

• use count chop to increase a value from 0 to 10 (set to clamp min and max)
• use math chop (-10) and logic chop to change a value at 10. You can use math to invert 0 and 1

Thanks, I actually just solved the issue, REALLY similar to your idea.

Do you mind seeing my other post that’s after this one? Please?