Creating a Short Cut data logger program
You must provide a program for the data logger in order for it to make measurements, store data, or do control. There are several ways to write a program. The simplest is to use the program generator called Short Cut. For more complex programming the CRBasic editor is used. The program file may use the extension
Data logger programs are executed on a precise schedule termed the scan intervalThe time interval between initiating each execution of a given Scan() of a CRBasic program. If the Scan() Interval is evenly divisible into 24 hours (86,400 seconds), it is synchronized with the 24 hour clock, so that the program is executed at midnight and every Scan() Interval thereafter. The program is executed for the first time at the first occurrence of the Scan() Interval after compilation. If the Scan() Interval does not divide evenly into 24 hours, execution will start on the first even second after compilation., based on the data logger internal clock.
Measurements are first stored in temporary memory called variablesA packet of SRAM given an alphanumeric name. Variables reside in variable memory. in the Public TableA CRBasic command for declaring and dimensioning variables. Variables declared with Public can be monitored during data logger operation.. Variables are usually overwritten each scan. Periodically, generally on a time interval, the data logger stores data in tables. The Data TablesA concept that describes how data is organized in memory, or in files that result from collecting data in memory. The fundamental data table is created by the CRBasic program as a result of the DataTable() instruction and resides in binary form in main-memory SRAM. The data table structure also resides in the data cache, in discrete data files on data logger drives, and in binary or ASCII files that result from collecting final-data memory with data logger support software. are later copied to a computer using your data logger support software.
Use the Short CutA CRBasic programming wizard suitable for many data logger applications. Knowledge of CRBasic is not required to use Short Cut. software to generate a program for your data logger. Short Cut is included with your data logger support software.LoggerNet, RTDAQ, PC400, and PC200W - these Campbell Scientific software applications include at least the following functions: data logger communications, downloading programs, clock setting, and retrieval of measurement data.
This section will guide you through programming a CR1000X data logger to measure the voltage of the data logger power supply, the internal temperature of the data logger, and a thermocouple. With minor changes, these steps can apply to other measurements.
- Using data logger support software, launch Short Cut.
- LoggerNetCampbell Scientific's data logger support software for programming, communications, and data retrieval between data loggers and a computer. users, click Program then Short Cut .
- PC400Data logger support software that supports a variety of communication options, manual data collection, and data monitoring displays. Short Cut and CRBasic Editor are included for creating data logger programs. PC400 does not support complex communications options, such as phone-to-RF, PakBus® routing, or scheduled data collection. and PC200WBasic data logger support software for direct connect. It supports a connection between computer and data logger and includes Short Cut for creating data logger programs. Tools for setting the data logger clock, sending programs, monitoring sensors, and on-site viewing and collection of data is also included. users, click Short Cut .
Click Create New Program.
CR1000X Seriesand click Next.NOTE:
The first time Short Cut is run, a prompt will ask for a noise rejection choice. Select 60 Hz Noise Rejection for North America and areas using 60 Hz ac voltage. Select 50 Hz Noise Rejection for most of the Eastern Hemisphere and areas that operate at 50 Hz.
A second prompt lists sensor support options. Campbell Scientific, Inc. (US) is usually the best fit outside of Europe.
To change the noise rejection or sensor support option for future programs, use the Program menu.
A list of Available Sensors and Devices and Selected Measurements Available for Output display. Battery voltage
BattVand internal temperature
PTemp_Care selected by default. During operation, battery and temperature should be recorded at least daily to assist in monitoring system status.
Use the Search feature or expand folders to locate your sensor or device. Double-click on a sensor or measurement in the Available Sensors and Devices list to configure the device (if needed) and add it to the Selected list. For the example program, expand the Sensors/Temperature folder and double-click Type T Thermocouple.
- If the sensor or device requires configuration, a window displays with configuration options. Click Help at the bottom of the window to learn more about any field or option.
For the example program, accept the default options:
- 1 Type T TC sensor
- Temp_C as the Temperature label, and set the units to Deg C
- PTemp_C as the Reference Temperature Measurement.
Click Wiring Diagram on the left side of the window to see how to wire the sensor to the data logger. With the power disconnected from the data logger, insert the wires as directed in the diagram. Ensure you clamp the terminal on the conductor, not the wire insulation. Use the included flat-blade screwdriver to open/close the terminals.
Click Sensors on the left side of the window to return to the sensor selection window, then click Next at the bottom of the window.
Type 1 in the How often should the data logger measure its sensor(s)? box.
Use the Output Setup options to specify how often measurements are to be made and how often outputs are to be stored. Note that multiple output intervals can be specified, one for each output table (Table1 and Table2 tabs). For the example program, only one table is needed. Click the Table2 tab and click Delete Table.
In the Table Name box, type a name for the table. For example: OneMin.
Select a Data Output Storage Interval. For example: to 1 minute.
Select the measurement from the Selected Measurements Available for Output list, then click an output processing option to add the measurement to the Selected Measurements for Output list. For the example program, select BattV and click the Average button to add it to the Selected Measurements for Output list. Repeat this procedure for PTemp_C and Temp_C.
Click Finish and give the program a meaningful name such as a site identifier. Click Save.
If LoggerNet or other data logger support software is running on your computer, and the data logger is connected to the computer (see Making the software connection for more information), you can choose to send the program. Generally it is best to collect data first; so, we recommend sending the program using the instructions in Sending a program to the data logger.
It is good practice is to always retrieve data from the data logger before sending a program; otherwise, data may be lost. See Collecting data for detailed instruction.
If your data acquisition requirements are simple, you can probably create and maintain a data logger program exclusively with Short Cut. If your data acquisition needs are more complex, the files that Short Cut creates are a great source for programming code to start a new program or add to an existing custom program using CRBasic. See the CRBasic Editor help for detailed information on program structure, syntax, and each instruction available to the data logger.
Once a Short Cut generated program has been edited with CRBasic Editor, it can no longer be modified with Short Cut.