Comments - Campbell CR300 Series Operator's Manual

Hide thumbs Also See for CR300 Series:
Table of Contents

Advertisement

Appendix B. Introduction to CRBasic Programming
CRBasic Example B-1. CRBasic Program Structure
'Declarations
'Define Constants
Const
RevDiff = 1
Const
Del = 0
'default
Const
Integ = 400
Const
Mult = 1
Const
Offset = 0
'Define public variables
Public
RefTemp
Public
TC(6)
'Define Units
Units
RefTemp = Deg C
Units
TC = Deg C
'Define data tables
DataTable(Temp,1,2000)
DataInterval(0,10,min,10)
Average(1,RefTemp,FP2,0)
Average(6,TC(),FP2,0)
EndTable
'Begin Program
BeginProg
'Set scan interval
Scan(1,Sec,3,0)
'Measurements
PanelTemp(RefTemp,400)
TCDiff(TC()...Offset)
'Processing (None in this
'example)
'Call data table
CallTable
Temp
'Controls
PortSet(...)
'Loop to next scan
NextScan
'End Program
EndProg
B.1 Comments
B-2
Declare constants
Declare public variables,
dimension array, and declare
units.
Define data table
Measure
Call data table
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
Declarations
Scan loop

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr300-rf407Cr300-rf412Cr300-rf422

Table of Contents