02-06-2025 07:48 PM - edited 02-06-2025 07:49 PM
Hi everyone,
I am trying to save some data using TDMS write from a cluster of 16 elements. While I understand that the data input has to be an array, I see that the cluster to array is only displaying one channel (the first element in my cluster which is TC K (K)) and saving all the data in one column. How can I change this so that I use all the channels and save the data in 16 columns? I attached screenshots here and the code as well. The VI pictured is the main (host) VI. Thanks!
02-07-2025 01:00 AM
Hi irivera,
@irivera30 wrote:
I see that the cluster to array is only displaying one channel (the first element in my cluster which is TC K (K)) and saving all the data in one column. How can I change this so that I use all the channels and save the data in 16 columns?
Read the help for the ClusterToArray function, then configure that node as needed!
Btw. cleaning up code helps to understand that code and it also helps to minimize programming errors…
Right now the logging loop will only execute AFTER the DAQ loop has finished because of THINK DATAFLOW!
02-07-2025 01:57 AM
The cluster to array automatically makes an array with as many elements as there are in the cluster, so you have it correct. Have you tried probing the wire? Or making an indicator and checking the actual value of the array?
02-07-2025 02:06 AM
02-07-2025 03:38 AM
Make the output of Cluster to Array a 2D-Array with Build Array and then transpose it.
The TDMS functions do not work that well with one sample per channel per write.
You may need to defragment the file afterwards to reduce the file size.