B.2 edlog program – Campbell Scientific CS215 Temperature and Relative Humidity Probe User Manual

Page 33

Advertising
background image

Appendix B. Example Programs

B.2 Edlog Program

The following example is written for the CR10(X). Programs for the CR500,

CR510, and CR23X would be similar. The program below shows a simple

example reading a sensor which has been set up with address 0 (the default)

and connected to control port 1.

;{CR10X}
;Example program for a CS215 sensor on control port 1
;Measures every minute and stores some summary statistics
;once per hour

*Table 1 Program
01: 60

Execution Interval (seconds)


;Measure the sensor on control port 1
;Note you have to manually assign the labels in the Inloc Editor
;to make sure two locations are free.

1: SDI-12 Recorder (P105)
1: 0000

SDI-12 Address

2: 00

SDI-12 Command

3: 1

Port

4: 1

Loc [ Temp ]

5: 1.

0 Mult

6: 0.0

Offset


;Now store some statistics.

2: If time is (P92)
1: 0

Minutes (Seconds --) into a

2: 60

Interval (same units as above)

3: 10

Set Output Flag High (Flag 0)


3: Real Time (P77)
1: 111

Day,Hour/Minute,Seconds (midnight = 0000)


4: Average (P71)
1: 1

Reps

2: 1

Loc [ Temp ]


5: Sample (P70)
1: 1

Reps

2: 2

Loc [ RH ]


*Table 2 Program
02: 0.0000 Execution Interval (seconds)

*Table 3 Subroutines

End Program

B-3

Advertising