Sign in to follow this  
Followers 0
Davids

Seperate Floating Point to Mantissa and Exponent

2 posts in this topic

Anyone know how to convert Floating Point number to mantissa and exponent for S7-300? Example: Float Number : 15000 / 0.0045 Mantissa : 1.5 / 4.5 Exponent : 4 / -3 Any formula to do this? thank.

Share this post


Link to post
Share on other sites
You could do a TRUNC which will give you the whole number, then subtract that from the starting floating point and multiply the result with 10, 100, 1000 etc, whatever you need, then do another TRUNC

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