LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

appending data to group in tdms file

      I need to continuosly monitor data from single analog channel. For that purpose im using DAQmx Logging. Suppose the task name of my channel is "Voltage". The data is saved in group with groupname"Voltage".

      If i stop my application and run it again the data is now stored in different group with name "Voltage #1".

      So each time i run my application it creates seperate group and writes data to it.

      Is there anyway to append my data to initially created group.

 

0 Kudos
Message 1 of 4
(3,596 Views)

When you save in a TDMS file, waveforms are indexed using the group and channel name. So, if group and channel names do not change, data should be appended.

Could you post your code?

0 Kudos
Message 2 of 4
(3,566 Views)

 Find the code and corresponding TDMS file in the attachment.

 

You can open the TDMS file using Excel importer.

I ran the code twice and each time it created seperate groups named Voltage and Voltage #1

Download All
0 Kudos
Message 3 of 4
(3,549 Views)

Yes, the stream to TDMS makes a different group for each run.  That is actually on purpose due to how the waveform is saved.  Instead of a timestamp for each data point, there is a single time stamp for the first data point and then a dt between each sample.  So only 2 numbers are needed for getting the time of a sample instead of having an additional number for every sample.  This savings on disk adds up really fast.

 

So you stop your program and then run again.  The problem is that it does not make sense to just add onto the previous group because the dt between the last sample of the previous run and the first sample of the new run is not the same as all of the other samples.  And you could have changed the sample rate, channel settings, number of channels, etc.  all of which invalidates all of the metadata from the group.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 4
(3,531 Views)