LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS Get Properties retains values

Hi All,

 

I am running a VI that uses the TDMS Get Properties function to report how many values have been recorded to the channel "Time". The VI is run inside a for loop and 4 different TDMS file references are passed into the function. If one of the file references is not valid (i.e. equal to 0), and this happens if one of the 4 channels is not logging data in my application, then the error code -2501 is reported by the function as expected.

 

The problem I am having though is, if a valid reference has been passed and the channel "Time" has outputted a property value, the property value is retained and reported again even if a different invalid reference has been passed and a -2501 error is outputted. 

 

Is there an option within the function that sets property value to be 0 if an invalid reference is passed to the function, or do I have to force it with a error handling case structure.

 

Thanks in advance

 

Munch

0 Kudos
Message 1 of 4
(2,967 Views)

Post some code not pictures.  And when posting a code it would be more helpful if the code demonstrates the problem.  I don't recall seeing this type of issue before.  Also shouldn't normal error handling catch this since an invalid reference should generate an error?

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

Hi Munch,

Thank you for your question. I've tried your case and the behavior is the same as you mentioned. But if TDMS Get Properties throws out an error, property value should be set to 0. We will fix the problem in future release.

Thanks

 

0 Kudos
Message 3 of 4
(2,910 Views)

Hi Hooovahh,

 

Attached is a VI that shows the same issues, albeit without the class etc etc. Attached is also a TDMS file that can be use.

 

If TDMSTime.tdms is pointed to in "file path" and "file path 2" is left blank and the Vi is run then an Error 118 will be shown because the path does not exist, and therefore an invalid reference will then be passed to the Get Properties Function. Array and Array2 will both show the same data for index 0&1 even though there is no valid TDMS file in file path 2. A -2501 Error is caught because of the invalid reference. I hope this helps.

 

Error handling does catch the error in the real application, but I need to implament a fix because it is likerly that some of the reference will be invalid at times.

 

Regards

 

Munch

 

Edit: Dooh, Atached Files

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