How to scale a pressure transmitter -10 to 20??

sparkytex

Lifetime Supporting Member
Join Date
Jun 2013
Location
Port Hardy B.C.
Posts
354
hello again,

I have to scale a pressure transmitter to -10 to 20 inches of water column. I've have not yet learned how to scale instruments into the negative on rslogix yet. The instrument mechanics have it ranged at 4 mA = -10 and 20 mA = 20 inches of water column. I'm trying to figure out how to do it in a compute function. would this be correct,

(((N111:80-4000)|16000)*30)+-10

I don't really have any examples on my PLC to go by so that's a complete shot in the dark for me.
 
If your plc is a SLC or micrologix use SCP instruction, if your plc is control o compact logix use SCP block instruction, if you do not have block instruction then download SCP AOI instruction. I'm guessing you have Allen Bradley.
 
If your plc is a SLC or micrologix use SCP instruction, if your plc is control o compact logix use SCP block instruction, if you do not have block instruction then download SCP AOI instruction. I'm guessing you have Allen Bradley.

I'm using RSLogix 5, I typically use a compute fuction to scale my instruments
 
thanks, I did manage to find the paper which I will definitely read as its good info. Problem is I'm under the gun to get this programming done today for the pressure transmitter. If any one has any input on how to scale this using RSLogix 5 please chime in!
 
Your equation in the first post is correct based on the following assumptions:
- N111:80 is your raw analog input value
- at 4mA N111:80 = 4000
- at 20mA N111:80 = 20000

Note: I would change the end of the eqution to just "...)-10" not "...)+-10"

What kind of data type are you using to store your result? Hopefully, a Real?
 
yes N111:80 is my raw data coming in, and yes i'll be using a floating point number to store the result onto our Wonderware HMI system.

question - if I change it to ..)-10 instead of ...)+-10 wont it times it by -10?

thanks for the quick reply I appreciate it
 
yes N111:80 is my raw data coming in, and yes i'll be using a floating point number to store the result onto our Wonderware HMI system.

question - if I change it to ..)-10 instead of ...)+-10 wont it times it by -10?

thanks for the quick reply I appreciate it

No. +- and - are functionally identical. To multiply it by -10 you'd have to put *(-10) at the end (I think).
 
FactoryTalktotheHand is correct. Using just the "-" is a simple subtraction. If the -10 were in parentheses, i.e. "...)(-10)" then that would indicate multiplying by -10. The problem you would run into there is that the PLC does not use implied multiplication like we do when we write mathematical formulae. If you entered the equation that way into the PLC, you would encounter errors when you tried to verify the program. A multiplication only happens when you specifically tell the PLC to multiply by using a "*".

To be honest, I'm not even sure the PLC would accept "+-" as a legitimate function. You probably would have gotten errors when you compiled that as well.
 
[FONT=&quot]((In – InRawMin) * (InEUMax - InEUMin) / (InRawMax - InRawMin)) + InEUMin[/FONT]


Your In is your unscaled raw input, the rest should be self explanatory let me know if you have questions
 
If your data is this:
Input Min = 4000
Input Max = 20000
Scaled Min = -10 inches
Scaled Max = 20 inches

then the proper scaling equations follows:

Scaled Value = input value X slope + offset
Slope = scaled max - scaled min / input max - input min
Offset = scaled min - (input min X slope)

Slope = (20 inches-(-10 inches)) / ( 20000-4000) = 30/16000 = 0.001875
Offset = -10 inches -(4000 X 0.001875) = -10 - (7.50) = -17.50

Scaled Value = input value X slope + offset
Scaled Value = (N111:80 * 0.001875) - 17.50

Test at input = 4000, Scaled Value = 4000 X .001875 - 17.50 = -10 inches
Test at input = 20000, Scaled Value = 20000 X .001875 - 17.50 = 20 inches

RSLogix 5 CPT.JPG
 
Last edited:
yes N111:80 is my raw data coming in, and yes i'll be using a floating point number to store the result onto our Wonderware HMI system.

question - if I change it to ..)-10 instead of ...)+-10 wont it times it by -10?

thanks for the quick reply I appreciate it


If you are displaying the value in InTouch, then why not just leave it raw in the PLC and scale it at the tag level in Wonderware?
 

Similar Topics

the scale occasionally stops working and displays the message "no response from modbus" on the control screen . tunaylar - load line2
Replies
2
Views
140
Hi! I'm wondering if PLCs are used for small-scale production. I've got four machines doing different things with textiles, and I'm exploring the...
Replies
16
Views
1,336
I am having an issue writing a carriage return to my scale, I can manually push the print button the the scale and then read the buffer. The scale...
Replies
4
Views
1,115
Good afternoon. 1794-ie12 module available, channel set to 4...20 mA. According to the table from the manual, we get from 0 at 4mA to 30840 at...
Replies
5
Views
2,257
Anyone have a modbus map for one of their Scale Integrators? They have lots of info on their website and state it has Modbus TCP but no Modbus...
Replies
0
Views
835
Back
Top Bottom