9 logarithmic sampling using loops – Campbell Scientific CR10X Measurement and Control System User Manual
Page 117

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES
8-9
07:
If Flag/Port (P91)
1:
21
Do if Flag 1 is Low
2:
30
Then Do
08:
Do (P86)
1:
11
Set Flag 1 High
09:
Z=F (P30)
1:
10
F
2:
0
Exponent of 10
3:
2
Z Loc [ Down_cnt ]
10:
End (P95)
11:
End (P95)
12:
IF (X<=>F) (P89)
1:
2
X Loc [ Down_cnt ]
2:
1
=
3:
0
F
4:
30
Then Do
13:
If Flag/Port (P91)
1:
11
Do if Flag 1 is High
2:
30
Then Do
14:
Serial Out (P96)
1:
81
All Data to other FS Area
15:
Do (P86)
1:
21
Set Flag 1 Low
16:
End (P95)
17:
Else (P94)
18:
Z=X+F (P34)
1:
2
X Loc [ Down_cnt ]
2:
-1
F
3:
2
Z Loc [ Down_cnt ]
19:
End (P95)
*
A
Mode 10 Memory Allocation
01:
28
Input Locations
02:
64
Intermediate Locations
03:
84
Final Storage Area 2
INPUT LOCATIONS
1 Force_kg
2 Down_cnt
8.9 LOGARITHMIC SAMPLING USING
LOOPS
A ground water pump test requires that water
level be measured and recorded according to
the following schedule.
Output Interval
Time into Test, min
Loop #
00
to
10
10 sec.
1
10
to
30
30 sec.
2
30
to
100
1 min.
3
100
to
300
2 min.
4
300
to
1000
5 min.
5
1000 and greater 10 min.
6
This is accomplished with a series of loops
(Instruction 87), where the delay and count
parameters are used to implement the
frequency of measurement (and output) and the
duration of the that frequency. The unit of delay
is the execution interval. A delay of 1 with a 10
second execution interval and a count of 60
means the instructions in the loop, in this case
measure and output water level, are executed
every 10 seconds for 10 minutes.
The drawdown portion of the test is completed
at some time greater than 1000 minutes. To
enter the recharge phase of the test, the
operator enters the
∗6AD Mode and sets Flag 1
high. At the next 10 minute pass through loop 6
the loop is exited. Program execution returns to
the top of the program table and the
measurement schedule starts over again for the
recharge test.
The sensor is a 50 PSI Druck, model 930/ti with
a calibration of 49.93 mV/10V of excitation or
4.993 mV/V. Your calibration will be different.
An excitation voltage of 1500 mV yields a
maximum signal of 7.489 mV at 50 PSI, fully
utilizing the 7.5 mV Input Range to provide the
best resolution.
The multiplier, m, is calculated to provide depth
of water in feet:
m = (50 psi/4.993 mV/V) * (2.3067 ft/psi)
m = 23.099 ft/mV/V
The offset is calculated to provide a final value
that represents the distance from the lip of the
well to the water surface. Similar to Figure
7.16-2, the offset equals the initial distance of
47.23 feet plus the initial reading of 54.77, or
102 feet.