Using Campbell® Scientific, Inc. Dataloggers in LI-COR EC Systems

Printable PDF: Using Campbell Scientific Dataloggers to Collect Biomet Sensor Data.

Application note that describes how to use a CR1000, CR3000, or CR6 in a LI-COR eddy covariance system.

With the addition of the SmartFlux® 2 and 3 Systems, LI-COR eddy covariance systems can collect biomet data from the Campbell Scientific CR6, CR1000, or CR3000 dataloggers. Compatibility between the datalogger and the analyzer has three requirements:

  • The logger needs to support an Ethernet interface with a static IP address on the same network as the SmartFlux 2 or 3 System (and the LI-7550 or LI-7500DS).
  • The data that you want to send to the SmartFlux System needs to be stored by the logger in a datatable named Biomet.
  • The field names used in the data table need to follow the standardized format required by EddyPro® Software.

Initial setup

  1. Install an Ethernet cable
  2. For the datalogger to communicate with the eddy covariance (EC) system, it needs a physical network connection on the same network as the SmartFlux 2 or 3, with a user-assigned static IP address. The CR6 has a built-in Ethernet port used for networking. If using the CR1000 or CR3000, an additional hardware component will be needed to network the data logger (e.g., NL115, NL116, or NL121 Ethernet Interface).
  3. Sync Clocks
  4. When the EC system polls the datalogger for new data it can also set the datalogger’s clock to match the time of the rest of the system. Enable this feature in the LI-7500A/RS or LI-7200/RS software. At the main dashboard window, click Site Setup > Biomet, and check the box next to Sync clock to 7550.

All communication to the datalogger is done through its web API (port 80). For the clock to be set using this protocol, the permissions need to be changed on the datalogger to allow read/write access. Network parameters and permissions can be set on the datalogger using LoggerNet’s Device Configuration Utility.

Configuring the network and permissions

  1. Power on the datalogger and connect the datalogger to a computer using its RS-232 connection.
  2. Launch Device Config Utility from LoggerNet’s Utilities menu.
  3. Select the datalogger type under Datalogger and the port it is connected to under Communication Port. Click the button to bring up a list of available serial ports.
  4. Click Connect and then choose Bypass at the pop-up window.
  5. Once connected, under Deployment choose TCP/IP and set appropriate values for the IP Address, Subnet Mask, and IP Gateway.
  6. Below, we show values appropriate for a system using a Sierra Wireless AirLink® LS300 cellular modem. Make a note of the IP address set on the datalogger in this step. It will need to be entered into the Biomet information in the EC system interface software (see the LI-7500A/RS or LI-7200/RS Instruction Manuals or online Help).
  7. Click Apply.
  8. Choose Network Services under Deployment.
  9. Click Edit .csipasswd File.
  10. When the Datalogger .csipasswd File Editor opens, select anonymous under User Names: and change the drop down for Access Level: to read write.
  11. Click Apply.
  12. Click Disconnect in the lower left corner of the Device Configuration Utility and exit the application.

Creating the Biomet data table

Data tables are created using the DataTable() instruction in CRBasic. For data in a data table to be accessible by the EC system, simply name the table "Biomet" as shown in the example below.

Important: Configure the logger program and datatable before you connect the logger to the SmartFlux System.


Here the data table will hold 9999 records (one week of data) and a new record will be added once every minute (DataInterval() of 60 seconds). The EC system polls the table for the newest record every 10 seconds and stores that data into the .ghg file once per minute (the nearest neighbor is logged). In this application, there is typically no need to store data more often than this on the datalogger.

Creating field names that are compatible with EddyPro

When the EC system polls the data table for new records, it sees and uses the field names present in the data table to label columns in the .ghg file and to create appropriate metadata for the biomet measurements. To work correctly, the field names used on the CSI logger need to follow the labeling format used by EddyPro Software. The field name needs to start with the EddyPro label from Table 2, the numeric units identifier from Table 1, the numeric data identifier from Table 1, and the position information. All other values should be separated by an underscore (_). For a sensor measuring air temperature in degrees Celsius, the EddyPro compliant field name would look like:


Or for a relative humidity measurement:


The field name can be applied to the variable several different ways. The simplest method is to declare the variable with the EddyPro compliant name initially. In the example below we create two variables, one for air temperature and one for relative humidity:

Public TA_2_1_1_1_1, RH_19_3_1_1_1


Dim TA_2_1_1_1_1, RH_19_3_1_1_1

This method may not be the most efficient when dealing with replicate sensors or sensors that return multiple values. In these cases, an array and aliasing may be more useful:

Public sensorvalues(2)

