Campbell Scientific CR10 CR10 Measurement and Control - Page 117

Analog, Multiplexer To, Chart

Page 117 highlights

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES 8.6 SDM-AO4 ANALOG OUTPUT MULTIPLEXER TO STRIP CHART This example illustrates the use of the SDMA04 4 Channel Analog Output Multiplexer to output 4 analog voltages to a strip chart. While of questionable value because of current requirements and strip chart reliability, some archaic regulations require strip chart backup on weather data. The SDM-AO4 may be used with the CR10 to provide analog outputs to strip charts. The output values in this example are wind speed, wind direction, air temperature, and solar radiation. lnstruction 103 is used to activate the SDMA04. The (4) millivolt values to output must be stored in adjacent Input Storage locations, the first of which is referenced in Instruction 103. The following program measures the sensors every 5 seconds. The readings are.moved to another 4 locations and scaled to a 0 to 1000 millivolt output for the SDM-AO4. Wind direction is changed trom a 0-360 degree input to output representing 0 to 540 degrees. This conversion is done in a subroutine which is described in the next example. The example also includes instructions to output wind vector and average temperature and solar radiation every hour. lnput Location Labels: 1:WS 2:0-360 WD 3:Ta 4:SR S:WS output 6:0-540 out 7:Ta output 8:SR output 10:0-540 WD * 1 01: 5 01: P3 01: 02: 1 1 03: 22 04: O5: 1 1.789 06: 1 TablelPrograms Sec. Execution Interval Pulse Rep Pulse Input Chan Switch Closure Loc [:WS ] Mult Offset 02: P4 Excite, Delay,Volt(SE) 01: 1 02: 14 Rep 250 mV fast Range 03: 1 04: 1 05: 5 lN Chan Excite all reps w/EXchan 1 Delay (units.01sec) 06: 1000 mV Excitation 07: 2 Loc [:0-360 WD ] 08: .7273 Mult 09: 0 Offset 03: P11 01: 1 02: 2 03: 2 04: 3 05: 1.8 06: 32 Temp 107 Probe Rep lN Chan Excite all reps w/EXchan 2 Loc [:Ta I Mult Offset 04: Pl Volt (SE) 01: 1 Rep 02: 2 7.5 mV slow Range 03: 3 lN Chan O4: 4 Loc [:SR 05: .14493 Mult 06: 0 Otfset 05: P92 01: 0 02; 60 03: 10 lf time is minutes into a minute interual Set high Flag 0 (output) P54 Block Move 4 No. of Values 1 First Source Loc WS 1 Source Step 5 First Dest. Loc [:WS output] 1 Destination Step P86 Do 1 CallSubroutine 1 P53 Scaling Array (A.loc +B) 5 Start Loc [:WS output] 10 A1 SCALE WS, 0-100 MPH = 0-1000 MV 0 B1 1.8519 A2 SCALE WD. 0-540 DEG = 0-1000 MV 82 5.7143 A3 SCALE TEMP, O7: 25 -25 - 100 F =0-1000 MV B3 08: 1000 A4 SCALE RADIATION, 0-1KWM^2 = 0-1000 MV B4 8-7

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208
  • 209
  • 210
  • 211
  • 212
  • 213
  • 214
  • 215
  • 216
  • 217
  • 218
  • 219
  • 220
  • 221
  • 222
  • 223
  • 224
  • 225
  • 226
  • 227
  • 228
  • 229
  • 230
  • 231
  • 232
  • 233
  • 234
  • 235
  • 236
  • 237
  • 238

8.6
SDM-AO4
ANALOG
OUTPUT
MULTIPLEXER TO
STRIP
CHART
This
example
illustrates
the
use of
the
SDM-
A04
4 Channel
Analog
Output Multiplexer to
output 4 analog voltages
to
a
strip chart.
While
of questionable
value
because
of
current
requirements and strip
chart
reliability, some
archaic
regulations require strip
chart
backup
on weather
data.
The
SDM-AO4 may
be
used
with
the
CR10 to provide analog outputs to strip
charts.
The
output
values
in
this example are
wind speed, wind direction, air temperature, and
solar
radiation.
lnstruction
103 is used
to
activate
the
SDM-
A04.
The
(4) millivolt values to
output
must
be
stored in
adjacent
Input Storage locations,
the
first
of
which is
referenced
in
Instruction
103.
The
following program
measures
the
sensors
every 5
seconds. The
readings are.moved
to
another
4
locations and scaled to a
0
to
1000
millivolt output for
the
SDM-AO4. Wind direction
is
changed
trom
a
0-360 degree input to
output
representing
0
to 540
degrees.
This
conversion
is
done
in
a subroutine
which
is
described
in
the
next example.
The example also includes instructions
to
output wind vector and average temperature
and
solar
radiation every hour.
lnput
Location Labels:
1:WS
2:0-360
WD
3:Ta
4:SR
S:WS
output
6:0-540
out
7:Ta output
8:SR output
10:0-540 WD
*
1
TablelPrograms
01:
5
Sec.
Execution Interval
01:
P3
01:
1
02:
1
03:
22
04:
1
O5:
1.789
06:
1
Pulse
Rep
Pulse
Input Chan
Switch Closure
Loc
[:WS
]
Mult
Offset
SECTION
8.
PROCESSING
AND
PROGRAM
CONTROL EXAMPLES
Excite,
Delay,Volt(SE)
Rep
250
mV
fast
Range
lN Chan
Excite
all
reps
w/EXchan
1
Delay
(units.01sec)
mV Excitation
Loc
[:0-360
WD
]
.7273
Mult
Offset
02:
P4
01:
1
02:
14
03:
1
04:
1
05:
5
06:
1000
07:
2
08:
09:
0
04:
Pl
01:
1
02:
2
03:
3
O4:
4
05:
06:
0
05:
P92
01:
0
02;
60
03:
10
P54
4
1
1
5
1
P86
1
P53
5
10
0
03:
P11
01:
1
02:
2
03:
2
04:
3
05:
1.8
06:
32
O7:
25
08:
1000
Temp
107 Probe
Rep
lN
Chan
Excite
all
reps w/EXchan
2
Loc
[:Ta
I
Mult
Offset
Volt
(SE)
Rep
7.5
mV
slow
Range
lN Chan
Loc
[:SR
.14493
Mult
Otfset
lf
time
is
minutes into a
minute interual
Set high Flag
0
(output)
Block Move
No. of Values
First
Source
Loc WS
Source Step
First
Dest.
Loc
[:WS
output]
Destination Step
Do
CallSubroutine
1
Scaling
Array (A.loc
+B)
Start Loc
[:WS
output]
A1
SCALE WS,
0-100 MPH
=
0-1000 MV
B1
1.8519
A2
SCALE WD.
0-540
DEG
=
0-1000 MV
82
5.7143
A3 SCALE TEMP,
-25
-
100
F
=0-1000
MV
B3
A4
SCALE
RADIATION,
0-1KWM^2
=
0-1000
MV
B4
8-7