02-07-2019 11:47 PM
Hi everyone..
my question is that how can i read stored tdms data for a particular time with the help of time & date control. I am attaching this VI in which i am storing a group of data .
i want to retrieve this data for particular time with the help of time & date control.
02-08-2019 07:23 AM
Kindly convert the code to LabVIEW 2017.
02-08-2019 05:04 PM
Currently, your code doesn't do what you think it does. Be sure to read carefully the help on TDMS Write. As written, all your data is written to an Untitled channel and Channel-1. This is exactly as the help describes because of the array you pass in. You need to convert the array into a column of data and not a row. Again, I recommend reading the help file.
http://zone.ni.com/reference/en-XX/help/371361P-01/glang/tdms_file_write/
Second, you can view the data easily using the TDMS File Viewer.vi function in Labview. This can help you debug issues with your TDMS file (you'd see all the issues with your data format).
Third, I would recommend not using a TDMS file because they are so hard to handle and have lots of gotchas. I would recommend a human readable file such as a CSV. If this is long term, low repetition rate logging data, also consider a database.
However, if you must use a TDMS file, you have a couple options for find the data associated with timestamp. One way is just read in all the data and then do a search for the time stamp. Note that a time constant can actually be a double value (timestamp to double conversion) so all your data can be same value. Then just load in the full 2D array, pull out the data column for the time and find index of the closest value to the one you want. In one application I had, since the TDMS files were GBs, I did a binary search in the file for the time. So options abound.
02-19-2019 11:22 PM
I am being able to store data but i do not know that how to retrieve a particular data from that all data with the help of two time & date control
02-21-2019 09:33 AM
Could you post your updated code? What have you tried so far? Can you elaborate a bit on your goals? To me the solution depends a bit on how much data you plan on collecting and the data format you plan to use. However, I recommend using a spreadsheet file (comma seperated file) instead of TDMS for the application you original wrote.
03-03-2019 11:32 PM
I will retrieve data of almost 5 years .
I want to use tdms because i will use many group of data.