02-23-2017 10:15 AM
I'm fairly new to LabVIEW, but not new to programming.
I'm trying to implement a VI which gives an audible alert to indicate the occurrence of an event using Play Sound File.vi.
A .Wav file is set to be played, after a certain flag is tripped to indicate the occurrence of an event. While my VI works well before compiling, it does not give an output after compiling. 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.
I have attached a sample code where I have replicated the problem. In the sample code I have assumed the event has occurred (flag tripped) and set the .Wav file to be played until the flag is reset. I gather this is probably not the most elegant way, but I'm trying to understand why compiling the .VI stops the sounds being played.
Any thoughts/comments are greatly appreciated.
Solved! Go to Solution.
02-23-2017 12:27 PM
t works when I compile it.
02-23-2017 06:39 PM
Thanks for that, Paul. Did you compile it as an executable? or as a Source Distribution?
02-23-2017 07:47 PM
If you want help with turning this into a DLL, attach the project you're working with and a calling VI to show an example of how you wish to call it. Without that, we can't tell what isn't right. We can only take the steps we'd take.
02-24-2017 02:53 AM
I compiled it to a .exe
02-28-2017 02:58 AM
Thank you, natasftw.
Please see attached.
02-28-2017 02:59 AM - edited 02-28-2017 03:11 AM
Thank you, paul_cardinale.
Compiling it into an executable seems to work for me too. However, it doesn't seem to work when I compile it into a .llb (Source Distribution). I need to compile it into a Source Distribution as I use this VI through another application (also developed in LabVIEW). I can recompile the application if necessary.
03-02-2017 07:41 AM - edited 03-02-2017 07:42 AM
Fixed.
It seems I made a mistake in the files path of the support directory structure, when compiling as a Source Distribution (which may have prevented the lvsound2.dll being accessed).