LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

printing array with decimals to text file

Solved!
Go to solution

Hi,

 

I have tried to find this information on forums but I cant seem to find exactly what I am looking for. I have VI that when it is finished has a 2 column and 5 or so row array that is populated with heat loads and corresponding voltages. I want to print this array to a text file but I want to include the decimal places in at least the voltage. I have attached what I have, thanks in advance

0 Kudos
Message 1 of 3
(2,478 Views)
Solution
Accepted by lvuser333

The answer is on your pc. If you have the context help open, click on the detailed help. There is a link there on format specifiers. You are using %d which tells the function to convert to integers. You want %f for floating point numbers.

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

Change your format specifier to a %f on the Array to Spreadsheet String. I you want to have some values as integers and some as floating point you will need to use a for loop to format each row yourself using the Format To String VI.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 3 of 3
(2,470 Views)