1 example program, 2 edlog, Example program – Campbell Scientific CS475, CS476, and CS477 Radar Water Level Sensor User Manual

Page 27: Edlog

Advertising
background image

CS475, CS476, and CS477 Radar Water Level Sensor

7.5.1.1 Example Program

'CR1000 Series Datalogger


'Declare the variable for the water level measurement

Public CS475(3)

'Rename the variable names

Alias CS475(1)=Stage
Alias CS475(2)=Distance
Alias CS475(3)=Error_Code


'Define a data table for 60 minute maximum and minimums
DataTable (Hourly,True,-1)

DataInterval(0,60,Min,10)
Maximum(1,Distance,FP2,0,0)

Minimum(1,Distance,FP2,0,0)
Average(1,Distance,FP2,False)
StdDev(1,Distance,FP2,False)

Maximum(1,Stage,FP2,0,0)
Minimum(1,Stage,FP2,0,0)
Average(1,Stage,FP2,False)

StdDev(1,Stage,FPs,False)
Sample (1,Error_Code,UINT2)
EndTable


'Read sensor every 60 seconds

BeginProg
Scan(60,sec,1,0)

'Code for SDI-12 measurements:
SDI12Recorder(CS475,1,0,”M!”,1,0)

'Call the data table:
CallTable(Hourly)

NextScan

EndProg

7.5.2 Edlog

Dataloggers that are programmed with Edlog include the CR500, CR510,
CR10(X), and CR23X. These dataloggers use Instruction 105 to read the
sensor.

Instruction 105 allows data to be collected from the radar sensor; each sensor
requires a separate Instruction 105.

Instruction 105 has the following parameters:

Parameter 1 — Address. Valid addresses are 0 through 9; 65 through 90
(decimal value for ASCII upper-case letters); and 97 through 122 (decimal
values for ASCII lower-case letters).

Parameter 2 — Command. Refer to the Edlog help for the command codes
used with this instruction.

Parameter 3 — Port. Enter the datalogger port in which the datalogger is
connected.

Parameter 4 — Location. Enter the input location in which to store the results.

19

Advertising