03-17-2009 12:36 PM
Hi,
I have a VI with producer/consumer format, which runs continously night and day. The data it acquires is supposed to be logged to a csv file.
The vi worked fine for about a month, but now it fails to save the data every few days. It just stops saving.
The vi is still running with no error showing up, but the data is not saved.
I have to close the VI and re-launch it; then it continues to work fine for a couple of days.
Why could that be?
I'm using LabVIEW 7.1, on a Windows XP machine.
The DAQ board is a NI USB-6229 M
Regards,
Victor
03-17-2009 12:52 PM
What measures are you taking to control the size of your data files? How many points are you saving? How often do you save the data?
csv files take up a lot of space. You might want to consider saving in a binary format instead if you're saving large amounts of data.
Are you opening and closing the file each time you write to it?
03-17-2009 12:55 PM
Without seeing code, it's hard to guess.
Note that the mSec Timer overflows after 4294967295 mSec - that's 49 days. If you have things tied to that, it's a possibility.
Are you indeed checking the error from WRITEing the file?
Are you writing into a single humongous file, or a series of daily files?
Give us some info to work with, please.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
03-17-2009 01:39 PM
Hi Diane,
I'm actually saving analog and digital data, into separate files. The data files are very small, 30Kb and 1Kb respectively.
I open and close the files every time I write to them, because I generate new files all the time.
Thanks,
Victor
03-17-2009 01:46 PM
It would be very helpful if you posted your code. How do you know for certain that no errors are occurring? Have you put a probe on the "error out" terminal of your "write to file" VI?
03-17-2009 01:46 PM
Hi Steve,
I replied new information in response to Diane.
I have some error checking for the file writing, a dialog box should appear if there is an error, and nothing pops up. The vi continues to work.
I agree you need more info to understand what's going on.I can send the vi, but I'm new to this forum, soI don't know how to post it here.
I also have an old NI reference number if it helps, I used to have NI support. If fact They helped me develop this vi.
Regards,
Victor
03-17-2009 01:52 PM
On the REPLY form, there's an ADD ATTACHMENTS item. Click on it, then find your file and attach it.
Note that you'll get a better chance of help if you save as the earliest version you can.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
03-17-2009 01:53 PM
Hi Diane,
I found out how to add the VI, so I'm attaching it.
Actually, they're two VIs.
Regards,
Victor
03-17-2009 01:55 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
03-17-2009 02:06 PM
Sorry about that,
I write a new pair (analog and digital) of files for every event. The events are spaced about 80 to 100 mS apart. I'm saving 60mS worth of data on every event.
I save all the data points for the analog data, but just the transitions for the digital data.
The events occur in bursts of about 300 to 500 approximately every 20 minutes.
All the data files accumulate in a folder which gets emptied at the end of the day. The total amount of files per day is about 15,000.
Victor