beautypg.com

Campbell Scientific CR23X Micrologger User Manual

Page 159

background image

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

9-25

This is likely to occur if Subroutine 98 execution
takes longer than the scan interval programmed
for Table 1 or 2. It is also possible for instructions
in Table 1 or 2 to prevent Subroutine 98 from
being called in time for Instruction 106 to receive
the address information from the recorder. This
is likely to occur only if Table 1 or 2 is executed
often and has instructions that take longer than
1/3 second to execute. For example, Instruction
4 (Excite-Delay-SE) with a 1/2 second delay could
cause Subroutine 98 to miss the SDI-12 address
information if it were executing when the SDI-12
data line became active. If this occurs the sensor
CR23X will not respond to the SDI-12 recorder.
Most instructions execute fast enough that when
Instruction 106 misses the initial SDI-12 address,
a subsequent retry by the recorder will work.

PARAM.

DATA

NUMBER

TYPE

DESCRIPTION

01:

4

ADDRESS (0-9, †10-126)

02:

4

TIME/VALUES
ttnn: tt=time(sec)
nn=no. values

03:

4

LOCATION starting
loc. for values

Input locations altered: 0

Intermediate locations required: 182. To
accommodate this number, increase the value in
*A window 2, if keying program steps in by hand.

PARAMETER 1. ADDRESS

Enter the address for the CR23X acting as an
SDI-12 sensor (0-9, †10-126 decimal value for
ASCII character, see Appendix E). Each SDI-
12 sensor connected to a given control port
must have a unique address.

PARAMETER 2. TIME/VALUES

Enter the time in seconds required for the
sensor CR23X to complete subroutine 98
followed by the number of input locations to be
returned to the SDI-12 recorder. The format is
ttnn where tt specifies the time in seconds and
nn (maximum 63) is the number of values from
Input Locations to be sent.

Enter a time of 0 to transfer the values already
stored in input locations. With a time of zero,
the remaining instructions in Subroutine 98 are
not executed.

The actual time to complete subroutine 98 is the
time required to execute all instructions from

Instruction 106 (SDI-12 sensor) to the final
Instruction 95 (End).

For response to the ‘M’ command, the entered
time may be longer than the actual time without
slowing the data exchange because the sensor
CR23X signals the SDI-12 data recorder when
the data is ready for transfer.

For response to either the ‘M’ or the ‘C’
command, if the entered time is too short the
sensor CR23X will not respond and the data
values will not be transferred. Similarly, no
response occurs if the SDI-12 recorder queries
the sensor CR23X before the entered time has
elapsed.

PARAMETER 3. LOCATION

This parameter determines the starting input
location for the 'n' values to be returned to the
recorder. The 'M' or 'M1-M9' command issued
by the SDI-12 recorder determines if the starting
location is actually that specified in Parameter 3
or a multiple of 'n' past Parameter 3.

Starting input location = Parameter 3 + (n

x),

where n is specified in Parameter 2, and, x is
the number following the 'M' sent by the SDI-12
recorder (1-9).If the 'M' command is sent by the
recorder x = 0.

Results of Instruction 106

The sensor CR23X will return a set of input
locations in response to the M or M1..M9
command sequence. The set of Locations
returned is determined by Parameters 2 and 3
of Instruction 106.

The three values, sent in response to a V
command sequence, indicate the status of the
sensor CR23X. The first and second values are
from the

B

mode of the sensor CR23X,

giving the number of watchdog errors (E08) and
the number of table overruns that have
occurred. The third is a signature of the sensor
CR23X memory. This signature is created by
the same technique that the Instruction 19
(Signature) uses.

In response to an I command, the CR23X
sends the string 'a 12CAMPBELL CR23X 001
bbbb' where a is the sensor address and bbbb
is the number from the eighth window of the

B

mode.