Section 7. Installation
158
Use of the Disable Variable
'This program example demonstrates the use of the 'disable' variable, or DisableVar, which
'is a parameter in many output processing instructions. Use of the 'disable' variable
'allows source data to be selectively included in averages, maxima, minima, etc. If the
''disable' variable equals -1, or true, data are not included; if equal to 0, or false,
'data are included. The 'disable' variable is set to false by default.
'Declare Variables and Units
Public
Oscillator
As Long
Public
Flag(1)
As Boolean
Public
DisableVar
As Boolean
'Define Data Tables
DataTable
(OscAvgData,True,-1)
DataInterval
(0,1,Min,10)
Average
(1,Oscillator,FP2,DisableVar)
EndTable
'Main Program
BeginProg
Scan
(1,Sec,1,0)
'Reset and Increment Counter
If
Oscillator = 2
Then
Oscillator = 0
Oscillator = Osci 1
'Process and Control
If
Oscillator = 1
If
Flag(1) = True
Then
DisableVar = True
EndIf
Else
DisableVar = False
EndIf
'Call Data Tables and Store Data
CallTable
(OscAvgData)
NextScan
EndProg
Numbers of Records
The exact number of records that can be stored in a data table is governed by a
complex set of rules, the summary of which can be found in Memory Cards and
Record Numbers
(p. 453).
7.6.3.11.2
Declaring Subroutines
Read More See Subroutines
(p. 332)
for more information on programming
with subroutines.
Subroutines allow a section of code to be called by multiple processes in the main
body of a program. Subroutines are defined before the main program body of a
program.
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: ......