02-19-2016 12:10 AM
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.
02-19-2016 02:18 AM
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?
02-19-2016 04:17 AM
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
02-19-2016 05:41 AM
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.