LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS - group by date

Dear LV'ers

 

after reading lots of TDMS related posts, i have gained basic knowledge on using it (atleast). but my recent project application was a bit complex design and need to manage enormous data. with a few knowleldge on TDMS function, I still cannot figure out how to start with my design. any help from you guys are greatly appreciated.

 

In our design, we prioritize budget cost  and independencies (no DIADEM, no other database software), that is why we really need to stick in using TDMS. here is the sample data management grouping we want.

 

 

3.jpg

 

each device will have different group name via parameter.. and each parameter will have sorted data via date... if possible, (if only), we want to retrieve data by its time duration (i.e. power data of device #1 from 10:00am to 4:00 pm of january 2)...

do we need to upgrade our LV software for datafinder function?

 

each TDMS files will sort via month.. (i.e. January.tdms, february.tdms, march.tdms and so on)...

 

can someone teach me how to do this design? or provide simple coding diagram on sorting data via parameter and date?

 

million thanks for any help!

Ivel R. | CLAD
0 Kudos
Message 1 of 4
(2,829 Views)

Hi ivelson,

 

Seems the timestamp information is important in your application. You need to know each data values acquisition time, right? Otherwise, how you can retrieve data like from 10:00 to 4:00? This has a problem here, in TDMS file, it cannot record the time automatically. There are 2 kind of cases:

 

  1. If your acquistion time interval is a constant, like always acquire a data value each 1 second, then you can record down the start time and the time interval in TDMS properties. When retrieving data, you have to do some calculation in your code to get to know the from which value you want to read from the channel.
  2. If your time interval is not a constant, then you have to record the timestamp informatin in a separate channel with the data values channel and then it would be a little bit complicated when retrieving data.
And, I cound't fully understand the situation you have in your application. But I can see one problem that TDMS only has 3 level, in 1 TDMS file, it can have multiple groups and in each group, it can have multiple channels, TDMS currently doesn't support customized multiple layers. Another reference is that TDMS has a node "TDMS List Contents" in LabVIEW, it can list the groups in a file or all channels in the group, hope it helps when sorting your groups.
Please let me know if you have any specific problem when using TDMS files.
Yongqing Ye
NI R&D

 

Message 2 of 4
(2,813 Views)

In my application, i have several machines and each machine have each parameters i need to be record (store / save). Based on your fact that TDMS has a limited layers, i think that my design layer was not applicable. but i think i can still do it by putting the timestamp in separate channel.

 by the way, in item #1, how can i set the start time and time interval in the TDMS properties for data retrieval? for example, i provide a code below getting 10 data samples each second. i used the separate channel for time and device parameters. but i dont know how to recall the data for specific time (i.e. getting data from 8:51:52 to 8:51:56).

 

4.jpg

Ivel R. | CLAD
0 Kudos
Message 3 of 4
(2,770 Views)

Hi ivelson,

 

For item #1, you can record the start timetamp and the time interval as 2 properties for the group. In your attached example, since the time interval is always a constant, you can calculate that from 8:51:51 to 8:51:56 data values positions are from the 2nd (if start from 0) to 7th, so you can wire 2 to the terminal "index" and wire 6 to the terminal "count" of TDMS Read when you reading the data values.

 

 

0 Kudos
Message 4 of 4
(2,760 Views)