Campbell Scientific CR6 CR6 Measurement and Control System - Page 124
Program Run Priorities
View all Campbell Scientific CR6 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 124 highlights
Section 7. Installation 7.7.4.2 Default.CR6 File A file named default.CR6 can be stored on the CR6 CPU: drive. At power up, the CR6 loads default.CR6 if no other program takes priority (see Program Run Priorities (p. 124) ). Default.CR6 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 CR6 memory. If the intent is to load operating systems via telecommunications and have a default.CR6 file in the CR6, the default.CR6 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. Refer to the section Sending the Operating System (p. 117) for information about sending the operating system. Execution of default.CR6 at power-up can be aborted by holding down the DEL key on the external keyboard display. CRBasic Example 3. Simple Default.CR6 File to Control SW12 Terminal ' use of a Default.CR6 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,1) If TimeIntoInterval(45,60,Sec) Then SW12(1,0) NextScan EndProg 7.7.5 Program Run Priorities 1. When the CR6 starts, 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 CR6 powers up, a program file marked as Run On Power-up will be the current program. Otherwise, any file marked as Run Now will be used. 3. If there is a file specified in the Include File Name setting, it is compiled at the end of the program selected in step. 4. If there is no file selected in step 1, or if the selected file cannot be compiled, the CR6 will attempt to run the program listed in the Include File Name setting. The CR6 allows a SlowSequence statement to take the place of the BeginProg statement. This allows the "Include File" to act as the default program. 5. If the program listed in the Include File Name setting cannot be run or if no program is specified, the CR6 will attempt to run the program named default.CR6 on its CPU: drive. 6. If there is no default.CR6 file or it cannot be compiled, the CR6 will not 124