LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS File starts recording data at 20Hz, but after a short time drops to <10Hz as VI slows, why?


@superomario wrote:

What is this symbol?

 

Capture.PNG


 

That just checks if the array is empty.  It prevents you from logging data to disk if you have none generated from the earlier for loop.

 

Unrelated rant (because it is a pet peeve of mine) that crossrulz commented on earlier when he said ... "The queue can then be safely destroyed and we can guarantee that all of the data has been logged."

 

Yes, I know that if you go "New -> Vi from Template -> Producer/Consumer Design Pattern (Data), it basically suggests stopping your consumer loop from an error - exactly like you did.  It was (in my opinion) a very stupid choice of NI to include this as the default design pattern for Producer/Consumer.  If you still have items in your queue at the time you hit the stop button, it instantly releases that queue and you never give your consumer loop a chance to dequeue / respond to the remaining elements in the queue.  The pattern crossrulz suggests will ensure that all of your data is out of the queue and logged before releasing it.

0 Kudos
Message 31 of 34
(1,110 Views)

Oh okay, could not find it in the boolean menu for a reason!

 

Sadly none of these suggestions has fixed my problem, 6min into the program running (WITH TDMS logging turned off even!!) the program begins to slow down, by 8min it had lost 3min worth of data and the counters on screen were lagging wayyy behind. Is it the graph? Should I change to chart? I really like having the cursor control to indicate when timestamps are logged in the file on the chart in real time but if it causing slow downs I guess I have no choice but do away with it. Though it was my understanding that preallocating 1 million samples to the array/chart before hand would prevent that =/

0 Kudos
Message 32 of 34
(1,103 Views)

Tried to to switch to a chart instead of building an endless graphing array and still the program seems even slower now. I am so confused as to why.

0 Kudos
Message 33 of 34
(1,069 Views)

How did you end up solving this issue? I'm having a similar problem.

Thanks

0 Kudos
Message 34 of 34
(573 Views)