Use the Beep VI with the Internal PC Speaker

Updated May 3, 2018

Reported In

Software

  • LabVIEW Full

Issue Details

Executing the Beep VI (found in the Graphics and Sound sub-palette) plays a sound over my speakers, but I'd rather have it beep on my internal PC speaker.

Solution

You can create a beep with the PC speaker by calling the "Beep" function in Windows kernel32.dll with a Call Library Node. The Beep function takes in two long inputs, and returns a long. The two inputs are frequency and duration respectively.

The attached beep_pc_speaker.vi implements the PC speaker beeping functionality.

WAS THIS ARTICLE HELPFUL?

Not Helpful