12-17-2010 03:41 PM
I am very new to LabVIEW, as in 3 days, and have not been able to figure out my problem with losing data while trying to write to a .txt file. I have a load cell that I am attempting to obtain data from, but when I go to the waveform data I am losing approximately 2/3's of my data and am worried that an event will be missed and the data cannot be used. Because I'm new, I am not good at troubleshooting/debugging and am looking for any help or guidance. I have attached an image of what I have.
12-17-2010 03:53 PM
The best time to learn is when you are learning.
A good way to handle this situation is to separate the data acquisition from the file save function. The standard way to do this in LabVIEW is to use parallel loops. Look at the design patterns which come with LV: File >> New.. >> VI >> From Template >> Frameworks >>Design Patterns >> Producer/Consumer Design Pattern (Data). Note that this is NOT File >> New VI.
Lynn
12-19-2010 03:14 AM
Hi there,
I think your basic problem is that you're obtaining your samples in individual lumps by collecting N samples then plotting and writing them to disk. If you change your task to a continuous acquisition say acquiring 10 samples at a time at 10Hz then the loop timing will be handled by the acquisition and the amount of data to be saved will be done easily within 1 second. See sample below. In this way you'll be constantly acquiring data and writing it to disk with no gaps.
If you want to run the acquisition faster than say a kHz then I'd follow the suggestion made in the previous reply and stream the data to a separate loop via a queue just in case the disk write takes longer than the loop time.
12-20-2010 12:21 AM - edited 12-20-2010 12:22 AM
Hi
I think u r replace the data in the file. So change the settings from "Replace or Create ". If u choose this u can view only the last data.
Thanks
Sivabalan.V
12-20-2010 05:41 AM
Hi,
I think this example may help you..Let me know if it was useful..
Regards,
Nitz..
(Kudos are always welcom;))
12-20-2010 08:02 AM
Thank you to all of you who replied. That was extremely helpful. You are correct, this is the best time for me to learn. I'm catching on (slowly, but surely)!