LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write cluster elements to text file

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?

 

0 Kudos
Message 1 of 7
(3,692 Views)

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.

0 Kudos
Message 2 of 7
(3,671 Views)

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.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 7
(3,668 Views)

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..

 

0 Kudos
Message 4 of 7
(3,658 Views)

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.

=====================
LabVIEW 2012


0 Kudos
Message 5 of 7
(3,646 Views)

no luck....stuck at using buffer to store all the array data ......any help guys?

0 Kudos
Message 6 of 7
(3,631 Views)

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.

0 Kudos
Message 7 of 7
(3,624 Views)