CobryWZL Posted February 25, 2020 Report Share Posted February 25, 2020 Hi guys, for our application we need to store some decimal numbers like 0.8. Unfortunatly we can only pick Integers ( MI, XI..) and longs (ML, XL..) in every function block we tried. How can we store doubles? Thank you very much! Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted February 25, 2020 MVP 2023 Report Share Posted February 25, 2020 What do you mean by "store"? Where are you trying to store the number? What is the source of the number? What are you trying to do exactly? Floating point number operands are available (MF operands), but they are separate from the normal math and store functions. You can find them under Math / Float. However, depending on what you're trying to do, you should keep the number as an integer while keeping track of the implied decimal location within your logic. For a number like 6.2, just multiply by 10 and store it as 62. You can display it properly on the HMI without any further math. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now