EasyManua.ls Logo

Campbell CR300 series - Comments

Campbell CR300 series
86 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Appendix B. Introduction to CRBasic Programming
B-2
CRBasic Example B-1. CRBasic Program Structure
'Declarations
'Define Constants
Const RevDiff = 1
Const Del = 0 'default
Declare constants
Const Integ = 400
Const Mult = 1
Const Offset = 0
'Define public variables
Public RefTemp
Public TC(6)
Declare public variables,
dimension array, and declare
units.
Declarations
'Define Units
Units RefTemp = Deg C
Units TC = Deg C
'Define data tables
DataTable(Temp,1,2000)
DataInterval(0,10,min,10)
Define data table
Average(1,RefTemp,FP2,0)
Average(6,TC(),FP2,0)
EndTable
'Begin Program
BeginProg
'Set scan interval
Scan(1,Sec,3,0)
'Measurements
Measure
PanelTemp(RefTemp,400)
TCDiff(TC()...Offset)
'Processing (None in this
'example)
Scan loop
Call data table
'Call data table
CallTable Temp
'Controls
PortSet(...)
'Loop to next scan
NextScan
'End Program
EndProg
B.1 Comments
Comments are nonexecutable text in the body of a program. Comments
document or clarify the program. As shown in CRBasic Example B-2, insert
comments into a program by preceding the comment with a single quote (').
Comments can be entered either as independent lines or following CR300

Table of Contents

Other manuals for Campbell CR300 series

Related product manuals