LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fixing Trailing Zeros whilst keeping text

I am having issues taking array values that are being written to a txt file, and having then numerical values being reported to only two decimal places while keeping the text entries at full length as shown in the images. Any help is appreciatedLV.PNG

0 Kudos
Message 1 of 3
(2,464 Views)

Can you attach your VI?  And your data file?

I don't understand what you are asking for.  You say "while keeping the text entries at full length as shown in the images", but your image doesn't show anything about what the text entries show.

 

I don't know why you are asking us what is written to file here in all of those comments. 

0 Kudos
Message 2 of 3
(2,439 Views)

Note that the format of the Array To Spreadsheet String doesn't do what you'd expect when the input is an array of strings. You should use %s as format string. Use Format Into String to format the numbers.

 

Array To Spreadsheet String only seem to use the width of the format to format the string. So %4f with an input array of strings, will output each element as a 4 characters, where spaces are added if the string is smaller...

 

Besides that, all Array To Spreadsheet String's are redundant, except the one on the far right. The Format Into Sting can do it, simply extract the inputs and specify a format string like "%s\t%s\t%#f".

 Format Into String.PNG

BTW: A probe on the wires would narrowed the problem down a lot. All File IO is basically fluff. Not relevant to the problem...

0 Kudos
Message 3 of 3
(2,417 Views)