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.