![Campbell CR300 series Скачать руководство пользователя страница 72](http://html1.mh-extra.com/html/campbell/cr300-series/cr300-series_operators-manual_3055705072.webp)
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
, insert
comments into a program by preceding the comment with a single quote (').
Comments can be entered either as independent lines or following CR300
Содержание CR300 series
Страница 2: ......
Страница 6: ......
Страница 68: ...CR300 Series Datalogger 58...
Страница 70: ......
Страница 85: ......