System information
Section 3. The CR200 Datalogger
3-4
3.7 Creating CR200 Programs and the CR200
Compiler
The CR200 datalogger must contain a valid program in order to execute
instructions that measure and analyze sensor data. These programs are usually
generated with either a software program called Short Cut for Windows or with
a program editor called CRBasic Editor but if the correct syntax is used,
datalogger programs can be written with any text editor.
Because of the compact size of the CR200, only compiled programs can be
sent to the datalogger. Once a program has been created, it must be compiled
to match the operating system of the datalogger before being sent to the
CR200. If program compiler does not match the current operating system on
the datalogger, the compiled program will be rejected.
Appropriate compilers are included with both Short Cut for Windows and the
CRBasic Editor. Once an application discovers the operating system version of
the CR200, the appropriate compiler can be used to compile a program before
sending it to the datalogger. When a program is sent to the datalogger, the
datalogger response will indicate if a compiler compatibility problem exists.
Attempts should be made to use the most recently released operating system in
the CR200. However, if the program compiler and the datalogger operating
system are not compatible, either the program must be recompiled with the
correct compiler or the datalogger operating system must change to match the
compiled program. Since there is not a an easy way to know what compiler
was used on the datalogger program, the recommended resolution is to
discover the operating system version of the CR200 and recompile the
datalogger program with the corresponding compiler.
3.7.1 Discovering the CR200 OS Version
There are two methods of discovering the CR200 operating system version.
The first method is to use the File Control Get Programming Statistics
transactions to query the datalogger for this information. The datalogger
operating system information will be included in the response message.
The second method is to get table definitions and then collect data from the
Status table of the CR200. The Status table holds key information like the
datalogger operating system version. However, if a program isn’t running on
the datalogger, table definitions will not be available and the Status table
cannot be queried. Therefore, the better option may be to focus on getting the
OS version using the Get Programming Statistics transaction.
Compare the discovered CR200 series datalogger operating system version to
the compiler used to create the datalogger program. For example, if the
datalogger reports an operating system of “v03A”, the appropriate compiler
would be named “cr2compv03A.exe”. Remember that the program must be
compiled to match the operating system running on the datalogger.