LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to create event driven timer

Hi everyone,
I'm using LabView 8 and wish to create a timer which starts when I press a control for the first time and shows time in milliseconds. The timer should stop and return to zero as soon as I press another control/Stop button or pass any condition to it.
Can anyone help around.
Looking for help,

0 Kudos
Message 1 of 56
(23,709 Views)
What resolution and accuracy does this timer need to have? With a non-realtime OS like Windows any timer you create in software is going have significant inherent inaccuracies.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 56
(23,690 Views)
I want a timer which has resolution in 1 ms. One which can behave like a stopwatch, which I can trigger using a switch(say a Latch Boolean control) and stops on other boolean condition. Next time when again switch becomes active, it starts again from reset.
0 Kudos
Message 3 of 56
(23,688 Views)
I would be real hesitant trying to get that fine a resolution with a software timer on a non-RT operating system. There are simply too many things that the OS can do to get in the way.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 56
(23,681 Views)
Could you please clarify...how can I achieve it...can you give some examples??
 
0 Kudos
Message 5 of 56
(23,678 Views)
As Mike said, you can't rely Windows to be accurate to the millisecond.  But if you are just using front panel Boolean switches to manually control the stopwatch then a few milliseconds here or there probably wont bother you too much.
If you're going to leave it running for days then you will need to consider that the value of the ms timer will wrap around to zero every 42 days (or something like that).


Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 6 of 56
(23,677 Views)
I don't have Labviw 8.2.1 ...I'm working on 8Smiley Sad
0 Kudos
Message 7 of 56
(23,668 Views)
Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 8 of 56
(23,666 Views)
Here's another quick draft.
 
(If you don't neet to see the current time while it's running, delete the timeout case and the upper shift register and associated things.)
Message 9 of 56
(23,656 Views)
I would think the the human reaction time is much slower that windows overhead in event handling, that is pressing the button will have aloo accurate responses than 1 ms.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 10 of 56
(23,629 Views)