04-05-2016 04:51 PM
@superomario wrote:What is this symbol?
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.
04-05-2016 05:02 PM
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 =/
04-06-2016 08:47 AM
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.
10-19-2017 09:10 PM
How did you end up solving this issue? I'm having a similar problem.
Thanks