Campbell Scientific CR6 CR6 Measurement and Control System - Page 152
Subroutines, 8.3.5.3 Incidental Sequences
![]() |
View all Campbell Scientific CR6 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 152 highlights
Section 7. Installation 7.8.3.5.2 Subroutines Read More See section Subroutines (p. 289) 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 CR6 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.8.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. In contrast, the following incidental 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.3.6 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 CR6 • Digital task - rigidly timed measurement and control of SDM (p. 507) and CDM/CPI (p. 491) peripheral devices • Processing task - converts measurements to numbers represented by engineering units, performs calculations, stores data, makes decisions to 152
![](/manual_guide/products/campbell-scientific-cr6-cr6-measurement-control-a476969/152.png)