Hi to all labviewers, girls as boys, lady's as gents.
I'm using the labview code in the attached JPG file,(LV vers.7.1 )
to write to a txt file. but can't control the decimals as you can see in the attched example below.
I've tried to change the data range, representation, digits of precision, data type... but no change at all. I always get this 6 decimals beind the comma! and I only needs Two digits, to print out from the text file.
Write text file example
P 221000.000000 R1PO_
P 9310.000000 R1PO_
P 42200.000000 R2NO_
P 15000.000000 R2NO_
Can you attach you VI?
And what is "lady's as gents" Never heard about it
6 is default one thats why
Replace your Express VI with a Write to spreadsheet and you can control those settings (dont forget to activate Append to file).
Go to the Front Panel - right click on the element of array - Display Format...
And on the Display Format card is property Digits which determines the number of digits after comma (the default settings is 6).
My text file is being written with only whole numbers. Does anyone have any idea as to why that would be happening? I have attached a screenshot.
Any help is great!
Thank you very much,
You are using the "Number to Decimal String".
Notice the 999 with no decimal point.
Try "Number to Fractional String" instead.