Appendix B. Instruction 15: Control Port Serial I/O
B-11
The following paragraphs contain more detailed information on some of the
parameters:
Parameter 2
Set to 00 to select TTL logic levels.
Parameter 4
The first control port is connected to the ‘shut down’ line (green);
the second to the TTL data line (black).
Parameter 7
The input termination character is carriage return (13).
Parameter 8
Total number of characters to expect per input for one barometric
reading is 9. One value from the AIR barometer typically consists
of
an occasional garbage character, a sign, 5 data char-
acters, 1 decimal point, and a carriage return.
When reading a serial input, Instruction 15 uses intermediate and input locations.
One input location is required per data point. The number of intermediate loca-
tions required depends on the value of parameter 8. To minimise the number of
intermediate locations used, parameter 8 should be equal to or one greater than the
number of characters per barometer output.
Table B-4 provides information on the number of characters to expect from
various barometer modes.
If the barometer output contains multiple data points, the input location specified
in parameter 10 is sequentially incremented for each data point.
Parameter 9
The time out parameter limits the amount of time that Instruction
15 waits to receive input. The execution time of Instruction 15 is
dependent on both the configuration and the barometer jumper
settings. Exact execution time must be verified, but an initial
estimate may be calculated as follows:
Configuration #1: ET = 0.1 x MA + 0.9
Configuration #2: ET = 0.1 x MA + 0.6
where ET = Execution time in seconds
MA = Number of measurements averaged by the sensor
Parameter 9 Time out = ET/0.01
Example: 100 samples are averaged by the barometer connected to the CR10X in
configuration 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 by trial and
error.
B.4.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.