Up to 18 digits including the decimal point should be used. (0~ 999999999999999.999)
i tested by enter Original value from 1 to 18 digit sequentially.
ex)9.999 -> 99.999 -> 999.999 -> 9999.999 -> 99999.999 ...
but erroneous value is occurred since 16 digit.
according to Online Help, WINCC OA can express -1.79769e+308 to +1.79769e+308.
is that bug?
float type digit error
Search
Re: float type digit error
The problem possibly is that the panel does not allow to enter a higher value.
If you want to write a higher value you can write a script which makes a dpSet() for the dp element.
Best Regards
Leopold Knipp
Senior Support Specialist
If you want to write a higher value you can write a script which makes a dpSet() for the dp element.
Best Regards
Leopold Knipp
Senior Support Specialist
-
- Posts: 161
- Joined: Mon Feb 23, 2015 1:34 pm
Re: float type digit error
Hello,
the problem is not the panel but a misunderstanding of how floating point numbers work.
To simplify: A 64bit (double precision, used in WinCC OA) floating point number has only about 15-16 significant digits.
This is why you see your accuracy problems occur.
To be clear: This is not a bug or a specific behaviour of WinCC OA. This is how floating point numbers work in general (e.g. on your computer, in your PLC, ...).
I recommend reading up on floating point numbers to get a better understanding of how they work and their limitations.
https://en.wikipedia.org/wiki/Floating- ... _computers
the problem is not the panel but a misunderstanding of how floating point numbers work.
To simplify: A 64bit (double precision, used in WinCC OA) floating point number has only about 15-16 significant digits.
This is why you see your accuracy problems occur.
To be clear: This is not a bug or a specific behaviour of WinCC OA. This is how floating point numbers work in general (e.g. on your computer, in your PLC, ...).
I recommend reading up on floating point numbers to get a better understanding of how they work and their limitations.
https://en.wikipedia.org/wiki/Floating- ... _computers