LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save queue flush to tdms

Hello all,

 

I am collecting data at 30kHz in a producer consumer loop. The data is enqueued and then written to a TDMS file. After a set time has elapsed, the producer loop stops enqueuing data and the rest of the queue is written to the file. This is very slow and can take much longer to finish writing than it took to collect the data. What I would like to do is flush the queue and write that entire array once data acquisition is stopped. However, the data type seems to be an array of a cluster of an array, and it cannot conform to the Write TDMS data type. I can extract the cluster and convert to array, but all I see is one data point, not a full queue. What is the best way to write the remaining queue to the TDMS file?

0 Kudos
Message 1 of 2
(146 Views)

I can extract the cluster and convert to array, but all I see is one data point, not a full queue.

I don't understand what you mean by this. It sounds like you have a queue of arrays, which LabVIEW automatically wraps each array in a cluster for the flush node because jagged arrays are not supported. But each cluster should contain each array that was enqueued originally.

 

If you don't want to deal with the array of clusters you need to change the queue to just have numeric type.

avogadro5_0-1746138340285.png

 

You could also replace flushing with just dequeuing each array until the queue is empty.

avogadro5_1-1746138503684.png

 

 

0 Kudos
Message 2 of 2
(121 Views)