07-13-2012 08:26 AM
I have been trying to log the data from DAQmx functions to the conventional TDMS stream method in a while loop. The problem is that I can never synchronise the sampling rate of the data from DAQmx and the Elapsed Time Function. In fact, changing the rate on Sample Clock Function does not affect the sampling rate into the TDMS.So the data logged into the TDMS file is always at constant rate.
This is causing me a massive problem when come to processing the data.
I have attached the labview code and one of the data.
Can anyone tell me what I have done wrong here?
Solved! Go to Solution.
07-13-2012 08:58 AM
You should read out the data from DAQmx as waveform. This data type contains timing information and can be added to the TDMS.
Norbert
07-13-2012 09:34 AM
Thanks for the reply, Norbert.
Reading as 1D waveform can only log the data from 1 channel. Potentially, I would like to log data from multi strain gauges and accelerometer at the same time.
Also, I still can't change the sampling rate... I think it is always at 0.000620, which is not good for later data analysis.
Is there any other way to solve this problem?
07-13-2012 11:22 AM
Hi Norbert,
I have just got the timing right by seperating into two while loops, but here is another problem. The data from DAQmx will only read up to around 0.3 seconds.
Do you happen to know the reason for this?
Thanks for your time and help,
Tong
07-13-2012 01:26 PM
@tonger wrote:
Thanks for the reply, Norbert.
Reading as 1D waveform can only log the data from 1 channel. Potentially, I would like to log data from multi strain gauges and accelerometer at the same time.
Also, I still can't change the sampling rate... I think it is always at 0.000620, which is not good for later data analysis.
Is there any other way to solve this problem?
That statement about logging only a single channel is absurd. And your two loop solution is just as wrong. A 1D waveform contains as many channels as you specify and it has an actual timestamp in it - not some asychronous number from a different loop.