04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Section 7. Installation<br />

7.7.3.7.2 SlowSequence / EndSequence<br />

allows the processing in the scan to lag behind measurements at times<br />

without affecting measurement timing. Use of the CRBasic Editor default<br />

size is normal. Refer to section SkippedScan (p. 425) for troubleshooting tips.<br />

• Count — number of scans to make before proceeding to the instruction<br />

following NextScan. A count of 0 means to continue looping forever (or until<br />

ExitScan). In the example in CRBasic example Scan Syntax (p. 136), the scan is<br />

1 second, three scans are buffered, and measurements and data storage<br />

continue indefinitely.<br />

Slow sequences include automatic and user entered sequences. Background<br />

calibration is an automatic slow sequence.<br />

User-entered slow sequences are declared with the SlowSequence instruction and<br />

run outside the main-program scan. They typically run at a slower rate than the<br />

main scan. Up to four slow-sequences scans can be defined in a program.<br />

Instructions in a slow-sequence scan are executed when the main scan is not<br />

active. When running in pipeline mode, slow-sequence measurements are spliced<br />

in after measurements in the main program, as time allows. Because of this<br />

splicing, measurements in a slow sequence may span across multiple-scan<br />

intervals in the main program. When no measurements need to be spliced, the<br />

slow-sequence scan will run independent of the main scan, so slow sequences<br />

with no measurements can run at intervals ≤ main-scan interval (still in 10-ms<br />

increments) without skipping scans. When measurements are spliced, checking<br />

for skipped slow scans is done after the first splice is complete rather than<br />

immediately after the interval comes true.<br />

In sequential mode, all instructions in slow sequences are executed as they occur<br />

in the program according to task priority.<br />

Background calibration is an automatic, slow-sequence scan.<br />

Read More! Self-Calibration (p. 289)<br />

7.7.3.7.3 SubScan() / NextSubScan<br />

SubScan() / NextSubScan are used in the control of analog multiplexers (see the<br />

appendix Analog Multiplexers (p. 560) for information on available analog<br />

multiplexers) or to measure analog inputs at a faster rate than the program scan.<br />

SubScan() / NextSubScan can be used in a SlowSequenc / EndSequence with<br />

an interval of 0. SubScan cannot be nested. PulseCount or SDM measurement<br />

cannot be used within a sub scan.<br />

7.7.3.7.4 Scan Priorities in Sequential Mode<br />

Note Measurement tasks have priority over other tasks such as processing and<br />

communication to allow accurate timing needed within most measurement<br />

instructions.<br />

A priority scheme is used in sequential mode to avoid conflicting use of<br />

measurement hardware. As illustrated in figure Sequential-Mode Scan Priority<br />

Flow Diagrams (p. 139), the main scan sequence has the highest priority. Other<br />

sequences, such as slow sequences and calibration scans, must wait to access<br />

137

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!