Alias sensorvalues(1) = TA_2_1_1_1_1

Alias sensorvalues(2) = RH_19_3_1_1_1

Field names can also be modified in the data table itself using the FieldNames() instruction as shown below:

    FieldNames(“TA_2_1_1_1_1:, RH_19_3_1_1_1:”)

When writing data to the data table, avoid using the Average() instruction when not using FieldNames() to specify EddyPro complaint names in the data table.
Average() by default appends _avg to the end of the field name, breaking EddyPro compliance. If average values are desired and FieldNames() won’t be used, use the AvgRun() instruction inside the scan to compute a running average and then use Sample() to record the running average in the data table.

Below is a simple example CRBasic program that shows collection of data from a Vaisala HMP155 Temperature and Relative Humidity sensor using EddyPro compliant names. The sensor is connected to single-ended channels 1 and 2 in this example.

'CR3000 Series Datalogger
‘EddyPro compliant biomet example
‘red, black, green-->ground
'Declare Variables and Units
Public sensorvalues(2)
    'Main Scan
        If sensorvalues(2)>100 AND sensorvalues(2)<108 Then 
        'Call Data Tables and Store Data
        CallTable Biomet

Unit identifiers

The unit identifiers specify which units to associate with each variable.

Table 1. Unit identifiers for logged variables.
Unit Identifier Units
1 K
2 C
3 F
4 kPa
5 Pa
6 W/m^2
7 umol/m^2/s
8 mm
9 cm
10 m
11 %Vol
12 m^3/m^3
13 mmH2O/m^2/s
14 ml/h
15 cm/s
16 m/s
17 mm/h
18 V
19 %
20 deg
99 Other

Data identifiers

The data identifiers specify which label to associate with each variable.

Table 2. Data identifiers for logged variables.
Data Identifier Label Description
1 TA Air Temperature
2 PA Air Pressure
3 RH Relative Humidity
4 RG Global Radiation
5 RN Net Radiation
6 RD Diffuse Radiation
7 RR Reflected Radiation
8 R_uva UVA Radiation
9 R_uvb UVB Radiation
10 SWIN Shortwave Incoming Radiation
11 SWOUT Shortwave Outgoing Radiation
12 SWBC Shortwave Below Canopy Radiation
13 SWDIF Shortwave Diffuse Radiation
14 LWIN Longwave Incoming Radiation
15 LWOUT Longwave Outgoing Radiation
16 TC Canopy Temperature
17 TBOLE Bole Temperature
18 P Precipitation
19 P_RAIN Rain Precipitation
20 P_SNOW Snow Precipitation
21 PPFD Photosynthetic Photon Flux Density (PAR)
22 PPFDD Diffuse PPFD
23 PPFDR Reflected PPFD
24 PPFDBC Below Canopy PPFD
25 APAR Absorbed Photosynthetically Active Radiation (PAR)
26 ALB Albedo
27 PRI Photochemical Reflectance Index
28 LAI Leaf Area Index
29 SAPFLOW Sap Flow
30 STEMFLOW Stem Flow
31 TBC Air Temperature Below Canopy
32 TR Tree Transpiration
33 WS Wind Speed
34 MWS Max Wind Speed
35 WD Wind Direction
36 SWC Soil Water Content
37 SHF Soil Heat Flux
38 TS Soil Temperature
39 VIN Input Voltage
40 SWDIR Shortwave Direct Radiation
41 SWP Soil Water Potential
42 WTD Water Table Depth
43 NDVI Normalized Difference Vegetative Index
44 WL Water Level
45 TW Water Temperature
99   Other

Note: Variables with data identifiers 40 through 45 are recognized by the LI-7550, but as of the writing of this document, are still treated as custom variables in EddyPro.

Relating field names with sensor position

With multiple sensors, some of which measure the same variable at a different (or the same) position on a station, it can be difficult to know which sensor provided which data. The scheme described here will unambiguously relate each sensor to the data it provides.

The horizontal position, vertical position, and replicate at a specific position will provide enough information to distinguish all sensors on a meteorological station.

In the dataset, an air temperature variable looks something like TA_2_1_1_1_1. To interpret the code:

Standard Label Units Identifier Variable Identifier Horizontal Position Vertical Position Replicate

Note: These values are integers. They are not floating points that represent real distances. You'll need to record the distances elsewhere.

Using Biomet.dld with sensor packages

LI-COR provides a generic CRBasic program (Biomet.dld) that accommodates all four standard biomet sensor packages available from LI-COR and can compile on a CR6, CR1000 or CR3000 datalogger. The program uses pre-compiler directives and a user-accessible constants table (BiometConstants; accessed through the logger keypad or the datalogger support software) to allow it to be configured without the need to modify the program in the CRBasic editor. To use Biomet.dld, the logger needs to be running OS28 or newer. Download biomet.dld from:

