Programming example, 1 using shortcut, 2 using crbasic – Campbell Scientific CS440 Liquid Level Sensor User Manual
Page 8
![background image](/manuals/415909/8/background.png)
CS440 Liquid Level Sensor
4
IMPORTANT: Current measurements such as 4-20 mA signals vary widely in
how they can be powered and connected to a datalogger. Please refer to the
CURS100 manual or the Application Note 2MI-B.
5. Programming Example
5.1 Using ShortCut
ShortCut is the easiest and typically the preferred method for programming the
datalogger. ShortCut generates a wiring diagram that shows how to connect
the pressure transducer to your datalogger. Select “4-20 mA Input” from the
Generic Measurements list. Use desired units when keying in the
measurements that correspond to the 4-20 mA end points for measurement
equivalents. For example, if the calibrated range was 0-5 psi, the two values
should be 0 and 5.
The sections that immediately follow are for CRBasic, Edlog and
Keyboard/Display users. ShortCut users can jump ahead to the
Maintenance section (page 6).
5.2 Using CRBasic
For our CR1000, CR3000, and CR5000 dataloggers, the VoltDiff instruction is
used. Because our CR200-series dataloggers do not support differential
measurements, the VoltSE instruction must be used when you have a CR200-
series datalogger.
Sample Program for CR200 Series Datalogger
'CR200 Series
'Declare the variable for the water level measurement
Public PSI
'Define a data table for 60 minute maximum and minimums
DataTable(Hourly,True,-1)
DataInterval(0,60,Min)
Maximum(1,Level,0,0)
Minimum(1,Level,0,0)
EndTable
'Read sensor(s) every 60 seconds
BeginProg
Scan(60,Sec)
'Code
for
4-20
mA
measurements:
VoltSE(PSI,1,1,0.03125,-12.5)
'Call
the
data
table:
CallTable(Hourly)
NextScan
EndProg
NOTE