Sign in to follow this  
Followers 0
Ben Jones

How to display a floating point number with more that 8 decimal points in RsLogix 5000

3 posts in this topic

Hi all. This is my first post here. I am trying to display a number in a register with at least 10 decimal places as a floating point number. The maximum dp's I can get is 8 (eg: 0.12345679 - as shown in the picture). The plc I am using is a Logix5572. I think I may need a 64 bit register to do this but not sure. I don't know if ths is a very trival task, or if it is even possible. Any advice on how to do this would be very useful. Many thanks in advance. Ben

Share this post


Link to post
Share on other sites
The Logix family does not support 64 bit floating point. So it's not a matter of displaying it. It's a matter of holding it at all. As a note, here is a link to a thread discussing 64 -> 32 bit floating point conversion.

Share this post


Link to post
Share on other sites
As mentioned, Rockwell doesn't support the 64bit LREAL from the IEC standard and the 32 bit REAL uses 23 bits for the whole number and 9 bits for the exponent (NOTICE: I may be wrong on this, these are the details for B&R and apparently it isn't set in stone in the IEC standard). That means that if you erase the decimal point and the leading/trailing zeros, you number can only go up to 8,388,608. In other words, 0.1234567 you can do and 0.12345678 is beyond the resolution of a REAL. It's the same thing with DINT only being able to do +/- 2,147,483,648. That also means that if you try to add 0.00000001 to 1.0, the answer will be 1.0. I've seen this loss of resolution cause major headaches for people that didn't know such a thing was a problem.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0