Campbell-scientific CR1000 Measurement and Control System Instrukcja Użytkownika Strona 136

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
Przeglądanie stron 135
Section 7. Installation
136
Table 17. Program Timing Instructions
Instructions General Guidelines Syntax Form
SubScan / NextSubScan
Use when measurements or
processing must run at faster
frequencies than that of the
main program.
BeginProg
Scan()
'.
'.
'.
SubScan()
'.
'.
'.
NextSubScan
NextScan
EndProg
7.7.3.7.1 Scan() / NextScan
Simple CR1000 programs are often built entirely within a single Scan() /
NextScan structure, with only variable and data-table declarations outside the
Scan() / NextScan structure. In these simple programs, Scan() / NextScan creates
an infinite loop, each periodic pass through the loop being synchronized to the
CR1000 clock. Scan() parameters allow modification of the period in 10- ms
increments. As shown in CRBasic example BeginProg / Scan() / NextScan /
EndProg Syntax (p. 136), aside from declarations, the CRBasic program may be
relativ
ely short.
CRBasicExample15. BeginProg/Scan()/NextScan/EndProgSyntax
BeginProg
Scan(1,Sec,3,0)
PanelTemp(RefTemp, 250)
TCDiff(TC(),6,mV2_5C,1,...)
CallTable Temp
NextScan
EndProg
Scan() determines how frequently instructions in the program are executed, as
shown in CRBasic example Scan Syntax
(p. 136):
CRBasicExample16. ScanSyntax
'Scan(Interval, Units, BufferSize, Count)
Scan(1,Sec,3,0)
·
·
·
ExitScan
Scan() has four parameters:
Interval — the interval between scans.
Units — the time unit for the interval. Interval is 10 ms <= Interval <= 1 day.
BufferSize the size (number of scans) of a buffer in RAM that holds the
raw results of measurements. When running in Pipeline mode, using a buffer
Przeglądanie stron 135
1 2 ... 131 132 133 134 135 136 137 138 139 140 141 ... 587 588

Komentarze do niniejszej Instrukcji

Brak uwag