LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS Write and Read

I'm trying to write to tdms file, my data is in 2d array 2 channels and 1000 samples each channel (no time column in my data), i'm able to create file and data is saving into it also i'm trying to read the same saved file and display it in graph and table. but i'm not able to get correct data on my graph. and how do i output data to tabular format. i'm using express vi's to write and read. any settings i have to do?

0 Kudos
Message 1 of 16
(3,757 Views)

plz attach code 

0 Kudos
Message 2 of 16
(3,753 Views)

Hi abhishek.d,

See the examples in labview/Find Examples/Directory Structure/ File IO/TDMS/Express Read and Write you can check your settings with those expressVI's or you can put your code in those examples and only change the path in the settings to write and read the file

0 Kudos
Message 3 of 16
(3,743 Views)

Thanks a lot for your information , examples helped me a lot now colud able to do write and read( i used Express VI's).

I have one more requirement while writing data to TDMS file i want write the data to TDMS file based on userdefined time.

Suppose if user enter 60 min it should only write data for 60 min and stop. Any Ideas how to do this..?

0 Kudos
Message 4 of 16
(3,703 Views)

You can use the ElapsedTime.vi in order to stop the loop that is writing, just like the code in the link...in this example the program will stop after 10s

Hope it helps

0 Kudos
Message 5 of 16
(3,698 Views)
It sounds like one of the things you need is grater control over how the data is being written and read. To accomplish that you should drop the express VI and use the TDMS API directly. There are several good examples that ship with LV.

The thing to remember about Express VIs is that while they are very easy to use, compromises had to be made to provide that ease of use so they are not a good way to implement deliverable code.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 16
(3,644 Views)

Thanks a lot for your information.. right now i had implemented the TDMS reading using Read measurements file Express vi ,i have configured it to read the entire data ,,  Then if the  file which i'm trying to read consist of 2 channles then how do i provide an option for user on the front panel to select the Channles. suppose if he wish to see only one chanel data at a time. can you please tel me how to do this.

0 Kudos
Message 7 of 16
(3,608 Views)
With express VIs your only option is to read the entire file and index out the channel the user wants to see. This but one example of the compromises I mentioned earlier.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 16
(3,586 Views)

After facing lots of issues with the express vi's(basically memory full and all)  i finally decided to use basic TDMS vi's..

I succesfully used TDMS Open , TDMS Write and TDMS Close. i only wanted to know that i need to provide an option to the user, if user click the button it should popup for the location in the system to name the file store it.

0 Kudos
Message 9 of 16
(3,565 Views)

That can be a good idea, but it can also cause problems in that a user could save a file anywhere.

 

Sometiems you have to ballance the risks involved in giving users open-ended choices.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 10 of 16
(3,555 Views)