beautypg.com

4 programming, 1 crbasic instructions, 2 edlog instructions – Campbell Scientific CS106 Barometer User Manual

Page 18: Programming, Crbasic instructions, Edlog instructions

background image

CS106 Barometric Pressure Sensor

7.4 Programming

Short Cut is the best source for up-to-date datalogger programming code.

Programming code is needed,

when creating a program for a new datalogger installation

when adding sensors to an existing datalogger program

If your data acquisition requirements are simple, you can probably create and

maintain a datalogger program exclusively with Short Cut. If your data

acquisition needs are more complex, the files that Short Cut creates are a great

source for programming code to start a new program or add to an existing

custom program.

Short Cut cannot edit programs after they are imported and edited

in CRBasic Editor.

A Short Cut tutorial is available in Section 4, Quickstart. If you wish to import

Short Cut code into either Edlog or CRBasic Editor to create or add to a

customized program, follow the procedure in Appendix A, Importing Short Cut

Code into CRBasic Editor. Programming basics for CRBasic and Edlog

dataloggers are provided in the following sections; more detailed information

about multiplier and offset calculations, conversion factors, long cable lengths,

resolution, and correcting pressure to sea level is provided in Section 8,

Operation. Complete program examples for select dataloggers can be found in

Appendix B, Example Programs.

7.4.1 CRBasic Instructions

The

VoltSE() measurement instruction programs CRBasic dataloggers

(CR200(X), CR800-series, CR1000, CR3000, CR5000, CR9000(X)) to

measure the CS106.

VoltSE(

Dest

,

Reps

,

Range

,

SEChan

,

MeasOff

,

SettlingTime

,

Integration

,

Multiplier

,

Offset

)

At sea level, a multiplier of 0.24 and an offset of 500 will report the barometric

pressure in mbar or hPa. The offset will need to be adjusted if the barometer is

not at sea level (see Section 8.5, Correcting Pressure to Sea Level). If different

barometric pressure units are desired, see Section 8.2, Conversion Factors.

Often, the

TimeIntoInterval() CRBasic instruction is used to only power the

barometer while making the measurements. Atmospheric pressure changes

little with time. In most weather station applications, measuring the barometer

pressure once an hour is adequate. See Appendix B, Example Programs, for

more information.

7.4.2 Edlog Instructions

The

Volt (SE) (P1) measurement instruction programs Edlog dataloggers

(CR500, CR510, CR10(X), CR23X, CR7, and 21X) to measure the CS106.

NOTE

10