Hi, Please I need help! I need to do data acquisition with 20 KHz and I would like to save these data with time stamp for each sample. I have used the myRio 1900 do it. In my code below I have tried to read only one analog channel but after the fix my issue I will need to read two analog channel. According diagram below for each exectuion I received array with 1000 data but when I save the data in TDMS format I have only one time stamp for each exectuion.
For example the lenght date & time is 120 and the voltage is 120000.
Solved! Go to Solution.
when I save the data in TDMS format I have only one time stamp for each exectuion.
Convert your signals to waveforms, which contain t0 and dt. Then save those waveforms to TDMS.
Then you can easily recover a timestamp for each sample…
(Does myRIO allow to read waveforms directly in the same way as DAQmx?)
Hi GerdW, first I appreciated a lot your help. Please could you share with me the example how can I recover a timestamp for each sample ? I would like to have a file with two columns one time stamp and second column with data.
Hi ZYOng, first I appreciated a lot your help. In the example I have one column with the data, is it possible to have two collumns in the file ? I would like to have a file with two columns one time stamp and second column with data for each sample.
On the waveform manipulation pallet you will find a vi that takes in a waveform and returns an array of timestamps calculated from t0, dt and size of y. Of course, it is trivial to write yourself. Just auto index a for loop over y, and output t0 + i * dt to an indexing output tunnel. If you really can't find it in your heart to use a wfm instance of DAQmx read, use timestamp + i / sample rate.
Use a while loop to generate an array of increasing timestamps and write it to a different channel.
Hi team, please I would like your help. I am not familiar with myRIO 1900 and I need to do data acquisition from two analog input with 20KHz and 10.000 samples with time stamp. The code below working good for one analog input I have the data record in file with time stamp, but I don`t know how to insert the second analog input. If I insert two analog input in the array connected to Smart Open.vi I had a error.
I don`t know how to insert the second analog input. If I insert two analog input in the array connected to Smart Open.vi I had a error.
Which error did you encounter?