Cr1000X Program Example; Cr1000X Program Example For Sensor With 4 To 20 Ma Output - Campbell CURS100 Product Manual

100 ohm current shunt terminal input module
Hide thumbs Also See for CURS100:
Table of Contents

Advertisement

5.3

CR1000X Program Example

CRBasic Example 5-1. CR1000X Program Example for Sensor with 4 to 20 mA Output
'CR1000X Series
'CR1000X program example for sensor with 4-20 mA output.
'Assuming a flow meter that outputs a 4-20mA signal representing 0 - 100 gal/min,
'the voltage across the resistor at 0 gal/min = 4mA * 100 ohms = 400mV,
'and at 100 gal/min is 20mA * 100 ohms = 2000mV. The change in mV is
'2000mV - 400mV = 1600mV for 0 - 100 gal/min flow rate.
'The measurement result (X) for the VoltDiff instruction is mV. The
'multiplier to convert mV to gal/min is: mV * 100gal/min / 1600mV = 0.0625,
'the offset = 0 - 400mV * 0.0625 = -25.0
'Declare Variables and Units
Public
BattV
Public
PTemp_C
Public
Measure
Units
BattV=Volts
Units
PTemp_C=Deg C
Units
Measure=mV
'Define Data Tables
DataTable(Hourly,True,-1)
DataInterval(0,60,Min,10)
Average(1,Measure,IEEE4,False)
EndTable
DataTable(Daily,True,-1)
DataInterval(0,1440,Min,10)
Minimum(1,BattV,FP2,False,False)
EndTable
CURS100 100 Ohm Current Shunt Terminal Input Module
V = 2.0 V or 2000 mV
Since the data logger measures in mV, the multiplier (or slope) must be in units
of psi/mV. Therefore, the y values have the units psi and the x values mV.
The equation of a line is:
(y – y 1 ) = m (x – x 1 )
Solve the equation for m that is the slope of the line (or multiplier).
700
psi
200
psi
m
=
=
2000
mV
400
mV
Now replace the known values to determine the intercept (or offset). Where
y = m(x) + b
psi
200
psi
=
. 0
3125
×
400
mV
b
=
200
. 0
3125
×
400
=
75
m = multiplier (slope) = 0.3125 and
b = the offset (intercept) = 75.0.
psi
0 3125
.
mV
mV
+
b
psi
9

Advertisement

Table of Contents
loading

Table of Contents