7 logarithmic sampling using loops – Campbell Scientific CR510 Basic Datalogger User Manual
Page 102

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES
8-6
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.7 LOGARITHMIC SAMPLING USING
LOOPS
A ground water pump test requires that water
level be measured and recorded according to
the following schedule.
Time into Test
Minutes
Output
Interval
Output
Interval
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 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, at
which time the operator sets Flag 1 low. At the
next 10 minute pass through loop 6, the loop is
exited and program execution returns to the top
of the program table. To enter the recharge
phase of the test, the operator enters the *6AD
Mode and sets Flag 1 high and the
measurement schedule starts over again.
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.
PROGRAM
*
Table 1 Program
01:
10
Execution Interval (seconds)
;User must toggle Flag 1 to start measurements.
;
01:
If Flag/Port (P91)
1:
21
Do if Flag 1 is Low
2:
0
Go to end of Program Table
;Loop 1, Output every 10 seconds for 10 minutes.
;
02:
Beginning of Loop (P87)
1:
1
Delay
2:
60
Loop Count
03:
Do (P86)
1:
1
Call Subroutine 1
04:
End (P95)