Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

String is Rounding off

Solved!
Go to solution

I used:

 

 http://forums.ni.com/t5/LabVIEW/How-to-read-Serial-Data-from-Arduino-using-labview-VISA/td-p/1497866...

 

VI and did editing. Using LabVIEW for arduino. I already have the data I needed. I get a data of 33.75 the data output will be 34. What I need is to get the data with the decimal no rounding down or up.

 

Ive attached the VI.

 

Please Help! Thanks!

Download All
0 Kudos
Message 1 of 4
(4,757 Views)

Hi

you removed the divide by 1023 and multiply by 5 from the original diagram.

That is why you seem to get rounding. But in fact you simply get what you programmed.

 

As normal you get what you programmed, not what you wanted to happen. 

greetings from the Netherlands
0 Kudos
Message 2 of 4
(4,731 Views)
Solution
Accepted by topic author shogunato3

Use Frac/Exp String to Number instead of Decimal String to Number.  The Decimal String to Number gives you an integer, so it rounds.



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
Message 3 of 4
(4,698 Views)

Thank you!! Frac/Exp String to Number works like magic.

0 Kudos
Message 4 of 4
(4,666 Views)