Section 7. Installation
183
Conditional Output
'This program example demonstrates the conditional writing of data to a data table. It
'also demonstrates use of StationName() and Units instructions.
'Declare Station Name (saved to Status table)
StationName
(Delta_Temp_Station)
'Declare Variables
Public
PTemp_C, AirTemp_C, DeltaT_C
'Declare Units
Units
PTemp_C = deg C
Units
AirTemp_C = deg C
Units
DeltaT_C = deg C
'Declare Output Table -- Output Conditional on Delta T >=3
'Table stores data at the Scan rate (once per second) when condition is met
'because DataInterval instruction is not included in the table declaration
'after the DataTable declaration.
DataTable
(DeltaT,DeltaT_C >= 3,-1)
Sample
(1,Status.StationName,String)
Sample
(1,DeltaT_C,FP2)
Sample
(1,PTemp_C,FP2)
Sample
(1,AirTemp_C,FP2)
EndTable
BeginProg
Scan
(1,Sec,1,0)
'Measure wiring panel temperature
PanelTemp
(PTemp_C,_60Hz)
'Measure type T thermocouple
TCDiff
(AirTemp_C,1,mV20C,1,TypeT,PTemp_C,True,0,_60Hz,1,0)
'Calculate the difference between air and panel temps
DeltaT_C = AirTemp_C - PTemp_C
'Call data table(s)
CallTable
(DeltaT)
NextScan
EndProg
7.7.1.3 Groundwater Pump Test
CRBasic example Groundwater Pump Test
(p. 183)
shows how to do the following:
•
Write multiple-interval data to the same data table
•
Use program control instructions outside the Scan() / NextScan structure
•
Execute conditional code
•
Use multiple sequential scans, each with a scan count
Summary of Contents for CR3000 Micrologger
Page 2: ......
Page 3: ......
Page 4: ......
Page 6: ......
Page 30: ......
Page 34: ......
Page 36: ......
Page 96: ......
Page 485: ...Section 8 Operation 485 8 11 2 Data Display FIGURE 110 Keyboard and Display Displaying Data ...
Page 487: ...Section 8 Operation 487 FIGURE 112 CR1000KD Real Time Custom ...
Page 491: ...Section 8 Operation 491 FIGURE 116 Keyboard and Display File Edit ...
Page 496: ......
Page 502: ......
Page 564: ...Section 11 Glossary 564 FIGURE 126 Relationships of Accuracy Precision and Resolution ...
Page 566: ......
Page 594: ......
Page 598: ......
Page 600: ......
Page 602: ......
Page 624: ......
Page 642: ......
Page 643: ......