LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with write cluster to TDMS

Solved!
Go to solution

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 12
(1,360 Views)

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.

 

 

Message 12 of 12
(1,336 Views)