beautypg.com

Parameter 10 - input location, Parameters 11 and 12 - multiplier and offset, B.4 control port configurations and sensor wiring – Campbell Scientific CR23X Micrologger User Manual

Page 249: Configuration 1

background image

APPENDIX B. CONTROL PORT SERIAL I/O INSTRUCTION 15

B-5

Characters received following the termination
character are discarded.

PARAMETER 8 - MAXIMUM NUMBER OF

CHARACTERS TO RECEIVE

Parameter 8 defines the total number of
characters to expect per input, including
numeric, non-numeric, polarity, decimal, space,
and carriage return characters. For proper
operation of the (ring) buffer pointer, you should
specify the number of characters expected + 1.
When the number of characters specified has
been reached, any additional characters are
discarded as if the termination character had
been received.

Parameter 8 should be 0 if no input is expected.

PARAMETER 9 - DELAY FOR CLEAR-TO-SEND

OR SERIAL INPUT

Parameter 9 is a 4 digit number that specifies a
time out delay in units of 0.01 seconds. The
CTS time out only applies to control port option
7. The time out specifies one of the following:

• The amount of time to wait for the CTS port

to come high (Parameter 3=0 and
Parameter 6>0). If the delay lapses, -99999
is stored in the input location specified by
Parameter 10 and no data is output.

• The amount of time to wait for serial input

(Parameter 8>0). If the delay lapses and
some characters have been received, it
acts like a termination character. If no
characters have been received, a -99999 is
stored to indicate a fault in communication.

• Both of the above (Parameter 3=0 and

Parameter 6>0 and Parameter 8>0).

If output and input are completed before the
end of the delay, program execution
immediately advances to the next instruction.
Thus, the delay may be over estimated without
slowing down table execution.

If the delay expires, CR23X execution passes
on to the next instruction.

The maximum delay is 99.99 seconds. If a
longer delay is required, enter (-1) in Parameter
9. Under this condition, the program execution

passes to the next instruction only when one of
the other completion conditions (Parameters 7
or 8) are met. Consideration should be given to
the power supply and current drain (45 mA)
when completion of Instruction 15 is delayed for
an extended period.

PARAMETER 10 - INPUT LOCATION

This parameter defines the location in the
CR23X's Input Storage where the first received
data value is stored. Multiple data values are
stored in sequential input locations starting with
the location specified by Parameter 10.

PARAMETERS 11 AND 12 - MULTIPLIER AND

OFFSET

The data received by the CR23X can be scaled
using the multiplier and offset parameters. A
multiplier of 1 and offset of 0 are required to
preserve the data in the same form that it was
received.

B.4 CONTROL PORT CONFIGURATIONS

AND SENSOR WIRING

The table below lists all possible input/output
configurations.

Glossary:

DTR

Data Terminal Ready

Output (5V)

RTS

Request to Send

Output (5V)

TXD

Transmit Data

Output

CTS

Clear to Send

Input

RXD

Receive Data

Input

DTR/RTS are the same control port and are
asserted high (5V) when digit A of Parameter 4
is greater than zero.

CONFIGURATION 1

Serial data are received as input only by the
CR23X. No data or preamble are transmitted
as output; the CTS line is not used. Parameter
6 must be 0 and Parameter 8 must be greater
than zero. Parameter 4 is a 2-digit parameter
(AB) and specifies the control port used for RTS
output (A=1,2,3 or 4) and also the control port
used as the serial input line (B=5,6,7 or 8).
RTS in this example, when asserted (5V) tells
the sensor that the CR23X is ready to accept
characters. A total of 2 control ports are being
used per repetition. A maximum of 4 repetitions
can be used in this configuration.