IncludeSection

IncludeSection() reduces the number of Include files needed by allowing the declaration of program sections that can be defined in one Include file.

Syntax

IncludeSection( "SectionName","Device:Filename" )

Remarks

IncludeSection is commonly used to stitch together libraries or sections of code located in Include files. This approach is commonly used for systems with many components and measurements that require large programs. These system programs often use multiple Include files for specific system-component configurations. IncludeSection() reduces the number of Include files needed by allowing the declaration of program sections that can be defined in one Include file.

NOTE: Beginning with OS 13.0, the datalogger can extract a main CRBasic program and several include files packaged in a web.obj.gz file. See web.obj.gz files for details.

Parameters

"SectionName"

The name of the section of code to be included in the main program. The name must be enclosed in quotation marks.

"Device:FileName"

Used to specify the file that contains the sections of code that should be executed. The Device on which the file is stored must be specified and the entire string must be enclosed in quotation marks. Device is CPU, CRD (memory card), USR (user-defined drive), or USB (SC115).

The USR device is an area of memory that can be set up by the user by assigning a value to the datalogger UsrDriveSize setting in the Status table. This drive must be set to at least 8192 bytes, in 512-byte increments (if the value entered is not a multiple of 512 bytes, the size will be rounded up).

The Include filename can also be an expression, such as "CPU:" + StationNameSetting + ".cr6", where StationNameSetting inserts the station name of the datalogger.

Type: Variable