beautypg.com

Parameter 5 - output start location, Parameter 7 - input termination character – Campbell Scientific CR10X Measurement and Control System User Manual

Page 236

background image

APPENDIX B. CONTROL PORT SERIAL I/O INSTRUCTION 15

B-4

and/or B+1 may also be used depending on the
P15 CONFIGURATION selected). The user
can choose any control port for hardware flow
control (RTS/DTR) or TXD/RXD provided that
any A+1 and B+1 ports required for the P15
CONFIGURATION specified are available.

For double-digit codes (supported starting with
OS10X version 1.0014), the first digit specifies
the TXD or RXD line and the second digit
specifies the RTS/DTR line used by the first
repetition. The second digit can be a “0”
resulting in no RTS/DTR line. A “0” in the first
digit is equivalent to a single digit code. More
information on the control ports is given in the
Section B4, "Control Port Configuration and
Sensor Wiring".

PARAMETER 5 - OUTPUT START LOCATION

Parameter 5 specifies the first input location
containing data to be sent, if any.

PARAMETER 6 - NUMBER OF LOCATIONS TO

SEND; PREAMBLE OR DATA

Parameter 6 specifies the number of input
locations to send. A "--" following the number
indicates that the datalogger needs to convert
the values to ASCII. Entering only the number
of input locations (i.e., no "--") implies that the
values are in ASCII decimal equivalent code.

A "0" in Parameter 6 means send nothing.

If outputting a preamble or command
characters to a sensor, the characters must be
in the ASCII decimal equivalent code (Appendix
E). The preamble is stored in sequential input
locations with one ASCII decimal equivalent
code (0 to 127) in each location. The CR10X
sends the preamble one ASCII character per
input location. The decimal codes may be
loaded into input locations using Instruction 30.
Any negative value indicates that a "BREAK"
should be sent. A "BREAK" is a spacing
condition of more than 150 milliseconds.

If the number of locations to send is followed by
"--", the CR10X sends an ASCII representation
of the value in the input location. Seven ASCII
characters are sent for each input location

(+ or -, five digits, and a decimal point). This
feature is used most often when outputting data
to another CR10X. Data points are separated
by a space, and the string is terminated with a
Carriage Return and Line Feed.

The data are transmitted with 1 start bit, 8 data
bits, no parity, and one stop bit. For sensors
requiring 7 data bits with 2 stop bits, add 128 to
the last input location.

PARAMETER 7 - INPUT TERMINATION

CHARACTER

The termination character is used to mark the
end of the ASCII string received by the CR10X.
Regardless of the configuration code, all 8 bits
are used in determining the termination
character. Thus, if the sensor is sending parity,
it may be necessary to add 128 to the decimal
value of the character.

If the termination character IS NOT
encountered, input will continue until time out
(Parameter 9) or until the maximum number of
characters (Parameter 8) is received.

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. When the
number of characters specified have been
received, 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 - TIME OUT 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
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.
LoggerNet displays an “-INF.”

• 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