LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Beep Command on PC

I would like to know where i can find a VI that produce a tone at a specific
frequency on a pc speaker
0 Kudos
Message 1 of 7
(3,692 Views)
Hi Nieldane,

have a look inside graphic and sound -> sound -> piep of your function
palette.
You can specify the frequency, delay and intensity of the tone.

Henrik

PS: if you have a soundcard it will be used instead




Nieldane Stodart wrote:
>
> I would like to know where i can find a VI that produce a tone at a specific
> frequency on a pc speaker
0 Kudos
Message 2 of 7
(3,692 Views)
This uses LabVIEW's built-in sound functions. Unfortunately (at least
in LabVIEW 5.11 and 6i), this subVI (Beep.vi) simply ignores any values
for the frequency, duration, and intensity.
What Nieldane has in mind requires a call to Kernel32.dll's Beep
function. However, this only works for Windows NT/2000 (Windows 95/98
simply play the system default sound).
In order to call the Beep function, use Call Library Function, and
configure it as such:
- Browse it to kernel32.dll in your winnt/system32/ directory (if you
have NT, for example)
- Type in the function name "Beep"
- Set the Calling Conventions to stdcall (WINAPI)
- Set the return type as an unsigned char (U8). This returns a 1 if an
error occurs.
- Add the parameter dwFreq as an unsigned long (u32). This
is your
Frequency.
- Add the parameter dwDuration as an unsigned long (u32). This is your
Duration.
Now wire up controls to the left side and specify the frequency (e.g.
1000) and duration (e.g. 500).
Hope this helps.
---
Adam Rofer



In article <3A0AAAC3.37BB0D5D@web.de>,
Henrik Skupin wrote:
> Hi Nieldane,
>
> have a look inside graphic and sound -> sound -> piep of your function
> palette.
> You can specify the frequency, delay and intensity of the tone.
>
> Henrik
>
> PS: if you have a soundcard it will be used instead
>
> Nieldane Stodart wrote:
> >
> > I would like to know where i can find a VI that produce a tone at a
specific
> > frequency on a pc speaker
>



Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 3 of 7
(3,694 Views)
Is there any way of forcing LV to ignore a soundcard and use the PC speaker
instead? I'm not too bothered about the tone, I just need to produce an audible
alarm noise.
Thanks,
Ben




Adam Rofer wrote:
>This uses LabVIEW's built-in sound functions. Unfortunately (at least>in
LabVIEW 5.11 and 6i), this subVI (Beep.vi) simply ignores any values>for
the frequency, duration, and intensity.>What Nieldane has in mind requires
a call to Kernel32.dll's Beep>function. However, this only works for Windows
NT/2000 (Windows 95/98>simply play the system default sound).>In order to
call the Beep function, use Call Library Function, and>configure it as such:>-
Browse it to kernel32.dll in your winnt/system32/ directory (if you>have
NT, for example
)>- Type in the function name "Beep">- Set the Calling Conventions
to stdcall (WINAPI)>- Set the return type as an unsigned char (U8). This
returns a 1 if an>error occurs.>- Add the parameter dwFreq as an unsigned
long (u32). This is your>Frequency.>- Add the parameter dwDuration as an
unsigned long (u32). This is your>Duration.>Now wire up controls to the left
side and specify the frequency (e.g.>1000) and duration (e.g. 500).>Hope
this helps.>--->Adam Rofer>>>>In article <3A0AAAC3.37BB0D5D@web.de>,> Henrik
Skupin wrote:>> Hi Nieldane,>>>> have a look inside graphic
and sound -> sound -> piep of your function>> palette.>> You can specify
the frequency, delay and intensity of the tone.>>>> Henrik>>>> PS: if you
have a soundcard it will be used instead>>>> Nieldane Stodart wrote:>> >>>
> I would like to know where i can find a VI that produce a tone at a>specific>>
> frequency on a pc speaker>>>>>>Sent via Deja.com http://www.deja.com/>Before
you buy.
0 Kudos
Message 4 of 7
(3,692 Views)
There is one way to do it.

First you have to save the noise in WAV format.
Then you can play it.

You shoudl use "PLAY SOUND.VI" developed by Dany Lawers. I dont remember de
addres but I can mail it to you. This is downable.
0 Kudos
Message 5 of 7
(3,692 Views)
Do you know of a way to make the beep louder when you call the kernel32.dll beep function?  Is there an intensity parameter you can feed it?
 
Thanks,
 
Joe
0 Kudos
Message 6 of 7
(3,440 Views)
Phone.vi from the examples shows how to adjust frequency and loudness of tones for a sound card.

Happy dialing

Manfred
0 Kudos
Message 7 of 7
(3,427 Views)