LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Logging using Write to TDMS

Solved!
Go to solution

Hooovahh,

 

In my earlier post I said I wanted to learn a little, not a lot! Just kidding, I appreciate the information and it is very useful. I enjoy learning best practices, and it's always better sooner than later!

0 Kudos
Message 11 of 18
(2,102 Views)

Using the 'create or replace' setting, the old file is replaced if it already exists

 

Is there any way to have a new file with some suffix added if a file with the name already exists?

 

For example:

Data File.tdms

Data File-2.tdms

Data File-3.tdms

etc

 

Thanks!

0 Kudos
Message 12 of 18
(2,095 Views)
Solution
Accepted by topic author ghp_1

I think you'd have to implement your own logic using the "Check if file or folder exists" function.

Message 13 of 18
(2,090 Views)

Starting in 2015 there is actually a "Create File with Incrementing Suffix" which will create a new file name that doesn't overwrite an existing one.  It has a few features I wish it didn't (like opening a reference to that new file) but you can open it up, make a new copy, and edit it to your liking.

 

And as for the TDMS comment, I really enjoy the file format.  For the types of data that LabVIEW applications generally produce, they work pretty well.  With tools to convert or open in Excel, quickly finding data without needing to read the whole file, fast writing, DMA streaming from DAQ to disk, in memory manipulation, and the fact that NI seems to continue to add new features, it makes sense to at least research and give it a try.  An interesting thread on LAVA appeared a while ago where I gave my opinion.

0 Kudos
Message 14 of 18
(2,079 Views)

Would just like to add a hint regarding "traceability" of data in TDMS files;

We found that often circumstances had us looking at old data, and not knowing exactly what calibration constants we had used when obtaining the data. This was true in both text files and TDMS files (losing notes is platform independent). After we got friendly with the functions available in the TDMS we started to store calibration constants in the properties of each data channel. When using waveforms as DAQ output, our calibration subVI (that applies our calibration values) stores channel name and calibration constants in the waveform attribute. The nugget here is that waveform attributes are automatically written to the channel properties of the TDMS. 

We could, and probably should, include sensor serial numbers etc. here...

 

Best regards,

Jarle Ekanger, MSc, PhD, CLD
Flow Design Bureau AS

- "The resistance of wires in LabVIEW is not dependent on their length."
0 Kudos
Message 15 of 18
(1,842 Views)

was this for me??

 

0 Kudos
Message 16 of 18
(1,838 Views)

How do I get the TDMS write to let me attach a array of strings for the names......I cant seem to get this to work.

0 Kudos
Message 17 of 18
(1,468 Views)

@BBEATON wrote:

How do I get the TDMS write to let me attach a array of strings for the names......


You start by making your own new thread which starts as unanswered.  This thread not only doesn't relate to your problem but has been solved.  Also reading the context help on the write function, and looking at the examples will help.  If you do make a new thread asking a new question, be sure and provide as much details as you can including example code, what version of LabVIEW and OS if applicable, and what you are trying to accomplish.

Message 18 of 18
(1,466 Views)