LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog output using DAQmx: Re-using the same task to output another waveform.

So in writing my response to Jeff, I had another idea that turns out to be a solution.  I used  "DAQmx Control Task.VI" to abort the task after each iteration. (Using the "unreserve" action works also)  Here's the code:

 

Play WAV in loop - with abort.png

 

My guess is that the task is in some "done" state, and this state is not reset when a new waveform is written and started with the task.  This seems like a bug to me, but I know very little about the DAQmx task state model, and how that all works. 

 

Can anyone shed additional light on this?

 

-Joe

0 Kudos
Message 11 of 14
(819 Views)
Sounds like a bug. try using control task to commit the task prior to entering the loop.

"Should be" isn't "Is" -Jay
0 Kudos
Message 12 of 14
(806 Views)

I'm getting a similar error, but I think the problem is not with my hardware but with the length of my audio file.

I'm trying to loop a wav file about a minute long and I'm getting the same sort of behavior where part of the file plays the first loop, but then subsequent loops are very short (less than a second unless I use the time delay) and the DAQ plays no sound.

0 Kudos
Message 13 of 14
(716 Views)

ebabe,

 

Are you getting data that is actually output, but it stops after a fraction of a second or is an error message occurring as soon as you try to output? Also are you trying to export more than 1 long waveform using the USB-6211?

 

As this thread is fairly old, I would suggest creating a new thread which is more likely to get new responses and the most ideas within the community.

Evan See
National Instruments
0 Kudos
Message 14 of 14
(697 Views)