LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rounding inputs

hi
i have an input reading voltage as e.g. 1.25634785 how do i round the number so it goes to 1.26 for the rest of my code?
0 Kudos
Message 1 of 3
(2,257 Views)
Hi

One simple solution was to multiply the value with a constant, round it and divide it by the same constant as before.

Just have a look at the example.

Hope this helps.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 3
(2,252 Views)
Hello,

Multiply it by 100, round it to the nearest integer and then divide it by 100.

Hope this helps,
Paulo
0 Kudos
Message 3 of 3
(2,251 Views)