Calculating Analog Values

XtremeIN

Member
Join Date
Jun 2005
Location
Indiana
Posts
217
It has been a really long day and I cannot remember the formula to calculate analog values. If 4.00mA = 0 PSI and 20.00mA = 100 PSI what would the mA reading be for 25 PSI......I kow this simple sorry guys.....

Thanks,
Micheal
 


y = mx + b

m = delta milliamps / delta pressure
= (20 - 4) / (100 - 0)
= 0.16

b = y - mx (for any xy pair)
= 20 - (0.16 * 100)
= 4
or
= 4 - (0.16 * 0)
= 4

y = mx + b
= (25 * 0.16) + 4
= 8 mA




Keith
 
For any unit conversion on any PLC you can use four function math with the following, which
asumes 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
 

Similar Topics

This application has a motor with encoder feedback that drives a linear actuator that moves in/out, and is at roughly 45 degs from horiz. As the...
Replies
19
Views
1,407
I need to keep a running pass/fail yield of the previous 5,000 parts produced. I have used this formula before to calculate average: AvgValue =...
Replies
6
Views
2,190
Does anyone know how to calculate the savings from now needing to run an air compressor all day? Basically I have a design that replaced 6 * 1"...
Replies
26
Views
4,911
I would like to refer to this document of which I used some data ...
Replies
1
Views
1,493
Seems like this should be a simple thing but I’m struggling with it. The basis is that I am trying to detect if a linear assembly is stopped or...
Replies
6
Views
3,130
Back
Top Bottom