In the programming of the weather station all constants such as calibraiton factors,
offsets and ASCII text commands are stored in an external data file on the CF
card. For detailed information of source code see appendix B on page 85. It is
itegrated within the normal program sequence through a simple include command
for execution. The example below shows the procedure of declaring constants.
Const = CR = CHR(13)
Const = LF = CHR(10)
Const = Command = ".P" + CR + LF
Const = wind_multiplier = 0.03125
Const = wind_offset = -12.5
The first part distinguishes the combination of commands like carriage return CHR(13)
and line feed CHR(10) with operating commands to a single instruction named
"Command". The characters were taken from the library of CRBASIC. This in-
struction can be sent through a serial line to operate sensors, in this case, the digital
PTB210 barometers from Vaisala.
Every analog sensors uses its proper multiplier and offset for converting the analog
voltage into real units like demonstrated. For details see section 4.5.1 on page 49.
4.4 Data Tables
Data are stored in tables as directed by the CR1000’s CRBASIC program. A data
table is created by a series of CRBASIC instructions which are entered after variable
declarations but before the main program. These intructions include:
DataTable() / EndTable
Output Trigger Condition(s)
Output Processing Instrucions
EndTable Instruction
A data table is essentially a file resides in CR1000 memory. The file is written to
each time data are directed to that file.
40
Commentaires sur ces manuels