Section 7.  Installation 
 
 
 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 = Oscillator + 1 
 
 'Process and Control 
 If Flag(1) = True Then 
 DisableVar = True 
 EndIf 
 Else 
 DisableVar = False 
 EndIf 
 
 'Call Data Tables and Store Data 
 CallTable(OscAvgData) 
 
 NextScan 
 
 
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. 
 
7.6.3.11.2  Declaring Subroutines 
Read More    See Subroutines (p. 307) 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.