11-26-2010 10:04 AM
I am in the final stages of implementing my program.
Currently I have to overcome two obstacles .
#1 corresponds to the attached VI "My stopwatch"
The round LED starts counting the time and stops it. Problem is even if I turn it off it, the timer keeps counting the seconds when I turn it on again. I want it to accumulate only the time it spent in the on position. How do I do this?
#2 corresponds to the VI "array of time".
I want to use "My stopwatch" as a reentrant subVI in this VI. I want the round LED Boolean array as the control to switch the stopwatch on and off.
Thanks for all your help.
mhaque
Solved! Go to Solution.
11-26-2010 01:30 PM
Check out the CLD exam example solutions.
One of them for the Car-Wash includes a modification of the "Elapsed timer function" that add a "Pause"
11-26-2010 02:33 PM - edited 11-26-2010 02:34 PM
On a sidenote, have you ever wondered what would happen if you would remove the "equals true?" and wire straight from the terminal to the rest of the code? 😄
(see also)
11-29-2010 10:15 AM
aaaaaaaaaah so its pointless having the equals to sign.
I was just using someone elses code.
Thanks for clarfification.
mhaque
11-29-2010 01:39 PM
We just call that WEC. or Wire Equivalent Code
11-29-2010 02:56 PM
I have managed to modify an existing VI to do what I want i.e. have one start/pause Boolean control for the stop watch.
Criticisms please. The block diagram looks simple enough.
Also I can't quite get it to reset.
Any suggestions.
Thanks
mhaque
11-30-2010 05:38 PM
I have managed to make a Boolean Array controlled stopwatch.
It is within a while loop. My question is how do I use this VI as a SubVI? How do I overcome the while loop?
I found this thread
http://forums.ni.com/t5/LabVIEW/handling-while-loop-in-subvi/m-p/1117918
but since I am new to LabVIEW I do not understand how they got over the issue using the VI server reference and Value Change Property node.
They use references but I don't understand how the reference controls tie in with the coding.
Your help is much appreciated.
mhaque
12-01-2010 02:02 AM - edited 12-01-2010 02:03 AM
To use it as a subVI, it is easiest to use globally initialized feedback nodes. Here's a quick example.
(Place both VIs in the same folder, then run CallTimerSubVI)
You are using way too much code. Please rethink what you did! Also study my example.
12-01-2010 10:31 AM
How long did it take you to get this good? Seriously?
It works perfectly! wow!
12-08-2010 05:50 PM - edited 12-08-2010 05:54 PM
Shoot I meant to reply to this post instead of
http://forums.ni.com/t5/LabVIEW/Can-LabVIEW-pickup-from-where-it-left-off/m-p/1334910#M542745
Hey altenbach
Where does the VI initialize, i.e from where are the zero filled arrays created.
I want to place a read/write binary file and I am wondering where I should wire it to, to save the timers when I exit the program.
Otherwise the timer starts from 0 which is not what I want.
Thanks
mhaque
Since you solved both problems I hope this is not too much of an inconvenience.