LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview 8.20 - TDMS bugs?

I recently installed labview 8.20 and started using the tmds VIs.

I used the "set properties.vi" and "get properties.vi" to set and get the file property, however, there are a couple of unexpected things happened:

a. the properties must be set one by one. for example, if i have a set of string properties to set, i could not wire an array to the "property names" and an array to the "property values", this would result an error. I must put this vi in a for loop. well, inconvenient but ok.

b. i used two file properties in my vi: test stand and dut serial . the tdms writes the file correctly (i could see the values in the result file), but when reading them both returned empty strings! however, using words such as test,stand,dut,serial alone had no problems.

anyone had similar experience with this new tdms file? thanks!

-Joe
0 Kudos
Message 1 of 7
(3,736 Views)
Hi Joe,

I hope you're doing well.  I would expect that you should be able to set multiple properties at once using an array wired into the "property names".  In fact this is done in a shipping example (in the NI Example Finder, it is under New Examples for LabVIEW 8.x»General»TDMS - Write data (time domain).vi).  What error do you see when you do not use a for loop?  Can you post an example of the VI?  As for the second problem, it sounds like your properties are two words ("test stand" and "dut serial"), and this seems to be causing a problem (the Read function seems to be having trouble parsing the values?).  I have not run into this problem personally, but I have not tried anything but one work properties.  There are no current reports with the developers about this issue, but if we can reproduce it easily, we can definitely look into it.  Let us know if you can provide some examples!

Thaison V
Applications Engineer
National Instruments
0 Kudos
Message 2 of 7
(3,704 Views)
Hi Thaison,

Thanks for the response. I found out the second problem was caused by my own mistake in the code. I wrote to the same property twice (forgot to delete on of them after I've done my modification).

I'll test the 1st problem again, hopefully it was another mistake. I'll post the test result.

thanks,

-Joe
0 Kudos
Message 3 of 7
(3,697 Views)
I found the cause for the first problem. The problem was caused by the "Cluster to Array" vi which converts a cluster to an array of strings (integers) then wired to the values input of the "Set Property" VI. However, there was no error when I used a) a explicit array input (constant or control), b) using the "build array" vi .

it looks like the TDMS set property VI does not like the output of the "Cluster to Array" function. Hmm, maybe the output is not an array afterall?

-Joe
0 Kudos
Message 4 of 7
(3,677 Views)
Joe,
 
I think what you are seeing due to the fact that the output of the cluster to array function is a fixed size array which is handled a little differently in LabVIEW.  I'm not totally sure why it wouldn't like this as an input to this specific VI but I'm going to look into this a little bit and post something on this thread as soon as I find out.
 
Justin D
Applications Engineer
National Instruments
0 Kudos
Message 5 of 7
(3,644 Views)

Joe,

It turns out that this specific problem is caused by a bug in the TDMS Set Properties VI.  R&D knows about this and a bug report has been filed.  To get around this in the meantime you could wire the output of the cluster to array to the input of a dummy FOR loop (enable indexing).  Wire this data to the other side of the FOR loop and enable indexing there as well.  You can connect the output of this FOR loop to your TDMS Set Properties VI and this will work fine.

Justin D
Applications Engineer
National Instruments

0 Kudos
Message 6 of 7
(3,613 Views)
Yup, I have noticed this bug too with the simple TDMS Write VI. It doesn't accept the output from Array Subset function, thinking that it requires and array and rejecting the subarray as not a valid array. Attached is the example VI with broken wire. As a workaround, simply process the subarray in a loop (to rebuild it) as explained above.
0 Kudos
Message 7 of 7
(3,547 Views)