From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to merge data that collected from different states in a state machine

Is it fair game to use the Convert Cluster to Array function to be able to wire the master array to the TDMS Write function? I ran a simple test with a few rng's to simulate data and it works, except all the data was in a single column in the spreadsheet.

0 Kudos
Message 11 of 12
(169 Views)

t0 is time stamp and defines the time of the first point in the waveform. For the rest of the waveform, dt is used to figure out the time relative to t0. So if I had data taken at 4pm, I could just replace t0 with a timestamp at 6pm, and then the data says it was taken at 6pm. You can check if your waveform already has non-default a value for t0, in which case you wouldn't have to do anything.

 

Cluster to array works well when everything in the cluster is the same data type, otherwise it has to coerce things be the array datatype. I'm not too familiar with TDMS, but if I was writing to a plain text file, I would probably unbundle each piece of data, convert it to a string (format into string is great for this), then build an array out of that data, before feeding it into the "write file" VI.

Message 12 of 12
(159 Views)