beautypg.com

B.2 example program for cr10(x) dataloggers – Campbell Scientific CS451/CS456 Pressure Transducer User Manual

Page 35

background image

Appendix B. Example Programs

B.2 Example Program for CR10(X) Dataloggers

Below is a portion of a CR10X program that measures the CS451/CS456.

The instructions below do not store data in final storage.

Instruction 92, Instruction 77, and processing instructions such as

Instruction 70 are required to store the data permanently.

;{CR10X}
;
*Table 1 Program
01:

60

Execution Interval (seconds)


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

SDI-12 Address

2: 0

Start Measurement (aM0!)

3: 1

Port ;this is where the white wire is connected

4: 1

Loc[Data_1

]

5: 1.0

Mult

6: 0.0

Offset


*Table 2 Program
02: 0.000

Execution Interval (seconds)


*Table 3 Subroutines

End Program

After Instruction 105 is executed, the input location called “Data_1” will hold

the measured pressure, reported in PSI, and the input location called Data_2

will hold the measured temperature, in degrees Celsius. The results can be

further processed by the datalogger. Note that Port 1 specifies that the SDI-12

data line is to be connected to the Port C1.

NOTE

B-3