EasyManuals Logo

Campbell CR1000 User Manual

Campbell CR1000
678 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #150 background imageLoading...
Page #150 background image
Section 7. Installation
' CRBasic Editor, name it 'IncludeFile.cr1, and save it to the same PC folder on which
' resides the main program file (this make pre-compiling possible. Including the
' SlowSequence instruction as the first statement is required, followed by any other code.
'2. Send the 'include' file to the CPU: drive of the CR1000 using the File Control menu
' of the datalogger support software
(p. 654). Be sure to de-select the Run Now and Run On
' Power-up options that are presented by the software when sending the file.
'3. Add the Include instruction to the main CRBasic program at the location from which the
' 'include' file is to be called (see the following code).
'4. Enter the CR1000 file system path and file name after the Include() instruction, as shown
' in the following code.
'
'IncludeFile.cr1 contains code to control power to a cellular phone modem.
'
'Cell phone + wire to be connected to SW12 terminal. Negative (-) wire
'to G.
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 "CPU:IncludeFile.CR1" '<<<<<<<<<<<<<<<'include' file code executed here
EndProg
CRBasic Example 13. 'Include' File to Control SW12 Terminal.
'This program example demonstrates the use of an 'include' file. See the documentation in CRBasic
example
'Using an Include File
(p. 149)
'
'<<<<<<<<<<<<<<<<<<<<<<<NOTE: No BeginProg instruction
SlowSequence '<<<<<<<<<<NOTE: Begins with SlowSequence
Scan(1,Sec,0,0)
If TimeIntoInterval(9,24,Hr) Then SW12(1) 'Modem on at 9:00 AM (900 hours)
If TimeIntoInterval(17,24,Hr) Then SW12(0) 'Modem off at 5:00 PM (1700 hours)
NextScan
'
'<<<<<<<<<<<<<<<<<<<<<<<NOTE: No EndProg instruction
7.8.4.10.4 Declaring Subroutines
Function() / EndFunction instructions allow you to create a customized CRBasic
instruction. The declaration is similar to a subroutine declaration.
7.8.4.10.5 Declaring Incidental Sequences
A sequence is two or more statements of code. Data-table sequences are essential
150

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Campbell CR1000 and is the answer not in the manual?

Campbell CR1000 Specifications

General IconGeneral
Power Requirements9.6 to 16 VDC
Data Logger Operating SystemCRBasic
Memory4 MB
Analog Inputs16 single-ended or 8 differential
Analog Input Resolution13 bits
Analog Input Range+/-2.5V
Digital I/O8
Pulse Counters2
Communication PortsRS-232
Operating Temperature-25°C to +50°C
Pulse Channels4

Related product manuals