Support Forums
Tag parameter weirdness

When using Parameter expression to Set High Scale value under the scaling tab of the Analog Status tags it slightly alters the value from the PLC's Tag value. The actual value is 16.4 and is just a stored REAL value not a calculated one. 5c4e0290efdc3
5c4e029104ea4

Also I have to perform a mathematically pointless calculation to get the widgets to use "Tag scaling values"

When using Parameter expression to Set High Scale value under the scaling tab of the Analog Status tags it slightly alters the value from the PLC's Tag value. The actual value is 16.4 and is just a stored REAL value not a calculated one. ![5c4e0290efdc3](serve/attachment&path=5c4e0290efdc3) ![5c4e029104ea4](serve/attachment&path=5c4e029104ea4) Also I have to perform a mathematically pointless calculation to get the widgets to use "Tag scaling values"

Century Control Systems, Inc. www.centurycontrolsystems-inc.com

Kind of weird, but 16.4 as a float is 16.3999996185302734375 without other errors.

Kind of weird, but 16.4 as a float is 16.3999996185302734375 without other errors.

Mel -

Can you send me a changeset, please?

Mel - Can you send me a changeset, please?

Doug Spurrell

These issues are caused by the limitations of the IEEE-754 floating point formats and not all numbers can be accurately represented with this format.

See an example calculator here, this shows that 16.4 cannot be accurately represented using a double.

As you might have guessed, VTScada uses IEEE-754 doubles internally to hold values.

These issues are caused by the limitations of the IEEE-754 floating point formats and not all numbers can be accurately represented with this format. See an example calculator [here](https://www.h-schmidt.net/FloatConverter/IEEE754.html), this shows that 16.4 cannot be accurately represented using a double. As you might have guessed, VTScada uses IEEE-754 doubles internally to hold values.

Software Developer with Trihedral

113
4
4
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft