Campbell Scientific CR6 CR6 Measurement and Control System - Page 274
SDI-12 Programmed Modes
View all Campbell Scientific CR6 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 274 highlights
Section 7. Installation SDI-12 Continuous Measurement Command (aR0! to aR9!) Sensors that are continuously monitoring, such as a shaft encoder, do not require an M command. They can be read directly with the Continuous Measurement Command (R0! to R9!). For example, if the sensor is operating in a continuous measurement mode, then aR0! will return the current reading of the sensor. Responses to R commands are formatted like responses to send data (aDv!) commands. The main difference is that R commands do not require a preceding M command. The maximum number of characters returned in the part of the response is 75. Each R command is an independent measurement. For example, aR5! need not be preceded by aR0! through aR4!. If a sensor is unable to take a continuous measurement, then it must return its address followed by (carriage return and line feed) in response to an R command. If a CRC was requested, then the must be preceded by the CRC. aRv! Request continuous data from the sensor. Example Syntax: aR5! 7.9.17.2 SDI-12 Programmed Modes The CR6 can be programmed to act as an SDI-12 recording device, or as an SDI12 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. 269), issue CRLF ( key) until CR6> prompt appears. Type W and then . 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. 7.9.17.2.1 SDI-12 Recorder Mode The SDI12Recorder() instruction automates the issuance of commands and interpretation of sensor responses. Commands entered into the SDIRecorder() instruction differ slightly in function from similar commands entered in transparent mode. In transparent mode, for example, the operator manually enters aM! and aD0! to initiate a measurement and get data, with the operator providing the proper time delay between the request for measurement and the request for data. In programmed mode, the CR6 provides command and timing services within a single line of code. For example, when the SDI12Recorder() instruction is programmed with the M! command (note that the SDI-12 address is a separate instruction parameter), the CR6 issues the aM! and aD0! commands with proper elapsed time between the two. The CR6 automatically issues retries and performs other services that make the SDI-12 measurement work as trouble free as possible. Table SDI-12Recorder() Commands (p. 275) summarizes CR6 actions 274