Campbell Scientific CR9000X Measurement and Control System User Manual

Page 344

Advertising
background image

Section 9. Program Control Instructions

program whose run time attribute is being changed would compile and start. If
the selected program has compile errors, the result would be no running
program unless a program file with a name of default.C9X resides either on the
CPU or on the PCMCIA card.

See "Program Run Attribute Hierarchy" under the Powerup.ini topic in
Section 9.2, Datalogger Status/Control.

"device:FileName" is the device and name of the Program file that must have
previously been stored either on the CR9000X flash memory or on the
PCMCIA card. The device must be either CPU (file stored in the CPU's
SDRAM) or CRD (file stored in a PC card located in the CR9032's PC card
slot). The quote marks ( " ) are necessary.

The attribute parameter is evaluated as a binary number where bits one and
two are used to indicate if the program is to become the program that runs on
power up and/or if it is to replace the current program and run when the
instruction is executed.

Bit Decimal Description
bit 0

1

not used

bit 1

2

Run On Power Up

bit 2

4

Run Now

Only bit1 and bit2 are available for this function.

Example 1 RunDLDFile("CPU:TEMPS.C9X", &B100)

Example 1 results in the loading and startup of the program file
called TEMPS.C9X from CPU flash memory. Whatever Program
file currently had a run time attribute of "Run on power up" would
be loaded and run if the CR9000X was powered off and then on
again. In this example the attribute parameter is entered as a
binary number (&B100); it could also be entered in decimal format
as 4.

Example 2 RunDLDFile("CPU:TEMPS.C9X", &B110)

Example 2 results in the loading and startup of the program file
called TEMPS.C9X from CPU flash memory. TEMPS.C9X is
also to run when the logger is powered up. The attribute
parameter could also be entered as 6.

Example 3 If Flag(2) then RunDLDFile("CPU:TEMPS.C9X", 4)

Example 3 results in the loading and startup of the program file
called TEMPS.C9X from CPU flash memory conditionally, based
on the state of Flag(2).

9-14

Advertising