12-23-2014 05:32 AM
Hi all,
I am new to labview and I've faced a problem during running my code.
I have a code that calls subvi which plays a sound file of type .wav using Play Sound File VI and Sound Output Clear VI. The sound file should play when some events occure, the problem is that the application is freez a little bit when it is time to play that sound. So I think I should load that subvi or maybe the sound file whenevr the application start.
Do you have any suggestion for reloading that subvi or sound file and what I should use.
It realy affects the performance of my application.
I appreciate your help.
Thank you in advance
12-23-2014 08:14 AM
Can you post your code?
This sounds very much like you've placed a long executing piece of code (sound play) inside of an event structure which will prevent other events from being handled while that code is active.
Architecturally, there are several ways around this. A queued state machine or dynamic launch of your sound play VI would be the most straightforward.
12-24-2014 10:34 PM
Many thanks for your reply
Okay
Let me just make that clear
I am reading signals and wherver the value of the signal reach the limit ( Max Value ) I should alram the user by sound
so the subvi on the red circle should be called
and here its code
So what do you think?
12-26-2014 03:57 AM