Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

*Facing problems while using NIDAQ 6259 (m series) with ANSI C in windows 2000*

*Facing problems while using NIDAQ 6259 (m series) with ANSI C in windows 2000*

I need to use six analog inputs while acquiring these at a continuous rate in the above defined environment. I am using DAQmxErrChk
(DAQmxCreateAIVoltageChan(taskHandle,"Dev1/ai0:5","",DAQmx_Val_RSE,0.0,0.5,DAQmx_Val_Volts,NULL));

But it refuses to run and says: Buffer is too small to fit read data. I have assigned the input as float64 datai[6];

Any help please!
0 Kudos
Message 1 of 3
(2,943 Views)
I forgot to mention that the error status code is -200229

Thanks.
0 Kudos
Message 2 of 3
(2,947 Views)
Hi Shukla,

There could be multiple causes to this error. Things that I would check to troubleshoot this problem are 1) Check to see if examples that are shipped with the NI-DAQmx driver are working. 2) This error could occur because of differences in the way that you have set up your channels and the way that you are actually reading your data.  More specifically, check your DAQmxReadAnalogF64() or whichever read function that you are using to acquire your data. Another post that was dealing with a similar problem is here.  3) Make sure that you are not trying to run analog input tasks in parallel and also could you tell me whether you are doing your acquisition in continuous mode or not. If you are acquiring continuously, you should check what you have set your sampPerChanToAcquire parameter as. 4)  Make sure that you are specifying the correct amount of samples that you want to read and in some functions you specify parameters (for example "array size"), which needs to be in bytes and not in samples.  Again, here is another post that was dealing with a similar issue.

It would help if you could post your code so that I could take a look at it.  As far as the little code that you posted in your first post, I do not really see anything wrong there.

Regards,
Raajit L
National Instruments
0 Kudos
Message 3 of 3
(2,918 Views)