B.2 differential measurement examples, B.2.1 crbasic differential measurement program, B.2.1 – Campbell Scientific HMP155A Temperature and Relative Humidity Probe User Manual
Page 31

Appendix B. Example Programs
B.2 Differential Measurement Examples
These examples use the differential voltage instruction to measure the sensor
and use the datalogger’s SW12V terminal to power the sensor only when it is
being measured. The differential instruction is recommended for long lead
lengths. TABLE B-2 shows the wiring used for these examples.
TABLE B-2. Wiring for
Differential Measurement Examples
Color
Description
CR1000 CR10(X)
Yellow
Temperature
2H
2H
Jumper to 1L
2L
2L
Blue
Relative Humidity
1H
1H
White
Signal Reference
1L
1L
Jumper from SW12V Control
C1
Red
Power
SW12 V
SW12 V
Black
Power Ground
G
G
Clear
Shield
G
B.2.1 CRBasic Differential Measurement Program
Below is an example CR1000 program. Other CRBasic dataloggers are
programmed similarly.
'CR1000 program to measure HMP155A with differential measurements
Public AirTC
Public RH
DataTable(Temp_RH,True,-1)
DataInterval(0,60,Min,0)
Average(1,AirTC,IEEE4,0)
Sample(1,RH,IEEE4)
EndTable
BeginProg
Scan(5,Sec,1,0)
'HMP155A Temperature & Relative Humidity Sensor measurements AirTC and RH:
PortSet (9,1)
Delay(0,2,Sec)
VoltDiff (AirTC,1,mV2500,2,True,0,_60Hz,.14,-80)
VoltDiff (RH,1,mV2500,1,True,0,_60Hz,0.1,0)
PortSet (9,0)
If RH>100 And RH<108 Then RH=100
CallTable(Temp_RH)
NextScan
EndProg
B-3