Campbell CR800 Specifications Page 241

  • Download
  • Add to my manuals
  • Print
  • Page
    / 324
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 240
Section 9. Program Control
Instructions
BeginProg … EndProg
The BeginProg instruction is used to mark the beginning of a program.
EndProg marks the end of a program.
Syntax
BeginProg
...
...
EndProg
Remarks
All of the instructions for the main program fall between the BeginProg and
EndProg statements. Program Variables, DataTables, and Subroutines must be
defined before the main program.
BeginProg Example
The following code shows the layout of a typical datalogger program and the
use of the BeginProg/EndProg statements. Program variables and the
DataTable are defined, followed by the code for the main program.
'Define Variables for WindSpeed and Rain
'Dimension the RealTime array
PUBLIC WINDSP
PUBLIC RAIN
DIM TIME(9)
ALIAS TIME(1)=YEAR
ALIAS TIME(2)=MONTH
ALIAS TIME(3)=DAY
ALIAS TIME(4)=HOUR
ALIAS TIME(5)=MINUTES
ALIAS TIME(6)=SECONDS
ALIAS TIME(7)=mSECONDS
ALIAS TIME(8)=DAY_OF_WEEK
ALIAS TIME(9)=DAY_OF_YEAR
'Define the DataTable, METDATA
DataTable (METDATA,1,1000)
DataInterval (0,1,Min,10)
Sample (1,WINDSP,FP2)
Totalize (1,RAIN,FP2,False )
EndTable
'Main program - Read datalogger real-time clock
'Measure 2 pulse count channels and Call DataTable
BeginProg
Scan (1,Sec,3,0)
9-1
Page view 240
1 2 ... 236 237 238 239 240 241 242 243 244 245 246 ... 323 324

Comments to this Manuals

No comments