LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying digits in a txt

Solved!
Go to solution

Hi,

I am sending an array of numbers to a txtx file.The numbers in the array are displayed with 6 digits after the point.

I don't want to display any digit after the point.I defined it in the data entry but still in the txt it displays 6 digits.

How it can be solved?

Thanks,

Leonid

0 Kudos
Message 1 of 5
(2,653 Views)

The settings in your data entry control only affect that.  It doesn't affect the data being written out to a text file.

 

How are you writing the text file?  Show us some code.

 

Some of the ways of sending data (such as Write to Spreadsheet File) have an input to set the format for the data being written out.  And if you fail to wire something to that, the default value of 6 decimal places will be used.  (Actually the default for Write to Spreadsheet File is 3 decimal places.)

0 Kudos
Message 2 of 5
(2,649 Views)
Solution
Accepted by topic author Leonid_Pascar

How are you writing to the file?  There is usally an input to format the number.  I think the format you want is "%.0f" for floating point numbers (ex: dbl) or "%d" for decimal numbers (ex: I32).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 5
(2,646 Views)

You can get the exact text that is displaying in a numeric indicator by using a property node and reading: Numeric Text -> Text.

0 Kudos
Message 4 of 5
(2,620 Views)

Thanks

0 Kudos
Message 5 of 5
(2,595 Views)