Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: davidbgtx on June 15, 2015, 08:13:27 PM
-
Why can you only enter or display 7 or 8 digits in data view for a real? And it only passses 7 digits through modbus MHR1:RD to my kepwareex data collection software.
-
How many digits did you expect? This is a limitation of floating point. Google 'floating point' and start reading.
-
What are you actually measuring, how precise does it need to be, and what is the full range?
For example, is it time in seconds, to the millisecond, but for up to a week's worth of seconds, i.e. 7 x 24 x 60 x 60?
-
How many digits did you expect? This is a limitation of floating point. Google 'floating point' and start reading.
I was thinking real not floating point, thanks.
-
What are you actually measuring, how precise does it need to be, and what is the full range?
For example, is it time in seconds, to the millisecond, but for up to a week's worth of seconds, i.e. 7 x 24 x 60 x 60?
The precision is enough, I was just curious, forgot it was float not real, thanks.
-
I was thinking real not floating point
I don't understand the distinction. Most PLCs use the IEEE 754 32 bit format. Were you thinking of something else. Your PC probably uses the 64 bit format with double the precision.
-
We tend to use "real" and "floating point" interchangeably. But as Bernie mentioned, PCs are generally using double precision. The PLC uses single precision. Smaller storage size reduces the available precision.
-
In computer-land, typically real implies floating point representation. So if you see a computer implementing "real numbers", it is most likely using floating point representation.
In the Mathematical world "real" has one meaning, and computers can only "approximate" this infinitely large set of numbers. For example, the real value of the fraction 1/3 (0.333...) would require all the RAM in the world to represent it in a true "real" format, and then it would still be short by an infinite number of decimal places ;D.
-
I was thinking real not floating point
I don't understand the distinction. Most PLCs use the IEEE 754 32 bit format. Were you thinking of something else. Your PC probably uses the 64 bit format with double the precision.
My SQL server database stores values collected from ThinkNDo (WINPLC) by way of KepserverEX. See attached pic. Shift1DownHrs set for float.
No biggie. I don't really need this much precision was just curious.