LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measure of time elapsed

Solved!
Go to solution

I've just started using LabView and I'm working on a project in which a sound file needs to be played once a microphone picks up a sound with a frequency above a certain level (I have a sound board right now that allows me to manually make these cues). I'm sure I'll have many more questions in the future, but for right now I was just wondering how I could measure how much time it takes for LabView to read the frequency and then play the file.

0 Kudos
Message 1 of 13
(5,126 Views)
Solution
Accepted by rmhughes

You can get start time and end time by using Tick Count (ms) Function or Get Date/Time In Seconds Function.

Hope it helps!

 

 

Time measured.png

Message 2 of 13
(5,113 Views)
I tried a similar setup on one of the templates but I got everything from 2.3 ms up to 109 ms. What are you using to break up the steps in that example?
0 Kudos
Message 3 of 13
(5,083 Views)
Scratch the above question, I found it. When I try and play any .wav file it tells me that LabView does not support the sound format.
0 Kudos
Message 4 of 13
(5,071 Views)

Sorry I'm being that annoying new guy in the forum who just posts questions as he thinks of them and doesn't bother doing work. I figured out the issue and everything seems to be working. I'm consistently getting readings of around 330 ms. Does that seem correct? Seemed a bit slow to me.

 

Also, out of curiousity, what is that item you're putting the final value into at the end of the process? I've just been using a numeric indicator.

Message Edited by rmhughes on 07-14-2009 02:40 PM
0 Kudos
Message 5 of 13
(5,061 Views)

No worries 🙂

 

Check an example here for playing wave file.

also find attached files.

 

Message Edited by lvABC on 07-14-2009 03:42 PM
Message 6 of 13
(5,058 Views)
Thanks for all the help!
0 Kudos
Message 7 of 13
(5,049 Views)
lvABC - I like your method of measuring time elapsed. How would this be done with Labview RT? The TickCount block only returns time in msec.
0 Kudos
Message 8 of 13
(4,924 Views)

BenYL,

 

One quick way to get time output would be by using shift register.

 

time.png

Message 9 of 13
(4,913 Views)
Also- check out the elapsed time function on the timing pallate- Smiley Wink

"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 13
(4,900 Views)