Você está na página 1de 4

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
Now for your problem:
DataOffset -32767 value at 4 mA
DataMax 32767 value at 20 mA
DataSpan 65534 Max - Offset
Factor 10 1500 = 150.0
EU psi x 10
EUOffset 0 EU at 4 mA
EUSpan 1500 EU at 20 mA
mA DATA EU % Process Value
4 -32767 0 0% 0.0
8 -16383.5 375 25% 37.5
0.0
20.0
40.0
60.0
80.0
100.0
120.0
140.0
160.0
-40000 -20000 0
P
r
o
c
e
s
s

V
a
l
u
e

Scaling
12 0 750 50% 75.0
16 16383.5 1125 75% 112.5
20 32767 1500 100% 150.0
0.0
-40000 -20000 0
Raw Data
20000 40000
Scaling
Scaling
20000 40000
Raw Data

Você também pode gostar