wireless-ethernet (cell) modems are often controlled by a switched 12 Vdc
(SW12) terminal. SW12 is normally off, so, if the program controlling SW12 is
disabled, such as by replacing it with a program that neglects SW12 control, the
cell modem is switched off and the remote CR1000 drops out of
telecommunications.
Executable CPU: files automatically execute according to the schedule outlined in
table . Each can contain code to set specific settings in the CR1000.
Executable CPU: files include the following:
• 'Include' file (p. 147)
•
Default.cr1 file (p. 116)
•
Powerup.ini file (p. 386)
To be used, each file needs to be created and then placed on the CPU: drive of the
CR1000. The 'include' file and default.cr1 file consist of CRBasic code.
Powerup.ini has a different, limited programming language.
7.7.1.4.1 Default.cr1 File
A file named default.cr1 can be stored on the CR1000 CPU: drive. At power up,
the CR1000 loads default.cr1 if no other program takes priority (see Executable
File Run Priorities
(p. 116)). Default.cr1 can be edited to preserve critical
datalogger settings such as communication settings, but cannot be more than a
few lines of code.
Downloading operating systems over telecommunications requires much of the
available CR1000 memory. If the intent is to load operating systems via a
telecommunication link, and have a default.cr1 file in the CR1000, the default.cr1
program should not allocate significant memory, as might happen by allocating a
large USR: drive. Do not use a DataTable() instruction set for auto allocation of
memory, either. Refer to the section Updating the Operating System (OS)
(p. 117)
for information about sending the operating system.
Execution of default.cr1 at power-up can be aborted by holding down the DEL
key on the CR1000KD Keyboard Display.
CRBasic Example 1. Simple Default.cr1 File to Control SW12 Terminal
'This program example demonstrates use of a Default.cr1 file. It must be restricted
'to few lines of code. This program controls the SW12 switched power terminal, which
'may be helpful in assuring that the default power state of a remote modem is ON.
BeginProg
Scan(1,Sec,0,0)
If TimeIntoInterval(15,60,Sec) Then SW12(1)
If TimeIntoInterval(45,60,Sec) Then SW12(0)
NextScan
7.7.1.4.2 Executable File Run Priorities
1. When the CR1000 powers up, it executes commands in the powerup.ini file (on
Campbell Scientific mass storage device or memory card including commands
to set the CRBasic program file attributes to Run Now or Run On Power-up.
2. When the CR1000 powers up, a program file marked as Run On Power-up
116