DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster to TDMS

I am using the librairie variantDataTo TDMS.llb for many year. I have upgraded to labview 2009. It is working fine. But I did a test recently. I have try to modify one value of the TDMS file directly in the tdms file in DIADEM. After it is impossible to read the file again. I have on error 85: "Error 85 occurred at [Essai]:T Avant haut Scan From String (arg 1) in ClusterToTDMS.lvlib:Read TDMS Key (Variant)__TDMS.vi->ClusterToTDMS.lvlib:Read TDMS Cluster__TDMS.vi->File Read write.vi

Possible reason(s):

LabVIEW: Scan failed. The input string does not contain data in the expected format."

Should I save the file in DIADEM in a special format?

Should I upgrade the librairy "variantDataTo TDMS.llb"?

Thanks for your help!

0 Kudos
Message 1 of 7
(5,956 Views)

Hi cynt,

 

Since the VariantDataToTDMS.llb was not directly developed by National Instruments, I'm not as familiar with the VIs. It may be helpful though if you could post a LabVIEW code snippet, so we can see what specific VIs you are currently using for the read operation. An example TDMS file may also be useful when trying to replicate the issue.

 

Also, have you previously tried modifying the file in DIAdem and reading with these same VIs with an earlier LabVIEW version?

 

 

Best Regards,
Swathi B
0 Kudos
Message 2 of 7
(5,931 Views)

I have joint an example of the write and read cluster to TDMS.

 

Open the VI Cluster to TDMS.vi

 

If you run it in read mode.Try the file "Modify by DIADEM.tdms" you will encounter an error message. This is the file that I have modifiy with DIADEM.

 

I have also put a file not modify "Original.tdms". This can be read without error message.

 

I hope this will work.

 

Thanks for your help.

 

 

 

 

0 Kudos
Message 3 of 7
(5,924 Views)

I had forget to join the file

0 Kudos
Message 4 of 7
(5,922 Views)

I have been able to find more information about my problem.

 

The probleme is very simple. It is occuring when I try to write a property name with a space. If I do that. I can write ans read the TDMS file correctlyu. But as soon as a modify the TDMS file in Diadem. I cannot read anymore tha property with the space.

 

It must be a Labview Bug???

 

I have join an example of the vi to read and write...

0 Kudos
Message 5 of 7
(5,899 Views)

Hi cynt,

 

I was able to open the TDMS files modified with DIAdem through use of the TDMS Viewer in LabVIEW, and so the issue appears specific to the functions used in the Cluster to TDMS.vi. I'd look to see if you can identify where in the reported VIs the error seems to be occuring and that might help as your look to modify the application architecture. 

Best Regards,
Swathi B
0 Kudos
Message 6 of 7
(5,886 Views)

Hi cynt,

 

I think I now understand what is causing you trouble.  DIAdem and the DataFinder do not support property names with spaces in them.  In fact, they do not support any characters in property names other than letters, integers, and the underscore character "_".  So when you load the file into DIAdem, or when you index the file with the DataFinder, those property names will be coerced to valid ones-- in your case each space character " " is replaced with an underline character "_".  When you save this file in DIAdem, those property name changes are saved to the new TDMS file.  This explains why your LabVIEW code that reads property names with spaces stumbles on the TDMS file DIAdem creates.

 

There is no way to avoid this property name coersion in DIAdem and the DataFinder, so you will have work around it.  The cleanest option is just not to use spaces in the property names you write and read in LabVIEW.  Alternatively, you could make your LabVIEW reader more robust to accept either space characters or undescore characters in the property name.  You could also loop over all the properties and pick the ones you want in the loop, instead of requesting a particular property by name.

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 7 of 7
(5,870 Views)