PLCHobbyist Posted July 11, 2011 Report Share Posted July 11, 2011 Hello, I'm using a M90-R1 PLC. A section of my application is used to convert degrees Celciust o Fareheit. The formula is Tf = (9/5)*Tc+32. Is the M90 can handle numbers with decimals? For the 9/5, since the result is 1,8 i used an integer number 2 for the calculation... It give a approximate conversion... How can i improve it? Thank you for your help! Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted July 11, 2011 MVP 2023 Report Share Posted July 11, 2011 An old trick for PLCs that only have integers is to use a "virtual decimal". Multiply the celcius value by 18 and add 320. Your fahrenheit value will have a virtual tenths place which you can work with and display by setting the numeric format to xx.x. Otherwise, you can divide the answer by 10 and get rid of it. I checked this out on my slide rule. It works great! Feel free to try it out on yours. Don't forget to add your exponents or you won't get the right answer. Or you could program the Jazz to do it. Joe T. Link to comment Share on other sites More sharing options...
PLCHobbyist Posted July 12, 2011 Author Report Share Posted July 12, 2011 Thank You mr Tauser! I will try it tomorrow! 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