LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI stops saving data to file

I don't know of any specific problem (as I said, I haven't had the time to look at your specific code), but it's possible that, if one operation takes an extraordinarily long chunk of time, then the other loop doesn't work right.

 

I'm not saying that's the case here, I'm saying that it's something to look at.  When you have 15 k files in one folder, sometimes the OS just takes a break. 

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 21 of 56
(1,547 Views)

Your data acquisition and your file write are taking place in separate loops.  So your DAQ loop should update regardless, as it seems to from your description.

 

It's possible that you are throttling your queue.  If your file write is taking too long (certainly possible given the number of files you're writing), then data will continue to pile up in your queue until it more-or-less hangs up.  That won't necessarily generate an error, but it will essentially stop your upper loop from executing.  Hence neither of your files will be saved, since that loop is stuck.

 

There is at least one thread on this forum that relates to throttling the queue.  Take a look at it.

 

I suspect that you have a combination of problems here...excessive number of files bogging down your OS, and the inability of your upper loop to keep up.

0 Kudos
Message 22 of 56
(1,540 Views)

I added Error handling to the analog file save part as well.

 

We'll see what happens (in a couple of days). I'll keep you posted.

 

Thanks for your help!

 

Victor

 

0 Kudos
Message 23 of 56
(1,539 Views)

ata will continue to pile up in your queue until it more-or-less hangs up. 

The only way I see that happening is if RAM fills up.

 

If it really is the OS taking a breather from dealing with a huge folder, then the queue gets more and more items in it.

But unless we get into RAM-FULL territory, then it will become unstuck and fix itself, as far as I see.

The WRITE FILE loop starts hogging the CPU because it has tons of work to do, but I don't think that's fatal.

 

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 24 of 56
(1,524 Views)

I don't know for certain that the queue is being throttled...I merely put it forth as a possibility because I've throttled a queue before and that's how my VI behaved (the one loop executed normally, the other one hung).  Once I implemented some controls to prevent too many items from piling up in the queue, I had no further problems.

 

Just an idea.

0 Kudos
Message 25 of 56
(1,518 Views)

Diane,

 

I've been searching around the forum about this throttling you mention. I could not find anything relevant.

 

Can you explain this a little to me?

 

Thanks,

Victor

0 Kudos
Message 26 of 56
(1,516 Views)
Search "too many events in queue" for some additional info.  I can't find the exact thread I originally referred to, and I don't have time to search through all of the hits I get from just typing in "queue".  The thread to which I originally referred is also referred to by TonP in one of the posts under "too many events in queue", but he wasn't able to find it, either.  I wonder where it went?
0 Kudos
Message 27 of 56
(1,499 Views)

To find out if your dequeue function (upper loop) is keeping up with your enqueue function (bottom loop), put the "Get Queue Status" function in your upper loop, before your dequeue function.  Wire an indicator to the "# of items in queue" output of "Get Queue Status" so you can see the number of items in your queue.  If that number keeps growing and growing, then you have a problem.  Your loop will grind to a halt in that case.

 

As I said, I don't know that you actually have this problem...it is only an idea.

 

BTW, I don't see any time delays in either of your loops, and your queue functions don't have timeouts wired to them.  Did I miss them?

0 Kudos
Message 28 of 56
(1,492 Views)

Hi Diane,

 

I added error checking to the VI and now got this error (see attachment).

 

How can I get an error in the top loop to stop both loops?

 

 

Thanks,

Victor

0 Kudos
Message 29 of 56
(1,472 Views)

Dequeue Element:  Refnum became invalid while node was waiting for it.

 

The only thing that could cause that is the bottom loop quitting and destroying the queue.

 

What happened to trigger the error - did you stop manually? 

 

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 30 of 56
(1,466 Views)