04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Section 7. Installation<br />

7.7.3.5.2 Subroutines<br />

7.7.3.5.3 Incidental Sequences<br />

7.7.3.6 Execution and Task Priority<br />

Read More! See Subroutines (p. 187) for more information on programming with<br />

subroutines.<br />

Subroutines allow a section of code to be called by multiple processes in the main<br />

body of a program. Subroutines are defined before the main program body of a<br />

program.<br />

Note A particular subroutine can be called by multiple program sequences<br />

simultaneously. To preserve measurement and processing integrity, the <strong>CR1000</strong><br />

queues calls on the subroutine, allowing only one call to be processed at a time in<br />

the order calls are received. This may cause unexpected pauses in the conflicting<br />

program sequences.<br />

Data table sequences are essential features of nearly all programs. Although used<br />

less frequently, subroutine sequences also have a general purpose nature. The<br />

following incidental sequences, however, are used only in applications to which<br />

they specifically apply.<br />

Shut-Down Sequences<br />

The ShutDownBegin / ShutDownEnd instructions are used to define code that<br />

will execute whenever the currently running program is shutdown by prescribed<br />

means. More information is available in CRBasic Editor Help.<br />

Dial Sequences<br />

The DialSequence / EndDialSequence instructions are used to define the code<br />

necessary to route packets to a PakBus® device. More information is available in<br />

CRBasic Editor Help.<br />

Modem-Hangup Sequences<br />

The ModemHangup / EndModemHangup instructions are used to enclose code<br />

that should be run when a COM port hangs up communication. More information<br />

is available in CRBasic Editor Help.<br />

Web-Page Sequences<br />

The WebPageBegin / WebPageEnd instructions are used to declare a web page<br />

that is displayed when a request for the defined HTML page comes from an<br />

external source. More information is available in CRBasic Editor Help.<br />

Execution of program instructions is prioritized among three task sequencers:<br />

• Measurement<br />

• Digital<br />

• Processing<br />

132

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

Saved successfully!

Ooh no, something went wrong!