Campbell Weather Stations

Purpose

The purpose of this plugin is to collect data from the Campbell weather stations and the datalogger CR1000.

Usage

This plugin reads the data from Campbell weather stations including the CR1000 data logger, via Modbus serial or TCP. Data will be collected to the weather table. By default, it will collect data every 5 minutes, but can collect at a minimum rate of 1 second, depending on the speed of the serial connection. The plugin will make 1 attempt (by default) to read the data. The Campbell device CR1000 is a data logger. The data can be read via this plugin. The file campbell_CR1000.txt is an example file. It needs to be chanegd to suit the site configuration. If you tunnel into Port 80 of the remote CR1000 and then use a web browser to select Newest Record from Public, it will provide a page similar to:

HeartBeat	    55
BattV	        13.71866
GHI	            -4.727127
POA	            -1795.851
Modbus(1)	    55
Modbus(2)	    13.71312
Modbus(3)	    -5.475296
Modbus(4)	    -1795.851
Modbus(5)	    0
Modbus(6)	    0
Modbus(7)	    0
ModbusCoil(1)	False
ModbusCoil(2)	False
ModbusCoil(3)	False
ModbusCoil(4)	False
ModbusCoil(5)	False
ModbusCoil(6)	False
ModbusCoil(7)	False
ModbusCoil(8)	False
WeekDay	        2
Day_of_Year	    269

The Modbus and ModbusCoil entries can be used to retrieve data via Modbus. But you may need the assistance of the plant operator to ensure the correct values are collected.

Arguments

Arguments are as follows:

  • endpoint. This is either a serial device like /dev/ttyS0 or an IP or DNS like 192.168.1.15

  • configuration file. This is the configuration file for the device type. It must be formulated for each site.

  • --bus_addresses. This is an optional parameter, defaulted to 1.

  • --port. This is an optional parameter used in an Ethernet gateway, and is the TCP port used for the gateway. Default is 502

  • --attempts. This is an optional parameter, and determines how many times to times to attempt to read an inverter value. Default is 1

  • --delay. This is the delay in seconds between inverter send and receive commands, AND if attempts > 1. Fractions like 0.3 can be used. Default is 0.05

  • --stop_on_any_command_fail. If this is specified, then any Modbus commands that fail will stop all further queries for all bus addresses and attempts.

  • --serial_lock. If this is set, the program can only be run one at a time (so as not to overload a Modbus device). If the device being queried is a serial device, this will automatically be set to "on". For IP addresses it is optional.

  • --sampling_rate. If this is defined, and the sampling rate is greater than 1, then all DECIMAL and SWAP16 values will be collected as an average. In other words; it will take a sample at the nominated frequency. After X samples defined by sampling_rate, a record will be written and sent to the cloud.

Last updated