User manual

Table Of Contents
User Guide
5.1.2 Example CRBasic Program Measuring One Sensor Every 30 Seconds
The following example is written for the CR200 datalogger. Programs for the
CR1000 and CR5000 would be similar although many instructions have extra
parameters required to control the extra capability in those dataloggers. The
SDI12recorder instruction also varies somewhat between the dataloggers – see the
CRBasic help for the respective logger for further details.
'CR200 Series Datalogger
'Example program showing measurement of a single CS215 sensor every 30 sec
'Declare the variables we are going to use
Public CS215meas(2)'An array suitable to read the SDI-12 data into
Alias CS215meas(1) = Temperature
Alias CS215meas(2) = RH
'Define Data Table to hold the stored data
DataTable (CS215data,1,-1)
DataInterval (0,15,min) 'As an example store the average every 15 mins
Average (1,Temperature,False)
Average (1,RH,False)
EndTable
'Main Program
BeginProg
Scan (30,Sec) 'Scan every 30 seconds
SDI12Recorder (CS215meas(),0R!,1.0,0) 'Read the last measured values into the array
CallTable CS215data 'Call the table instruction to calculate and store the averages
NextScan
EndProg
5.2 Measurements at Fast Scan Rates
Before considering making higher speed measurements with the CS215 it is
important to understand one possible source of error. This is that the sensor
element in the CS215 contains active elements so is subject to errors caused by
self-heating. This is where power dissipated in the element raises its temperature
leading to a slight over-reading of temperature and under reading of relative
humidity. These errors will only be significant in conditions of very low
windspeed and when taking measurements very frequently. For instance in still air
measuring the probe at 1 second intervals will lead to an over-reading of
temperature by up to 0.3°C and at 2 second intervals the error is about 0.1°C.
Therefore for the best accuracy it is advisable to read to sensor no more often than
every 5 seconds.
In addition to issues with self-heating the length of time a CS215 measurement
takes can limit the speed at which a program table can run, especially if there are
other lengthy measurements too. The following sections describe this issue and
ways to optimise the program to avoid this.
5.2.1 Edlog Dataloggers
The aM! and aR! commands takes about 740 and 300 milliseconds respectively to
make a measurement from the CS215. If the SDI-12 instruction is included in the
main program table (table 1 in Edlog dataloggers or the main scan in CRBasic
dataloggers) the program will be delayed for this interval which will limit the
maximum scan rate for fast running programs.
7