beautypg.com

Appendix f. example crbasic programs – Campbell Scientific CS110 Electric Field Meter User Manual

Page 69

background image

Appendix F. Example CRBasic
Programs

An example CS110 weather station program using a variable electric field
measurement rate in order to minimize current consumption in solar powered
applications follows.

'CS110 efield and weather station program with variable measurement
'rate for low-power consumption.(CS110_low_power.cr1).
'Measures rainfall, wind speed and direction, solar radiation,
'relative humidity, air temperature, and electric field.
'Updated last by Jody Swenson on 9/18/04 for Mparallel_plate and Csite.

const Mparallel_plate = 85
const Csite = 0.10

'Approximate value for weather station site.

const Mcorrected = Mparallel_plate* Csite

'Mcorrected is multiplier for CS110 instruction.

const SLOW_INTERVAL = 10
const FAST_INTERVAL = 1

Public E_field
Units E_field=volts/m
Public battery_volt
Public leakage_cur
Units leakage_cur=nA
Public status
Public panel_temp
Units panel_temp=DegF
Public rain_fall
Units rain_fall=inch
Public wind_speed
Units wind_speed=mph
Public wind_dir
Units wind_dir=deg
Public solar_rad
Units solar_rad=W/m2
Public air_temp
Units air_temp=DegF
Public RH
Units RH=%
Public internal_RH
Units internal_RH=%

Public count
Public E_field_int

'Interval to make efield measurement rate

Public run_avg10
Public abs_run_avg600

Public E_status(16)

'Efield status array.

Public

k

'Index for E_stat array.

Public meas_error

'Disable variable for slow table.

F-1