10-10-2007 02:07 PM
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:_unnamedTask<1>
So naturally I suspected that the program has a problem .. but when I simulated the PCI 6251 M Card with the program on a cmputer with no DAQ Card it worked fine.
So I thought the driver is incorrectly installed ..The person took the PCI 6036 E Card and installed it into the computer where the PCI 6251 M Card was and the program worked fine.
And my question ... where is the problem ? ( I no longer have access to the computers with the Cards , as I'm in a different country now :smileysad: )
Thank you in advanced for any ideas.:smileywink:
10-11-2007 10:14 AM
10-11-2007 05:39 PM
Hi Amutiano
I will first point you to an example already written to synchronize analog input and analog output; this example will be located inside the National Instruments folder “MultiFunctionSyncAIAO_DigStart.sln” and compare that example with your code. The error is self explaining that the minimum buffer size is two this is something you should change in your code the “samples to read” to two. This error occurs because the buffer size needs to be greater than two for that card. In case you don’t find the example take a look at this knowledge base: NI-DAQmx, NI-VISA and NI-488.2 .NET Example Locations
I hopt this helps.
10-12-2007 03:47 AM
10-12-2007 03:48 AM
10-12-2007 03:25 PM
Hi Amutianu,
The method “WriteSingleSample” creates a buffer of one so you can not use this function with the PCI-6251. Why Am I Getting Error -200609 or Error -200802? In this case you need to reset the voltage level using “WriteMultipleSamples”. If you comment this line (write.WriteSingleSample) in your code you will see that the error will not occur. I would like to confirm that I understand your issue, you say at the end of your last post “The only time when I read/write a single sample is when I reset the voltage level using write.WriteSingleSample and ReadSingleSample” by resetting I think you refer to updating the value right? And here is where the buffer is been setup for one.
I hope this helps.
10-14-2007 06:45 AM
10-15-2007 07:30 PM
Hi amutianu,
The ReadSingleSample method should work properly with the way you have set up your application.
To give further explanation as to why the WriteSingleSample method doesn’t work we can take a look at how you have set up your timing on the output channel. I have quoted and highlighted this on the line below:
output.Timing.ConfigureSampleClock("",1000,SampleClockActiveEdge.Rising,
SampleQuantityMode.ContinuousSamples);
With this continuous sampling mode selected as I have highlighted above, you will only be able to use the WriteMultipleSamples function.
While your input channel is also defined as continuous you may still use the ReadSingleSample and ReadMultipleSamples methods without error.
10-16-2007 10:02 AM