LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Number of decimal places in recorded data

Solved!
Go to solution

Hi everyone,

 

I am using the Write to Measurement File Express VI and every thing works well except for one thing. I have too many decimal places in my recorded data. I really only need 2 decimal places for my application. Is there a way I can fix this without having to open the file with Excel and format the numbers?

 

Just FYI I am writing dynamic data, the Write VI is configured for Text (.lvm) file format, and it is tab delimited.

 

Attached are two pictures: one of the spreadsheet of recorded data, and the other is my Write to Measurement Express VI.

 

Thanks!

Laura

Download All
0 Kudos
Message 1 of 3
(2,660 Views)
Solution
Accepted by topic author lauraalkhoury

Not with the express vi's

 

You CAN specify a format "%.2f" in write to spreadsheet file


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 3
(2,625 Views)

Hi Laura,

 

As Jeff said, you cannot specify the format with the express VI you are using.  I would suggest taking a look at an example that ships with LabVIEW.  If you open the NI Example Finder (Help»Find Examples) and browse by task. Select the folder path Fundamentals»File Input and Output»Write to Text File.vi.  I have highlighted the part where you can format the numbers in the screen shot below.

 

Regards,

 

Greg H.

 

Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(2,592 Views)