Campbell Scientific CR200X CR200/CR200X-series Dataloggers - Page 93

DataInterval Instruction, 7.1.3, Output Processing Instructions

Page 93 highlights

Section 9. Programming • 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. 81

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206
  • 207
  • 208

Section 9.
Programming
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.
81