beautypg.com

106 sdi-12 sensor – Campbell Scientific CR10X Measurement and Control System User Manual

Page 154

background image

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

9-22

PARAMETER 3. PORT

Enter the CR10X control port (C1-C8)
connected to the SDI-12 sensor data line. The
default port is C8.

PARAMETER 4. INPUT LOCATION

Input location where the returned data is stored.
If multiple values are returned from the SDI-12
sensor they are stored in sequential input
locations beginning at the specified location.

ERRORS

If the CR10X receives either an incorrect
response or no response from an SDI-12
sensor, the CR10X will retry the operation. If
after retries a valid response has not been
received, the CR10X will store a -99999 in the
input location specified in Parameter 4. Only
the first location will be altered. Sequential
locations will contain values from previous
measurements.

TRANSPARENT MODE

The SDI-12 transparent mode is used to
communicate directly with an SDI-12 sensor. A
common application of the transparent mode is
to verify proper operation of the SDI-12 sensor.

A computer or terminal is required to use the
transparent mode; the CR10KD (keyboard
display) cannot be used. Transparent mode is
entered while the computer is in
telecommunications with the SDI-12 recorder
CR10X (at the asterisk '

∗' prompt). Enter 'pX' at

the asterisk prompt, where 'p' is the Control Port
number (1-8) attached to the SDI-12 data line.
The CR10X responds with ‘entering SDI-12.’
Any SDI-12 command preceded with the sensor
address and followed with an exclamation point
'!' may then be entered. For example, entering
'0I!' would request identification from an SDI-12
sensor addressed at 0.

The SDI-12 prompt will not appear until the
CR10X finishes executing all program tables.
While in transparent mode, scheduled tables in
the CR10X will not execute. Transparent mode
ends and the ‘*’ prompt is returned when an
invalid SDI-12 command (e.g., a blank line) is
entered, if the SDI-12 sensor doesn’t respond
within the time-out period following a valid
command (approximately 1/3 second), or if the

user does not enter a command before the
mode times out (approximately 35 seconds).
Security must be unlocked to level 2 before the
Transparent mode is enabled.

*** 106 SDI-12 SENSOR ***

Instruction 106 allows a CR10X to be used as
an SDI-12 sensor. The CR10X can make
measurements and transfer data using SDI-12
commands in response to another SDI-12
recorder.

Instruction 106 supports the Standard SDI-12
commands as listed in the Parameter 2
description for Instruction 105.

The SDI-12 data line is attached to Control Port
8 and Instruction 106 must be the first
instruction in Subroutine 98 located in Table 3.
An SDI-12 recorder addresses the SDI-12
sensor CR10X by sending a Break and the
sensor's address. The sensor CR10X will call
subroutine 98 whenever it detects activity on the
SDI-12 data line attached to Port 8, but if the
Break and the specified address are not
received by Instruction 106, the remainder of
the subroutine is not executed.

Two programming techniques exist for obtaining
measurement values to be transferred by the
sensor Instruction 106. The first technique
makes the requested measurements "on
demand" in response to the recorders request.
The measurement instructions are located in
Subroutine 98 and are executed only when the
SDI-12 recorder requests measurements. This
technique is preferred when measurements are
to be made at the recorder's command.

The second technique transfers measurement
values previously obtained by instructions in
Table 1 or Table 2. Subroutine 98 contains only
Instructions 106 (SDI-12 sensor) and 95 (End).
When the recorder requests measurements,
values already in the specified input locations
are used. The advantage of this technique is
that the sensor CR10X can be making and
storing measurements independent of the SDI-
12 recorder. The data is also returned slightly
faster since the sensor CR10X does not make
measurements when the recorder requests
data, but rather uses measurements made at
the last regular table execution.