LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple timer+saving to file

Solved!
Go to solution

Hi guys,

 

I'm new to here and LabVIEW, and I'm trying to design a program with multiple timers. The user clicks the first button to start the timer, and upon clicking the second button, it stops the first timer, logs it, and starts a second timer. And so on with the third and fourth buttons.

 

I have a VI designed, but it doesn't really work, and I'm not sure why. Could anyone suggest possible fixes? Thanks a lot.

0 Kudos
Message 1 of 17
(3,789 Views)
well, you only need one while loop and on event structure for your program
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 2 of 17
(3,784 Views)
I'm not sure what you mean. How would it work with only one event structure? Could you be a little more specific? Thanks.
0 Kudos
Message 3 of 17
(3,779 Views)

the reason you are having errors is:

 

your events are not filled you have to chooses acontrol to go with a event such as:

        ok button, value change

 

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 4 of 17
(3,773 Views)

this is an error:

 

 

 

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 5 of 17
(3,768 Views)
of coarse, you could just use the elapsed time vi from the timing palatte, use property nodes to enable and disable the buttons, and avoid having all those pesky event structures run in series (by diabling the buttons until the prerquiste event occurs you can combine the structures into one.)  makes for cleaner code-but comments should be used to clarify the vi function.  Better yet- use the vi discription!

"Should be" isn't "Is" -Jay
Message 6 of 17
(3,755 Views)

Thanks for the tip.

 

I filled in the empty event structures, but I think there's something wrong with the design of the program in general.

 

I'm getting 0.00 0.00 0.00 on the log, instead of actual times.

 

Is there something wrong with my timer design?

0 Kudos
Message 7 of 17
(3,743 Views)

In case anyone wants to try running it, I have the "fixed" version attached.

 

0 Kudos
Message 8 of 17
(3,723 Views)

Yep-

time isn't an integer its a number of mSec.


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 17
(3,722 Views)

Woah!

 

OK- its not good to have the same event handled by two different loops and I cannot understand why you would change the timeout value when "Button" goes true.  Back to the drawing board for this.


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 17
(3,719 Views)