LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write tdms continiously

Dear All!

 

I'm using the following VI to read data from a physical channel and simultaneously write it to a tdms file. 

 

I have set the sample rate to 1000 Hz and the number of samples to 1000. The problem is that when reading the generated tdms file with DIAdem, I can only see 1000 samples of the physical channel. I would like to apprend the block of samples I get in each while loop iteration in the same tdms file.

 

I would really appreciate if you could help me,

 

Miren

0 Kudos
Message 1 of 8
(3,332 Views)

Try placing the open & close tdms-VIs outside of the while loop.

 

At the moment with every cycle of the while loop you replace the already existing tdms-file with its 1000 values in it with a new one.

0 Kudos
Message 2 of 8
(3,326 Views)

Hi Miren,

 

       I think you may find "Cont Acq&Graph Voltage - Write Data to File (TDMS)" example really helpful. You can find it at the LabVIEW Example Finder by searching for "TDMS".

 

Regards,

David Oña
0 Kudos
Message 3 of 8
(3,310 Views)

Thank you very much for your answer. It was really helpful for me.

 

 

0 Kudos
Message 4 of 8
(3,306 Views)

Just one more question. When I write data to a TDMS file and open it afterwards using DIAdem, I would like the X-axis unit to be time, instead of samples. Is there any possibility to change this? Do I have to do any changes in the way I'm storing data in the TDMS file?

 

Thank you very much in advance,

 

Miren

0 Kudos
Message 5 of 8
(3,304 Views)

The way data is displayed in a diagram in DIAdem is determined by the way you add this data to the diagram, both in "VIEW" and in "REPORT".

 

You can select the data to be displayed in the diagrams via the data explorer to the right side of the main working area. If you select multiple channel and drag and drop them in a diagram, the first selected channel will be the x-Axis-Data and all following channels will be used as y-Axis-Data.

 

In "REPORT" you can also directly edit the assignment of data to a diagram by double clicking on the diagram and modifying it in the respective tab.

0 Kudos
Message 6 of 8
(3,294 Views)

so, therefore, i need to store the time data at the same time i'm storing the data from the physical channel in the tdms file? How could i do it? How can i get the time info and save it in the tdms file?

0 Kudos
Message 7 of 8
(3,289 Views)
0 Kudos
Message 8 of 8
(3,276 Views)