5 scaling array, Crbasic example 56. scaling array – Campbell Scientific CR1000 Measurement and Control System User Manual
Page 250

Section 7. Installation
250
'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. 250)
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