LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write text file from controls

I have three clusters and I would like to save the data of each of them into one text file.  One of the clusters is an array.  I would like whatever the contol is named followed by whatever the data is.  I was thinking of using Write to Text File VI.  I was wondering if there was a better way then to manually create the text for each line?  Also when I use the ring control it outputs a #, but I would rather it output the string is there a way to do that?  The array has 13 elements and I would rather not program each line individually, is their a way to do this prgamically?  I am attaching the controls that have the data that I would like to save into one file.  What I would like to do is have it look like this when I open the text file:
 
Patient data
 
Examinee number:
Ethnicity: ...
.
.
.
 
Filter paramters
Match mean pixel value:...
.
.
.
 
Pupil data array
0
Exposure time (ms):...
Camera gain:...
.
.
.
1
Exposure time (ms):...
Camera gain:...
.
.
.
 
Until it finishes with all 13 elements in the array.  Thanks for any help desinging a output file that can write the name and the corresponding data for each time I change the data.
 
Kevin Baker
0 Kudos
Message 1 of 2
(2,198 Views)

Hi Kevin,

The attached example shows two approaches.  The flatten-to-XML is easiest, but not as nicely formatted as the other example - which is closer to the format you provided.

Hope it helps!

Message Edited by tbd on 08-20-2006 09:05 PM

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 2 of 2
(2,177 Views)