LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Format txt file

How can I output the following text file,

Data
Size 1000
0
90
.
.
121

where Data and Size 1000 are string values and the data underneath are dbl.  The data underneath must be in a single column.
0 Kudos
Message 1 of 5
(2,999 Views)
Use this code to convert it all to string format then save it to file.
 
Matt
 
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 2 of 5
(2,993 Views)
Thanks for your help.  However when I save the file using File I/O > Write File.vi, I get squares in my text file.

0 Kudos
Message 3 of 5
(2,984 Views)

Hello,

I'm guessing you're on a non-Windows machine.  In the example code given by the previous poster, replace the Carriage Return Constants on his diagram (there are two of them) with End of Line Constants (also available on the String palette).  Now your text file should look normal.  The difference between these items is that a Carriage Return is the platform specific character denoting the end of a line on Windows, but it may not be on other platforms.  In order to get an end of line character that is specific to the platform you are on, you need to use the End of Line Constant.

Hope this helps,

-D

0 Kudos
Message 4 of 5
(2,979 Views)
I am on a Windows platform.  Nonetheless you poster has help and it now works.
Thanks.
0 Kudos
Message 5 of 5
(2,969 Views)