Converting fahrenheit to celsius

Cajunman0821

Member
Join Date
May 2004
Posts
3
I am currently running into an issue where I need to convert my fahrenheit set point to celsius. I am storing the values in BCD and need accuracy to the tenth. If I have a value of 682 this is actually 68.2 degrees F. It should be converted to 20.0 degrres C.

Can anyone please help?
 
C = (F - 32)/1.8

If you are using a factor of ten to get an assumed decimal place, just mulitply the whole conversion by ten:

Cx10 = (Fx10 - 320)/1.8

Fx10 = 682
Cx10 = 201

If you can't handle the decimal in your PLC with a floating point, use another factor of 10:

Cx10 = ((Fx10 - 320)*10)/18

Fx10 = 682
Cx10 = 201

Fx10 = 2120
Cx10 = 1000

You don't identify the PLC model you are using, so the details will vary, but this can be done with the simple four function math available in most PLCs.
 

Similar Topics

I need to convert a RSLogix Program from Celsius to Fahrenheit, I have had the file on here before and was going to look into a different way to...
Replies
18
Views
5,419
Hello everyone, can anyone help me with covert the STL code to ladder. Iam using plc s71200. A %DB1.DBX33.7 // angel of vaccum...
Replies
2
Views
205
Hello PLCs Forum, I am in a bit of a pickle and was hoping someone could offer me some help. I have a .rss file and just need to see the ladder...
Replies
2
Views
120
Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
314
Hello, did anybody know, if there exist an converting cable like the1492-CM1746-M01 (for an 1746-IB16 to an 5069-IB16), for an 1746-HSCE to an...
Replies
3
Views
387
Back
Top Bottom