Campbell 21X Operator's Manual page 83

Micrologger
Table of Contents

Advertisement

SECTION
8.
PROCESSING
AND PROGRAM CONTROL EXAMPLES
02:
03:
11:
01:
02:
03:
o4:.
05:
60
10
minute interval
Set high Flag
0 (output)
Wind Vector
Rep
Samples per sub-interual
US, DV, SD (Polar Sensor)
Wind Speed/East Loc WS
Wind Direction/North Loc
0-360
wD
Average
Reps
Loc
Ta
3:Ta
4:SR
S:WS
output
6:0-540 out
7:Ta output
8:SR output
10:0-540 WD
*3
01:
01:
02:
01:
02:
03:
o4:
03:
01:
04:
05:
01:
06:
O7:
P31
01:
2
Q2:
10
08:
P89
01:
10
Q2:
4
03:
180
04:
30
10:
P34
01:
10
02:
360
03:
10
11:
P31
01:
10
Q2:
6
Table
3 Subroutines
Beginning of Subroutine
Subroutine Number
lf X<=>F
X Loc 0-540 WD
>=
F
Then Do
Do
Set high Flag
1
Else
Do
Set low
Flag
1
End
Z=X
X Loc 0-360 WD
Z Loc [:0-540 WD]
lf X<=>F
X Loc 0-540 WD
F
Then Do
ll
Flag
1 is
set
Then Do
Z=X+F
X Loc 0-540 WD
F
Z
Loc [:0-540 WD]
Z=X
X Loc 0-540 WD
Z Loc [:0-540 out]
95
End
95
End
P69
1
180
00
1
12:
P71
01:
2
02:
3
P85
1
P89
10
3
270
30
P86
11
P94
P86
21
P95
13:
P
End
Table
1
8.6
CONVEHTING 0.360 WIND
DIRECTION OUTPUT TO 0.540 FOR
STRIP CHART
lf 0-360 degl'ee wind direction is output
to
a
strip
chart,
the digcontinuity at 0/360 will cause
the
pen
to
jump back and forth full scale when the
winds are
v{rying
from
the
north.
In
the days of
strip charts {nis
was solved with a 0-540 degree
pot on the
vriind
vane (direction changes from
540
to
180
dnd
from
0
to 360 so the pen only
jumps once
iivhen
the wind
is
out of
the north or
south).
When
with
the necessity of strip chart
output (see
example), the following
algorithm
be used to change a 0-360 degree
.
(lf
you have
a
0-540 pot,
it
can
input to
be used
the
21X since the Wind Vector
Instruction,
,
willwork
with this output.)
To change
Q-360
degrees to the 0-540 degrees,
360 degree$ must sometimes be added
to
the
reading
wh(n
it is
in
the range of
0
to 180. The
following
al$orithm does this by assuming that if
the previou$ reading was less than 270, the
vane has shifted through
180
degrees and does
not need to
be
altered.
lf
the previous 0-540
reading waq greater
lhan27O,360
degrees
is
added.
This
example
is
written as a subroutine
which
is
used by
the previous example to output
an
analog volt4ge to
a
strip chart.
Input Locatipn Labels:
1:WS
09:
P91
01:
11
02:
30
12:
P
13:
P
1
8-7
2:0-360
W

Advertisement

Table of Contents
loading

Table of Contents