Campbell Scientific CR10 CR10 Measurement and Control - Page 116

speeds., below., 5-1. Connections, RealTime

Page 116 highlights

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES would be used for 2 wind speeds.) ln Program Table 1, the 2 normal pulse inputs are read and the hourly totals output to Final Storage with lnstruction 72. The rain gage is connected as diagrammed below. When the switch closes, 5 volts is applied to port 8 which causes the subroutine to be executed. RAINGAGE FIGURE 8.5-1. Connections for Rain Gage I nput location Assignments: 10:Rain #1 11:Rain #2 12:Rain #3 13:Rain alt (from Pulse count) (from Pulse count) (from subroutine 98 while Output Flag is low) (from subroutine 98 while Output Flag is high) 1 01: 10 Table 1 Programs Sec. Execution Interval 01: 01: o2: 03: o4: 05: 06: P3 Pulse 2 Reps 1 Pulse Input Chan 2 Switch Closure 10 .254 Loc [:Rain #1 ] Mult 0 Offset 02"" 01: 02; 03: P92 o 60 10 03: P77 01: 1 10 04: P 01: 2 02: 10 05: 0A12:: P91 10 30 ll time is minutes into a minute interval Set high Flag 0 (output) RealTime Day,Hour-Minute 72 Tolalize Reps Loc Rain #1 lf Flag/Port Do il flag 0 (output) is high Then Do 06: P70 0012:: 1 12 O7: P30 01: 0 Q2: 0 03: 12 08: P86 01: 20 09: P33 01: 13 0032:: 12 12 10: 01: P30 0 02: 0 03: 13 P95 12: P 3 01: P85 01: 98 02: P91 01: 10 02: 30 03: 01: 02: 03: P34 13 o.254 13 o4: P94 05: P34 01: 12 O2: .254 03: 12 07: P22 01: 02: 1 0 03: 20 04: 0 08: P95 09: P Sample Reps Loc Rain #3 Z=F F Exponent of 10 Z Loc [:Rain #3 ] Do Set low Flag 0 (output) Z=X+Y X Loc Rain alt Y Loc Rain #3 Z Loc [:Rain #3 ] Z=F F Exponent of 10 Z Loc [:Rain alt ] End End Table 1 Table 3 Subroutines Beginning of Subroutine Subroutine Number lf Flag/Port Do if flag 0 (output) is high Then Do Z=X+F X Loc Rain alt F Z Loc [:Rain alt ] Else Z=X+F X Loc Rain #3 F Z Loc [:Rain #3 ] End Excitation with Delay EX Chan Delay wiEX (units=.01 sec) Delay after EX (units=.O1 mV Excitation End End Table 3 8-6

  • 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

SECTION
8.
PROCESSING
AND
PROGRAM
CONTROL EXAMPLES
would
be
used for 2 wind
speeds.)
ln
Program
Table
1,
the
2
normal pulse inputs
are
read and
the
hourly totals output
to
Final Storage with
lnstruction
72.
The
rain gage
is
connected
as diagrammed
below.
When
the
switch closes,
5
volts
is
applied
to
port
8
which causes the subroutine
to
be
executed.
FIGURE
8.5-1. Connections
for
Rain Gage
I
nput location Assignments:
06:
P70
01:
1
02:
12
09:
P33
01:
13
02:
12
03:
12
08:
P86
01:
20
O7:
P30
01:
0
Q2:
0
03:
12
Z=F
F
10:
P30
01:
0
02:
0
03:
13
05:
P34
01:
12
O2:
.254
03:
12
07:
P22
01:
1
02:
0
03:
20
04:
0
Sample
Reps
Loc Rain #3
Z=F
F
Exponent
of
10
Z
Loc
[:Rain
#3
]
Do
Set low Flag
0
(output)
Z=X+Y
X
Loc Rain alt
Y
Loc Rain #3
Z
Loc
[:Rain
#3
]
Exponent
of
10
Z
Loc
[:Rain
alt
]
End
End
Table
1
Table
3 Subroutines
Beginning of Subroutine
Subroutine Number
lf
Flag/Port
Do
if
flag
0 (output) is high
Then
Do
Z=X+F
X
Loc Rain alt
F
Z
Loc
[:Rain
alt
]
Else
Z=X+F
X
Loc Rain #3
F
Z
Loc
[:Rain
#3
]
End
Excitation
with
Delay
EX Chan
Delay
wiEX
(units=.01
sec)
Delay
after
EX
(units=.O1
mV Excitation
End
End
Table
3
10:Rain
#1
11:Rain #2
12:Rain #3
13:Rain alt
01:
01:
01:
o2:
03:
o4:
05:
06:
02""
01:
02;
03:
03:
P77
01:
1
10
04:
P
01:
2
02:
10
(from
Pulse count)
(from Pulse count)
(from subroutine
98
while
Output Flag is
low)
(from subroutine 98 while
Output
Flag is
high)
Table
1
Programs
Sec.
Execution Interval
Pulse
Reps
Pulse Input Chan
Switch Closure
Loc
[:Rain
#1
]
.254
Mult
Offset
ll time
is
minutes into a
minute interval
Set high Flag
0
(output)
RealTime
Day,Hour-Minute
72
Tolalize
Reps
Loc Rain
#1
lf
Flag/Port
Do
il
flag 0
(output) is high
Then
Do
12:
P95
P
3
P91
10
30
P34
13
o.254
13
P94
P95
P
01:
P85
01:
98
1
10
P3
2
1
2
10
0
P92
o
60
10
02:
01:
02:
03:
01:
02:
03:
o4:
08:
09:
05:
P91
01:
10
A2:
30
RAINGAGE
8-6