System information
Section 3. The CR200 Datalogger
3-3
• PakBusAddress: The PakBus address of the datalogger
If the names of the available settings are not known, all settings within the
CR200 datalogger can be obtained by specifying a null NameList parameter in
a Get Settings transaction. Once the settings are returned, they can be parsed,
viewed, and later used as needed.
3.5 Getting and Setting the CR200 Clock
The CR200 datalogger contains an accurate clock that drives the execution
interval of the running datalogger program. An application can either check or
set the datalogger clock with the Clock Transaction.
Before attempting to set the datalogger clock, the application should always
check the current time. Then, if necessary, the appropriate adjustment can be
made by either adding time to or subtracting time from the datalogger clock
with the Clock Command message. A hexadecimal example of this message
that is checking the clock for a datalogger with a PakBus address of 1 looks
like:
BD A0 01 4F FE 10 01 0F FE 17 17 00 00 00 00 00 00 00 00 00
00 B2 B3 BD
The response from the datalogger to the clock request comes in the form of the
Clock Response message. A hexadecimal example of a clock response packet
looks like:
BD AF FE 00 01 1F FE 00 01 97 17 00 1B FA 2A 61 C8 00 00 00
04 FA BD
3.6 Datalogger Program Structure
CR200 programs are written with a programming language called CRBasic.
This BASIC-like programming language syntax facilitates the creation of
datalogger programs capable of precise measurement and data analysis.
Datalogger programs declare variables, define tables to store data, and run
instructions to make measurements or process information.
Datalogger programs that are sent to the datalogger execute on a precise
interval to process data or make measurements. Data are stored in tables
defined by the datalogger program. By default, all CR200 dataloggers include
the Status table and the Public table. The Status table contains information
about the datalogger operating system and parameters. The Public table
contains program variables and measurements. A maximum of four additional
custom tables can be defined in the datalogger program and used to store data
in the CR200.
When the datalogger runs the compiled program, the defined tables are created
in Flash memory. As the program executes, data are stored in the created
tables on the specified interval. Therefore, when the datalogger is powered
down, the data remains. However, since the datalogger program creates the
tables, all data are erased when a new datalogger program is sent to the
datalogger.