11-11-2014 04:04 AM
Hi All,
I admit that i'm totally new. I have a probelm with my VI program in that after about 20 minutes it stopped with an Error -200279.
I uplodded my VI and I appreciate any possible help.
11-11-2014 11:26 AM - edited 11-11-2014 11:28 AM
The help for this error says:
Error -200279 occurred at an unidentified location
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.
Obviously, you are trying to read more data that can be processed in time. I cannot see the configuration of the DAQ assistant. How is it configured?
You buld an xy graph without any upper limit (the build xy graph express VI is set to retain data between calls!), so you'll run out of memory eventually. Before that, you'll slow down trying to allocate more and more memory. You need to limit the history contained in the xy graph.
I would also recommend to use lower level DAQ functions.
Also the writing to the file should be done asynchronously, and not in the DAQ loop, for example using a queue.
11-12-2014 04:52 AM - edited 11-12-2014 04:55 AM
Hi altenbach,
many thanks to your reply. I searched for what you said about an 'upper limit' to xy graph but I didnt figure out how to do it. Can you please give me more explanation. In addition, when I change the program to the new one (attached), the program was run for 60 min, and was smaller in size, which is better. However, it ends with the same error. 'Using lower level functions' and 'asynchronously writing' are also need more elaboration, if you don't mind.
Regards
Ahmed
11-12-2014 02:39 PM
(Please give your attachments unique names. It is confusing if you keep attaching new versions, all with the same name.)
The "build xy graph" express VI will accumulate data forever unless you configure it to "clear data on each call". Since you only add one point per call, It seems silly to now "reset" on every call, but still configure it to retain data. What was your thought process? Personally, I would get rid of the express VI and just retain a finite set of historical data in a shift register, for example.
Use a seperate loop for the FIle io. Write the data to a queue in the current loop and read the queue in the second loop. Look at the help, shipping examples and design templates.