How to round values as in designer

Hello,

I am reading an array of float from a PLC using OPC-UA
with the value that are integers it works fine, but looking at decimal values I have the following
image
image

so basically the value 28.35 has other digits, but on the designer I just see 28.35, same for 1.2.

if I read the value on a script, I read 28.350000381 and not 28.35

How can Ignition get the right value and show it in the designer UI?
Is there a way to do it also to read values on a script?

thank you
Andrea

Related: Ignition MQTT rounding floating point numbers with incoming transmissions.

How can Ignition get the right value...

After reading the linked thread, which do you regard as the "right" value?

2 Likes

the correct one is the one displayed in the UI, where I think Ignition applies some sort of rounding

Did you read that topic @Transistor posted? Doesn't sound like it. It explains exactly what you're seeing and why.

The answer is to format the display of your values with the precision you need, for example using the numberFormat expression function