Campbell CR200 Manuel de l'opérateur Page 94

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 210
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 93
Section 9. Programming
CRBASIC EXAMPLE 8. Definition and Use of a Data Table
'Declare Variables
Public Batt_Volt
Public T109_C(2)
'Define Units
Units Batt_Volt=Volts
Units T109_C(2)=Deg C
'Define Data Tables
DataTable (OneMin,True,-1)
DataInterval (0,1,Min)
Average (1,Batt_Volt,False)
Average (2,T109_C(1),False)
EndTable
DataTable (Table1,True,-1)
DataInterval (0,1440,Min)
Minimum (1,Batt_Volt,False,False)
EndTable
'Main Program
BeginProg
Scan (5,Sec)
'Default Datalogger Battery Voltage measurement Batt_Volt:
Battery (Batt_Volt)
'109-L Thermistor measurements Temp_C:
Therm109(T109_C(),2,1,Ex1,1,0)
'Call Data Tables and Store Data
CallTable (OneMin)
CallTable (Table1)
NextScan
EndProg
As shown in CRBASIC EXAMPLE. Definition and Use of a Data Table (p. 79),
data table declaration begins with the DataTable () instruction and ends with the
EndTable () instruction. Between DataTable () and EndTable () are instructions
that define what data to store and under what conditions data are stored. A data
table must be called by the CRBASIC program for data storage processing to
occur. Typically, data tables are called by the CallTable () instruction once each
Scan.
9.7.1.1 DataTable () and EndTable () Instructions
The DataTable instruction has three parameters: a user-specified alphanumeric
name for the table (e.g., "OneMin"), a trigger condition (e.g., "True"), and the
size to make the table in RAM (e.g., auto allocated).
Name-The table name can be any combination of numbers and letters up to
16 characters in length. The first character must be a letter.
80
Vue de la page 93
1 2 ... 89 90 91 92 93 94 95 96 97 98 99 ... 209 210

Commentaires sur ces manuels

Pas de commentaire