Campbell CR5000 Especificações Página 207

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 238
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 206
9-1
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. The BeginProg/EndProg statements are not
necessary if there are no subroutines or DataTables.
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
Vista de página 206
1 2 ... 202 203 204 205 206 207 208 209 210 211 212 ... 237 238

Comentários a estes Manuais

Sem comentários