Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Error 200279 occured at DAQmx Read (Analog 1D Wfm Nchan NSamp).vi

116 views
Skip to first unread message

mickeyw

unread,
Aug 4, 2008, 12:10:12 PM8/4/08
to
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

unread,
Aug 5, 2008, 9:40:07 PM8/5/08
to
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

unread,
Aug 6, 2008, 3:10:07 AM8/6/08
to
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

unread,
Aug 7, 2008, 12:40:06 AM8/7/08
to
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

unread,
Aug 7, 2008, 1:10:11 AM8/7/08
to
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
0 new messages