beautypg.com

Programming, 1 crbasic examples – Campbell Scientific CS210 (10162) Enclosure Humidity Sensor User Manual

Page 7

background image

CS210 Enclosure Humidity Sensor

5. Programming

This section is for users who write their own datalogger programs. A
datalogger program to measure this sensor can be created using Campbell
Scientific’s Short Cut Program Builder Software. You do not need to read this
section to use Short Cut.

The relative humidity signal from the CS210 is measured using a single-ended
analog measurement (CRBasic instruction SEVolt or Edlog Instruction 1). The
CR200 series and 21X use a control port to power the CS210. At the
beginning of the program, the control port needs to be turned on, and the port
should remain on. It takes the CS210 approximately 10 seconds for the
reading to become stable after the port has been turned on. Depending on the
scan rate, the first few measurements from the CS210 could be low.

The probe output scale is 0 to 1000 millivolts for the relative humidity range of
0 to 100%. Table 2 provides calibration information for relative humidity.

TABLE 2. Calibration for

Relative Humidity

Units

Multiplier

(% mV

-1

)

Offset

(%)

Percent 0.1

0

5.1 CRBasic Examples

Example 1 is a sample CRBasic program written for a CR1000, but our
CR800, CR850, CR3000, CR5000, and CR9000(X) dataloggers are
programmed similarly.

Example 2 is a CRBasic program written for a CR200 datalogger. The CR200
program turns on control port 2 to power the CS210. Notice that the scan rate
is set at 10 seconds. The sensor won’t give a good reading until the second
scan.

Example 1. Sample CR1000 Program

'CR1000 Series Datalogger

'SENSOR WIRING
'CS210
'Black: 5V
'White: SE1
'Clear: G

'Declare Public Variables
Public PanelTempC
Public Batt_Volt
Public Enc_RH

3