![background image](http://html1.mh-extra.com/html/campbell/cr200/cr200_instruction-manual_489088091.webp)
Section 9. Programming
81
•
TrigVar
-Controls whether or not data records are written to storage. Data
records are written to storage if TrigVar is true and if other conditions, such
as DataInterval (), are met. Default setting is -1 (True). TrigVar may be a
variable, expression, or constant. TrigVar does not control intermediate
processing. Intermediate processing is controlled by the disable variable,
DisableVar, which is a parameter in all output processing instructions (see
Output Processing Instructions
(p. 81)).
Read More!
TrigVar and DisableVar - Controlling Data Output and Output
Processing
(p. 125) discusses the use of TrigVar and DisableVar in special
applications.
•
Size
-Table size is the number of records to store in a table before new data
begins overwriting old data. If "10" is entered, 10 records are stored in the
table -- the eleventh record will overwrite the first record. If "-1" is entered,
memory for the table is automatically allocated at the time the program
compiles. Auto allocation is preferred in most applications since the
CR200(X) sizes all tables such that they fill (and begin overwriting the
oldest data) at about the same time. Approximately 2K bytes of extra data
table space is allocated to minimize the possibility of new data over writing
the oldest data in ring memory when support software collects the oldest
data at the same time new data are written. These extra records are not
reported in the Status Table and are not reported to the support software and
so are not collected.
CRBASIC EXAMPLE. Definition and Use of a Data Table
(p. 79) creates a data
table named "OneMin", stores data once a minute as defined by DataInterval (),
and retains the most recent records in SRAM, up to the automatically allocated
memory limit. DataRecordSize entries in the status table report allocated
memory in terms of number of records the tables hold.
9.7.1.2
DataInterval () Instruction
DataInterval () instructs the CR200(X) to write data records at the specified
interval. The interval is independent of the Scan () / NextScan interval;
however, it must be a multiple of the Scan () / NextScan interval. The data
interval must be at least one minute.
DataInterval does not override the trigger condition in the DataTable instruction.
If the trigger is not set always true by entering a constant, it is a condition that
must be met in addition to the time interval before data will be stored.
9.7.1.3
Output Processing Instructions
Data storage processing ("output processing") instructions determine what data
are stored in the data table. When a data table is called in the CRBASIC
program, data storage processing instructions process variables holding current
inputs or calculations. If trigger conditions are true, e.g. the required interval has
expired, processed values are stored ("output") in the data table. In
CRBASIC
EXAMPLE. Definition and Use of a Data Table
(p. 79), three averages are
stored.
Содержание 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: ......