NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Knight of NI
Knight of NI
Ben
Posts: 16,091
0 Kudos

Re: Help with write cluster to TDMS

Since there are practivle limits to recursion it is not used that often. YOu may have run into an issue, that nobody else has sen yet.

 

Re: posting code...

 

If you post it in this thread, and add a link to the Nugget thread, we will be able to find your code.

 

Or if yo just want to hadd it to that thread I would not mind that option either.

 

Take care,

 

Ben

Ben Rayner
Who is NOT John Galt... yet... just building Rayner's Ridge

Member
doyles
Posts: 34

Re: Help with write cluster to TDMS

Ok, here it is.  The top level vi is based on the template I created for a queued-producer-consumer-state-machine-with-user-event-loop-control.  I use this quite often.

 

A couple of things to mention: 1) I did not add support for enums.  2) I noticed a bug that I do not know how to fix properly - if an array is loaded with x elements and then a different version of that array is loaded with x-y elements, the y elements are still displayed with old data. 

 

To see an example, start the TDMS Save and Restore Tester.vi and select the thrice.tdms file (in the Data folder) and then click the Load button.  Notice the array elements are empty.  Now click the Re-Init button and select the once more.tdms file and notice the array elements have been filled.  Now Re-Init and select the thrice.tdms file and the array elements are still full with the old data.

 

Any advice on ways to improve this would be appreciated, especially how to properly size the arrays.  I understand the initial purpose for Ben's nugget was for configuration data and was intended to be read only once.  I intend to save and load various test information and could certainly have the array situation arise.  I know I could create a constant for the cluster and put all default data, including empty arrays, and write that to a value->property node for the cluster at the top level.  This has already been done in the BD of the tester vi in a diagram disable structure.  It is at least manageable, but that gets away from the whole idea.

 

 

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page