Jump to content

Celcius to Fareheit conversion


Recommended Posts

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

  • MVP 2023

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!

slide_rule_c_to_f.jpg

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

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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.