
Appendix B. Example Programs
B-2
The following example can be used directly with the CR6 datalogger.
CRBasic Example B-2. CR6 Program Measuring the EE181
'Program measures EE181 with single-ended inputs once every 5 seconds
'and stores the average temperature and a sample of the relative
'humidity every 60 minutes.
'Wiring Diagram
'==============
'EE181
'Wire CR6
'Color: Function - Terminal
'------ -------- --------
'Red: Power - SW12-1
'Yellow: Temperature signal - U1
'Blue: Relative Humidity signal - U2
'Black: Power Ground - Ground Symbol
'Clear: Shield - Ground Symbol
Public
AirTC :
Units
AirTC = °C
Public
RH :
Units
RH = %
DataTable
(Temp_RH,True,-1)
DataInterval
(0,60,Min,0)
Average
(1,AirTC,FP2,0)
Sample
(1,RH,FP2)
EndTable
BeginProg
Scan
(5,Sec,1,0)
SW12
(1,1 )
'Turn on switched 12V
Delay
(0,2,Sec)
'2-second delay
'EE181 Temperature & Relative Humidity Sensor measurements AirTC and RH:
VoltSe
(AirTC,1,mV1000,U1,0,0,60,0.1,-40)
VoltSe
(RH,1,mV1000,U2,0,0,60,0.1,0)
SW12
(1,0 )
'Turn off switched 12V
CallTable
(Temp_RH)
NextScan
EndProg
Summary of Contents for EE181
Page 2: ......
Page 6: ......
Page 24: ......
Page 30: ...Appendix C Absolute Humidity C 4...
Page 31: ......