beautypg.com

2 using crbasic or edlog, 1 crbasic programming, Using crbasic or edlog – Campbell Scientific CS450/CS455 Pressure Transducer User Manual

Page 23: Crbasic programming

background image

CS450/CS455 Pressure Transducer

Keyboard/Display users and SCWIN users can jump ahead to the Maintenance
section.

6.2 Using CRBasic or Edlog

6.2.1 CRBasic Programming

Dataloggers that use CRBasic include our CR200-series, CR800, CR850,
CR1000, CR3000, and CR5000. These dataloggers use the SDI12Recorder()
to read the CS450/CS455. A multiplier of 1.0 and an offset of 0.0 yield water
level in psig and temperature in degrees C.

The SDI12Recorder() instruction has the following form:

SDI12Recorder(Destination, Output String, Multiplier, Offset)

Sample Program for CR200-Series Datalogger

‘CR200 Series

‘Declare the variable for the water level measurement
Public CS450(2)

‘Rename the variable names
Alias CS450(1)=Level
Alias CS450(2)=Temp_C

‘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)
Maximum(1,Temp_C,0,0)
Minimum(1,Temp_C,0,0)
EndTable

‘Read sensor every 60 seconds
BeginProg
Scan(60,sec)

‘Code

for

SDI-12

measurements:

SDI12Recorder(CS450,0M!,1,0)

‘Call

the

data

table:

CallTable(Hourly)

NextScan
EndProg

17