LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to reduce precision of a slider upto 3 decimal points

Hello Good Afternoon,

I am generating a floating number through a slider 

for example 1.234567 i want to do a precision that the output should be scaled upto 3 decimal points like 1.234 i am wishing to get this output is there any simple way of doing it can some please help with an example 

0 Kudos
Message 1 of 3
(1,916 Views)

Hi Anjaney,

 

a DBL value is good for ~15 decimal digits.

 

All you can change is the appearance on the front panel by applying some formatting rules. Set the slider to show just 3 decimal digits.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(1,905 Views)

You should be able to set the controls properties to have step of 0.001. It's not perfect since floats have their limitations, but it should be close enough. As Mentioned, you should also set the display to 3 decimals.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 3
(1,874 Views)