01-13-2021 03:31 AM
01-14-2021 02:09 AM
Hi,
Links below can be helpful for you.
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019U29SAE&l=en-US
https://zone.ni.com/reference/en-XX/help/371361R-01/lvpict/playsoundfile/
01-17-2021 09:44 PM
Hi,
There's no inbuilt node to play a sound/beep. However, there's one way you could add capability to play sound in your webVI.
Web Module has a feature called JavaScript Library Interface (JSLI), which lets you call your JavaScript code from a webVI. Using JSLI, you can call your JavaScript function which plays the sound.
This page has many simple code snippets which show how to play sound using JavaScript. This page has an example showing how you can make use of JSLI.
01-18-2021 05:36 AM - edited 01-18-2021 05:36 AM
Sujay, the links you sent are great, thank you! However, I am not an expert in JS (yet...), so I wonder how I need to alter the JS code to use it in my webVI. For example this code (which I found in the link that you sent) http://jsfiddle.net/55Kfu/1506/ .
01-20-2021 04:29 AM
I'm attaching a project which does this. I have modified the example project which I linked above (just so you can compare this with the existing example there), and incorporated the JS which you provided in it.
I have added the JavaScript code which makes the beep sound under "Calculator Library.gcomp\javascript". The integration for this JavaScript code is added in the "Calculator Library.gcomp\Calculator Functions.jsli" file. Once I did this, the "Make Beep Sound" node got added to the palette in the diagram palette of webVI.
In the attached project, I'm calling the "Make Beep Sound" node in a loop as part of the "WebApp.gcomp\Beep.gviweb" VI. You can run this webVI to see the full thing in action.
01-21-2021 07:56 AM
I get an error about 5 sec after I run the WebVI, do you know the reason? I attached a screenshot.
01-24-2021 11:33 PM
Not sure what the issue was. I'm attaching another simpler JS file which you can replace in the earlier attachment.