Campbell Scientific CR6 CR6 Measurement and Control System - Page 149
Scan Time and System Time, OpenInterval Instruction
![]() |
View all Campbell Scientific CR6 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 149 highlights
Section 7. Installation CR6 response to a lapse. The table DataInterval () Lapse Parameter Options (p. 149) lists Lapses parameter options and associated functions. Note Program logic that results in lapses includes scan intervals inadequate to the length of the program (skipped scans), the use of DataInterval() in event-driven data tables, and logic that directs program execution around the CallTable() instruction. A data table consists of successive 1 kB data frames. Each data frame contains a time stamp, frame number, and one or more records. By default, a time stamp and record number are not stored with each record. Rather, the datalogger support software data extraction extraction routine uses the frame time stamp and frame number to time stamp and number each record as it is stored to computer memory. This technique saves telecommunication bandwidth and 16 bytes of CR6 memory per record. However, when a record is skipped, or several records are skipped contiguously, a lapse occurs, the SkippedRecords status entry is incremented, and a 16-byte sub-header with time stamp and record number is inserted into the data frame before the next record is written. Consequently, programs that lapse frequently waste significant memory. If Lapses is set to an argument of 20, the memory allocated for the data table is increased by enough memory to accommodate 20 sub-headers (320 bytes). If more than 20 lapses occur, the actual number of records that are written to the data table before the oldest is overwritten (ring memory) may be less than what was specified in the DataTable(). If a program is planned to experience multiple lapses, and if telecommunication bandwidth is not a consideration, the Lapses parameter should be set to 0 to ensure the CR6 allocates adequate memory for each data table. Table 23. DataInterval() Lapse Parameter Options DataInterval() Lapse Argument Effect Lapse > 0 If table record number is fixed, X data frames (1 kB per data frame) are added to data table if memory is available. If record number is auto-allocated, no memory is added to table. Lapse = 0 Time stamp and record number are always stored with each record. Lapse < 0 When lapse occurs, no new data frame is created. Record time stamps calculated at data extraction may be in error. Scan Time and System Time In some applications, system time (see System Time (p. 510) ), rather than scan time (see Scan Time (p. 507) ), is desired. To get the system time, the CallTable() instruction must be run outside the Scan() loop. See section Time Stamps (p. 305). OpenInterval() Instruction By default, the CR6 uses closed intervals. Data output to a data table based on DataInterval() includes measurements from only the current interval. Intermediate memory that contains measurements is cleared the next time the data table is called regardless of whether or not a record was written to the data table. 149
![](/manual_guide/products/campbell-scientific-cr6-cr6-measurement-control-a476969/149.png)