5 scaling array – Campbell Scientific CR800 and CR850 Measurement and Control Systems User Manual
Page 251

Section 7. Installation
251
'10 Minute Data Interval
Scan
(10,Min,0,0)
Counter(6) = Counter(6) + 1
Battery
(Batt_volt)
PanelTemp
(PTemp,250)
TCDiff
(Level,1,mV2_5,1,TypeT,PTemp,True,0,250,1.0,0)
If
TimeIntoInterval
(0,1,Min)
Then
TimeIntoTest = TimeIntoTest + 1
EndIf
'Call Output Tables
CallTable
LogTable
NextScan
EndIf
EndProg
7.8.17.5 Scaling Array
CRBasic example Scaling Array
(p. 251)
demonstrates programming to create and
use a scaling array. Several multipliers and offsets are entered at the beginning of
the program and then utilized by several measurement instructions throughout the
program.
CRBasic Example 56. Scaling Array
'Declare viewable variables
Public
PTemp_C, Temp_C(10)
Public
Count
'Declare scaling arrays as non-viewable variables
Dim
Mult(10), Offset(10)
'Declare Output Table
DataTable
(min_5,True,-1)
DataInterval
(0,5,Min,0)
Average
(1,PTemp_C,FP2,0)
Maximum
(1,PTemp_C,FP2,0,0)
Minimum
(1,PTemp_C,FP2,0,0)
Average
(10,Temp_C(),FP2,0)
Minimum
(10,Temp_C(1),FP2,0,0)
Maximum
(10,Temp_C(1),FP2,0,0)
EndTable