Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

output buffer size

Solved!
Go to solution
I am updating an old (LV7.1) VI that outputs a waveform which can be modified by the user in amplitude and time using traditional DAQ. I used AO Buffer Config.vi (traditional DAQ) to force the buffer to be the same length as the waveform requested so there were no excess data points that fill any extra buffer space or the requested waveform was not truncated by a buffer too short. If I want to achieve this action in DAQmx, is there a VI in DAQmx to do this, or should I just use the traditional AO Buffer Config.vi? Thank you to any of the highly esteemed experts for any direction I might take to do this.
0 Kudos
Message 1 of 5
(3,705 Views)
Solution
Accepted by Liberated

Hi Liberated,

 

You can explicitly configure the buffer using the DAQmx Configure Output Buffer.vi.  Alternatively, you could let DAQmx automatically configure your buffer based on the amount of data you write before you start the task.  You can't mix and match DAQmx and Traditional DAQ functions on the same device, so using the traditional AO Buffer Config.vi is not an option if you want to use DAQmx on your board.

 

Here's a screenshot from the DAQmx Help that explains how buffer size is determined in DAQmx:

 

 

Buffer_Size.PNG

 

I hope this helps!

 

 

Best Regards,

John

John Passiak
0 Kudos
Message 2 of 5
(3,701 Views)

Thanks for the response John

So, all I have to do is wire my array to the data input of DAQmxWrite(Analog 2D DBL NChan NSamp).vi, and the buffer sizing is automatically taken care of. Is this correct? Is there any benefit to manually sizing the buffer with the DAQmx Configure Output Buffer.vi in this case?

0 Kudos
Message 3 of 5
(3,689 Views)

Hi Liberated,

 

You are correct that writing an array of data to DAQmx Write will auto-size the buffer to exactly accomodate the array.  There are a few cases that you might want to configure the output buffer to be larger than this, which is when you would want to use the Configure Output Buffer function.  For example, if you plan on streaming data to the DAQ device continuously after the task starts (Non-Regeneration) you might want to use the Configure Output Buffer to have more control over the buffer size.

 

The Configure Output Buffer is more of an advanced function and under most circumstances should not be required.  If you have a pre-determined set of data that you will be writing to the output buffer before the task is started then I see no reason to have to manually configure the output buffer.

 

 

-John

John Passiak
Message 4 of 5
(3,685 Views)

John

Thank you very much for the help. The output is now what I had been expecting it to be.

Paul

0 Kudos
Message 5 of 5
(3,681 Views)