
Appendix B. Example Programs
B-2
'Define a data table for 60 minute averages:
DataTable
(Hourly,True,-1)
DataInterval
(0,60,Min,0)
Average
(1,T109_C,IEEE4,0)
EndTable
BeginProg
Scan
(1,Sec,1,0)
'Measure the temperature
Therm109
(T109_C,1,U1,U10,0,60,1.0,0.0)
'Call Data Table
CallTable
(Hourly)
NextScan
EndProg
The following example can be used directly with CR200(X)-series dataloggers.
CRBasic Example B-3. 109 Program Example for CR200(X)-Series Dataloggers
'Program measures one 109 temperature probe once a second and
'stores the average temperature every 60 minutes.
'Wiring Diagram
'==============
' 109
' Probe
' Lead CR200(X)
' Color Function Terminal
' ----- -------- ------
' Black Voltage-excitation input VX1/EX1
' Red Analog-voltage output SE1
' Purple Bridge-resistor ground Ground Symbol
' Clear Shield Ground Symbol
'Declare the variable for the temperature measurement
Public
T109_C
'
Define a data table for 60 minute averages
DataTable
(Hourly,True,-1)
DataInterval
(0,60,min)
Average
(1,T109_C,False)
EndTable
BeginProg
Scan
(1,sec)
'Measure the temperature
Therm109
(T109_C,1,1,Ex1,1.0,0)
'Call Data Table
CallTable
Hourly
NextScan
EndProg