2 default.cr8 file – Campbell Scientific CR800 and CR850 Measurement and Control Systems User Manual
Page 105

Section 7. Installation
105
CRBasic Example 1.
Using an "Include File" to Control SW12
'Assumes that the Include file in CRBasic example
"Include File" to Control SW12
'is loaded onto the CR800 CPU: Drive.
'The Include file will control power to the cellular phone modem.
Public
PTemp, batt_volt
DataTable
(Test,1,-1)
DataInterval
(0,15,Sec,10)
Minimum
(1,batt_volt,FP2,0,False)
Sample
(1,PTemp,FP2)
EndTable
BeginProg
Scan
(1,Sec,0,0)
PanelTemp
(PTemp,250)
Battery
(Batt_volt)
CallTable
Test
NextScan
'<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"Include File" Code Executed Here
EndProg
CRBasic Example 2.
"Include File" to Control SW12.
'"Include File" "Add-on" Program
'Control Cellular modem power for the main program.
'Cell phone + to be wired to SW12 terminal, - to G.
'<<<<<<<<<<<<<<<<<<<<<<
SlowSequence
Scan
(1,Sec,0,0)
If TimeIntoInterval
(9,24,Hr)
Then SW12
(1)
'Modem on at 9:00 AM
If TimeIntoInterval
(17,24,Hr)
Then SW12
(0)
'Modem off at 5:00 PM
NextScan
'<<<<<<<<<<<<<<<<<<<<<<<<<<
7.6.3.3.2 Default.cr8 File
Default.cr8 can be stored on the CR800 CPU: drive. At power up, the CR800
loads default.cr8 if no other program takes priority (see Program Run Priorities
(p.
). Default.cr8 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 CR800 memory. If the intent is to load operating systems via
telecommunications and have a default.cr8 file in the CR800, the default.cr8
program should not use significant memory, such as occurs by allocating a large
USR: drive, or by using a DataTable() instruction with auto allocation of
memory.