features of nearly all programs. Although used less frequently, subroutine and
function sequences also have a general purpose nature. In contrast, the following
sequences are used only in specific applications.
Shut-Down Sequences
The ShutDownBegin / ShutDownEnd instructions are used to define code that
will execute whenever the currently running program is shutdown by prescribed
means. More information is available in CRBasic Editor Help.
Dial Sequences
The DialSequence / EndDialSequence instructions are used to define the code
necessary to route packets to a PakBus
®
device. More information is available in
CRBasic Editor Help.
Modem-Hangup Sequences
The ModemHangup / EndModemHangup instructions are used to enclose code
that should be run when a COM port hangs up communication. More information
is available in CRBasic Editor Help.
Web-Page Sequences
The WebPageBegin / WebPageEnd instructions are used to declare a web page
that is displayed when a request for the defined HTML page comes from an
external source. More information is available in CRBasic Editor Help.
7.8.4.11 Execution and Task Priority
Execution of program instructions is divided among the following three tasks:
• Measurement task — rigidly timed measurement of sensors connected
directly to the CR1000
• CDM task — rigidly timed measurement and control of CDM
(p. 509)
peripheral devices
• SDM task — rigidly timed measurement and control of SDM
(p. 527) peripheral
devices
• Processing task — converts measurements to numbers represented by
engineering units, performs calculations, stores data, makes decisions to
actuate controls, and performs serial I/O communication.
Instructions or commands that are handled by each task are listed in table
Program Tasks
(p. 152).
These tasks are executed in either pipeline or sequential mode. When in pipeline
mode, tasks run more or less in parallel. When in sequential mode, tasks run
more or less in sequence. When a program is compiled, the CR1000 evaluates the
program and automatically determines which mode to use. Using the
PipelineMode or SequentialMode instruction at the beginning of the program
will force the program into one mode or the other. Mode information is included
in a message returned by the datalogger, which is displayed by the datalogger
support software
(p. 654). The CRBasic Editor pre-compiler returns a similar
message.
151