05-01-2025 03:23 PM
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?
05-01-2025 05:30 PM
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.
You could also replace flushing with just dequeuing each array until the queue is empty.