Section 7. Installation
120
CRBasic Program Structure
Units
Optional. Assign engineering units to variables. Units are
not active code. The CR800 makes no use of units nor
checks unit accuracy.
DataTable
Sample()
Average()
Maximum()
Minimum()
Define stored-data tables.
•
Process or store trigger: set triggers when data should
be stored. Triggers may be a fixed interval, a condition,
or both.
•
Set the size of a data table.
•
Send data to a Campbell Scientific mass storage device
if available.
BeginProg
Begin the action part of the program.
Scan()
Set the interval for a series of measurements.
Measurements
Make measurements.
Processing
Process measurement and other data.
CallTable()
Call data tables to process and store data.
Controls
Check measurements and initiate any control actions.
NextScan
Loop back to
Scan()
and wait for the next scan.
EndProg
End the program.
1
Fine points:
•
Maximum program-line length is 512 characters.
•
Maximum constant-name length is about 500 characters.
•
Processes or calculations repeated during program execution can be packaged in a
subroutine and called when needed rather than repeating the code each time.
Summary of Contents for CR800 Series
Page 2: ......
Page 4: ......
Page 6: ......
Page 32: ......
Page 34: ......
Page 54: ......
Page 92: ......
Page 310: ......
Page 446: ...Section 8 Operation 446 8 11 2 Data Display FIGURE 100 CR1000KD Displaying Data ...
Page 448: ...Section 8 Operation 448 FIGURE 102 CR1000KD Real Time Custom ...
Page 449: ...Section 8 Operation 449 8 11 2 3 Final Storage Data FIGURE 103 CR1000KD Final Storage Data ...
Page 450: ...Section 8 Operation 450 8 11 3 Run Stop Program FIGURE 104 CR1000KD Run Stop Program ...
Page 452: ...Section 8 Operation 452 FIGURE 106 CR1000KD File Edit ...
Page 456: ......
Page 462: ......
Page 523: ...Section 11 Glossary 523 FIGURE 116 Relationships of Accuracy Precision and Resolution ...
Page 524: ......
Page 526: ......
Page 556: ......
Page 558: ......
Page 560: ......
Page 597: ......