float type digit error

Discussions about product bugs & problems!
Note: This is no replacement for the Official ETM Support!
Search

Post Reply
3 posts • Page 1 of 1
interelec
Posts: 27
Joined: Wed May 27, 2015 7:52 am

float type digit error

Post by interelec »

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?
Attachments
2.JPG
1.JPG
1.JPG

User avatar
leoknipp
Posts: 2926
Joined: Tue Aug 24, 2010 7:28 pm

Re: float type digit error

Post by leoknipp »

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

dbindernagel
Posts: 161
Joined: Mon Feb 23, 2015 1:34 pm

Re: float type digit error

Post by dbindernagel »

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

Post Reply
3 posts • Page 1 of 1