Discussion:
Error 200279 occured at DAQmx Read (Analog 1D Wfm Nchan NSamp).vi
(too old to reply)
data acquation
2008-08-01 11:40:19 UTC
Permalink
Hi, I am using NI USB-6008. I have a robot arm connected and the NI takes the voltage reading from the arm. I need to take the 3D position of arm. I have a Labview program with Matlab for arm. When I run the program, the Labview shows  error message as 'Error 200279 occured at DAQmx Read (Analog 1D Wfm Nchan NSamp).vi'.  I am struck with this error message. In that error message it says as below:         " Possible reason(s):          Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten.          Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.' Please help me to rectify this error, Where I need to increase the buffer size? Is it possible to the view the 3D graph from other sides of dimensions, if yes how?  I will be waiting for your reply...  Thanking You.RegardsNag
mickeyw
2008-08-04 16:10:12 UTC
Permalink
Hi Nag,
 
The error you are experiencing is due to the application not retrieving data quickly enough, meaning that the original data is being overwritten. During a continuous, buffered acquisition, the buffer should be monitored to ensure the data is not overwritten.  If the value continuously increases during the acquisition, decrease the sampling rate, increase the buffer size, or increase the number of samples per channel to read. Make sure the error output of the Open File Dialog VI (if used) is wired to the error input of the Start Task VI, in order to make sure no readings are taken before the task is ready to begin.
 
I have attached some sample code which is similar to what I believe you are trying to do, and should solve your problem.
 
Regards,
 
Mike
 


 

 

 


CircularBuffer[1].vi:
http://forums.ni.com/attachments/ni/250/42068/1/CircularBuffer[1].vi
ahtiam
2008-08-06 01:40:07 UTC
Permalink
Hi,
I face the same problem but i'm using LabVIEW 7.1 with DAQmx lastest version dan use NI PCI-6220.
Please help me to rectify this error.
Thank you.
devchander
2008-08-06 07:10:07 UTC
Permalink
Quite a few thing you have to get right in your code.
For start,
looks like you need to perform 4 iterations per sec ( is that why you are using wait until next mS Multiple function == 250?? )
Am I correct in understanding that??
 
If that's correct, Remove that wait>>set your 'Scan rate' of AI sample clock and 'Number  of samples to read' to get your desired loop rate
For example, Scan rate = 400, Number of samples to read=100 should make your loop run 4 times in a sec
 
In your program, you have scan rate as 100, reading samples at rate of 10 ( effective this translates to a loop rate of 10/sec) and you also have a wait until next 250 ms ( which actually makes your loop iterate at rate of 4/sec), which seems to be causing this error
 
 
Regards,
Dev
ahtiam
2008-08-07 04:40:06 UTC
Permalink
hi,
I already remove the wait but the same error occured. 
So, by try and error.
 I find out that the scan rate only can set as 10.  If I set the scan rate others that then the same error will occured.
Why this happening?
devchander
2008-08-07 05:10:11 UTC
Permalink
Two thoughts
1. Try using basic File write I/O functions. Look at File I/O example VI's shipped with LabVIEW to understand them ( DAQmx express VI's are good to start with, but are not good to use in a process-time demanding situation like yours)
2. Since you are doing 3 file write operations, think of a suitable architecture like <a href="http://zone.ni.com/devzone/cda/tut/p/id/3023" target="_blank">Producer Consumer Design pattern </a>&nbsp;for your application. Keep DAQ operation in Producer Loop, File Write in the consumer loop
Loading...