Include example, Print list of variables or quoted text, Rundldfile – Campbell Scientific CR9000X Measurement and Control System User Manual
Page 343

Section 9. Program Control Instructions
The Device on which the file is stored must be specified and the
entire string must be enclosed in quotation marks.
NOTE
The Include file returns compile errors when it is sent to the datalogger with a
Run Now attribute (RTDAQ's and LoggerNet's Connect window's "Send"
function always sends files as Run Now and Run on Power Up) or if it is
compiled in CRBasic, since it is only a partial file.
The Include file should normally be uploaded to the logger using the "File
Control" utility, or from the CRBasic editor with all of the Run time attributes
shut off.
Include Example
Below is an example of using the Include file functionality of the datalogger.
In the example, the "included" file merely declares a new variable and converts
a temperature value in the original program to degrees Fahrenheit, but the
included file could be a subroutine, slow sequence scan, or any portion of code
that you did not want displayed in the main program.
Main Running Program
Public Temp
BeginProg
Scan(1,Sec,3,0)
ModuleTemp(Temp,1,4,0)
INCLUDE
"CPU:IncludeFile.C9X"
NextScan
EndProg
Include File
Public TempF
TempF = Temp*1.8 + 32
Print list of variables or quoted text
Print is used as a tool in debugging a program to print text or the value of
variables at different points in the program. “Printing” occurs over the active
link and can be observed from DataLogger | Terminal Mode in RTDAQ.
RunDLDFile
Used to run one program file from another.
Syntax
RunDLDFile(
"d:FileName", Attribute
)
Remarks
RunDLDFile is a function that allows a running program to change the run
time attributes of another program file that is stored in the CR9000X. If bit 2
is set (Run Now), the current running program would be stopped and the
9-13