Uploading Biomet.dld and configuring measurements

  1. Connect the datalogger to power and physically connect it to the computer either through RS-232 or Ethernet.
  2. Create a new station by following the prompts in LoggerNet’s Setup application. Setup is found under the Main menu in LoggerNet.
  3. In LoggerNet’s Connect application (Main menu) select the station and click Connect.
  4. Once a connection is established, click Send New… from under Current Program and navigate to where Biomet.dld is stored on the computer. To see Biomet.dld in available files select DLD Files (*.dld) or All Files (*.*) for the file type.
  5. Once the program has uploaded and compiled, select BiometConstants from the dropdown menu under Table Monitor: Real Time Monitoring. If the value fields are blank, click Start at the bottom of the table.
  6. If not using biomet package 100, select the value for BiometPackage and change the number to correspond to the package in use. Click Enter so that the new value is retained in the table. If using biomet 100 skip to step 10.
  7. Select the value next to ApplyAndRestart at the bottom of the table, change it to true, and click Enter. This will force the logger to apply the new values and recompile the program. Communication to the logger will be lost during this process and the table definitions will need updating after reconnecting.
  8. Wait 30 seconds or so and click Connect to reconnect to the logger.
  9. Once connected, right click the station and select Update Table Definitions and click Merge in the popup box.
  10. Select BiometConstants again and edit the values associated with the various fields as needed. Click Enter after entering each new value so that it will be retained. A summary of all potentially available fields with their description is given in Table 1‑1.
  11. Once all required fields have been edited, select the value next to ApplyAndRestart at the bottom of the table, change it to true, and click Enter. Again, this will cause the logger to recompile the program and lose connection with the computer.

Three data tables may be created by Biomet.dld depending on the sensor package selected. For all sensor packages, a table containing a single record of version information (VersionInfo) and a table containing one minute mean sensor data (Biomet) are created. For all packages other than biomet 100, an additional table is created that contains flags indicating the state of various program controls (ControlFlags). The number of records stored in Biomet and ControlFlags is user set from BiometConstants.

All voltage measurements are treated as single ended measurements in Biomet.dld. This is a consequence of the limited number of input channels available on the dataloggers supported by the program.

Biomet.dld uses the SDI-12 protocol to communicate with up to three Stevens HydraProbe II soil moisture sensors at sequential addresses. If it fails to communicate with one of the sensors, it will not fill Biomet with any data, as the M! command does not allow for a timeout and the program will not advance beyond the initial call for soil moisture data. To avoid this issue, make sure the probes are connected correctly and the address range is specified correctly in BiometConstants. By default the program expects the three sensors at addresses 1, 2 and 3. New sensors come from the factory set to address 0 and need to be manually addressed by the user. To set an address on an SDI-12 device through the logger, see the instructions below.

Setting the address on an SDI-12 sensor

  1. Connect the sensor to the logger (only one sensor should be connected at a time): blue wire to C1, black to ground, red to SW-12 or SW-12-1.
  2. Connect to the datalogger as described in Uploading Biomet.dld and configuring measurements. There is no need to create another station if the setup has already been done.
  3. Once connected, under Stations right-click the station name and choose Terminal Emulator from the pop-up menu.
  4. Once the terminal emulator window opens click Open Terminal and press Enter to bring up the datalogger prompt (CR1000> in the figure). It may take several Enter presses to get the prompt.
  5. At the prompt enter sdi12 and press Enter. Note that the entry is not case sensitive.
  6. A list of available SDI-12 ports will be displayed in the terminal. Enter 1 at the Select SDI12 Port: prompt and then press Enter.
  7. After the Entering SDI12 Terminal message, enter ?! then press Enter to see the address of the connected sensor (0 in the figure).
  8. To set the new address enter the address returned in step 7 followed by A, then the new address followed by !, and press Enter. To set a sensor with address 0 to address 2, enter 0A2! as shown in the figure. Once Enter is pressed the sensor will return the new address if it is accepted.
  9. Disconnect the sensor and repeat steps 1, 7 and 8 for any remaining sensors. Note that only one sensor should be connected at a time during this process and that the terminal has a relatively short time out. If it loses connection to the SDI-12 terminal, press Enter a few times to bring up the datalogger prompt and then repeat steps 5 and 6 to re-enter the SDI-12 terminal.
  10. Once all sensors are addressed, click Close Terminal and exit the terminal emulator.