![background image](http://html1.mh-extra.com/html/campbell/cr200/cr200_instruction-manual_489088090.webp)
Section 9. Programming
80
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.
Содержание CR200
Страница 32: ...Section 2 Quickstart Tutorial 22 ...
Страница 45: ...Section 3 Overview 35 3 3 Specifications ...
Страница 46: ...Section 3 Overview 36 ...
Страница 58: ...Section 4 Sensor Support 48 ...
Страница 62: ...Section 5 Measurement and Control Peripherals 52 ...
Страница 78: ...Section 8 CR200 X Configuration 68 ...
Страница 102: ...Section 9 Programming 92 ...
Страница 138: ...Section 11 Programming Resource Library 128 ...
Страница 156: ...Section 16 Support Software 146 ...
Страница 160: ...Section 17 Care and Maintenance 150 ...
Страница 166: ...Section 18 Troubleshooting 156 18 3 3 Diagnosis and Fix Procedures 18 3 3 1 Battery Voltage Test ...
Страница 167: ...Section 18 Troubleshooting 157 18 3 3 2 Charging Circuit Test Solar Panel ...
Страница 168: ...Section 18 Troubleshooting 158 18 3 3 3 Charging Circuit Test Transformer ...
Страница 169: ...Section 18 Troubleshooting 159 18 3 3 4 Adjusting Charging Circuit Voltage ...
Страница 170: ...Section 18 Troubleshooting 160 ...
Страница 184: ...Appendix A Glossary 14 ...
Страница 190: ...Appendix B Status Table and Settings 20 ...
Страница 192: ...Appendix C Serial Port Pin Outs 22 ...
Страница 211: ......