12-12-2011 01:49 PM
Hi
I have developed a simple program that writes the cluster elements into a text file with no hassle. But the problem is if lets say I have cluster of more than 100 elements then Its bit tough to build array with all those 100 elements.
Is there any finer way to do this?
12-12-2011 02:16 PM
Why are you going from an array of references to a cluster of references, to each one being made into an array of strings built into 2-D arrays, concatenated together, then transposed.
You have an array of references feed that into your For Loop with autoindexing turned on. Don't mess with the cluster.
12-12-2011 02:18 PM
If you haven't tried them before, look at the OpenG tools and the toolkits from Moore Good Ideas, both have tools for writing/reading clusters to files.
12-12-2011 03:36 PM
Hi Raveens
Thanks for the logic.....I have developed as you suggested....but when I run the VI only the last element is written in the text file. Is there any "buffer" in LV so that I can store until the whole while loop executes and then the write to text file?
I looked around the palettes but could not get hold of any..appreciate your reply..
12-12-2011 03:53 PM
Does it need to be in a specific format? If you could use XML I would suggest using flatten to xml and unflatten from xml.
12-12-2011 07:26 PM
no luck....stuck at using buffer to store all the array data ......any help guys?
12-12-2011 08:28 PM
Put the Write to Text File function inside the loop. Right now you have an ordinary tunnel which means you are only sending out the data from the last iteration of the while loop.
And why you are using a While Loop instead of a For Loop like I showed, I have no idea. It is just a Rube Goldberg construction.