LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

so wait hangs

i tried to output some data to audio. i set "SO Set Num buffer' to 2 and then in a while loop i repeatedly call 'SO Volumn', 'SO Wait', 'SO Write' in that order. sound plays fine for like half an hour. but then all of a sudden it just stops playing. i looked into the block diagram and saw that 'SO Wait' is still running but never exits.

is this a known bug in labview?
0 Kudos
Message 1 of 3
(2,928 Views)
A possible reason for this is because there are several calls to these functions running simultaneously. A workaround may be using a Sequence structure instead of the so wait.

Good luck and Regards.
0 Kudos
Message 2 of 3
(2,928 Views)

I realize this message is a little stale. I have the same problem and digging deeper into the SOWait.VI the hangup is caused by the "call shared library node" calling

 

int32_t SOWait(uint32_t taskID, uint8_t *wait, int32_t *occur);

 

That call takes the occurrence reference as an argument and somewhere in there "sets" the occurrence.

 

The next step of the subVI is to wait on that occurrence and the problem is, after many "minutes" of calling, the wait function waits indefinitely because the SOWait() C-function call no longer is setting the occurrence.

 

My attempts to add a timeout to the occurrence and set the occurrence in that timeout case produce non-ideal results. The C-function continues to return values which timeout the occurrence and it never waits the "appropriate" amount of time anymore.

 

For example, if you had a 500ms sound file and a 1000ms timeout on the occurrence you will wait 1000ms between each time you hear your 500ms sound file. The occurrence is 'supposed' to be held up for the duration of the sound but when it is never set again it simply times out.

 

I believe this points to a bug in the SOWait() C-function call but being that its 2010 - I'd like to just find another way to accomplish the same thing - using newer VIs.

 

0 Kudos
Message 3 of 3
(2,481 Views)