Campbell Dataloggers via HTTP

The Goal

To have DataTurbine access a Campbell CR1000 or CR3000 data logger without having to use loggernet or a custom driver via the Campbell NL115 module.

NL115

For those using a Campbell CR1000 or CR 3000 Data logger, one of the ways of accessing data is through the the NL115 Module, manufactured and sold by Campbell. It fits into the peripheral port on the data logger and provides network access (as well as a CF card storage option) to the data logger The module runs a HTTP and FTP server that you can connect to via a wired ethernet port;

Setting it up

CambellDeviceConfigUtil

  1. Attach the NL115 module to the Campbell CR1000, or CR3000 data logger
  2. Connect a serial cable to the RS-232 port of the data logger and the serial port of a laptop
    If a serial port is not present on the laptop, it is possible to get a serial to USB adapter, they are inexpensive.
  3. Plug in power to the data logger (+12 Volts DC)
  4. Configure the NL115 to the network using the Campbell Device Configuration Utility.
    1. Use the DVD that came with the NL115 to install the utility
    2. Launch the utility
    3. Under Device Type (the left sidebar), select your logger (CR1000, or CR 3000)
    4. Under Communication Port in the bottom left click the […] to select the serial port (if you are using an adapter and it is not listed you may need to install the adapter’s driver)
    5. Under Baud Rate in the bottom left corner select the appropriate value for the device, if you do not remember what the logger is configured to and you are having issues connecting to the logger you may need to test out various rates (there are only 8 possibilities).
    6. Click connect
    7. Select the TCP/IP tab (under Deployment)
      1. Set the IP_address to an unoccupied Static IP appropriate for your network (you may need to talk to your network admin to determine what this should be). This is the IP you will use to connect to the HTTP server on the NL115.
      2. You can probably leave the subnet alone, unless instructed otherwise
      3. Set the default gateway to the IP of your router (again you may need to contact your network administrator)
    8. Select the Net Services tab (under Deployment) and verify that HTTP is enabled
    9. Optional: If you have not already uploaded a program you can click the Logger Control tab at the top to upload a program and set the clock
  5. The logger should now be accessible on the network. Open your browser and go to the IP you specified in the configuration

Parsing Data from the logger

This simple program uses the HTMLCleaner library and Xpath to parse out the data from the HTTP server. Add the HTML cleaner library to your build path. Then include the NL115Parser in your projects.

To use it simply create a new NL115Parser object then use the parse method to create an array of data stored on the logger by specifying the url to the NL115 http view.

1
2
NL115Parser nl115= new NL115Parser();
String[][] data = nl115.parse(new URL("http://192.168.2.22/?command=NewestRecord&table=Status"));

Example

Here is an example DataTurbine Source parsing data directly from the logger via HTTP.

NL115_Demo

Files:

Open Source DataTurbine Initiative © 2017 Frontier Theme