; NOTE: the following CSI logger program annotations may contain errors.
; From an experimental perl module, Campbell::Program, by fnkci@uaf.edu
; output generated on host shand at Fri Oct 10 10:02:28 2008 local time


MODE 13
13:00  1
01:}
MODE 14

MODE 1
SCAN RATE 60
1:P30     ; Z=F*10^exp
1:3013    ;     fixed value 3013
2:0       ;     times 1 (10^0)
3:3       ;     store 3013 in location 3

2:P10     ; BATT VOLT
1:27      ;     store in location 27

3:P20     ; PORT SET
1:7999    ;     P8=output, P7=nc, P6=nc, P5=nc
2:9999    ;     P4=nc, P3=nc, P2=nc, P1=nc

4:P92     ; IF TIME
1:0       ;     is 0 minutes into
2:60      ;     60 minute interval
3:30      ;     then DO...

5:P89     ;     IF X < = > F
1:27      ;         if X from location 27
2:4       ;         is <
3:12.2    ;         fixed value 12.2
4:21      ;         set flag F1 low

6:P95     ; END IF-DO

7:P92     ; IF TIME
1:0       ;     is 0 minutes into
2:60      ;     60 minute interval
3:30      ;     then DO...

8:P89     ;     IF X < = > F
1:27      ;         if X from location 27
2:3       ;         is >=
3:12.1    ;         fixed value 12.1
4:48      ;         set port C8 high

9:P95     ; END IF-DO

10:P92    ; IF TIME
1:720     ;     is 720 minutes into
2:1440    ;     1440 minute interval
3:48      ;     set port C8 high

11:P91    ; IF FLAG/PORT
1:21      ;     if flag F1 is low
2:30      ;     then DO...

12:P92    ;     IF TIME
1:10      ;         is 10 minutes into
2:60      ;         60 minute interval
3:58      ;         set port C8 low

13:P95    ; END IF-DO

14:P86    ; DO
1:41      ;     set port C1 high

15:P22    ; EXCIT w/DEL
1:1       ;     drive excitation channel E1
2:0       ;     delay 0 sec w/ excitation
3:15      ;     delay 0.15 sec after excitation
4:0       ;     with 0 mV excitation

16:P1     ; VOLT (SE)
1:1       ;     1 repetition
2:5       ;     using 2500 mV range, slow integration
3:1       ;     from input channel SE1
4:1       ;     store result in location 1
5:.1      ;     with multiplier * 0.1
6:-40     ;     and with offset + -40

17:P1     ; VOLT (SE)
1:1       ;     1 repetition
2:5       ;     using 2500 mV range, slow integration
3:2       ;     from input channel SE2
4:2       ;     store result in location 2
5:.1      ;     with multiplier * 0.1
6:0       ;     and with offset + 0

18:P86    ; DO
1:51      ;     set port C1 low

19:P17    ; INTERNAL TEMP
1:28      ;     store in location 28

20:P3     ; PULSE
1:1       ;     1 repetition
2:1       ;     from pulse counter P1
3:21      ;     as low level AC, discard long interval counts, output frequency (Hz)
4:4       ;     store result in location 4
5:.098    ;     with multiplier * 0.098
6:0       ;     and with offset + 0

21:P4     ; EX-DEL-SE
1:1       ;     1 repetition
2:5       ;     using 2500 mV range, slow integration
3:3       ;     from input channel SE3
4:1       ;     drive excitation channel E1
5:2       ;     with delay 0.02 sec
6:2500    ;     with 2500 mV excitation
7:5       ;     store result in location 5
8:.142    ;     with multiplier * 0.142
9:0       ;     and with offset + 0

22:P92    ; IF TIME
1:0       ;     is 0 minutes into
2:60      ;     60 minute interval
3:10      ;     set output flag F0 high, output array id 122

23:P70    ; SAMPLE
1:1       ;     1 repetition
2:3       ;     value from location 3

24:P77    ; REAL TIME
1:1220    ;     year + day(midnight=prev.day) + hour-minute(midnight=2400)

25:P71    ; AVERAGE
1:2       ;     2 repetitions
2:1       ;     value from location 1

26:P71    ; AVERAGE
1:2       ;     2 repetitions
2:27      ;     value from location 27

27:P69    ; WIND VECTOR
1:1       ;     1 repetition
2:0       ;     no standard deviation subinterval
3:1       ;     avg spd, avg dir, for anem. & vane
4:4       ;     wind speed from location 4
5:5       ;     wind direction from location 5

28:P73    ; MAXIMUM
1:1       ;     1 repetition
2:0       ;     output value only
3:4       ;     value from location 4

29:P70    ; SAMPLE
1:1       ;     1 repetition
2:5       ;     value from location 5

30:P0     ; NOP

MODE 2
SCAN RATE 0
1:P86     ; DO
1:48      ;     set port C8 high

2:P0      ; NOP

MODE 3
1:P0      ; NOP

MODE 10
1:28
2:64
3:0
4:1097729
5:378

MODE 12
1:0
1:0
1:0

MODE 13
13:8
8:0

MODE 13
13:9
9:0

MODE 13
13:10
10:0

MODE 13
13:13
13:0

MODE 11
1:56713
2:9893
3:2304
4:0
5:0
6:9801
7:21
8:2.9597
9:0
10:00--
11:.375

;; CAUTION: experimental output tags follow:
;;
;; output array:
;;     1. id_122
;;     2. sample-Loc3
;;     3. year
;;     4. day
;;     5. hhmm
;;     6. average-Loc1.SE1
;;     7. average-Loc2.SE2
;;     8. average-Loc27.logger_battery_voltage
;;     9. average-Loc28.panel_temperature_C
;;     10. vector_avg_spd-Loc4.P1
;;     11. vector_avg_dir-Loc5.SE3
;;     12. maximum-Loc4.P1
;;     13. sample-Loc5.SE3