Section 7. Installation
268
program can be coded to parse the response and issue subsequent SDI-12
commands based on a customized evaluation of the response. See Serial I/O
Input Programming Basics
(p. 311).
Using an SDI-12 Extended Command
'This program example demonstrates the use of SDI-12 extended commands. In this example,
'a temperature measurement, tt.tt, is sent to a CH200 Charging Regulator using the command
'XTtt.tt!'. The response from the CH200 should be '0OK', if 0 is the SDI-12 address.
'
'Declare Variables
Public
PTemp
As Float
Public
SDI12command
As String
Public
SDI12result
As String
'Main Program
BeginProg
Scan
(20,Sec,3,0)
PanelTemp
(PTemp,250)
SDI12command = "XT" & FormatFloat(PTemp,"%4.2f") & "!"
SDI12Recorder
(SDI12result,1,0,SDI12command,1.0,0)
NextScan
EndProg
7.7.15.3 SDI-12 Sensor Mode
The CR3000 can be programmed to act as an SDI-12 recording device or as an
SDI-12 sensor.
For troubleshooting purposes, responses to SDI-12 commands can be captured in
programmed mode by placing a variable declared As String in the variable
parameter. Variables not declared As String will capture only numeric data.
Another troubleshooting tool is the terminal-mode snoop utility, which allows
monitoring of SDI-12 traffic. Enter terminal mode as described in SDI-12
Transparent Mode
(p. 255),
issue CRLF (<Enter> key) until CR3000> prompt
appears. Type W and then <Enter>. Type 9 in answer to Select:, 100 in answer to
Enter timeout (secs):, Y to ASCII (Y)?. SDI-12 communications are then
opened for viewing.
The SDI12SensorSetup() / SDI12SensorResponse() instruction pair programs
the CR3000 to behave as an SDI-12 sensor. A common use of this feature is the
transfer of data from the CR3000 to other Campbell Scientific dataloggers over a
single-wire interface (terminal configured for SDI-12 to terminal configured for
SDI-12), or to transfer data to a third-party SDI-12 recorder.
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
Summary of Contents for CR3000 Micrologger
Page 2: ......
Page 3: ......
Page 4: ......
Page 6: ......
Page 30: ......
Page 34: ......
Page 36: ......
Page 96: ......
Page 485: ...Section 8 Operation 485 8 11 2 Data Display FIGURE 110 Keyboard and Display Displaying Data ...
Page 487: ...Section 8 Operation 487 FIGURE 112 CR1000KD Real Time Custom ...
Page 491: ...Section 8 Operation 491 FIGURE 116 Keyboard and Display File Edit ...
Page 496: ......
Page 502: ......
Page 564: ...Section 11 Glossary 564 FIGURE 126 Relationships of Accuracy Precision and Resolution ...
Page 566: ......
Page 594: ......
Page 598: ......
Page 600: ......
Page 602: ......
Page 624: ......
Page 642: ......
Page 643: ......