HomeWindLDR

Discussion for our PLC programming software.

BUG: Floating point addition (possibly others) Messages in this topic - RSS

RT
RT
Posts: 39

5/30/2019
Using WindLDR v8.11.0

While working on a new project I discovered that uses the ADD command to increment a float by 0.01.

works fine for 0.01, 0.02, 0.03, 0.04, 0.05, then blamo 0.0599999 and its off until I hit 11.0 if you continue on it happens at various numbers past that as well.

when your needing 0.0001 accuracy in your math how can you trust any of this? Has anyone else seen this bug?


To reproduce:

make a rung with a NORMALLY OPEN followed by a SOTU then ADD(F) S1=D000 S2=0.01 D1=D000
simulate or run same on both, toggle the NO about 6 times and you'll see what i'm talking about.

If this works as it should in an earlier version of WindLDR please let me know.
0 link
Shane
Shane
Moderator
Posts: 306

5/30/2019
You were the one that found a similar bug in the HMI software for rounding decimals. Guess they need to work on WindLDR too..
0 link




Powered by Jitbit Forum 8.2.0.0 © 2006-2013 Jitbit Software