Campbell Scientific CR6 CR6 Measurement and Control System - Page 121
SlowSequence, File Control, Include File, BeginProg
![]() |
View all Campbell Scientific CR6 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 121 highlights
Section 7. Installation in a file separate from the main program file. It can be used once or multiple times by the main program, and by multiple programs. The file begins with the SlowSequence instruction and can contain any code. Procedure to use the "Include File": 1. Write the file, beginning with the SlowSequence instruction followed by any other code. 2. Send the file to the CR6 using tools in the File Control menu of datalogger support software (p. 89). 3. Enter the path and name of the file in the Include File setting using DevConfig or PakBusGraph. Figures "Include File" Settings with DevConfig (p. 122) and "Include File" settings with PakBusGraph (p. 122) show methods to set required settings with DevConfig or with telecommunications. There is no restriction on the length of the file. CRBasic example Using an "Include File" to Control Switched 12 V (p. 122) shows a program that expects a file to control power to a modem; CRBasic example "Include File" to Control Switched 12 V (p. 123) lists the code. Consider the the example "include file", CPU:pakbus_broker.dld. The rules used by the CR6 when it starts are as follows: 1. If the logger is starting from power-up, any file that is marked as the "run on power-up" program is the "current program". Otherwise, any file that is marked as "run now" is selected. This behavior has always been present and is not affected by this setting. 2. If there is a file specified by this setting, it is incorporated into the program selected above. 3. If there is no current file selected or if the current file cannot be compiled, the datalogger will run the program given by this setting as the current program. 4. If the program run by this setting cannot be run or if no program is specified, the datalogger will attempt to run the program named default.CR6 on its CPU: drive. 5. If there is no default.CR6 file or if that file cannot be compiled, the datalogger will not run any program. The CR6 will now allow a SlowSequence statement to take the place of the BeginProg statement. This feature allows the specified file to act both as an include file and as the default program. The formal syntax for this setting follows: include-setting := device-name ":" file-name "." file-extension. device-name := "CPU" | "USR" File-extension := "dld" | "CR6" 121
![](/manual_guide/products/campbell-scientific-cr6-cr6-measurement-control-a476969/121.png)