beautypg.com

B.6.1.4 barometer program – Campbell Scientific CR10X Measurement and Control System User Manual

Page 244

background image

APPENDIX B. CONTROL PORT SERIAL I/O INSTRUCTION 15

B-12

TABLE B-3. Number of Characters/Output and Memory Requirements for Various Barometer

Output Modes

Example: 100 samples are averaged by the
barometer connected to the CR10X via hook-up
#1.

ET = 0.1 * 100 + 0.9

ET = 10.9 seconds

Time out = 10.9/0.01

Time out = 1090

In general, the above equations overestimate
the execution time. When execution speed is
critical, the minimum time out delay must be
determined through trial and error.

B.6.1.4 BAROMETER PROGRAM

The following example program assumes the
barometer is jumpered for TTL output and the

average of one measurement. The following
considerations are accounted for in the
program.

• To preserve the barometer measurement

resolution, barometer data must be output
to the CR10X Final Storage in High
Resolution (OUTPUT PROCESSING
INSTRUCTION 78).

• A communication failure shows up as a

partial value or -99999. It is generally
desirable to exclude this value from any
processing and log the incidence of failure.
A failure may be detected by comparing it to
expected limits. A bad value may be
excluded from processing by temporarily
setting the Intermediate Processing Disable
flag (flag 9). To log a failure the reading
could be output immediately with the time of
occurrence.

01:

P15

Control Port Serial I/O

01:

1

Repetitions

02:

00

Configuration code

ASCII;TTL

03:

0

CTS/Delay before send

04:

1

C1 RTS/DTR

RXD is C2 (code could be 12)

05:

0

Output start location

06:

0

Number of locations to send

07:

13

Input termination character

13

=

CR

08:

9

Max characters to receive

09:

100

Delay for CTS/input

Wait 1 sec

for Input

10:

1

First input location

11:

1

Multiplier

barometer jumpered

12:

0

Offset

for millibar output