Scaling of Analog Current 4-20 ma Output

TahirQ

Member
Join Date
May 2013
Location
Riyadh
Posts
54
We are currently using thermowells to monitor the temperature of water in one of our projects. Its transmitter has temperature range of 0-150 degree celsius and current output of 4-20 ma.
I am currently testing the transmitter by connecting it to my PLC.I am aware of the logic of raw values and measured values in PLC. I know that 4 ma is representing Zero degree celsius & O in PLC and 20 ma represents 150 degrees & 65536 in PLC.
But what I want to know is How much does 4.1 or say 5.1 ma represent in integer form in the PLC in such a case because I cant get a hold on How to interpret the integer forms in temperature units. Any help would be appreciated.
 
It's a simple line equation where y = mx + b...

y = the temperature ( y1 = 0, y2 = 150)

x = raw value (x1 = 0, x2 = 65536)

m = slope of the line

b = intercept

In this case, since 0 raw = 0 deg C, the slope is 150/65536 and the intercept is 0.

So, in your PLC, create a math function that takes the raw PLC value (0 to 65536) and divides by 65536 and then multiplies by 150. The result is the temperature. Don't worry about the ma value as the PLC is already interpolating 4 to 20ma into 0 to 65536.
 
i would add that some plc's don't use whole range (0-65536) for converted value because they leave some on beginning and some on the end for values below 4 and over 20 and for diagnostic. (e.g. s7 1200 uses 6400 - 27648 i think, not sure for low limit though)
 
In case of s7-1200 PLC it will works on 0-20ma, when you select limit as 6400-27648, then the 0-3.99ma value will be eliminated. And 4 - 20ma gives a linear value of Engineering data (0-150)
 
For any unit conversion on any PLC you can use four function math with the following, whichasumes integer math:

DataOffset = Data in input register at 4 mA (or zero analog signal of whatever range - for example 0 VDC on a 0-10 VDC transmitter)
DataSPan = Data at 20 mA - Data @ 4 mA
FACTOR = arbitrary factor (multiple of 10) needed to get proper resolution and accuracy
EU = Engineering Units x FACTOR
EUOffset = Engineering Units @ 4 mA x FACTOR
EUSpan = (Engineering Units @ 20 mA - Engineering
Units @ 4 mA) x FACTOR
DATA = Actual data reading in input register
EU = ((EUSpan x (DATA - DataOffset))/DataSpan) + EUOffset
ProcessValue = EU / FACTOR

For Example, 0-60 psig from 4-20 mA with resolution of 0.1 psig:
FACTOR = 10
Data @ 4 mA = 6240
Data @ 20 mA = 31208
DataOffset = 6240
DataSpan = 31208 - 6240 = 24968
EUOffset = 0 x 10 = 0
EUSpan = (60 - 0) x 10 = 600
DATA = 18975
EU = ((600 x (18975 - 6240)) / 24968) + 0 = 306
Process Value = 306 / 10 = 30.6 psig

See the attached
 
Last edited:
I would hazard a guess that anywhere above this if you read 65536 it should be 65535. That is the maximum unsigned integer value that can be represented in a 16-bit unsigned integer register.
 
if anyway possible solve this with real as dividing with integers is not working good.
make yourself a table with x start and end and same for Y
use excel or calc for this
now fill in every 100 points or every .1 and see what integer comes out.
 

Similar Topics

Hello, We monitor the temperature of a pipe via a 4-20mA temperature transducer. This goes into DB135(Read Analog Inputs). The issue I have is the...
Replies
0
Views
624
Hi all! I have a question about RSLOGIX and Analog input/output scaling So we have an existing controller with an IF8I and OF81 card. My...
Replies
3
Views
933
I’m trying to perfect the HMI interface for analog configuration. I’ve provided the user the same options for all analog inputs, as follows...
Replies
10
Views
1,667
Hi I have a modicon 984 with proworx 32 that is scaling an analog input, and I need to adjust the scaling. I have new analog input values and %...
Replies
3
Views
1,726
Hi, i've write this AOI to send a ControlValue comes from pid and control a valve. this valve is controlled through analog output. the rang of...
Replies
0
Views
1,021
Back
Top Bottom