LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

timer problem

Hello all,
 
I'm trying to add to my program the equivalent of a timestamp, except that it records the time elapsed from the start of the program...
 
like
 "press button" --> timer starts    writes: "0 seconds"
 "press button" --> timer records writes: "2 seconds"
 
etce tc...
 
I was thinking of subtracting 2 times... but I don't think it works. Any suggestions please?
 
thanks.
 
 
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 1 of 26
(3,810 Views)

If you just want milliseconds, get the tick count at the start of the program (e.g. outside the main loop).

Inside the loop, you can now get the elapese time by using another tick count and subtracting the start value above.

Message 2 of 26
(3,806 Views)
Is it possible to set the tick count to 0 ?
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 3 of 26
(3,802 Views)
Is it possible to set the tick count to 0 ?
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 4 of 26
(3,802 Views)
In a way...  here's how to get the timer starting at 0.
0 Kudos
Message 5 of 26
(3,798 Views)
Another question 😞
 
What IF (yes i know i'm being troublesome) I only wanted the timer to start the FIRST time I pressed the record button...? I can't really place it outside the loop because that wouldnt work...
 
 
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 6 of 26
(3,786 Views)
Well is your loop always running, or does it only run during "record"?
0 Kudos
Message 7 of 26
(3,785 Views)
Well, One loop is always running. the other one isnt.
Let me attach my VI.
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 8 of 26
(3,781 Views)
Just do something like in the attached modification. (converted to LabVIEW 6.1). I hope it is clear.
0 Kudos
Message 9 of 26
(3,771 Views)
Perfect! Many thanks 🙂
Aquaphire

---USING LABVIEW 6.1---
0 Kudos
Message 10 of 26
(3,766 Views)