LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmxWriteAnalogF64 - Generation cannot be started, because the selected buffer size is too small. Increase the buffer size. Status Code: -200609

Exact error output:

NON-FATAL RUN-TIME ERROR:   "control.c", line 281, col 5, thread id 0x000015CC:   Function DAQmxWriteAnalogF64: (return value == -200609 [0xfffcf05f]). Measurements: Generation cannot be started, because the selected buffer size is too small.  Increase the buffer size. Selected Buffer Size: 1 Minimum Required Buffer Size: 2  Task Name: Analog Output Task  Status Code: -200609

...
double ovalues[3];
...

DAQmxWriteAnalogF64 (h_AOTask, 1, 1, 10.0, DAQmx_Val_GroupByChannel, ovalues, &spc_written, 0);

I'm a noob with LabWindows/CVI and I'm having a hard time finding information for error output. Does anyone know what might be my problem here? Thanks.
0 Kudos
Message 1 of 6
(4,768 Views)

Just a guess but often the hardware has a minimum waveform size and also a quanta size for waveforms. Values of  eight or four are common for various NI hardware.

If your harware requires min sample size of 4 and sample quanta of four, then this would mean valid waveforms would have to be at least four samples lon and must be evenly divided by four.

 

Greg

0 Kudos
Message 2 of 6
(4,766 Views)
I'm not sure that I understand what you mean. Which value in the function call are you saying should be a multiple of 4?
0 Kudos
Message 3 of 6
(4,764 Views)
What is the hardware that you assigned h_AOTask to? This hardware wil have a minimum waveform size that can be written to it - in your case, the waveform is " double ovalues[3] " or three values long. If the hardware minimum size and quanta is four then you need to define " double ovavalues [4] ".
 
The manual that came with your hardware will describe the minimum size spec. You can probably find it from the the hardware by using querying the correct attribute for the hardware from CVI.
 
Looking at the error info, it may be that you will need to build a buffer on the hardware to receive the data before sending it I'll admit I don't often call Daqmx directly so I may be behind the curve here. The command for building the buffer will be
 
DAQmxCfgOutputBuffer (, );
 
Specifics about what hardware and what you are trying to do would help at this point. It is doubtful that you will need to use low level task for common task.
 
Greg
0 Kudos
Message 4 of 6
(4,748 Views)
The hardware that I'm using is a USB-6259. I found the manual at http://www.ni.com/pdf/manuals/371022j.pdf but there's little in here that mentions waveform generation. There are 4 analog output lines for this device, is it possible that I need to create a task that uses all 4 lines and just utilize 3?


Message Edited by coanda on 04-25-2008 04:32 PM
0 Kudos
Message 5 of 6
(4,744 Views)
I've added the line:

  DAQmxCfgOutputBuffer (h_AOTask, samples_per_chan);

above my call to DAQmxWriteAnalogF64 and now there's no more buffer error, but it's uncovered a new DAQ Error message box with the error "A system call returned a warning. "The operation was completed but the state of the system may be unreliable."


Any thoughts?


Message Edited by coanda on 04-25-2008 04:54 PM
0 Kudos
Message 6 of 6
(4,740 Views)