Introduction To Crbasic Programming; B-1. Crbasic Program Structure - Campbell CR300 Series Operator's Manual

Hide thumbs Also See for CR300 Series:
Table of Contents

Advertisement

Appendix B. Introduction to CRBasic
Programming
Essential elements of a CRBasic program are listed in TABLE B-1, and
demonstrated in CRBasic Example B-1.
TABLE B-1. CRBasic Program Structure
Declare constants
Declare Public variables
Declare Dim variables
Define aliases
Define units
Define data tables
Processing of data
Begin program
Begin scan
Measurements
Processing of data
Call data table(s)
Initiate controls
Next scan
End program
List fixed constants using Const.
List, and if necessary, dimension
variables viewable during program
execution.
List, and if necessary, dimension
variables not viewable during program
execution.
Assign aliases to variables using Alias.
Assign engineering units to variable
(optional). Units are strictly for
documentation. The CR300 makes no use
of Units nor checks Unit accuracy.
DataTable() defines stored data tables.
The CR300 can save up to 20 data tables.
List data to be stored in the data table, for
example, Sample(), Average(),
Maximum(), Minimum().
BeginProg defines the beginning of
statements defining CR300 actions.
Scan sets the interval for a series of
measurements.
Enter measurements to make.
Enter any additional processing.
Declared data tables must be called using
CallTable to process and store data.
Check measurements and initiate controls
if necessary.
NextScan loops back to the beginning of
the scan and waits for the next scan.
EndProg defines the end of statements
defining CR300 actions.
B-1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr300-rf407Cr300-rf412Cr300-rf422

Table of Contents