10-21-2013 11:53 AM - edited 10-21-2013 11:53 AM
Hi,
I have used 2 time elapsed timers inside my data acquisition loop to acquire digital signals just between lets say 11s and 11.05s. The vi works properly if I stop the vi and run it again but the problem I have is, this vi is a subVI and since it is called from another vi , the timer will not reset when it is called again so the elapsed time doesn't start from zero . Could you please let me know how can I reset the timers when this vi is called as a subVI.
Thanks
Solved! Go to Solution.
10-21-2013 12:42 PM
Hi !
Have you tried to make Elapsed Time 1, and Elapsed Time 2, input terminals of your SubVI ?? so they will be refreshed every time you call it in the main VI ...
10-21-2013 12:48 PM
Hi, Do you mean I use Reset terminal as as input terminals of my subVI. I have tried that but the problem is when I change the state to be true from my calling vi then the counters don't stop counting since the reset terminal is always true inside the loop
10-21-2013 12:55 PM
Hello tintin,
To get the behavior (I think you) want, you'll need to use some sort of logic to reset the express VIs when you want to- I would suggest using the loop's iteration counter (i) and an Equal to Zero? Comparator function to reset the timer only on the first iteration of the loop.
Regards,