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.
Summary of Contents for CR200
Page 32: ...Section 2 Quickstart Tutorial 22 ...
Page 45: ...Section 3 Overview 35 3 3 Specifications ...
Page 46: ...Section 3 Overview 36 ...
Page 58: ...Section 4 Sensor Support 48 ...
Page 62: ...Section 5 Measurement and Control Peripherals 52 ...
Page 78: ...Section 8 CR200 X Configuration 68 ...
Page 102: ...Section 9 Programming 92 ...
Page 138: ...Section 11 Programming Resource Library 128 ...
Page 156: ...Section 16 Support Software 146 ...
Page 160: ...Section 17 Care and Maintenance 150 ...
Page 167: ...Section 18 Troubleshooting 157 18 3 3 2 Charging Circuit Test Solar Panel ...
Page 168: ...Section 18 Troubleshooting 158 18 3 3 3 Charging Circuit Test Transformer ...
Page 169: ...Section 18 Troubleshooting 159 18 3 3 4 Adjusting Charging Circuit Voltage ...
Page 170: ...Section 18 Troubleshooting 160 ...
Page 184: ...Appendix A Glossary 14 ...
Page 190: ...Appendix B Status Table and Settings 20 ...
Page 192: ...Appendix C Serial Port Pin Outs 22 ...
Page 211: ......