Specifications
Section 9. CR1000 Programming
9-16
'Process and Control
If Oscillator = 1
If Flag(1) = True
DisableVar = True
End If
Else
DisableVar = False
EndIf
'Call Data Tables and Store Data
CallTable(OscAvgData)
NextScan
EndProg
Read more! For a complete list of output processing instructions, see
Section 10.2.3 Data Storage Output Processing.
9.8 Subroutines
Read more! See Section 11.4 Subroutines 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 (Section 11.4 Subroutines) of a program.
A p
articular subroutine can be called by multiple program
sequences simultaneously. To preserve measurement and
processing integrity, the CR1000 queues calls on the subroutine,
allowing only one call to be processed at a time in the order calls
are received. This may cause unexpected pauses in the
conflicting program sequences.
9.9 Program Timing: Main Scan
As shown in EXAMPLE 9.9-1, aside from declarations, the CRBASIC
program may be relatively short. Executable code begins with BeginProg and
ends with EndProg. Measurements, processing, and calls to data tables within
the Scan / NextScan loop determine the sequence and timing of program
functions.
EXAMPLE 9.9-1. CRBASIC Code: BeginProg / Scan / NextScan / EndProg Syntax
BeginProg
Scan(1,Sec,3,0)
PanelTemp(RefTemp, 250)
TCDiff(TC(),6,mV2_5C,1,TypeT,RefTemp,RevDiff,Del,Integ,Mult,Offset)
CallTable Temp
NextScan
EndProg
NOTE