LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Beep in labview.

The beep VI doesn't use the PC speaker unless a sound card is not installed (it calls the Windows MessageBeep function (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/messagebeep.asp). If you want to use the PC speaker you should call the beep function (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/beep.asp) with a Call Library Function node.
There is a KB on this at http://digital.ni.com/public.nsf/websearch/CD1557276420321D86256CA300792571?OpenDocument

Regards,
Ryan K.
0 Kudos
Message 11 of 18
(3,761 Views)

I leave an example which can contribute, Greetings

Download All
Message 12 of 18
(2,592 Views)

You just responded to a thread from the year 2004 with an example that has some serious problems:

 

  • Unnecessary use of a stacked sequence structure.
  • The VI uses 100% of one CPU core when no sound is playing.
  • I don't understand why you are immediately stopping the sound output after a 0ms timeout. The entire sound file never has a chance to play fully.
  • Losts of duplicate code. You could turn your cluster into an array and autoindex over it and over an array of sound file names using a FOR loop. Now you only need one instance of the sound code and case structure and eliminate the sequence at the same time.
  • This thread is about the beep, not about playing a sound file.
Message 13 of 18
(2,578 Views)

thank you very much for the bounding, the objective of the forum is to help only propose a simple example that anyone can understand, there will always be people who are just starting, Greetings

Message 14 of 18
(2,566 Views)

Carlos, thanks for that example.

 

I have something to similar to your code. In my case I'm playing a .Wav file after a certain flag is tripped to indicate the occurrence of a event. However, I cannot seem to get the same performance once the code is compiled as a Source Distribution (as a .llb, which is what I want) or as an Executable.

 

Any thoughts?

 

I'm away that this thread is from 2013, but any help is appreciated.

 

 

0 Kudos
Message 15 of 18
(1,608 Views)
@hkd2015 wrote:

Any thoughts?

 

 


Yes.  First, do not continue this decade-old thread!

 

Start a new topic.  Give it a title that pertains to your question (which is not "Beep", right?).  If you've tried something and it doesn't work well, attach your VI so others can see what you've tried, get a better idea of what you are trying to do, and can make helpful suggestions or "improve" your code.

 

Bob Schor

0 Kudos
Message 16 of 18
(1,588 Views)

@Bob_Schor wrote:
@hkd2015 wrote:

Any thoughts?

 

 


Yes.  First, do not continue this decade-old thread!

 


Why?

 


 

Start a new topic.  Give it a title that pertains to your question (which is not "Beep", right?).  If you've tried something and it doesn't work well, attach your VI so others can see what you've tried, get a better idea of what you are trying to do, and can make helpful suggestions or "improve" your code.

 

 


I have, but thank you anyway.

0 Kudos
Message 17 of 18
(1,583 Views)

Why?  Here's several reasons.

 

1) It's poor etiquette on any forums you'll ever visit.

2) The user you're asking questions hasn't had any activity in nearly a year.  They're very unlikely to respond to you.

3) Posting to other threads to ask your question is often considered rude as it's hijacking the thread with your needs instead.

4) Posting to another thread is generally only somewhat relevant to your problem.  You have something you want solved.  People can give you better advice if you have a focused issue to look at rather than trying to split attention across the multiple problems.

5) It's actually worse to post your own thread and then hijack/bump another.  It splits any potential help you'd be receiving rather than letting people collaborate to help you out.

 

Reason enough?

Message 18 of 18
(1,578 Views)