Measurand's SAACR_FileGenerator is the best and easiest method for creating a program to log ShapeArray data on a Campbell Scientific CR series data logger. It is sometimes desirable to also log data from non-ShapeArray sensors, such as vibrating wire piezometers, strain gauges, or earth pressure cells, with the same data logger. Programs generated with SAACR_FileGenerator can easily be modified to include code for logging data from these sensors alongside your Measurand ShapeArrays.
SAACR_FileGenerator will create a program file with a logger specific file extension. This files can easily be opened and edited using the CRBasic Editor included with Campbell Scientific's LoggerNet software.
Figure 1: A CR1000 program created with SAACR_FileGenerator opened in LoggerNet's CRBasic Editor
The program file created by SAACR_FileGenerator is structured in the following manner.
- Constant declarations (named values that cannot change during program execution)
- Variable declarations (named values that can change during program execution)
- Data table declarations (logger specific storage structures for storing data read from attached sensors)
- Subroutine declarations (named blocks of code that can be executed on demand in the program)
- Main program declaration (defined actions taken when the program is executed on the data logger)
- Initializes variables and data structures
- Executes preliminary scans (collect preliminary data samples from attached sensors and store them in data tables)
- Executes the main scan loop (collect data samples from attached sensors and store them in data tables at the defined time interval)
In each of the program sections described above, an area to insert your own code for working with non-ShapeArray sensors is clearly demarcated with the following comments.
- USER declared Constants
- USER declared Variables
- USER declared Data Tables
- USER declared Subroutines
- USER program initializations
- USER program code to execute in Main Scan Loop
Figure 2: An example of one of the clearly demarcated areas for user code in a ShapeArray logger program
The attached integration_example.cr8 file is an example program for a CR800 data logger. It has been modified from the base program generated by SAACR_FileGenerator to include code for the following:
- Collecting and logging data from vibrating wire piezometers and earth pressure cells
- Toggling the switched 12 V (SW12) port off at midnight and on at 6 A.M.