11-10-2009 01:43 PM
11-10-2009 05:05 PM
11-10-2009 05:41 PM
Lunazuly,
It is completely unclear what you are asking here. What exactly is the behavior that is undesirable? Is it that the counter is sending multiple zeros when the reset signal is sent?
Also, your diagram is set to run forever as when the outer loop is stopped the inner loop is started and there is no condition for stopping that loop.
Cheers, Matt
11-11-2009 08:12 AM
I send again the vi with out the inner loop for the better untderstanding. This VI works with the other i posted yesterday (pul_con_mod2.vi),when Almacena[1].vi runs start two counters if the reset botton is off, if the resete buttos is on one counter shows ceros thats ok, if I press the reset button the upper counter begins count again, thats ok too, but if I pressed the reset button again, the counter return to the begining and show ceros again thas fine BUT I want to see, to catch, to recover the last value after this ceros just the last value the counter shows just right before the reset, thats the problem. (Se aceptan respuestas en español,gracias)
11-12-2009 11:59 AM
OK, so I still don't quite get all that you are trying to do (language thing I think and the code is pretty rough), but the jist is that you want to be able to recover a value right before or after an event occurs. This seems simple enough - you need a place to store the value before you begin zeroing your counter; this can be either a shift register or a global variable. This bit of memory can store the value and you should be able to read it back and do whatever you wish with it. To do this, you will either have to poll the control to see if the status has changed or drop in an event structure with a value change event registered for the button Reset Signal. When an event is fired or the changed status is true, simply store the value you are interested in before zeroing the counter indicator.
Let me know if this is not clear.
Cheers, Matt