LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent Beep.vi to slow down VI

Solved!
Go to solution

Hi,

 

I am working on a metronome that has to run for a x time with a x frequency. The time is in seconds and the frequency in BPM. 

Every time there is a beet, the VI has to make a beep. This can be done easily by the beep.vi, but the standard for the beep.vi is toplay a system sound. 

This is a quite long tone (Windows 10). So therefore, I want to set my own frequency and duration of the beep.

But when I change this in the beep.vi, the VI will wait for the set duration (msec) before it continues the vi. So it slows down the whole VI.

 

Is there a way to make the beep.vi beep with the frequency and duration that I set, without it slowing the VI down?

 

Thank you!

0 Kudos
Message 1 of 3
(2,924 Views)
Solution
Accepted by topic author Ruben29

Have the 'beep' VI run asynchronously to your main code - have the VI in another loop and use a queue/notifier to notify the loop when to play from the main loop.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 3
(2,919 Views)

Thank you very much!

0 Kudos
Message 3 of 3
(2,907 Views)