LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI stops saving data to file

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

0 Kudos
Message 1 of 56
(4,074 Views)

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?

0 Kudos
Message 2 of 56
(4,064 Views)

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. 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 56
(4,060 Views)

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

0 Kudos
Message 4 of 56
(4,042 Views)

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?

0 Kudos
Message 5 of 56
(4,040 Views)

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

0 Kudos
Message 6 of 56
(4,039 Views)

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. 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 7 of 56
(4,033 Views)

Hi Diane,

 

I found out how to add the VI, so I'm attaching it. 

 

Actually, they're two VIs.

 

Regards,

Victor

0 Kudos
Message 8 of 56
(4,031 Views)
<i>I generate new files all the time.</i>
This is not really helpful - can you be specific?
Do you write a new file every day, every hours, every event?  
How many files are in a folder? 
 
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 9 of 56
(4,030 Views)

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

0 Kudos
Message 10 of 56
(4,024 Views)