09-07-2011 07:37 AM
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
09-22-2011 10:09 PM
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.