Antoine Chalons Posted December 29, 2011 Report Share Posted December 29, 2011 Hello, I recently used TDMS files in a customer application and for that purpose I made VIs to write/read clusters containing parameters to/from TDMS file. These VIs are basically *copies* of the Read Variant Key.vi and Write Variant Key.vi from the OpenG Variant Configuration File palette so I thought it would be a good idea to add it to OpenG. Hopefully it could help someone. PS: haven't tested these VIs extensively (with all possible data types in LabVIEW) but they do work fine with big clusters containing 1D and 2D arrays. Read Property Key from TDMS File.vi Write Property Key to TDMS File.vi 1 Quote Link to comment
Ton Plomp Posted December 29, 2011 Report Share Posted December 29, 2011 Nice idea (I had written a similar tool just a few months ago). I remember two bugs/issues. DIAdem is quite strict about the allowed characters for property names, '.' (period) is not allowed. Upon resaving the TDMS file the period will be replaced by an underscore '_'. (the list is quite long). A boolean is stored as an U8 after a resave with DIAdem, the TDMS routine of LabVIEW can read the boolean, if they receive an explicit boolen. However if they receive a variant with a boolean as data-type, the returned variant is an U8. And a variant to data function will fail. (your code has a specific case for each data-type so it will not break). One thing about your code, why don't you use the VI reentrantly? By allowing 'Share clones', you can drop the VI strait into itself, without the need of explicit VI-server calls. Another addition would be to have basically the same code for waveform attributes (I have that around as well). Ton Quote Link to comment
Antoine Chalons Posted January 3, 2012 Author Report Share Posted January 3, 2012 One thing about your code, why don't you use the VI reentrantly? By allowing 'Share clones', you can drop the VI strait into itself, without the need of explicit VI-server calls. I have no good answer to that... Was it possible in LV8.6? I think the first time I made those VIs it was in LV8.6 and then I just upgraded the LV version without modifying the code. Another addition would be to have basically the same code for waveform attributes (I have that around as well). Sounds like a good idea to me. Any other idea anyone? Quote Link to comment
Stobber Posted June 26, 2012 Report Share Posted June 26, 2012 DIAdem is quite strict about the allowed characters for property names, '.' (period) is not allowed. Upon resaving the TDMS file the period will be replaced by an underscore '_'. (the list is quite long). Ton Here's a post on the NI forums detailing which characters aren't allowed in property names: http://forums.ni.com/t5/DIAdem/Properties-in-TDMS-file-not-visible-in-Diadem/m-p/1747404/highlight/true#M14082 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.