09-01-2008 12:43 AM
Hi everybody!
what i want to do is as follows: every time i press the boolean control i want to count from zero up to ten with increments of one (0,1,2,3...10). When i reach ten, i want to go backwards(10,9,8...0). The process should continue like this,going up and down(from zero to ten and from ten to zero and so on). So far i've got this!.....Thanks in advance!
09-01-2008 02:35 AM
Hi riot,
use another shift register for a flag to indicit, if you count up or down.
Mike
09-01-2008 09:07 AM
09-01-2008 09:15 AM
Hi riot,
see the attached example. It´s also possible without the event case.
Hope it helps.
Mike
09-01-2008 12:33 PM
Thank you so much for your help Mike! That's exactly what i needed. Now I'll try to do it without using the case event as you propose!
09-01-2008 01:26 PM - edited 09-01-2008 01:27 PM
One shift register is plenty (under some conditions none is needed). 🙂
Here is some simple code that shows the basic idea. See if it works for you. For simplicity, you could even wrap the math portion into a subVI.
It would be trivial to adapt it for the case where the lower turning point is not zero, try it!. 😉
(Note also that the indicator should always go before the event structure, else it could show a stale value until the event executes for the first time)

09-02-2008 10:19 PM