Showing results for 
Search instead for 
Did you mean: 

Questions about "Sound output write"




The function I want to realize is quite simple. Reading data from DAQ, if a falling edge is detected, play sound files using "Sound output write". If a rising edge is detected, stop playing.


However, if I run the vi, when a falling edge is detected, sometimes it plays the sound file for 2 or 3 times, sometimes the vi will get stuck.

Could anyone help me find the problem?

Thank you.


PS: I know using "Play Sound files" is easier, but "Play Sound Files" will have a tiny delay before playing, but I want the vi start playing immediately without any delay.

0 Kudos
Message 1 of 2

Hi Big_man,


The first thing that I would do to troubleshoot this is to replace the DAQ Assistant and rising/falling edge logic entirely with constants to determine if the issue is with the hardware giving false signals or something in the structure of your code. You could also create an indicator to see when your trigger function is detecting a trigger event and compare that to a chart of your DAQ Assistant data. Doing these steps should significantly narrow down where in the code the problem is happening.

Mark M.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 2