B-1
Appendix B. Introduction to CRBasic
Programming
Essential elements of a CRBasic program are listed in TABLE
, and
demonstrated in CRBasic Example
TABLE B-1. CRBasic Program Structure
D
ecl
ar
at
io
ns
Declare constants
List fixed constants using
Const
.
Declare
Public
variables
List, and if necessary, dimension
variables viewable during program
execution.
Declare
Dim
variables
List, and if necessary, dimension
variables not viewable during program
execution.
Define aliases
Assign aliases to variables using
Alias
.
Define units
Assign engineering units to variable
(optional).
Units
are strictly for
documentation. The CR300 makes no use
of Units nor checks Unit accuracy.
Define data tables
DataTable()
defines stored data tables.
The CR300 can save up to 20 data tables.
Processing of data
List data to be stored in the data table, for
example,
Sample()
,
Average()
,
Maximum()
,
Minimum()
.
Begin program
BeginProg
defines the beginning of
statements defining CR300 actions.
Sc
an L
oop
Begin scan
Scan
sets the interval for a series of
measurements.
Measurements
Enter measurements to make.
Processing of data
Enter any additional processing.
Call data table(s)
Declared data tables must be called using
CallTable
to process and store data.
Initiate controls
Check measurements and initiate controls
if necessary.
Next scan
NextSca
n loops back to the beginning of
the scan and waits for the next scan.
End program
EndProg
defines the end of statements
defining CR300 actions.
Содержание CR300 series
Страница 2: ......
Страница 6: ......
Страница 68: ...CR300 Series Datalogger 58...
Страница 70: ......
Страница 85: ......