Specifications

Section 9. CR1000 Programming
9-19
measurements are not allowed in pipeline mode. Because of the precise
execution of measurement instructions, processing in the current scan
(including update of public variables and data storage) is delayed until all
measurements are complete. Some processing, such as transferring variables to
control instructions, e.g. PortSet() and ExciteV(), may not be completed until
the next scan.
When a condition is true for a task to start, it is put in a queue. Because all
tasks are given the same priority, the task is put at the back of the queue.
Every 10 msec (or faster if a new task is triggered) the task currently running is
paused and put at the back of the queue, and the next task in the queue begins
running. In this way, all tasks are given equal processing time by the
datalogger.
All tasks are given the same general priority. However, when a conflict arises
between tasks, program execution adheres to the priority schedule in
TABLE 9.11-2.
TABLE 9
.11-2. Pipeline Mode Task Priorities
1) Measurements in main program
2) Background calibration
3) Measurements in slow sequences
4) Processing tasks
9.11.2 Sequential Mode
Sequential mode executes instructions in the sequence in which they are
written in the program. Sequential mode may be slower than pipeline mode
since it executes only one line of code at a time. After a measurement is made,
the result is converted to a value determined by processing included in the
measurement instruction, and then execution proceeds to the next instruction.
This line-by-line execution allows writing conditional measurements into the
program.
The exact time at which measurements are made in sequential
mode may vary if other measurements or processing are made
conditionally, if there is heavy communications activity, or if
other interrupts such as inserting a CF card occur.
When running in sequential mode, the datalogger uses a queuing system for
processing tasks similar to the one used in pipeline mode. The main difference
when running a program in sequential mode is that there is no prescheduled
timing of measurements; instead, all instructions are executed in their
programmed order.
A priority scheme is used to avoid conflicting use of measurement hardware.
The main scan has the highest priority and prevents other sequences from using
measurement hardware until the main scan, including processing, is complete.
Other tasks, such as processing from other sequences and communications, can
occur while the main sequence is running. Once the main scan has finished,
NOTE