beautypg.com

3 command line – Campbell Scientific CR1000 Measurement and Control System User Manual

Page 114

background image

Section 7. Installation

114 

 

 

'Define public variables

Public

RefTemp

Public

TC(6)

'Define Units

Units

RefTemp = degC

Units

TC = DegC

Declare public variables,
dimension array, and declare
units.

Declarations

'Define data tables

DataTable

(Temp,1,2000)

DataInterval

(0,10,min,10)

Average

(1,RefTemp,FP2,0)

Average

(6,TC(),FP2,0)

EndTable

Define data table

'Begin Program

BeginProg

'Set scan interval

Scan

(1,Sec,3,0)

'Measurements

PanelTemp

(RefTemp,250)

TCDiff

(TC()...Offset)

Measure

'Processing (None in this

'example)

Scan loop

'Call data table

CallTable

Temp

Call data table

'Controls (None in this

'example)

'Loop to next scan

NextScan

'End Program

EndProg

 

7.7.3.3 Command Line

CRBasic programs are made up of a series of statements. Each statement
normally occupies one line of text in the program file. Statements are made up of
instructions, variables, constants, expressions, or a combination of these.
"Instructions" are CRBasic commands. Normally, only one instruction is
included in a statement. However, some instructions, such as If and Then, are
allowed to be included in the same statement.

Lists of instructions and expression operators can be found in the CRBasic
Programming Instructions

(p. 473)

section. A full treatment of each instruction and