
Section 7. Installation
254
Details of using the
SDI12SensorSetup()
/
SDI12SensorResponse()
instruction
pair can be found in the
CRBasic Editor Help
. Other helpful tips include:
Concerning the
Reps
parameter in the
SDI12SensorSetup()
, valid
Reps
when
expecting an
aMx!
command range from 0 to 9. Valid
Reps
when expecting an
aCx!
command are 0 to 20. The
Reps
parameter is not range-checked for valid
entries at compile time. When the SDI-12 recorder receives the sensor response
of
atttn
to a
aMx!
command, or
atttnn
to a
aCx!
command, only the first digit
n
,
or the first two digits
nn
, are used. For example, if
Reps
is mis-programmed as
123, the SDI-12 recorder will accept only a response of
n
= 1 when iss
uing an
aMx!
command, or a response of
nn
= 12 when issuing an
aCx!
command.
When programmed as an SDI-12 sensor, the CR800 will respond to SDI-12
commands
M
,
MC
,
C
,
CC
,
R
,
RC
,
V
,
?
, and
I
. See table
SDI-12 Commands for
Transparent Mode
(p. 242)
for full command syntax. The following rules apply:
1. A CR800 can be assigned only one SDI-12 address per SDI-12 port. For
example, a CR800 will not respond to both
0M!
AND
1M!
on SDI-12 port
C1
. However, different SDI-12 ports can have unique SDI-12 addresses.
Use a separate
SlowSequence
for each SDI-12 port configured as a sensor.
2. The CR800 will handle additional measurement
(
aMx!
)
commands. When an
SDI-12 recorder issues
aMx!
commands as shown in CRBasic example
SDI-
12 Sensor Setup
(p. 254),
measurement results are returned as listed in table
SDI-
12 Sensor Setup — Results
(p. 255).
SDI-12 Sensor Setup
'This program example demonstrates the use of the SDI12SensorSetup()/SDI12SensorResponse()
'instruction pair to program the CR800 to emulate an SDI-12 sensor. A common use of this
'feature is the transfer of data from the CR800 to SDI-12 compatible instruments, including
'other Campbell Scientific dataloggers, over a single-wire interface (SDI-12 port to
'SDI-12 port). The recording datalogger simply requests the data using the aD0! command.
Public
PanelTemp
Public
Batt_volt
Public
SDI_Source(10)
BeginProg
Scan
(5,Sec,0,0)
PanelTemp
(PanelTemp,250)
Battery
(batt_volt)
SDI_Source(1) = PanelTemp
'temperature, degrees C
SDI_Source(2) = batt_volt
'primary power, volts dc
SDI_Source(3) = PanelTemp * 1.8 + 32
'temperature, degrees F
SDI_Source(4) = batt_volt
'primary power, volts dc
SDI_Source(5) = PanelTemp
'temperature, degrees C
SDI_Source(6) = batt_volt * 1000
'primary power, millivolts dc
SDI_Source(7) = PanelTemp * 1.8 + 32
'temperature in degrees F
SDI_Source(8) = batt_volt * 1000
'primary power, millivolts dc
SDI_Source(9) = Status.SerialNumber
'serial number
SDI_Source(10) = Status.LithiumBattery
'data backup battery, V
NextScan
Summary of Contents for CR800 Series
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 34: ......
Page 54: ......
Page 92: ......
Page 310: ......
Page 446: ...Section 8 Operation 446 8 11 2 Data Display FIGURE 100 CR1000KD Displaying Data ...
Page 448: ...Section 8 Operation 448 FIGURE 102 CR1000KD Real Time Custom ...
Page 449: ...Section 8 Operation 449 8 11 2 3 Final Storage Data FIGURE 103 CR1000KD Final Storage Data ...
Page 450: ...Section 8 Operation 450 8 11 3 Run Stop Program FIGURE 104 CR1000KD Run Stop Program ...
Page 452: ...Section 8 Operation 452 FIGURE 106 CR1000KD File Edit ...
Page 456: ......
Page 462: ......
Page 523: ...Section 11 Glossary 523 FIGURE 116 Relationships of Accuracy Precision and Resolution ...
Page 524: ......
Page 526: ......
Page 556: ......
Page 558: ......
Page 560: ......
Page 597: ......