beautypg.com

2 subroutines, 3 incidental sequences, 6 execution and task priority – Campbell Scientific CR3000 Micrologger User Manual

Page 137

background image

Section 7. Installation

137

 

7.7.3.5.2 Subroutines

Read More! See Subroutines

(p. 192)

for more information on programming with

subroutines.

Subroutines allow a section of code to be called by multiple processes in the main
body of a program. Subroutines are defined before the main program body of a
program.

Note A particular subroutine can be called by multiple program sequences
simultaneously. To preserve measurement and processing integrity, the CR3000
queues calls on the subroutine, allowing only one call to be processed at a time in
the order calls are received. This may cause unexpected pauses in the conflicting
program sequences.

7.7.3.5.3 Incidental Sequences

Data table sequences are essential features of nearly all programs. Although used
less frequently, subroutine sequences also have a general purpose nature. The
following incidental sequences, however, are used only in applications to which
they specifically apply.

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.7.3.6 Execution and Task Priority

Execution of program instructions is prioritized among three task sequencers:

• Measurement
• Digital
• Processing