LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

replace instead of append tdms file

Hi,

I am saving data into a tdms file and then read data back from the tdms file and analyze it. The problem is that when I analyze this data two times and write to the same channel and channel group, it appends the second set of analyzed data to the previous one, making an array that is twice as long as I would like. Is there a way to make it so that the tdms write replaces insteads of appends data when it writes data to a channel and channel group that already exists in the tdms file.

Thank you,

Tim
0 Kudos
Message 1 of 16
(4,811 Views)
Sorry, there is no way of deleting or overwriting things within a TDMS file right now. We are working on this, but I can't tell you when it will be shipping. For now, the only workaround is to create a new file that contains exactly what you need.

Herbert
Message 2 of 16
(4,807 Views)
Is this still in the works or has a solution been sorted out?
0 Kudos
Message 3 of 16
(4,671 Views)
Still no time line for this one. We're working on some other features at this time. Obviously, I can't comment on what that is.
Herbert
0 Kudos
Message 4 of 16
(4,655 Views)
I have the same problem, i need sometimes to replace data instead of append it, is there a solution for this issue???
What about the flush vi?? what is the prupose of this vi?
0 Kudos
Message 5 of 16
(4,600 Views)
Hi JOSEALB85,

As Herbert mentioned in his above post, there is currently no way of doing this, and the only workaround is to create a new file that contains exactly what you need.

The TDMS Flush VI can't be used in the way that you describe.  Its function is to write all currently buffered information to disk.
Message 6 of 16
(4,581 Views)

Is there any solution  to it now??

 

I want to store 2 information in the file.

1) No. of tests performed on the user.

2) Personal Information of the user(Name, sex, location, etc.)

 

No. of tests keep changing whenever the user takes a new test. and, the user has the freedom to change his personal settings.

now just to change the value in the "no. of tests", i would have to delete the old file and create a new file with the updated information. that would really be time inefficient.

is there any other workaround that would do the job and is time efficient??

 

Thanks,

Ritesh 

0 Kudos
Message 7 of 16
(4,282 Views)

This sounds like you want to overwrite properties rather than data values. There's no problem with that. If you set a new value to an existing property, the old value will be overwritten.

 

Herbert 

0 Kudos
Message 8 of 16
(4,280 Views)

Hi Herbert, 

Thanks for your Quick Response.

 

The user information that i am saving in the file is actually a cluster of values(Name, age, sex,location, phone no, ID, date).

i want to know can i write a cluster to the property?

 

Thanks,

Ritesh 

0 Kudos
Message 9 of 16
(4,278 Views)

You would need to split the cluster up into basic data types like string or numeric or time stamp. While LabVIEW doesn't have any built-in functions for that, there is a VI library available in this LAVA Discussion Thread that saves clusters as a set of properties and also loads them back from the same set of properties.

 

Herbert

0 Kudos
Message 10 of 16
(4,275 Views)