4-20ma-32-212 degress

Benton

Member
Join Date
Oct 2010
Location
Baton Rouge
Posts
34
I have a thermostat that I am trying to scale. It measure 32-212 degrees fahrenheit, and send out a 4-20ma signal accordingly. What I did to scale it to a degree was divide 180 by 16 (180 being the difference between 212 and 32, and 16 which is the difference between 4 and 20). I came up with 11.25. So if he stat is sending 5ma then the temp is 43.25 degrees. My question is how can I scale it even more. Lets say the temp is 42 degrees or 72. I jsut want to be able to scale it to the lowest common denominator.
 
What kind of PLC do you use? They all have different scale blocks, that are premade for you and will let u scale to pretty much anything you would need.
 
I'm using CLICK

This might look complicated, but if you will dig down into the logic you will see what it is doing. This is generic in that it can "extract the square root" for a Differential Pressure Flow Input if needed.

It is a little more complicated because I wanted to do it all in one block in a Honeywell HC900 rather than making a separate "Normal Block" and "Extract SQRT Block"

This works no matter what the ranges are. It can be adapted to any PLC that can do the math (I've done it in a CompactLogix PLC)



The logic is as follows:

(((H*sqrt((A-B)/(C-B)))+(abs(H-G)*((A-B)/(C-B))))*(E-D))+D

A = Raw Input Value
B = Raw Input Zero Value (ex. 0)
C = Raw Input Span Value (ex. 100)
D = Engineering Units Zero Value (ex. 32)
E = Engineering Units Span Value (ex. 212)
F = Constant 0 Value
G = Constant 1 Value
H = 0 = Linear Value 1 = "Extract SQRT"

The first half ((h*sqrt((a-b)/(c-b))) = ZERO if you are not Extracting the SQRT and the second half (abs(h-g)*((a-b)/(c-b))) = ZERO if you are xtracting the SQRT. The "+" in the middle either adds 0 to a number or a number to 0.

The rest *(e-d))+d does the final linearizing.

Put it in a spreadsheet and watch it work...

Put this in any cell after putting your numbers above into A1 to H1. Change A1 and watch the formula do its work. Change B1 and/or C1 and D1 and/or E1 for fun.

=(((H1*SQRT((A1-B1)/(C1-B1)))+(ABS(H1-G1)*((A1-B1)/(C1-B1))))*(E1-D1))+D1

Then play around with simplifying it if you want...

I know some PLCs have this functionality built in but you asked how to do it.

Jim
 
Last edited:
I am not familiar with your PLC( Click), but here is the general formula for scaling raw data to engineering units. And links to more info about scaling.

Also a handy tool for checking your scaling, provided by "John Soltesz" forum member.
 
Last edited:
The CLICK has a Math block that is like the RSLogix CPT (compute) block, so you can take the slope intercept formula (y=mx+b) and stick it right in there.

In your case, you have two known points rather than a slope and offset, so you have to solve for m and b which is done in Mickey's attachment.
 

Similar Topics

Hi all, I'm connecting several 4-20mA sensors together in parallel (only one shown below) The enclosure is ABS plastic with metal backplate DAQ...
Replies
5
Views
273
Problem: Our PLC can only output 4-20mA, but the actuators it needs to control, modulate based on a 0-135Ohm signal. Buying 4 or 8 individual...
Replies
7
Views
275
What's your go to 4-20ma isolator. I've got some 4 wire 4-20ma from several flow meters and scales that I would like to isolate before it gets to...
Replies
10
Views
1,692
Hi, I need to read three 4-20mA signals from a DCS(ABB) in a remote 6 channel analog input module with RS485 modbus port. When I connected...
Replies
2
Views
486
Hello this is my first post. Looking forward to being more involved in this community to learn and hopefully help others. Any help or guidance...
Replies
7
Views
790
Back
Top Bottom