Hi guys

How could i change a counter up when a value get higher and down when a value get lower using a swicher , i used a change mode but gives a bang every change of course and does not know about higher or lower value , the patch is there but somehow appear on the up right inside the patch :D

CounterChangeSwich2.v4p (25.1 kB)

hum, i don’t quite understand your patch, but i guess ‘hysterisis’ might come handy.

You might want to look into the TogEdge node, and maybe FrameDifference as well.

hi Woei thanks for your reply , hysterisis gives a 1 when passing a sort of border , i was looking for something that knows when a value is incrising and when decreasing so when the value increases, it bangs the up from the counter and when the value decreases it bangs the down from the counter

sorry dujoducom it seems you answered while i was writing last post to woei , strange thing , i checked togedge and frame difference but still they don,t recognise when a a value is increasing or decreasing , cheers

Is this what you’re looking for? if the value raises it counts up, if it lowers it counts down, if it stays the same nothing happens.

countincreasedecrease.v4p (2.9 kB)

yes this is what i wanted works perfect in your patch but it does not in mine , maybe because my counter and swich is 0 to 15 dont know really ,if you try with the patch above you,ll see it always works on increasing but just sometimes on decreasing
thanks a lot anyway

HI guys just for you to know it works taking off the iobox(value adavance)between LTnode and the counter , thanks a lot dujoducom for your patch seeing it done looked very easy to increase decrease ;D