LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change output buffer size without recreating task

Hello,

 

I am using DAQmx to do hardware timed, buffered digital output. My problem is that I want to have the ability to stop the task, add samples, then restart the task. However, when I try this I get an error because the buffer is too small. I tried using DAQmx Configure Output Buffer.vi to change the buffer size but it does not solve the problem. Apparently the buffer size is decided when DAQmx Write.vi runs the first time and the only way to change it is to clear the task and recreate it. I found a workaround which is simply to do unbuffered output, but I'm not sure if this is a good idea. So my question is: which is the lesser of two evils, repeatedly clearing and recreating the task or doing unbuffered output? Or is there some trick I can use to change the buffer size after DAQmx Write.vi has run without clearing and recreating the task?

 

Thanks

0 Kudos
Message 1 of 2
(2,418 Views)

Hello Qurple,

 

Instead of completely restarting the task, you could use the Control Task VI to set it back to the Verified state. That would save on performance!

 

Have a nice day,

0 Kudos
Message 2 of 2
(2,378 Views)