B.7 program examples, B.7.1.1 cr23x-barometer configuration limitations, B.7.1.2 cr23x/barometer hook-up – Campbell Scientific CR23X Micrologger User Manual
Page 254

APPENDIX B. CONTROL PORT SERIAL I/O INSTRUCTION 15
B-10
B.7 PROGRAM EXAMPLES
The following examples represent portions of a
larger, more complete application program, and
SHOULD NOT BE USED VERBATIM.
B.7.1 EXAMPLE 1: ATMOSPHERIC
INSTRUMENTS RESEARCH AIR-DB-1A
BAROMETER
Various barometer functions (mode, units of
output, baud rate, etc.) are determined by
jumpers internal to the barometer. A summary
of the jumper configurations is found in Section
B8. Detailed instructions for jumper placement
are found in the AIR Barometer Operations
Manual provided by AIR, Inc.
B.7.1.1 CR23X-BAROMETER
CONFIGURATION LIMITATIONS
The CR23X is limited to reading only certain
barometer jumper configurations as described
below:
MODES of OPERATION
The CR23X can read all Modes of Operation
except the Serial ID and Signature Analysis
portion of the Test Mode. Serial input is
required. The CR23X will NOT read a parallel
input.
UNITS of OUTPUT
The CR23X reads all Units of Output.
NUMBER of MEASUREMENTS AVERAGED
Any number of "measurements averaged" may
be read by the CR23X. Instruction 15 execution
time is prolonged when the barometer makes
several measurements to compute an average.
BAUD RATE
300 or 1200 baud
RS-232 JUMPERS
For typical field use where power is limiting, the
RS-232 Jumpers should be removed to enable
a TTL (0-5V) level output.
B.7.1.2 CR23X/BAROMETER HOOK-UP
Table 2 provides connection information for two
TTL and one RS-232 version of data transfer.
Each hook-up has specific advantages:
HOOK-UP #1
This hook-up demands the least power
consumption (typically 1.0 mA quiescent, 6.0
mA active). If the barometer is jumpered to
output the average of one measurement, the
execution time of Instruction 15 is 0.5 to 0.6
seconds. The barometer's "shut down" and
data transmit lines connect to the RTS and RX
control ports (Parameter 4). TTL logic is
specified in Parameter 2. When the instruction
is run, the shut down line connected to RTS
goes from 5 to zero volts. The barometer
"wakes up", makes the measurement(s), and
transmits the data. Upon receipt of the data,
the RTS line goes to 5 volts, returning the
barometer a low current drain "sleep" mode.
HOOK-UP #2
This hook-up results in greater power
consumption than Configuration 1 (typically 5.5
mA quiescent, 6.0 mA active), but executes
faster. If the barometer is jumpered to output
the average of one measurement, Instruction 15
execution time is 0.2 to 0.3 seconds. The only
difference between HOOK-UPs #1 and #2 is
that the barometer's DTR line replaces the shut
down line. The barometer is always "awake",
leading to faster instruction execution at the
expense of higher current drain.
HOOK-UP #3
The purpose of this hook-up is to read the
barometer on a standard RS-232 device, such
as a printer or terminal instead of the CR23X. If
failure occurs, this hook-up allows using a third
device to check if the problem is with the
barometer or with the CR23X.