From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make a query by date with several TDMS files?

Hi,

 

I have a project that can write and read TDMS files everyday (a file for each day with date and time). There, I can import those files to excel (I choose a file and load it). But, I have a question: How can I make a query by date with those TDMS files? I'd like make a time stamp for start date and stop date, where I could compare the TDMS file dates and sum the values that are in the channels where these files are similar. For example, I save a file with "02/01/2013" name, in other day "03/01/2013"in other day "04/01/2013"... so, i'd like put in time stamp for start date "02/01/2013" file and to stop date "04/01/2013" file, than, sum all values that range with my TDMS files existing. How can I make that? 

 

Thanks all,

 

---

 

Val 

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

Hi Val,

 

Actually, I didn't fully understand what you want to do, what do you mean by "query"? Do you mean query by programming in LabVIEW?  And, if you want to use the date or the timestamp information, I would suggest you store the date or timestamp as one of the TDMS properties on file or even as the name of the file, does it make sense to you?

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

Hello Val_Auto.

 

I build a VI specially for you. I wait have understood your question and this VI help you.

In Diagram Blocks I wrote some coments that help you too.

 

Let me know if i help you and success in your application.

 

Thaks for you contact.

 

Best Regards.

 

Wesley Rocha
Application Engineer
National Instruments Brazil

Visite a nossa comunidade em PORTUGUÊS!!!

Certified-LabVIEW-Associate-Dev
Download All
Message 3 of 8
(3,483 Views)

Ow! Thank you so much, but my version is the labview 8.5! Can you convert this file? Thanks! 🙂

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

Hello Val_Auto.

You're Brazilian, no? Me too. = ^ - ^ =

I converted VI to version of your LabVIEW (8.5). Is attached in this reply.

 

This VI search all your TDMS in a range of dates and join them in a single TDMS. I hope this is what you wanted.

Query TDMS is the main VI. The TDMS VI Search changes the date format that out from calendar control (which is DD / MM / YYYY) to DD-MM-YYYY. This is because you can't name files using "/". I chose "-" but, if necessary, you should change to keep the same format of your TDMS files.

If you have any doubt as to its operation or how to make changes to adapt VI for your application, keep at your disposal.

Thank you for your contact; I hope have helped you and succeed in your application.

 

 

 

 

Wesley Rocha
Application Engineer
National Instruments Brazil

Visite a nossa comunidade em PORTUGUÊS!!!

Certified-LabVIEW-Associate-Dev
Download All
Message 5 of 8
(3,436 Views)

I'm too... 🙂 So brazilian.. Thanks for your help.. 😉 I'll test here... 

 

Thank you so much

Message 6 of 8
(3,431 Views)

Ainda em 12.0... =\

0 Kudos
Message 7 of 8
(3,429 Views)

Sorry, I corrected VI's version, now. I hope this work for you. And sorry too for not writing in Portuguese. This is because it can help other users too. But you are welcome in your portuguese (BR) community.

Thak you so much and thank for your Kudos. =^-^=

Best regards,

Wesley Rocha
Application Engineer
National Instruments Brazil

Visite a nossa comunidade em PORTUGUÊS!!!

Certified-LabVIEW-Associate-Dev
Download All
0 Kudos
Message 8 of 8
(3,400 Views)