04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Section 7. Installation<br />

7.8.3.2 SDI-12 Programmed Modes<br />

7.8.3.2.1 SDI-12 Recorder Mode<br />

Send Data Commands (aD0! to aD9!)<br />

These commands requests data from the sensor. They are normally issued<br />

automatically by the <strong>CR1000</strong> after measurement commands aMv! or aCv!. In<br />

transparent mode, the user asserts these commands in series to obtain data. If the<br />

expected number of data values are not returned in response to a aD0! command,<br />

the data logger issues aD1!, aD2!, etc., until all data are received. In transparent<br />

mode, a user does likewise. The limiting constraint is that the total number of<br />

characters that can be returned to a aDv! command is 35 characters (75 characters<br />

for aCv!). If the number of characters exceed the limit, the remainder of the<br />

response are obtained with subsequent aDv! commands wherein v increments (v =<br />

0 to 9) with each iteration.<br />

Continuous Measurement Command (aR0! to aR9!)<br />

Sensors that are able to continuously monitor the phenomena to be measured,<br />

such as a shaft encoder, do not require a Start Measurement (M) command. They<br />

can be read directly with the Continuous Measurement Command (R0! to R9!).<br />

For example, if the sensor is operating in a continuous measurement mode, then<br />

aR0! will return the current reading of the sensor. Responses to R commands are<br />

formatted like responses to D commands. The main difference is that R<br />

commands do not require a preceding M command. The maximum number of<br />

characters returned in the part of the response is 75.<br />

Each R command is an independent measurement. For example, aR5! need not<br />

be preceded by aR0! through aR4!. If a sensor is unable to take a continuous<br />

measurement, then it must return its address followed by (carriage<br />

return and line feed) in response to an R command. If a CRC was requested, then<br />

the must be preceded by the CRC.<br />

The <strong>CR1000</strong> can be programmed to act as an SDI-12 recording device, or as an<br />

SDI-12 sensor.<br />

For troubleshooting purposes, responses to SDI-12 commands can be captured in<br />

programmed mode by placing a variable declared As String in the variable<br />

parameter. Variables not declared As String will capture only numeric data.<br />

Another troubleshooting tool is the terminal-mode snoop utility, which allows<br />

monitoring of SDI-12 traffic. Enter terminal mode as described in SDI-12<br />

Transparent Mode (p. 173), issue CRLF ( Key) until <strong>CR1000</strong>> prompt<br />

appears. Type W and then . Type 9 in answer to Select:, 100 in answer<br />

to Enter timeout (secs):, Y to ASCII (Y). SDI-12 communications are then<br />

opened for viewing.<br />

The SDI12Recorder() instruction automates the issuance of commands and<br />

interpretation of sensor responses. Commands entered into the SDIRecorder()<br />

instruction differ slightly in function from similar commands entered in<br />

transparent mode. In transparent mode, for example, the operator manually enters<br />

aM! and aD0! to initiate a measurement and get data, with the operator providing<br />

the proper time delay between the request for measurement and the request for<br />

data. In programmed mode, the <strong>CR1000</strong> provides command and timing services<br />

within a single line of code. For example, when the SDI12Recorder() instruction<br />

177

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!