Bruce Booska Posted February 10, 2022 Report Share Posted February 10, 2022 In Unilogic when you divide a real number, say 7.0/3.0 it puts out 2.33333333. I understand using 7/3 = 2 and modulo function 7/3 will give you that 1 remainder, but there's no choice for easily getting the real decimal output, the whole number output and the remainder. This also doesn't work well when the remainder is greater than .5 and rounds up. In RSLOGIX500 when you divide a real number, say 11000.0/375.0 it saves 29.3333333 to one register, 29 to S:14 and 125 = (11000 - (29x375)) to S:13. Are there math registers in Unilogic like this or do I have to build a formula? Link to comment Share on other sites More sharing options...

MVP 2023 kratmel Posted February 10, 2022 MVP 2023 Report Share Posted February 10, 2022 Maybe it is helpful https://www.unitronicsplc.com/Download/SoftwareHelp/UniLogic_Knowledgebase/ Home > Ladder > Ladder Functions (LF) > LF: Math Functions > LF: INT to Real, Real to INT Or if you need - write C code for solve your 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 account## Sign in

Already have an account? Sign in here.

Sign In Now