08-26-2013 03:29 AM
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.
Please help.!
Best regards
HFZ
Write text file example
TR1-620M
8933.654639 R1PO
P 221000.000000 R1PO_
P 9310.000000 R1PO_
11066.433566 R2NO
P 42200.000000 R2NO_
P 15000.000000 R2NO_
10000.000000 R5IN
08-26-2013 03:46 AM
Can you attach you VI?
And what is "lady's as gents" Never heard about it
08-26-2013 03:46 AM
6 is default one thats why
08-26-2013 04:35 AM
Replace your Express VI with a Write to spreadsheet and you can control those settings (dont forget to activate Append to file).
/Y
09-12-2013 07:02 AM
cant you just write it?
09-12-2013 07:35 AM
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).
Simyfren
09-12-2013 07:48 AM
09-12-2013 08:17 AM
Oh, sorry, my fault.
I read wrong what HFZ wrote..
10-11-2016 08:08 PM - edited 10-11-2016 08:08 PM
Hello,
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,
Paige
10-11-2016 08:41 PM
You are using the "Number to Decimal String".
Notice the 999 with no decimal point.
Try "Number to Fractional String" instead.