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! Quote Link to comment Share on other sites More sharing options...
MVP 2022 Joe Tauser Posted July 11, 2011 MVP 2022 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. Quote 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! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.