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 #181 background imageLoading...
Page #181 background image
Section 7. Installation
by using -p <outfile name>. This feature allows the smallest size program file
possible to be sent to the CR1000, which may help keep costs down over very
expensive telecommunication links.
CRBasic example Conditional Code
(p. 181) shows a sample program that
demonstrates use of conditional compilation features in CRBasic. Within the
program are examples showing the use of the predefined LoggerType constant
and associated predefined datalogger constants (6, 800, 1000, and 3000).
CRBasic Example 29. Conditional Code
'This program example demonstrates program compilation than is conditional on datalogger
'model and program speed. Key instructions include #If, #ElseIf, #Else and #EndIf.
'Set program options based on:
' LoggerType, which is a constant predefined in the CR1000 operating system
' ProgramSpeed, which is defined in the following statement:
Const ProgramSpeed = 2
#If ProgramSpeed = 1
Const ScanRate = 1 '1 second
Const Speed = "1 Second"
#ElseIf ProgramSpeed = 2
Const ScanRate = 10 '10 seconds
Const Speed = "10 Second"
#ElseIf ProgramSpeed = 3
Const ScanRate = 30 '30 seconds
Const Speed = "30 Second"
#Else
Const ScanRate = 5 '5 seconds
Const Speed = "5 Second"
#EndIf
'Public Variables
Public ValueRead, SelectedSpeed As String * 50
'Main Program
BeginProg
'Return the selected speed and logger type for display.
#If LoggerType = 3000
SelectedSpeed = "CR3000 running at " & Speed & " intervals."
#ElseIf LoggerType = 1000
SelectedSpeed = "CR1000 running at " & Speed & " intervals."
#ElseIf LoggerType = 800
SelectedSpeed = "CR800 running at " & Speed & " intervals."
#ElseIf LoggerType = 6
SelectedSpeed = "CR6 running at " & Speed & " intervals."
#Else
SelectedSpeed = "Unknown Logger " & Speed & " intervals."
#EndIf
'Open the serial port
SerialOpen(ComC1,9600,10,0,10000)
'Main Scan
Scan(ScanRate,Sec,0,0)
'Measure using different parameters and a different SE channel depending
'on the datalogger type the program is running in.
181

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