LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multilist box with decimal format

Solved!
Go to solution

I defined a global array of cluster "Test Results" with all the parameters I needed to log and created a user event which triggers when the data needs to be logged. Though I created the pressure flow rate and vacuum flow rate as a double when I write it to list box or a .csv file I see the rounded value. I tried %d or %f instead %s but still I get a rounded value. But when I checked my global variable "Test Results"those parameters are double. Any help is appreciated.

Thanks

0 Kudos
Message 1 of 4
(2,608 Views)

 

did you check the CSV file by opening in excel and formatting the cell to display decimal values?

Anil Punnam
CLD
LV 2012, TestStand 4.2..........
0 Kudos
Message 2 of 4
(2,605 Views)
Thanks Anil. Yes I did that and it is in right format.
0 Kudos
Message 3 of 4
(2,593 Views)
Solution
Accepted by topic author romesh

romesh, remove the . in the format specifier or place a value after the .

 

the format specifier %.f will be read as %.0f which will have no places after the decimal point.  If you need 2 places use %.2f.  That should fix the problem. 

 

Troy.

Troy
Message 4 of 4
(2,578 Views)