Model HC2S3 Temperature and Relative Humidity Probe
CR1000 program using single-ended measurements in Slow Sequence scan
The following program example has a 1-second main scan, and uses a Slow Sequence scan to
measure the HC2S3 every 5 seconds. Every 5 seconds the program switches power to the HC2S3 on
the SW-12 terminal, delays for a 3-second “warm-up”, and measures relative humidity and
temperature on single-ended channels 1 and 2 respectively. Because of the 3-second delay, the
program must be run in SequentialMode. Please contact Campbell Scientific if your program must
run in pipeline mode.
'CR1000 program
SequentialMode
'Required for Slow Sequence scan
Public AirTC
Public RH
Public Battery_volts
Public Ptemp
Units AirTC = C
Units RH = %
Units Batter_volts = V
Units Ptemp = C
DataTable (Table1,True,-1)
DataInterval (0,60,Min,10)
Average (1,Battery_volts,FP2,FALSE)
Average (1,Ptemp,FP2,FALSE)
Average (1,AirTC,FP2,FALSE)
Sample 1,RH,FP2)
EndTable
BeginProg
Scan (1,Sec,1,0)
'Run main scan 1 second
Battery (Battery_volts)
PanelTemp (Ptemp_C,250)
'add additional instructions to be executed every 1 second
CallTable (Table1)
NextScan
SlowSequence
Scan (5,Sec,0,0)
'Run slow sequence scan every 5 seconds
PortSet (9,TRUE)
'Turn on HC2S3
Delay (0,3000,mSec)
'Wait 3 seconds for HC2S3 to warm-
up
VoltSe (AirTC,1,mV2500,2,0,0,_60Hz,0.1,-40) 'Measure HC2S3 temperature
VoltSe (RH,1,mV2500,1,0,0,_60Hz,0.1,0)
'Measure HC2S3 relative humidity
PortSet (9,FALSE)
'Turn off probe
NextScan
EndProg
7.4.2 Example Programs using Differential Measurement Instructions
Temperature and humidity are measured on differential input channels 1 and 2
respectively. The program sets relative humidity equal to 100 if the measured
value is greater than 100 but less than 103%. Values greater than 103% are not
set equal to 100, and indicate a problem with the sensor or its calibration.
17