Appendix A. Daily Average
If the CS105 will be measured every minute or faster, and a daily average is
required, follow Example 5. In Example 5 the daily average, maximum, and
minimum pressure is recorded at midnight. A constant is subtracted from the
pressure before the average instruction is executed. This prevents the loss of
significant digits when adding small numbers to large numbers in floating
point arithmetic.
Example 5. Recording a Daily Average, Maximum, and Minimum Pressure
;{CR10X}
;
*Table 1 Program
01: 5
Execution
Interval
(seconds)
01: Do (P86)
1: 41*
Set Port 1* High
02: Excitation with Delay (P22)
1: 1
Ex
Channel
2: 0
Delay W/Ex (units = 0.01 sec)
3: 100
Delay After Ex (units = 0.01 sec)
4: 0
mV
Excitation
03: Volts (SE) (P1)
1: 1
Reps
2: 25**
± 2500 mV 60 Hz Rejection Range
3: 1*
SE
Channel
4: 1*
Loc [ P_mb ]
5: .184
Mult
6: 600
Offset
04: Do (P86)
1: 51*
Set Port 1 Low*
05: Z=X+F (P34)
1: 1*
X Loc [ P_mb ]
2: -800
F
3: 2*
Z Loc [ P_const ]
06: If time is (P92)
1: 0
Minutes (Seconds --) into a
2: 1440
Interval (same units as above)
3: 10
Set Output Flag High (Flag 0)
07: Set Active Storage Area (P80)
1: 3
Input
Storage
Area
2: 3*
Loc [ P_mb_avg ]
A-1