2.4.3.2 RS-232, RS-422, RS-485, TTL, and LVTTL ports14
2.4.3.3 SDM ports14
2.4.4 CS I/O port15
2.4.5 RS-232/CPI port16
2.5 Programmable logic control17
3. Setting up the CR619
3.1 Setting up communications with the data logger19
3.1.1 USB or RS-232 communications20
3.1.2 Virtual Ethernet over USB (RNDIS)21
3.1.3 Ethernet communications option22
3.1.3.1 Configuring data logger Ethernet settings23
3.1.3.2 Ethernet LEDs24
Table of Contents - i
3.1.3.3 Setting up Ethernet communications between the data logger and
computer24
3.1.4 Wi-Fi communications option25
3.1.4.1 Configuring the data logger to host a Wi-Fi network25
3.1.4.2 Connecting your computer to the data logger over Wi-Fi26
3.1.4.3 Setting up Wi-Fi communications between the data logger and the data
logger support software26
3.1.4.4 Configuring data loggers to join a Wi-Fi network27
3.1.4.5 Wi-Fi LED indicator28
3.1.5 Radio communications option28
3.1.5.1 Configuration options29
3.1.5.2 RF407-Series radio communications with one or more data loggers30
Configuring the RF407-Series radio30
Setting up communications between the RF407-Series data logger and the
computer31
3.1.5.3 RF407-Series radio communications with multiple data loggers using one
data logger as a router32
Configuring the RF407-Series radio33
Configuring the data logger acting as a router33
Adding routing data logger to LoggerNet network34
Adding leaf data loggers to the network35
Using additional communications methods35
3.1.5.4 RF451 radio communications with one or more dataloggers35
Configuring the RF451 radio connected to the computer36
Configuring slave RF451 dataloggers36
Setting up communications between the RF451 data logger and the computer37
3.1.5.5 RF451 radio communications with multiple dataloggers using one data
logger as a repeater38
Configuring the RF451 radio connected to the computer39
Configuring the data logger acting as a repeater39
Adding the repeater data logger to the LoggerNet network40
Adding leaf dataloggers to the network40
Using additional communication methods41
3.2 Testing communications with EZSetup41
3.3 Making the software connection43
3.4 Creating a Short Cut data logger program43
3.5 Sending a program to the data logger46
Table of Contents - ii
4. Working with data48
4.1 Default data tables48
4.2 Collecting data49
4.2.1 Collecting data using LoggerNet49
4.2.2 Collecting data using PC200W or PC40049
4.3 Viewing historic data50
4.4 Data types and formats50
4.4.1 Variables51
4.4.2 Constants52
4.4.3 Data storage53
4.5 About data tables54
4.5.1 Table definitions54
4.5.1.1 Header rows55
4.5.1.2 Data records56
4.6 Creating data tables in a program57
5. Data memory59
5.1 Data tables59
5.2 Memory allocation59
5.3 SRAM60
5.3.1 USRdrive61
5.4 Flash memory62
5.4.1 CPU drive62
5.5 MicroSD (CRD:drive)62
5.5.1 Formatting microSD cards63
5.5.2 MicroSDcard precautions63
5.5.3 Act LED indicator64
6. Measurements65
6.1 Voltage measurements65
6.1.1 Single-ended measurements66
6.1.2 Differential measurements67
6.1.2.1 Reverse differential67
6.2 Current-loop measurements67
6.2.1 Example Current-Loop Measurement Connections68
6.3 Resistance measurements70
6.3.1 Resistance measurements with voltage excitation71
Table of Contents - iii
6.3.2 Resistance measurements with current excitation73
6.3.3 Strain measurements75
6.3.4 AC excitation77
6.3.5 Accuracy for resistance measurements78
6.4 Period-averaging measurements78
6.5 Pulse measurements79
6.5.1 Low-level AC measurements81
6.5.2 High-frequency measurements81
6.5.2.1 U terminals82
6.5.2.2 C terminals82
6.5.3 Switch-closure and open-collector measurements82
A basic data acquisition system consists of sensors, measurement hardware, and a computer with
programmable software. The objective of a data acquisition system should be high accuracy,
high precision, and resolution as high as appropriate for a given application.
The components of a basic data acquisition system are shown in the following figure.
Following is a list of typical data acquisition system components:
l Sensors - Electronic sensors convert the state of a phenomenon to an electrical signal (see
Sensors (p. 3) for more information).
l Data logger - The data logger measures electrical signals or reads serial characters. It
converts the measurement or reading to engineering units, performs calculations, and
reduces data to statistical values. Data is stored in memory to await transfer to a computer
by way of an external storage device or a communications link.
l Data Retrieval and Communications - Data is copied (not moved) from the data logger,
usually to a computer, by one or more methods using data logger support software. Most
communications options are bi-directional, which allows programs and settings to be sent
1. CR6 data acquisition system components1
to the data logger. For more information, see Sending a program to the data logger (p.
46).
l Datalogger Support Software - Software retrieves data, sends programs, and sets settings.
The software manages the communications link and has options for data display.
l Programmable Logic Control - Some data acquisition systems require the control of
external devices to facilitate a measurement or to control a device based on measurements.
This data logger is adept at programmable logic control. See Programmable logic control
(p. 17) for more information.
lMeasurement and Control Peripherals - Sometimes, system requirements exceed the
capacity of the data logger. The excess can usually be handled by addition of input and
output expansion modules.
1.1 The CR6 Datalogger
The CR6 data logger provides fast communications, low power requirements, built-in USB,
compact size and and high analog input accuracy and resolution. It includes universal (U)
terminals, which allow connection to virtually any sensor - analog, digital, or smart. This
multipurpose data logger is also capable of doing static vibrating-wire measurements.
1.1.1 Overview
The CR6 data logger is the main part of a data acquisition system (see CR6 data acquisition
system components (p. 1) for more information). It has a central-processing unit (CPU), analog
and digital measurement inputs, analog and digital outputs, and memory. An operating system
(firmware) coordinates the functions of these parts in conjunction with the onboard clock and
the CRBasic application program.
The CR6 can simultaneously provide measurement and communications functions. Low power
consumption allows the data logger to operate for extended time on a battery recharged with a
solar panel, eliminating the need for ac power. The CR6 temporarily suspends operations when
primary power drops below 9.6 V, reducing the possibility of inaccurate measurements.
1.1.2 Communications Options
The CR6 can include Wi-Fi or the following radio options for different regions:
l RF407: 900 MHz (United States and Canada)
l RF412: 920 MHz (Australia and New Zealand)
l RF422: 868 MHz (Europe)
l RF451: 900 MHz, 1 Watt (United States, Canada, and Australia)
1. CR6 data acquisition system components2
1.1.3 Operations
The CR6 measures almost any sensor with an electrical response, drives direct communications
and telecommunications, reduces data to statistical values, performs calculations, and controls
external devices. After measurements are made, data is stored in onboard, nonvolatile memory.
Because most applications do not require that every measurement be recorded, the program
usually combines several measurements into computational or statistical summaries, such as
averages and standard deviations.
1.1.4 Programs
A program directs the data logger on how and when sensors are measured, calculations are
made, data is stored, and devices are controlled. The application program for the CR6 is written
in CRBasic, a programming language that includes measurement, data processing, and analysis
routines, as well as the standard BASIC instruction set. For simple applications, Short Cut, a userfriendly program generator, can be used to generate the program. For more demanding
programs, use the full featured CRBasic Editor.
Programs are run by the CR6 in either sequential mode or pipeline mode. In sequential mode,
each instruction is executed sequentially in the order it appears in the program. In pipeline
mode, the CR6 determines the order of instruction execution to maximize efficiency.
1.2 Sensors
Sensors transduce phenomena into measurable electrical forms by modulating voltage, current,
resistance, status, or pulse output signals. Suitable sensors do this with accuracy and precision.
Smart sensors have internal measurement and processing components and simply output a
digital value in binary, hexadecimal, or ASCII character form.
Most electronic sensors, regardless of manufacturer, will interface with the data logger. Some
sensors require external signal conditioning. The performance of some sensors is enhanced with
specialized input modules. The data logger, sometimes with the assistance of various peripheral
devices, can measure or read nearly all electronic sensor output types.
The following list may not be comprehensive. A library of sensor manuals and application notes
is available at www.campbellsci.com/support to assist in measuring many sensor types.
l Analog
o
Voltage
o
Current
o
Strain
1. CR6 data acquisition system components3
o
Thermocouple
o
Resistive bridge
l Pulse
o
High frequency
o
Switch-closure
o
Low-level ac
o
Quadrature
l Period average
l Vibrating wire
l Smart sensors
o
SDI-12
o
RS-232
o
Modbus
o
DNP3
o
TCP/IP
o
RS-422
o
RS-485
1. CR6 data acquisition system components4
2. Wiring panel and terminal
functions
The CR6 wiring panel provides ports and removable terminals for connecting sensors, power, and
communications devices. It is protected against surge, over-voltage, over-current, and reverse
power. The wiring panel is the interface to most data logger functions so studying it is a good
way to get acquainted with the data logger. Functions of the terminals are broken down into the
following categories:
l Analog input
l Pulse counting
l Analog output
l Communications
l Digital I/O
l Power input
l Power output
l Power ground
l Signal ground
2. Wiring panel and terminal functions5
Table 2-1: Analog input terminal functions
U1U2U3U4U5U6U7U8U9U10U11U12RG
Single-Ended Voltage✓✓✓✓✓✓✓✓✓✓✓✓
Differential VoltageHLHLHLHLHLHL
Ratiometric/Bridge✓✓✓✓✓✓✓✓✓✓✓✓
Vibrating Wire (Static,
✓✓✓✓✓✓
VSPECT®)
Vibrating Wire with
✓✓✓
Thermistor
Thermistor✓✓✓✓✓✓
Thermocouple✓✓✓✓✓✓✓✓✓✓✓✓
Current Loop✓
Period Average✓✓✓✓✓✓✓✓✓✓✓✓
Table 2-2: Pulse counting terminal functions
U1U2U3U4U5U6U7U8U9U10U11U12C1-C4
Switch-Closure✓✓✓✓✓✓✓✓✓✓✓✓✓
High Frequency✓✓✓✓✓✓✓✓✓✓✓✓✓
Low-level Ac✓✓✓✓✓✓
NOTE:
Conflicts can occur when a control port pair is used for different instructions (TimerInput(),
PulseCount(), SDI12Recorder(), WaitDigTrig()). For example, if C1 is used for
SDI12Recorder(), C2 cannot be used for TimerInput(), PulseCount(), or
WaitDigTrig().
Table 2-3: Analog output terminal functions
U1-U12
Switched Voltage Excitation✓
Switched Current Excitation✓
2. Wiring panel and terminal functions6
Table 2-4: Voltage output terminal functions
U1-U12C1-C412VSW12-1SW12-2
3.3 VDC✓✓
5 VDC✓✓
12 VDC✓✓✓
C and even numbered U terminals have limited drive capacity. Voltage levels are configured in pairs.
The data logger requires a power supply. It can receive power from a variety of sources, operate
for several months on non-rechargeable batteries, and supply power to many sensors and
devices. The data logger operates with external power connected to the green BAT and/or CHG
terminals on the face of the wiring panel. The positive power wire connects to +. The negative
wire connects to -. The power terminals are internally protected against polarity reversal and high
voltage transients.
In the field, the data logger can be powered in any of the following ways:
l 10 to 18 VDC applied to the BAT + and – terminals
l 16 to 32 VDC applied to the CHG + and – terminals
To establish an uninterruptible power supply (UPS), connect the primary power source (often a
transformer, power converter, or solar panel) to the CHG terminals and connect a nominal 12
VDC sealed rechargeable lead-acid battery to the BAT terminals. See Power budgeting (p. 130)
for more information. The Status Table ChargeState may display any of the following:
2. Wiring panel and terminal functions8
l No Charge - The charger input voltage is either less than +9.82V±2% or there is no charger
attached to the terminal block.
l Low Charge Input – The charger input voltage is less than the battery voltage.
l Current Limited – The charger input voltage is greater than the battery voltage AND the
battery voltage is less than the optimal charge voltage. For example, on a cloudy day, a
solar panel may not be providing as much current as the charger would like to use.
l Float Charging – The battery voltage is equal to the optimal charge voltage.
l Regulator Fault - The charging regulator is in a fault condition.
WARNING:
Sustained input voltages in excess of 32 VDC on CHGor BAT terminals can damage the
transient voltage suppression.
Ensure that power supply components match the specifications of the device to which they are
connected. When connecting power, switch off the power supply, insert the connector, then turn
the power supply on. See Troubleshooting power supplies (p. 147) for more information.
Following is a list of CR6 power input terminals and the respective power types supported.
l BAT terminals: Voltage input is 10 to 18 VDC. This connection uses the least current since
the internal data logger charging circuit is bypassed. If the voltage on the BAT terminals
exceeds 19 VDC, power is shut off to certain parts of the data logger to prevent damaging
connected sensors or peripherals.
l CHG terminals: Voltage input range is 16 to 32 VDC. Connect a primary power source, such
as a solar panel or VAC-to-VDC transformer, to CHG. The voltage applied to CHG terminals
must be at least 0.3 V higher than that needed to charge a connected battery. When within
the 16 to 32 VDC range, it will be regulated to the optimal charge voltage for a lead acid
battery at the current data logger temperature, with a maximum voltage of approximately
15 VDC. A battery need not be connected to the BAT terminals to supply power to the data
logger through the CHG terminals. The onboard charging regulator is designed for
efficiently charging lead-acid batteries. It will not charge lithium or alkaline batteries.
l USB port: 5 VDC via USB connection. If power is also provided with BAT or CHG, power will
be supplied by whichever has the highest voltage. If USB is the only power source, then the
CS I/O port and the 12V and SW12 terminals will not be operational. When powered by
USB (no other power supplies connected) Status field Battery = 0. Functions that will be
active with a 5 VDC source include sending programs, adjusting data logger settings, and
making some measurements.
2. Wiring panel and terminal functions9
NOTE:
The Status field Battery value and the destination variable from the Battery() instruction
(often called batt_volt or BattV) in the Public table reference the external battery
voltage. For information about the internal battery, see Internal battery (p. 126).
2.1.1 Powering a data logger with a vehicle
If a data logger is powered by a motor-vehicle power supply, a second power supply may be
needed. When starting the motor of the vehicle, battery voltage often drops below the voltage
required for data logger operation. This may cause the data logger to stop measurements until
the voltage again equals or exceeds the lower limit. A second supply or charge regulator can be
provided to prevent measurement lapses during vehicle starting.
In vehicle applications, the earth ground lug should be firmly attached to the vehicle chassis with
12 AWG wire or larger.
2.1.2 Power LED indicator
When the data logger is powered, the Power LED will turn on according to power and program
states:
l Off: No power, no program running.
l 1 flash every 10 seconds: Powered from BAT, program running.
l 2 flashes every 10 seconds: Powered from CHG, program running.
l 3 flashes every 10 seconds: Powered via USB, program running.
l Always on: Powered, no program running.
2.2 Power output
The data logger can be used as a power source for communications devices, sensors and
peripherals. Take precautions to prevent damage to these external devices due to over- or undervoltage conditions, and to minimize errors. Additionally, exceeding current limits causes voltage
output to become unstable. Voltage should stabilize once current is again reduced to within
stated limits. The following are available:
l 12V: unregulated nominal 12 VDC. This supply closely tracks the primary data logger supply
voltage; so, it may rise above or drop below the power requirement of the sensor or
peripheral. Precautions should be taken to minimize the error associated with
measurement of underpowered sensors.
2. Wiring panel and terminal functions10
l SW12: program-controlled, switched 12 VDC terminals. It is often used to power devices
such as sensors that require 12 VDC during measurement. Voltage on a SW12 terminal will
change with data logger supply voltage. CRBasic instruction SW12() controls the SW12
terminal. See the CRBasic Editor help for detailed instruction information and program
examples: https://help.campbellsci.com/crbasic/cr6/.
l CS I/O port: used to communicate with and often supply power to Campbell Scientific
peripheral devices.
CAUTION:
Voltage levels at the 12V and switched SW12 terminals, and pin 8 on the CS I/O port, are tied
closely to the voltage levels of the main power supply. Therefore, if the power received at the
POWER IN 12V and G terminals is 16 VDC, the 12V and SW12 terminals and pin 8 on the CS
I/O port will supply 16 VDC to a connected peripheral. The connected peripheral or sensor
may be damaged if it is not designed for that voltage level.
l C or U terminals: can be set low or high as output terminals . With limited drive capacity,
digital output terminals are normally used to operate external relay-driver circuits. Drive
current varies between terminals. See also Digital input/output specifications (p. 232).
l U terminals: can be configured to provide regulated ±2500 mV dc excitation.
See also Power output specifications (p. 223).
2.3 Grounds
Proper grounding lends stability and protection to a data acquisition system. Grounding the data
logger with its peripheral devices and sensors is critical in all applications. Proper grounding will
ensure maximum ESD protection and measurement accuracy. It is the easiest and least expensive
insurance against data loss, and often the most neglected. The following terminals are provided
for connection of sensor and data logger grounds:
l Signal Ground () - reference for single-ended analog inputs, excitation returns, and a
ground for sensor shield wires.
o
6 common terminals
l Power Ground (G) - return for 3.3 V, 5 V, 12 V, U or C terminals configured for control, and
digital sensors. Use of G grounds for these outputs minimizes potentially large current flow
through the analog-voltage-measurement section of the wiring panel, which can cause
single-ended voltage measurement errors.
o
4 common terminals
2. Wiring panel and terminal functions11
l Resistive Ground (RG) - used for non-isolated 0-20 mA and 4-20 mA current loop
measurements (see Current-loop measurements (p. 67) for more information). Also used
for decoupling ground on RS-485 signals. Includes 100 Ω resistance to ground. Maximum
voltage for RG terminal is ±16 V.
o
1 terminal
l
NOTE:
Resistance to ground input for non-isolated 0-20 mA and 4-20 mA current loop
measurements is available in CR6 data loggers with serial numbers 7502 and greater.
These data loggers have two blue stripes on the label.
l Earth Ground Lug () - connection point for heavy-gage earth-ground wire. A good earth
connection is necessary to secure the ground potential of the data logger and shunt
transients away from electronics. Campbell Scientific recommends 14 AWG wire, minimum.
NOTE:
Several ground wires can be connected to the same ground terminal.
A good earth (chassis) ground will minimize damage to the data logger and sensors by providing
a low-resistance path around the system to a point of low potential. Campbell Scientific
recommends that all data loggers be earth grounded. All components of the system (data
loggers, sensors, external power supplies, mounts, housings) should be referenced to one
common earth ground.
In the field, at a minimum, a proper earth ground will consist of a 5-foot copper-sheathed
grounding rod driven into the earth and connected to the large brass ground lug on the wiring
panel with a 14 AWG wire. In low-conductive substrates, such as sand, very dry soil, ice, or rock, a
single ground rod will probably not provide an adequate earth ground. For these situations,
search for published literature on lightning protection or contact a qualified lightning-protection
consultant.
In laboratory applications, locating a stable earth ground is challenging, but still necessary. In
older buildings, new VAC receptacles on older VAC wiring may indicate that a safety ground
exists when, in fact, the socket is not grounded. If a safety ground does exist, good practice
dictates to verify that it carries no current. If the integrity of the VAC power ground is in doubt,
also ground the system through the building plumbing, or use another verified connection to
earth ground.
See also:
l Ground loops (p. 152)
l Minimizing ground potential differences (p. 158)
2. Wiring panel and terminal functions12
2.4 Communications ports
The data logger is equipped with ports that allow communications with other devices and
networks, such as:
l Computers
l Smart sensors
l Modbus and DNP3 networks
l Ethernet
l Modems
l Campbell Scientific PakBus® networks
l Other Campbell Scientific data loggers
Campbell Scientific data logger communications ports include:
l CS I/O
l RS-232/CPI
l USB Device
l Ethernet
l C and U terminals
2.4.1 USB device port
One USB device port supports communicating with a computer through data logger support
software or through virtual Ethernet (RNDIS), and provides 5 VDC power to the data logger
(powering through the USB port has limitations - details are available in the specifications). The
data logger USB device port does not support USBflash or thumb drives. Although the USB
connection supplies 5 V power, a 12 VDC battery will be needed for field deployment.
2.4.2 Ethernet port
The RJ45 10/100 Ethernet port is used for IP communications.
2.4.3 C and U terminals for communications
C and U terminals are configurable for the following communications types:
l SDI-12
l RS-232
l RS-422
l RS-485
l TTL (0 to 5 V)
2. Wiring panel and terminal functions13
l LVTTL (0 to 3.3 V)
l SDM
Some communications types require more than one terminal, and some are only available on
specific terminals. This is shown in the data logger specifications.
2.4.3.1 SDI-12 ports
SDI-12 is a 1200 baud protocol that supports many smart sensors. C1, C3, U1, U3, U5, U7, U9, and
U11 can each be configured as SDI-12 ports. Maximum cable lengths depend on the number of
sensors connected, the type of cable used, and the environment of the application. Refer to the
sensor manual for guidance.
For more information, see SDI-12 communications (p. 111).
2.4.3.2 RS-232, RS-422, RS-485, TTL, and LVTTL ports
RS-232, RS-422, RS-485, TTL, and LVTTL communications are typically used for the following:
l Reading sensors with serial output
l Creating a multi-drop network
l Communications with other data loggers or devices over long cables
Configure C or U terminals as serial ports using Device Configuration Utility or by using the
SerialOpen() CRBasic instruction. C and U terminals are configured in pairs for TTL and
LVTTL communications, and C terminals are configured in pairs for RS-232 or half-duplex RS-422
and RS-485. For full-duplex RS-422 and RS-485, all four C terminals are required. See also
Communications protocols (p. 91).
NOTE:
RS-232 ports are not isolated.
2.4.3.3 SDM ports
SDM is a protocol proprietary to Campbell Scientific that supports several Campbell Scientific
digital sensor and communications input and output expansion peripherals and select smart
sensors. It uses a common bus and addresses each node. CRBasic SDM device and sensor
instructions configure terminals C1, C2, and C3 together to create an SDM port. Alternatively,
terminals U1, U2, and U3; U5, U6, and U7; or U9, U10, and U11 can be configured together to be
used as SDM ports by using the SDMBeginPort() instruction.
See also Communications specifications (p. 234).
2. Wiring panel and terminal functions14
2.4.4 CS I/O port
One nine-pin port, labeled CS I/O, is available for communicating with a computer through
Campbell Scientific communications interfaces, modems, and peripherals. Campbell Scientific
recommends keeping CS I/O cables short (maximum of a few feet). See also Communications
specifications (p. 234).
Table 2-7: CS I/O pinout
Pin
Function
Number
15 VDCO5 VDC: sources 5 VDC, used to power peripherals.
2SG
3RINGI
4RXDI
5MEO
6SDEO
7CLK/HSI/O
Input(I)
Description
Output(O)
Signal ground: provides a power return for pin 1 (5V),
and is used as a reference for voltage levels.
Ring: raised by a peripheral to put the CR6 in the
telecom mode.
Receive data: serial data transmitted by a peripheral are
received on pin 4.
Modem enable: raised when the CR6 determines that a
modem raised the ring line.
Synchronous device enable: addresses synchronous
devices (SD); used as an enable line for printers.
Clock/handshake: with the SDE and TXD lines addresses
and transfers data to SDs. When not used as a clock, pin
7 can be used as a handshake line; during printer
output, high enables, low disables.
812VDC
9TXDO
Nominal 12 VDC power. Same power as 12V and SW12
terminals.
Transmit data: transmits serial data from the data logger
to peripherals on pin 9; logic-low marking (0V), logichigh spacing (5V), standard-asynchronous ASCII: eight
data bits, no parity, one start bit, one stop bit. User
selectable baud rates: 300, 1200, 2400, 4800, 9600,
19200, 38400, 115200.
2. Wiring panel and terminal functions15
2.4.5 RS-232/CPI port
The data logger includes one RJ45 module jack labeled RS-232/CPI. CPI is a proprietary interface
for communications between Campbell Scientific data loggers and Campbell Scientific CDM
peripheral devices and smart sensors. It consists of a physical layer definition and a data protocol.
CDM devices are similar to Campbell Scientific SDM devices in concept, but the CPI bus enables
higher data-throughput rates and use of longer cables. CDM devices require more power to
operate in general than do SDM devices. CPI ports also enable networking between compatible
Campbell Scientific data loggers. Consult the manuals for CDM modules for more information.
NOTE:
RS-232/CPI port is not isolated.
CPI port power levels are controlled automatically by the CR6:
lOff: Not used.
lHigh power: Fully active.
lLow-power standby: Used whenever possible.
lLow-power bus: Sets bus and modules to low power.
When used with a Campbell Scientific RJ45-to-DB9 converter cable, the RS-232/CPI port can be
used as an RS-232 port. It defaults to 115200 bps (in autobaud mode), 8 data bits, no parity, and 1
stop bit. Use Device Configuration Utility or the SerialOpen() CRBasic instruction to change
these options.
Table 2-8: RS-232/CPI pinout
Pin NumberDescription
1RS-232: Transmit (Tx)
2RS-232: Receive (Rx)
3100 Ω Res Ground
4CPI: Data
5CPI: Data
6100 Ω Res Ground
7RS-232 CTS CPI: Sync
8RS-232 DTR CPI: Sync
9Not Used
2. Wiring panel and terminal functions16
2.5 Programmable logic control
The data logger can control instruments and devices such as:
l Controlling cellular modem or GPS receiver to conserve power.
l Triggering a water sampler to collect a sample.
l Triggering a camera to take a picture.
l Activating an audio or visual alarm.
l Moving a head gate to regulate water flows in a canal system.
l Controlling pH dosing and aeration for water quality purposes.
l Controlling a gas analyzer to stop operation when temperature is too low.
l Controlling irrigation scheduling.
Control decisions can be based on time, an event, or a measured condition. Controlled devices
can be physically connected to C, U, or SW12 terminals. Short Cut has provisions for simple
on/off control. Control modules and relay drivers are available to expand and augment data
logger control capacity.
l C and U terminals are selectable as binary inputs, control outputs, or communication ports.
These terminals can be set low (0 VDC) or high (3.3 or 5 VDC) using the PortSet() or
WriteIO() instructions. See the CRBasic Editor help for detailed instruction information
and program examples: https://help.campbellsci.com/crbasic/cr6/. Other functions include
device-driven interrupts, asynchronous communications and SDI-12 communications. The
high voltage for these terminals defaults to 5 V, but it can be changed to 3.3 V using the
PortPairConfig() instruction. A C or U terminal configured for digital I/O is normally
used to operate an external relay-driver circuit because the terminal itself has limited drive
capacity.
l SW12 terminals can be set low (0 V) or high (12 V) using the SW12() instruction (see the
CRBasic help for more information).
2. Wiring panel and terminal functions17
The following image illustrates a simple application wherein a C or Uterminal configured for
digital input, and another configured for control output are used to control a device (turn it on
or off) and monitor the state of the device (whether the device is on or off).
In the case of a cell modem, control is based on time. The modem requires 12 VDC power, so
connect its power wire to a data logger SW12 terminal. The following code snip turns the modem
on for the first ten minutes of every hour using the TimeIsBetween() instruction embedded
in an If/Then logic statement:
If TimeIsBetween (0,10,60,Min)Then
SW12(SW12_1,1,1) 'Turn phone on.
Else
SW12(SW12_1,0,1) 'Turn phone off.
EndIf
2. Wiring panel and terminal functions18
3. Setting up the CR6
The basic steps for setting up your data logger to take measurements and store data are included
in the following sections:
3.1 Setting up communications with the data logger19
3.2 Testing communications with EZSetup41
3.3 Making the software connection43
3.4 Creating a Short Cut data logger program43
3.5 Sending a program to the data logger46
3.1 Setting up communications with the data
logger
The first step in setting up and communicating with your data logger is to configure your
connection. Communications peripherals, data loggers, and software must all be configured for
communications. Additional information is found in your specific peripheral manual, and the
data logger support software manual and help.
The default settings for the data logger allow it to communicate with a computer via USB, RS232, or Ethernet. For other communications methods or more complex applications, some
settings may need adjustment. Settings can be changed through Device Configuration Utility or
through data logger support software.
You can configure your connection using any of the following options. The simplest is via USB.
For detailed instruction, see:
3.1.1 USB or RS-232 communications20
3.1.2 Virtual Ethernet over USB (RNDIS)21
3.1.3 Ethernet communications option22
3.1.4 Wi-Fi communications option25
3.1.5 Radio communications option28
For other configurations, see the LoggerNet EZSetup Wizard help. Context-specific help is given
in each step of the wizard by clicking the Help button in the bottom right corner of the window.
3. Setting up the CR619
For complex data logger networks, use Network Planner. For more information on using the
Network Planner, watch a video at https://www.campbellsci.com/videos/loggernet-software-
network-planner.
3.1.1 USB or RS-232 communications
Setting up a USB or RS-232 connection is a good way to begin communicating with your data
logger. Because these connections do not require configuration (like an IPaddress), you need
only set up the communications between your computer and the data logger. Use the following
instructions or watch the Quickstart videos at https://www.campbellsci.com/videos.
Follow these steps to get started. These settings can be revisited using the data logger support
software Edit Datalogger Setup option.
1. Using data logger support software, launch the EZSetup Wizard.
l
LoggerNet users, click Setup, click the View menu to ensure you are in the EZ
(Simplified) view, then click Add Datalogger.
l
PC400 and PC200W users, click Add Datalogger.
2. Click Next.
3. Select your data logger from the list, type a name for your data logger (for example, a site
or project name), and click Next.
4. If prompted, select the Direct Connect connection type and click Next.
5. If this is the first time connecting this computer to a CR6 via USB, click Install USBDriver,
select your data logger, click Install, and follow the prompts to install the USBdrivers.
6. Plug the data logger into your computer using a USBor RS-232 cable. The USB connection
supplies 5 V power as well as a communications link, which is adequate for setup. A 12V
battery will be needed for field deployment. If using RS-232, external power must be
provided to the data logger and a CPI/RS-232 RJ45 to DB9 cable is required to connect to
the computer.
NOTE:
The Power LED on the data logger indicates the program and power state. Because the
data logger ships with a program set to run on power-up, the Power LED flashes 3 times
every 10 seconds when powered over USB. When powered with a 12 V battery, it flashes
1 time every 10 seconds.
7. From the COM Port list, select the COMport used for your data logger.
3. Setting up the CR620
8. USB and RS-232 connections do not typically require a COM Port Communication Delay this allows time for the hardware devices to "wake up" and negotiate a communications
link. Accept the default value of 00 seconds and click Next.
9. The baud rate and PakBus address must match the hardware settings for your data logger.
The default PakBus address is 1. A USB connection does not require a baud rate selection.
RS-232 connections default to 115200 baud.
10. Set an Extra Response Time if you have a difficult or marginal connection and you want the
data logger support software to wait a certain amount of time before returning a
communication failure error.
11. LoggerNet and PC400 users can set a Max Time On-Line to limit the amount of time the
data logger remains connected. When the data logger is contacted, communication with it
is terminated when this time limit is exceeded. A value of 0 in this field indicates that there
is no time limit for maintaining a connection to the data logger.
12. Click Next.
13. By default, the data logger does not use a security code or a PakBus encryption key.
Therefore, the Security Code can be set to 0 and the PakBus Encryption Key can be left
blank. If either setting has been changed, enter the new code or key. See Data logger
security (p. 121) for more information.
14. Click Next.
15. Review the Setup Summary. If you need to make changes, click Previous to return to a
previous window and change the settings.
Setup is now complete, and the EZSetup Wizard allows to you click Finish or click Next to test
communications, set the data logger clock, and send a program to the data logger. See Testing
communications with EZSetup (p. 41) for more information.
3.1.2 Virtual Ethernet over USB (RNDIS)
CR6 series dataloggers with OS version 7 or greater support RNDIS (virtual Ethernet over USB).
This allows the data logger to communicate via TCP/IP over USB. Watch a video
https://www.campbellsci.com/videos/ethernet-over-usb or use the following instructions.
3. Setting up the CR621
1. Supply power to the data logger. If connecting via USB for the first time, you must first
install USB drivers by using Device Configuration Utility (select your data logger, then on
the main page, click Install USBDriver). Alternately, you can install the USBdrivers using EZ
Setup. A USB connection supplies 5 V power (as well as a communication link), which is
adequate for setup, but a 12 V battery will be needed for field deployment.
NOTE:
Ensure the data logger is connected directly to the computer USB port (not to a
USBhub). We recommended always using the same USB port on your computer.
2. Physically connect your data logger to your computer using a USB cable, then in DeviceConfiguration Utility select your data logger.
3. Retrieve your IPAddress. On the bottom, left side of the screen, select IP as the Connection
Type, then click the browse button next to the Server Address box. Note the IPAddress
(default is 192.168.66.1). If you have multiple data loggers in your network, more than one
data logger may be returned. Ensure you select the correct data logger by verifying the
data logger serial number or station name (if assigned).
4. A virtual IP address can be used to connect to the data logger using Device ConfigurationUtility or other computer software, or to view the data logger internal web page in a
browser. To view the web page, open a browser and enter linktodevice.com or the IP
address you retrieved in the previous step (for example, 192.168.66.1) into the address bar.
To secure your data logger from others who have access to your network, we recommend that
you set security. For more information, see Data logger security (p. 121).
NOTE:
Ethernet over USB (RNDIS) is considered a direct communications connection. Therefore, it is
a trusted connection and csipasswd does not apply.
3.1.3 Ethernet communications option
The CR6 offers a 10/100 Ethernet connection. Use Device Configuration Utility to enter the data
logger IPAddress, Subnet Mask, and IPGateway address. After this, use the EZSetup Wizard to
set up communications with the data logger. If you already have the data logger IPinformation,
you can skip these steps and go directly to Setting up Ethernet communications between the
data logger and computer (p. 24). Watch a video
https://www.campbellsci.com/videos/datalogger-ethernet-configuration or use the following
instructions.
3. Setting up the CR622
3.1.3.1 Configuring data logger Ethernet settings
1. Supply power to the data logger. If connecting via USB for the first time, you must first
install USB drivers by using Device Configuration Utility (select your data logger, then on
the main page, click Install USBDriver). Alternately, you can install the USBdrivers using EZ
Setup. A USB connection supplies 5 V power (as well as a communication link), which is
adequate for setup, but a 12 V battery will be needed for field deployment.
2. Connect an Ethernet cable to the 10/100 Ethernet port on the data logger. The yellow and
green Ethernet port LEDs display activity approximately one minute after connecting. If you
do not see activity, contact your network administrator. For more information, see Ethernet
LEDs (p. 24).
3. Using data logger support software (LoggerNet, PC400, or PC200W), open DeviceConfiguration Utility.
4. Select the CR6 Series data logger from the list
5. Select the port assigned to the data logger from the Communication Port list. If connecting
via Ethernet, select Use IPConnection.
6. By default, this data logger does not use a PakBus encryption key; so, the PakBus
Encryption Key box can be left blank. If this setting has been changed, enter the new code
or key. See Data logger security (p. 121) for more information.
7. Click Connect.
8. On the Deployment tab, click the Ethernet subtab.
9. The Ethernet Power setting allows you to reduce the power consumption of the data
logger. If there is no Ethernet connection, the data logger will turn off its Ethernet interface
for the time specified before turning it back on to check for a connection. Select Always
On, 1 Minute, or Disable.
10. Enter the IP Address, Subnet Mask, and IP Gateway. These values should be provided by
your network administrator. A static IP address is recommended. If you are using DHCP,
note the IP address assigned to the data logger on the right side of the window. When the
IP Address is set to the default, 0.0.0.0, the information displayed on the right side of the
window updates with the information obtained from the DHCP server. Note, however, that
this address is not static and may change. An IP address here of 169.254.###.### means
the data logger was not able to obtain an address from the DHCP server. Contact your
network administrator for help.
11. Apply to save your changes.
3. Setting up the CR623
3.1.3.2 Ethernet LEDs
When the data logger is powered, and Ethernet Power setting is not disabled, the 10/100 Ethernet
LEDs will show the Ethernet activity:
l Solid Yellow: Valid Ethernet link.
l No Yellow: Invalid Ethernet link.
l Flashing Yellow: Ethernet activity.
l Solid Green: 100 Mbps link.
l No Green: 10 Mbps link.
3.1.3.3 Setting up Ethernet communications between the data logger
and computer
Once you have configured the Ethernet settings or obtained the IPinformation for your data
logger, you can set up communications between your computer and the data logger over
Ethernet. Watch a videohttps://www.campbellsci.com/videos/ezsetup-ethernet-connection
or use the following instructions.
This procedure only needs to be followed once per data logger. However, these settings can be
revised using the data logger support software Edit Datalogger Setup option.
1. Using data logger support software, open EZSetup.
l
LoggerNet users, select Setupfrom the Main category on the toolbar, click the
View menu to ensure you are in the EZ(Simplified) view, then click Add Datalogger.
l
PC400 users, click Add Datalogger.
NOTE:
PC200W does not support IP connections.
2. Click Next.
3. Select the CR6 Series from the list, enter a name for your station (for example, a site or
project name), Next.
4. Select the IPPort connection type and click Next.
5. Type the data logger IPaddress followed by a colon, then the port number of the data
logger in the Internet IPAddress box (these were set up through the Ethernet
communications option (p. 22)) step. They can be accessed in Device Configuration Utility
on the Ethernet subtab. Leading 0s must be omitted. For example:
3. Setting up the CR624
l IPv4 addresses are entered as 192.168.1.2:6785
l IPv6 addresses must be enclosed in square brackets. They are entered as
[2001:db8::1234:5678]:6785
6. The PakBus address must match the hardware settings for your data logger. The default
PakBus address is1.
l Set an Extra Response Time if you want the data logger support software to wait a
certain amount of time before returning a communications failure error.
l LoggerNet and PC400 users can set a Max Time On-Line to limit the amount of time
the data logger remains connected. When the data logger is contacted,
communications with it is terminated when this time limit is exceeded. A value of 0 in
this field indicates that there is no time limit for maintaining a connection to the data
logger. Next.
7. By default, the data logger does not use a security code or a PakBus encryption key.
Therefore the Security Code can be set to 0 and the PakBus Encryption Key can be left
blank. If either setting has been changed, enter the new code or key. See Data logger
security (p. 121). Next.
8. Review the Communication Setup Summary. If you need to make changes, click Previous to
return to a previous window and change the settings.
Setup is now complete, and the EZSetup Wizard allows you Finish or select Next. The Next steps
take you through testing communications, setting the data logger clock, and sending a program
to the data logger. See Testing communications with EZSetup (p. 41) for more information.
3.1.4 Wi-Fi communications option
By default, the CR6-WIFI is configured to host a Wi-Fi network. The LoggerLink mobile app for
iOS and Android can be used to connect with a CR6-WIFI. Up to eight devices can connect to a
network created by a CR6. The setup follows the same steps shown in this video: CR6-WIFI
Datalogger - Setting Up a Network.
NOTE:
The user is responsible for emissions if changing the antenna type or increasing the gain.
See also Communications specifications (p. 234).
3.1.4.1 Configuring the data logger to host a Wi-Fi network
By default, the CR6-WIFI is configured to host a Wi-Fi network. If the settings have changed, you
can follow these instructions to reconfigure it.
3. Setting up the CR625
1. Ensure your CR6-WIFI is connected to an antenna and power.
2. Using Device Configuration Utility, connect to the data logger.
3. On the Deployment tab, click the Wi-Fi sub-tab.
4. In the Configuration list, select the Create a Network option.
5. Optionally, set security on the network to prevent unauthorized access by typing a
password in the Password box (recommended).
6. Apply your changes.
3.1.4.2 Connecting your computer to the data logger over Wi-Fi
1. Open the Wi-Fi network settings on your computer.
2. Select the Wi-Fi-network hosted by the data logger. The default name is CR6 followed by
the serial number of the data logger. In the previous image, the Wi-Fi network is CRxxx.
3. If you set a password, select the Connect Using a Security Key option (instead of a PIN) and
type the password you chose.
4. Connect to this network.
3.1.4.3 Setting up Wi-Fi communications between the data logger and
the data logger support software
1.
Using LoggerNet or PC400, click Add Dataloggerto launch the EZSetup Wizard. For
LoggerNet users, you must first click Setup, then View menu to ensure you are in the EZ
(Simplified) view, then click Add Datalogger.
3. Setting up the CR626
NOTE:
PC200W does not support IP connections.
2. Select the IPPort connection type and click Next.
3. In the Internet IPAddress field, type 192.168.67.1. This is the default data logger
IPaddress created when the CR6-WIFI creates a network.
4. Click Next.
5. The PakBus address must match the hardware settings for your data logger. The default
PakBus address is 1.
l Set an Extra Response Time if you want the data logger support software to wait a
certain amount of time before returning a communication failure error. This can
usually be left at 00 seconds.
l You can set a Max Time On-Line to limit the amount of time the data logger remains
connected. When the data logger is contacted, communication with it is terminated
when this time limit is exceeded. A value of 0 in this field indicates that there is no
time limit for maintaining a connection to the data logger.
6. Click Next.
7. By default, the data logger does not use a security code or a PakBus encryption key.
Therefore, the Security Code can be left at 0 and the PakBus Encryption Key can be left
blank. If either setting has been changed, enter the new code or key. See Data logger
security (p. 121) for more information.
8. Click Next.
9. Review the Communication Setup Summary. If you need to make changes, click the
Previous button to return to a previous window and change the settings.
Setup is now complete, and the EZSetup Wizard allows you click Finish or click Next to test
communications, set the data logger clock, and send a program to the data logger. See Testing
communications with EZSetup (p. 41) for more information.
3.1.4.4 Configuring data loggers to join a Wi-Fi network
By default, the CR6-WIFI is configured to host a Wi-Fi network. To set it up to join a network:
1. Ensure your CR6-WIFI is connected to an antenna and power.
2. Using Device Configuration Utility, connect to the data logger.
3. On the Deployment tab, click the Wi-Fi sub-tab.
4. In the Configuration list, select the Join a Network option.
3. Setting up the CR627
5.
Next to the Network Name (SSID) box, click Browseto search for and select a Wi-Fi
network. To join a hidden network, manually enter its SSID.
6. If the network is a secured network, you must enter the password in the Password box and
add any additional security in the Enterprise section of the window.
7. Enter the IP Address, Network Mask, and Gateway. These values should be provided by
your network administrator. A static IP address is recommended.
l Alternatively, you can use an IP address assigned to the data logger via DHCP. To do
this, make sure the IP Address is set to 0.0.0.0. Click Apply to save the
configuration changes. Then reconnect. The IP information obtained through DHCP
is updated and displayed in the Status section of the Wi-Fi subtab. Note, however,
that this address is not static and may change. An IP address here of
169.254.###.### means the data logger was not able to obtain an address from the
DHCP server. Contact your network administrator for help.
8. Apply your changes.
9. For each data logger you want to connect to network, you must follow the instruction in
Setting up Wi-Fi communications between the data logger and the data logger support
software (p. 26), using the IP address used to configure that data logger (step 7 in this
instruction).
3.1.4.5 Wi-Fi LED indicator
When the data logger is powered, the Wi-Fi LED will turn on according to Wi-Fi communication
states:
lOff: Insufficient power, Wi-Fi disabled, or data logger failed to join or create a network
(periodic retries will occur).
lSolid for 2 seconds: Attempting to join or create a network.
lFlashing: Successfully joined or created a network. Flashes with network activity and once
every four seconds.
3.1.5 Radio communications option
CR6-RF data loggers include radio options. The RF407-series frequency-hopping spreadspectrum (FHSS) radio options include the RF407, RF412, RF422, and RF427. The RF451, another
radio option, has a 902-to-928 MHz operating-frequency range typically used for long-range
communications. RF407-series are designed for license-free use in several countries:
l The RF407 option has a 902 to 928 MHz operating-frequency range appropriate for use in
the United States and Canada (FCC / IC compliant).
3. Setting up the CR628
l The RF412 option has a 915 to 928 MHz operating-frequency range appropriate for use in
Australia and New Zealand (ACMA compliant).
l The RF422 option has an 863 to 873 MHz operating-frequency range appropriate for use in
most of Europe and some of Asia (ETSI compliant).
l The RF427 option has a 902 to 907.5 MHz/915 to 928 MHz operating-frequency range
appropriate for use in Brazil.
l The RF451 option has a 902 to 928 MHz operating-frequency range appropriate for use in
the United States and Canada (FCC / IC compliant). This radio option is typically used for
long-range communications.
NOTE:
This equipment has been tested and found to comply with the limits for a Class A digital
device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable
protection against harmful interference when the equipment is operated in a commercial
environment. This equipment generates, uses, and can radiate radio frequency energy and, if
not installed and used in accordance with the instruction manual, may cause harmful
interference to radio communications. Operation of this equipment in a residential area is
likely to cause harmful interference in which case the user will be required to correct the
interference at his or her own expense.
Radio options cannot be mixed within a network. An RF407 can only be used with other RF407type radios, an RF412 can only be used with other RF412-type radios, an RF422 can only be used
with other RF422-type radios, RF427 can only be used with other RF427-type radios, and an
RF451 can only be used with other RF451-type radios.
Throughout these instructions, RF407-series represents each of the RF407, RF412, RF422, and
RF427 radio options, unless otherwise noted. Similarly, the RF407-series standalone, or
independent radio represents each of the RF407, RF412, RF422, and RF427 models, unless
otherwise noted.
3.1.5.1 Configuration options
The most frequently used configurations with the RF-series data logger and RF-series radio
include the following:
3. Setting up the CR629
See also RF radio option specifications (p. 236).
3.1.5.2 RF407-Series radio communications with one or more data
loggers
To configure an RF407-series radio to communicate with the data logger, you must complete the
following steps (instruction follows):
l Ensure your data logger and RF407-series radio are connected to an antenna and power.
l Configure the connection to the RF407-series device using Device Configuration Utility.
l If you are connecting to multiple data loggers, you will have to assign unique PakBus
addresses to each data logger using Device Configuration Utility. (Connect to each data
logger, set the PakBus Address on the Deployment | Datalogger tab.)
l Use data logger support software to set up communications between the RF407-series
radio and the data loggers.
NOTE:
This procedure assumes the RF407 series devices are using factory default settings.
Configuring the RF407-Series radio
Configure the RF407-Series radio connected to the computer (see image in Configuration
options (p. 29) for reference).
3. Setting up the CR630
1. Ensure your RF407-series radio is connected to an antenna and power.
2. If connecting via USB for the first time, you must first install USBdrivers using DeviceConfiguration Utility (select your radio, then on the main page, click Install USBDriver).
Plug the RF407-series radio to your computer using a USB or RS-232 cable.
3. Using Device Configuration Utility, select the Communication Port used for your radio and
connect to the RF407-series radio.
4. On the Main tab, set the Active Interface to USB or RS-232 (depending on how your
computer will be connected to the RF407-series radio).
5. Apply the changes.
6. Connect the RF407-Series radio to the computer communication port selected in the
previous step.
Setting up communications between the RF407-Series data logger and the computer
These instructions provide an easy way to set up communications between the RF407-series data
logger and the computer connected to the RF407-series radio (as configured in previous
instructions). Follow these instructions multiple times to set up multiple data loggers. In this case,
each data logger must be given a unique PakBus address (see PakBus communications (p. 111)
for more information). For more complicated networks, it is recommended that you use Network
Planner.
1. Supply 12 VDC power to the data logger.
2. Ensure the data logger antenna is connected.
3. Using data logger support software, launch the EZSetup Wizard and add the data logger.
l
PC200W and PC400 users, click Add Datalogger.
l
LoggerNet users, click Setup, click the View menu to ensure you are in the EZ
(Simplified) view, then click Add Datalogger.
4. Click Next.
5. Select the CR6Series data logger from the list, type a name for your data logger (for
example, a site or project name), and click Next.
6. If prompted, select the Direct Connect connection type and click Next.
7. Select the communication port used to communicate with the RF407-series radio from the
COM Port list. (Note that the RF407-series radio to RF407-series data logger link is not
indicated in the LoggerNet Setup Standard View.)
3. Setting up the CR631
8. Accept the default value of 00 seconds in the COM Port Communication Delay - this box is
used to allow time for hardware devices to "wake up" and negotiate a communications
link. Click Next.
9. In the previous instruction "Configuring a Connection to an RF407-Series Radio," you were
asked to select an active interface option of USB or RS-232. If you selected USBas the
active interface for the radio, you do not need to select a baud rate. If you selected RS-232,
set the baud rate to the one chosen during that step. The radio's default baud rate is
115200. The PakBus address must match the hardware settings for your data logger. The
default PakBus Address is 1.
10. Click Next.
11. By default, the data logger does not use a security code or a PakBus encryption key.
Therefore, the Security Code can be left at 0 and the PakBus Encryption Key can be left
blank. If either setting has been changed, enter the new code or key. See Data logger
security (p. 121) for more information.
12. Click Next.
13. Review the Communication Setup Summary. If you need to make changes, click the
Previous button to return to a previous window and change the settings.
Setup is now complete, and the EZSetup Wizard allows you to click Finish or click Next to test
communications, set the data logger clock, and send a program to the data logger. See Testing
communications with EZSetup (p. 41) for more information.
If you experience network communications problems, see Troubleshooting Radio
Communications (p. 145) for assistance.
3.1.5.3 RF407-Series radio communications with multiple data loggers
using one data logger as a router
This type of network configuration is useful for communicating around an obstacle, such as a hill
or building, or to reach longer distances.
To configure an RF407-series radio to communicate with multiple data loggers through a router,
you must complete the following steps (instruction follows):
3. Setting up the CR632
l Ensure your data loggers and RF407-series radios are each connected to an antenna and
power.
l Configure your connection to the RF407-series devices using Device Configuration Utility.
l Assign unique PakBus addresses to each data logger using Device Configuration Utility.
(Connect to each data logger, and set the PakBus Address on the Deployment | Datalogger
tab.)
l Configure the data logger acting as a router.
l Use data logger support software to set up communications between the computer and the
data loggers.
Configuring the RF407-Series radio
Configure the RF407-Series radio connected to the computer (see previous image for reference).
1. Ensure your RF407-series radio is connected to an antenna and power.
2. If connecting via USB for the first time, you must first install USBdrivers using DeviceConfiguration Utility (select your radio, then on the main page, click Install USBDriver).
Plug the RF407-series radio to your computer using a USB or RS-232 cable.
3. Using Device Configuration Utility, select the Communication Port used for your radio and
connect to the RF407-series radio.
4. On the Main tab, set the Active Interface to USB or RS-232 (depending on how your
computer will be connected to the RF407-series radio).
5. Apply the changes.
6. Connect the RF407-Series radio to the computer communication port selected in the
previous step.
Configuring the data logger acting as a router
1. Supply power to the data logger. If connecting via USB for the first time, you must first
install USB drivers by using Device Configuration Utility (select your data logger, then on
the main page, click Install USBDriver). Alternately, you can install the USBdrivers using EZ
Setup. A USB connection supplies 5 V power (as well as a communication link), which is
adequate for setup, but a 12 V battery will be needed for field deployment. Ensure the data
logger antenna is connected.
2. Using Device Configuration Utility , connect to the RF407-series data logger that will serve
as a router.
3. On the Deployment > Datalogger tab, assign a unique PakBus Address (see PakBus
communications (p. 111) for more information).
3. Setting up the CR633
4. On the Deployment tab, click the Com Ports Settings sub-tab.
5. From the Select the ComPort list, select RF.
6. Set the Beacon Interval to 60 seconds (or the amount of time you are willing to wait for the
leaf data loggers in the network to be discovered).
NOTE:
A beacon is a packet broadcast at a specified interval intended to discover neighbor
devices.
7. Set the Verify Interval to something slightly greater than the expected communications
interval between the router and the other (leaf) data loggers in the network (for example,
90 seconds).
8. Click the Advanced sub-tab and set Is Router to True.
9. Apply your changes.
Adding routing data logger to LoggerNet network
1.
Using LoggerNet, click Setupand click the View menu to ensure you are in the
Standard view.
2.
Click Add Root.
3. Click ComPort, then PakBusPort (PakBus Loggers), then CR6Series.
4. Click Close.
5. In the Entire Network pane on the left side of the window, select the ComPort.
6. On the Hardware tab on the right, click the ComPort Connection list and select the
communication port assigned to the RF407-series radio.
7. In the Entire Network pane on the left side of the window, select PakBusPort.
8. On the Hardware tab on the right, select the PakBus Port Always Open check box.
l If you would like to prevent the possibility of LoggerNet communicating with any
other data loggers in the network without going through the router, set the Beacon
Interval to 00 h 00 m 00s.
9. In the Entire Network pane on the left side of the window, select the router data logger
(CR6Series) from the list.
10. On the Hardware tab on the right, type the PakBus Address you assigned to the router data
logger in Device Configuration Utility.
3. Setting up the CR634
11.
Optionally, click the Rename button () to provide the data logger a descriptive name.
12. Apply your changes.
Adding leaf data loggers to the network
1.
In the LoggerNet Standard Setup view (click the Setup () option and click the View menu
to ensure you are in the Standard view), right-click on the router data logger in the Entire
Network pane on the left side of the window and select CR6Series.
2. With the newly added data logger selected in the Entire Network pane, set the PakBus
Address to the address that was assigned to the leaf data logger in Device ConfigurationUtility.
3. Click Rename. Enter a descriptive name for the data logger.
4. Apply your changes.
5. Repeat these steps for each leaf data logger in the network.
If you experience problems with network communications, see Troubleshooting Radio
Communications (p. 145) for assistance.
Using additional communications methods
Using similar instructions, a RF407-series data logger can be used in a system with additional
communication methods. For example, in the following image, the router RF407-series data
logger communicates with LoggerNet through an RV50 cellular modem connected to RF407-
series data logger using the RS-232 port. The router RF407-series data logger communicates with
the leaf RF407-series data loggers over RF.
3.1.5.4 RF451 radio communications with one or more dataloggers
To configure an RF451 radio to communicate with the data logger, you must complete the
following steps (detailed instruction follows):
l Ensure your data logger and RF451 radio are connected to an antenna and power.
l Configure the RF451 radio that will be connected to the computer using Device
Configuration Utility.
3. Setting up the CR635
l If you are connecting to multiple dataloggers, you will have to assign unique PakBus
addresses to each data logger using Device Configuration Utility. (Connect to each data
logger, set the PakBus Address on the Deployment | Datalogger tab.)
l Use data logger support software to set up communications between the computer with
the RF451 radio and the dataloggers.
Configuring the RF451 radio connected to the computer
Configure the RF451 radio connected to the computer (see image in Configuration options (p.
29) for reference).
1. Ensure your RF451 radio is connected to an antenna and power.
2. If connecting via USB for the first time, you must first install USBdrivers using DeviceConfiguration Utility (select your radio, then on the main page, click Install USBDriver).
Plug the RF451 radio to your computer using a USB cable.
3. Using Device Configuration Utility, connect to the RF451 radio.
4. On the Deployment tab, set the Active Interface to USB or RS-232 (depending on how your
computer will be connected to the radio).
5. Set the Radio Operation Mode to Multi-Point Master.
6. In the Network IDfield, type a unique number between 0 and 4095 (excluding 255). This is
used to communicate with RF451 devices in the network. Make note of this number. All
radios in the network require the same Network ID.
7. Select a Frequency Key between 0 and 14 and make note of this number. Generally all
radios in the network will have the same Frequency Key.
8. Apply the changes.
9. Connect the RF451 radio to the computer communication port selected in the previous
step.
Configuring slave RF451 dataloggers
Follow these instructions multiple times to set up multiple dataloggers. In this case, each must be
given a unique name and PakBus address. For more complicated networks, it is recommended
that you use Network Planner.
1. Ensure your RF451 data logger is connected to an antenna and power.
2. Using Device Configuration Utility, connect to the RF451 data logger.
3. On the Deployment | Datalogger tab, assign a unique PakBus address.
3. Setting up the CR636
4. On the Deployment | RF451 tab, set the Radio Operation Mode to Point to Multi-Point
Slave.
5. In the Network IDfield, type the same number set in the previous instruction: "Configuring
a Connection to an RF451 Radio."
6. Select the same Frequency Key set in the previous instruction: "Configuring a Connection
to an RF451 Radio."
7. Apply the changes.
Setting up communications between the RF451 data logger and the computer
These instructions provide an easy way to set up communications between the RF451 data logger
and the computer with an RF451 radio. Follow these instructions multiple times to set up multiple
dataloggers. For more complicated networks, it is recommended that you use Network Planner.
1. Ensure the data logger is connected to an antenna and power.
2. Connect the RF451 data logger to the computer communication port that was selected as
the active interface in Device Configuration Utility.
3. Using data logger support software, launch the EZSetup Wizard and add the data logger.
l
PC200W and PC400 users, click Add Datalogger.
l
LoggerNet users, click Setup, then the View menu to ensure you are in the EZ
(Simplified) view, then click the Add Datalogger button.
4. Click Next.
5. Select the CR6Series data logger from the list, type a name for your data logger (for
example, a site or project name), and click Next.
6. If prompted, select the Direct Connect connection type and click Next.
7. Select the communication port used to communicate with the RF451 from the COM Port
list.
8. Accept the default value of 00 seconds in the COM Port Communication Delay - this box is
used to allow time for hardware devices to "wake up" and negotiate a communications
link. Click Next.
9. You do not need to select a baud rate. The PakBus address must match the hardware
settings for your data logger.
10. Click Next.
11. By default, the data logger does not use a security code or a PakBus encryption key.
Therefore, the Security Code can be left at 0 and the PakBus Encryption Key can be left
3. Setting up the CR637
blank. If either setting has been changed, enter the new code or key. See Data logger
security (p. 121) for more information.
12. Click Next.
13. Review the Communication Setup Summary. If you need to make changes, click the
Previous button to return to a previous window and change the settings.
Setup is now complete, and the EZSetup Wizard allows you to click Finish or click Next to test
communications, set the data logger clock, and send a program to the data logger. See Testing
communications with EZSetup (p. 41) for more information.
If you experience problems with network communications, see Troubleshooting Radio
Communications (p. 145) for assistance.
3.1.5.5 RF451 radio communications with multiple dataloggers using
one data logger as a repeater
This type of network configuration is useful for communicating around an obstacle, such as a hill
or building, or to reach longer distances.
To configure an RF451 radio to communicate with multiple dataloggers, you must complete the
following steps (instruction follows):
l Ensure your dataloggers and RF451 radios are each connected to an antenna and power.
l Configure your connection to the RF451 devices using Device Configuration Utility.
l Assign unique PakBus addresses to each data logger using Device Configuration Utility.
(Connect to each data logger, and set the PakBus Address on the Deployment | Datalogger
tab.)
l Configure one data logger to act as a repeater.
l Use data logger support software to set up communication between the computer and the
dataloggers.
3. Setting up the CR638
Configuring the RF451 radio connected to the computer
Configure the RF451 radio connected to the computer (see previous image for reference).
1. Ensure your RF451 radio is connected to an antenna and power.
2. Using Device Configuration Utility, connect to the RF451 radio.
3. On the Main tab, set the Active Interface to USB or RS-232 (depending on how your
computer will be connected to the radio).
4. Set the Radio Operation Mode to Multi-Point Master. In the Network ID box, type a unique
number between 0 and 4095 (excluding 255). This is used to communicate with RF451
devices in the network. Make note of this number. All radios in the network require the
same Network ID.
5. In the Frequency Key box, type a number between 0 and 14, and make note of this number.
Generally, all radios in the nework will have the same Frequency Key.
6. Check the Repeaters Used box.
7. Apply your changes.
Configuring the data logger acting as a repeater
1. Supply power to the data logger. If connecting via USB for the first time, you must first
install USB drivers by using Device Configuration Utility (select your data logger, then on
the main page, click Install USBDriver). Alternately, you can install the USBdrivers using EZ
Setup. A USB connection supplies 5 V power (as well as a communication link), which is
adequate for setup, but a 12 V battery will be needed for field deployment. Ensure the data
logger antenna is connected.
2. Using Device Configuration Utility, connect to the RF451 data logger.
3. On the Deployment tab, click the Com Ports Settings sub-tab.
4. From the Select the ComPort list, select RF.
3. Setting up the CR639
5. Set the Beacon Interval to 60 seconds (or the amount of time you are willing to wait for the
leaf dataloggers in the network to be discovered).
NOTE:
A beacon is a packet broadcast at a specified interval intended to discover neighbor
devices.
6. Set the Verify Interval to something slightly greater than the expected communication
interval between the repeater and the other (leaf) dataloggers in the network (for example,
90 seconds).
7. Click the RF451 sub-tab and check the Repeaters Used box.
8. Also on the RF451 sub-tab, set the Radio Operation Mode to Point to Multi-Point
Slave/Repeater. In the Network ID box, type the same number set in the previous
instruction ("Configuring the RF451 Radio Connected to the Computer").
9. In the Frequency Key box, type the same number set in the previous instruction
("Configuring the RF451 Radio Connected to the Computer").
10. Apply your changes.
Adding the repeater data logger to the LoggerNet network
To add the repeater data logger to the LoggerNet network, follow the instructions found in
Setting up communications between the RF451 data logger and the computer (p. 37).
Adding leaf dataloggers to the network
1.
In the LoggerNet Standard Setup view (click Setupand then the View menu to ensure
you are in the Standard view), right-click on the repeater data logger in the Entire Network
pane on the left side of the window and select CR6Series.
2. With the newly added data logger selected in the Entire Network pane, set the PakBus
Address to the address that was assigned to the leaf data logger in Device ConfigurationUtility.
3. Setting up the CR640
3. Click Rename. Enter a descriptive name for the data logger.
4. Apply your changes.
5. Repeat these steps for each leaf data logger in the network.
If you experience problems with network communications, see Troubleshooting Radio
Communications (p. 145) for assistance.
Using additional communication methods
Using similar instructions, an RF451 data logger can be used in a system with additional
communication methods. For example, in the following image, the router RF451 data logger
communicates with LoggerNet through an RV50 cellular modem connected to RF451 data logger
using the RS-232 port. The router RF451 data logger communicates with the leaf RF451
dataloggers over RF.
3.2 Testing communications with EZSetup
1. Using data logger support software EZSetup, access the Communication Test window. This
window is accessed during EZ Setup (see USB or RS-232 communications (p. 20) for more
information). Alternatively, you can double-click a data logger from the station list to open
the EZ Setup Wizard and access the Communication Test step from the left side of the
window.
3. Setting up the CR641
2. Ensure the data logger is connected to the computer, select Yes to test communications,
then click Next to initiate the test. To troubleshoot an unsuccessful test, see Tips and
troubleshooting (p. 137).
3. With a successful connection, the Datalogger Clock window displays the time for both the
data logger and the computer.
l The Adjusted Server Date/Time displays the current reading of the clock for the
computer or server running your data logger support software. If the Datalogger
Date/Time and Adjusted Server Date/Time don't match, you can set the data logger
clock to the Adjusted Server Date/Time by clicking Set Datalogger Clock.
l Use the Time Zone Offset to specify a positive or negative offset to apply to the
computer time when setting the data logger clock. This offset will allow you to set
the clock for a data logger that needs to be set to a different time zone than the time
zone of the computer (or to accommodate for changes in daylight saving time).
4. Click Next.
5. The data logger ships with a default GettingStarted program. If the data logger does not
have a program, you can choose to send one by clicking Select and Send Program. Click
Next.
6. LoggerNet only - Use the following instructions or watch the Scheduled/Automatic Data
Collection video:
3. Setting up the CR642
l The Datalogger Table Output Files window displays the data tables available to be
collected from the data logger and the output file name. By default, all data tables
set up in the data logger program will be included for collection. Make note of the
Output File Name and location. Click Next.
l Check Scheduled Collection Enabled to have LoggerNet automatically collect data
from the data logger on the Collection Interval entered. When the Base Date and
Time are in the past, scheduled collection will begin immediately after finishing the
EZSetup wizard. Click Next twice.
7. Click Finish.
3.3 Making the software connection
Once you have configured your hardware connection (see Setting up communications with the
data logger (p. 19), your data logger and computer can communicate. You'll use the Connect
screen to send a program, set the clock, view real-time data, and manually collect data.
l
LoggerNet users, select Main and Connecton the LoggerNet toolbar, select the data
logger from the Stations list, then Connect.
l
PC400 and PC200W users, select the data logger from the list and click Connect.
To disconnect, click Disconnect.
For more information see the Connect Window Tutorial.
3.4 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 control external devices. 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 .CR6, .CRB or .DLD.
Data logger programs are executed on a precise schedule termed the scan interval, based on the
data logger internal clock.
Measurements are first stored in temporary memory called variables in the Public Table. Variables
are usually overwritten each scan. Periodically, generally on a time interval, the data logger stores
data in tables. The Data Tables are later copied to a computer using your data logger support
software.
3. Setting up the CR643
Use Short Cut software to generate a program for your data logger. ShortCut is included with
your data logger support software.
This section will guide you through programming a CR6 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. Use the following
instructions or watch the Quickstart part 2 video.
1. Using data logger support software, launch ShortCut.
l
LoggerNet users, click Program then ShortCut.
l
PC400 and PC200W users, click ShortCut.
2. Click Create New Program.
3. Select CR6 Series and click Next.
NOTE:
The first time ShortCut 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.
4. A list of Available Sensors and Devices and Selected Measurements Available for Output
display. Battery voltage BattV and internal temperature PTemp_C are selected by
default. During operation, battery and temperature should be recorded at least daily to
assist in monitoring system status.
5. 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.
6. 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:
l 1 Type TTCsensor
l Temp_C as the Temperature label, and set the units to Deg C
l PTemp_C as the Reference Temperature Measurement.
7. Click OK.
3. Setting up the CR644
8. 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.
9. 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.
10. Type 1 in the How often should the data logger measure its sensor(s)? box.
11. 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.
12. In the Table Name box, type a name for the table. For example:OneMin.
13. Select a Data Output Storage Interval. For example: to 1 minute.
14. Click Next.
15. 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.
16. Click Finish and give the program a meaningful name such as a site identifier. Click Save.
17. 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 (p. 43) 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 (p. 46).
3. Setting up the CR645
TIP:
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 (p. 49) for detailed instruction.
If your data acquisition requirements are simple, you can probably create and maintain a data
logger program exclusively with ShortCut. If your data acquisition needs are more complex, the
files that ShortCut 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
https://help.campbellsci.com/crbasic/cr6/.
NOTE:
Once a Short Cut generated program has been edited with CRBasic Editor, it can no longer
be modified with ShortCut.
3.5 Sending a program to the data logger
TIP:
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 (p. 49) for detailed instruction.
Some methods of sending a program give the option to retain data when possible. Regardless of
the program upload tool used, data will be erased when a new program is sent if any change
occurs to one or more data table structures in the following list:
l Data table name(s)
l Data output interval or offset
l Number of fields per record
l Number of bytes per field
l Field type, size, name, or position
l Number of records in table
Use the following instructions or watch the Quickstart part 3 video.
1. Connect the data logger to your computer (see Making the software connection (p. 43) for
more information).
2. Using your data logger support software, click Send New... or Send Program (located in the
Current Program section on the right side of the window).
3. Navigate to the program, select it, and click Open. For example: navigate to
C:\Campbellsci\SCWin and select MyTemperature.CR6.
3. Setting up the CR646
4. Confirm that you would like to proceed and erase all data tables saved on the data logger.
The program will send and compile.
5. Review the Compile Results window for errors, messages and warnings.
6. Click Details, select the Table Fill Times tab. Ensure that the times shown are expected for
your application. Click OK.
After sending a program, it is a good idea to monitor the Public Table to make sure sensors are
taking good measurements. See Working with data (p. 48) for more information.
3. Setting up the CR647
4. Working with data
4.1 Default data tables
By default, the data logger includes three tables: Public, Status, and DataTableInfo. Each of these
tables only contains the most recent measurements and information.
l The Public table is configured by the data logger program, and updated at the scan
interval set within the data logger program, It shows measurement and calculation results
as they are made.
l The Status table includes information about the health of the data logger and is updated
only when viewed.
l The DataTableInfo table reports statistics related to data tables. It also only updates when
viewed.
l User-defined data tables update at the schedule set within the program.
For information on collecting your data, see Collecting data (p. 49).
Use these instructions or follow the Connect Window tutorialto monitor real-time data.
LoggerNet users, select the Main category and Connecton the LoggerNet toolbar, select the
data logger from the Stations list, then click Connect. Once connected, select a table to view
using the Table Monitor.
PC400 and PC200Wusers, click Connect, then Monitor Data. When this tab is first opened for
a data logger, values from the Public table are displayed. To view data from other tables, click
Add, select a table or field from the list, then drag it into a cell on the Monitor Data tab.
4. Working with data48
4.2 Collecting data
The data logger writes to data tables based on intervals and conditions set in the CRBasic
program (see Creating data tables in a program (p. 57) for more information). After the program
has been running for enough time to generate data records, data may be collected by using data
logger support software. During data collection, data is copied to the computer and still remains
on the data logger. Collections may be done manually, or automatically through scheduled
collections set in LoggerNet Setup. Use these instruction or follow the Collect Data Tutorial.
4.2.1 Collecting data using LoggerNet
1.
From the LoggerNet toolbar, click Main and Connect, select the data logger from the
Stations list, then Connect.
2.
Click Collect Now.
3. After the data is collected, the Data Collection Results window displays the tables collected
and where they are stored on the computer.
4. Select a data file, then View File to view the data. See Viewing historic data (p. 50)
4.2.2 Collecting data using PC200W or PC400
1.
Click Connecton the main PC200W or PC400 window.
2. Go to the Collect Data tab.
4. Working with data49
3. Select an option for What to Collect. Either option creates a new file if one does not
already exist.
l New data from data logger (Append to data files): Collects only the data in the
selected tables stored since the last data collection and appends this data to the end
of the existing table files on the computer. This is the default, and most often used
option.
l All data from data logger (Overwrite data files): Collects all of the data in the selected
tables and replaces the existing data files on the computer.
4. By default, all output tables set up in the data logger program are selected for collection.
5. Click Start Data Collection.
6. After the data is collected, the Data Collection Results window displays the tables collected
and where they are stored on the computer.
7. Select a data file, then View File to view the data. See Viewing historic data (p. 50)
4.3 Viewing historic data
Open data files using View Pro. View Pro contains tools for reviewing data in tabular form as well
as several graphical layouts for visualization. Use these instructions or follow the View Data
Tutorial.
Once the data logger has had enough time to store multiple records, you should collect and
review the data.
1. To view the most recent data, connect the data logger to your computer and collect your
data (see Collecting data (p. 49) for more information).
2. Open View Pro:
l
LoggerNet users click Data then View Proon the LoggerNet toolbar.
l
PC200W and PC400 users click View Data Files via View Pro.
3.
Click Open, navigate to the directory where you saved your tables (the default directory
is C:\Campbellsci\[your data logger software application]). For example: navigate to the
C:\Campbellsci\LoggerNet folder and select OneMin.dat.
4.4 Data types and formats
Data takes different formats as it is created and manipulated in the data logger, as it is displayed
through software, and as it is retrieved to a computer file. It is important to understand the
different data types, formats and ranges, and where they are used.
4. Working with data50
Table 4-1: Data types, ranges and resolutions
Data typeDescriptionRangeResolutionWhere used
Float
IEEE four-byte
floating point
four-byte
Long
signed integer
four-byte
Boolean
signed integer
+/–1.8 *10^–38 to
+/–3.4 *10^38
–2,147,483,648 to
+2,147,483,647
–1, 0
24 bits
variables
(about 7 digits)
1 bitvariables, output
True (–1) or
False ( 0)
variables,
sample output
variables,
StringASCII String
sample output
IEEE four-byte
+/–1.8 *10^–38 to
24 bits
internal calculations,
IEEE4
floating point
IEEE eight-byte
+/–3.4 *10^38
+/–2.23 *10^–308 to
(about 7 digits)
53 bits
output
internal calculations,
IEEE8
floating point
Campbell Scientific
FP2
two-byte floating point
+/–1.8 *10^308
–7999 to +7999
(about 16 digits)
13 bits
(about 4 digits)
output
output
NSECeight-byte time stampnanosecondsvariables, output
4.4.1 Variables
In CRBasic, the declaration of variables (via the DIM or the PUBLIC statement) allows an
optional type descriptor As that specifies the data type. The data types are Float, Long,
Boolean, and String. The default type is Float.
Example variables declared with optional data types
Public PTemp As Float, Batt_volt
Public Counter As Long
Public SiteName As String * 24
As Float specifies the default data type. If no data type is explicitly specified with the As
statement, then Float is assumed. Measurement variables are stored and calculations are
performed internally in IEEE 4 byte floating point with some operations calculated in double
precision. A good rule of thumb is that resolution will be better than 1 in the seventh digit.
As Long specifies the variable as a 32 bit integer. There are two possible reasons a user would
do this: (1) speed, since the CR6 Operating System can do math on integers faster than with
Floats, and (2) resolution, since the Long has 31 bits compared to the 24 bits in the Float. A
good application of the As Long declaration is a counter that is expected to get very large.
4. Working with data51
As Boolean specifies the variable as a 4 byte Boolean. Boolean variables are typically used for
flags and to represent conditions or hardware that have only 2 states (e.g., On/Off, High/Low). A
Boolean variable uses the same 32 bit long integer format as a Long but can set to only one of
two values: True, which is represented as –1, and false, which is represented with 0. When a
Float or Long integer is converted to a Boolean, zero is False (0), any non-zero value will set
the Boolean to True (-1). The Boolean data type allows application software to display it as an
On/Off, True/False, Red/Blue, etc.
The CR6 uses –1 rather than some other non-zero number because the AND and OR operators
are the same for logical statements and binary bitwise comparisons. The number -1 is expressed
in binary with all bits equal to 1, the number 0 has all bits equal to 0. When –1 is anded with any
other number the result is the other number, ensuring that if the other number is non-zero (true),
the result will be non-zero.
As String * size specifies the variable as a string of ASCII characters, NULL terminated,
with an optional size specifying the maximum number of characters in the string. A string is
convenient in handling serial sensors, dial strings, text messages, etc. When size is not specified,
a default of 24 characters will be used (23 usable bytes and 1 terminating byte).
As a special case, a string can be declared As String * 1. This allows the efficient storage of a
single character. The string will take up 4 bytes in memory and when stored in a data table, but it
will hold only one character.
Structures (StructureType/EndStructureType) are an advanced technique used to
organize variables and display data in a structured manner. They can significantly shorten
program code, especially for instructions that output an array of values, such as AVW200(),GPS(),
and SDI12Recorder(). For example, a single StructureType may be used to organize
and display data for multiple vibrating wire sensors or many SDI-12 sensors without creating
aliases for each sensor. See the CRBasic Editor help for detailed instruction information and
program examples: https://help.campbellsci.com/crbasic/cr6/.
4.4.2 Constants
The Const declaration is used to assign a name that can be used in place of a value in the data
logger CRBasic program. Once a value is assigned to a constant, each time the value is needed in
the program, the programmer can type in the constant name instead of the value itself. The use
of the Const declaration can make the program easier to follow, easier to modify, and more
secure against unintended changes. Unlike variables, constants cannot be changed while the
program is running.
Constants must be defined before they are used in the program. Constants can be defined in a
ConstTable/EndConstTable construct allowing them to be changed using the keyboard
display, the C command in terminal mode, or via a custom menu.
4. Working with data52
Constants can also be typed For example:Const A as Long = 9999, and Const B as String =
“MyString”. Valid data types for constants are: Long, Float, Double, and String. Other
data types return a compile error.
When the CRBasic program compiles, the compiler determines the type of the constant (Long,
Float, Double, or String) from the expression. This data type is communicated to the
software. The software formats or restricts the input based on the data type communicated to it
by the data logger.
You can declare a constant with or without specifying a data type. If a data type is not specified,
the compiler determines the data type from the expression. For example: Const A = 9999 will
use the Long data type. Const A = 9999.0 will use the Floatdata type.
4.4.3 Data storage
Data can be stored in either IEEE4 or FP2 formats. The format is selected in the program
instruction that outputs the data, i.e. minimum, maximum, etc.
While Float (IEEE 4 byte floating point) is used for variables and internal calculations, FP2 is
adequate for most stored data. Campbell Scientific 2 byte floating point (FP2) provides 3 or 4
significant digits of resolution, and requires half the memory space as IEEE4 (2 bytes per value
vs 4).
Table 4-2: Resolution and range limits of FP2 data
ZeroMinimum magnitude Maximum Magnitude
0.000±0.001±7999.
The resolution of FP2 is reduced to 3 significant digits when the first (left most) digit is 8 or
greater. Thus, it may be necessary to use IEEE4 output or an offset to maintain the desired
resolution of a measurement. For example, if water level is to be measured and output to the
nearest 0.01 foot, the level must be less than 80 feet for FP2 output to display the 0.01 foot
increment. If the water level is expected to range from 50 to 90 feet the data could either be
output in IEEE4 or could be offset by 20 feet (transforming the range to 30 to 70 feet).
Table 4-3: FP2 decimal location
Absolute valueDecimal location
0 – 7.999X.XXX
8 – 79.99XX.XX
80 – 799.9XXX.X
800 – 7999.XXXX.
4. Working with data53
NOTE:
String and Boolean variables can be output with the Sample() instruction. Results of
Sampling a Boolean variable will be either -1 or 0 in the collected Data Table. A Boolean
displays in the Numeric Monitor Public and Data Tables as true or false.
4.5 About data tables
A data table is essentially a file that resides in data logger memory (for information on data table
storage, see Data memory (p. 59)). The file consists of five or more rows. Each row consists of
columns, or fields. The first four rows constitute the file header. Subsequent rows contain data
records. Data tables may store individual measurements, individual calculated values, or summary
data such as averages, maximums, or minimums.
Typically, files are written to based on time or event. The number of data tables is limited to 250.
You can retrieve data based on a schedule or by manually choosing to collect data using data
logger support software (see Collecting data (p. 49)).
Each data table is associated with descriptive information, referred to as a“table definition,” that
becomes part of the file header (first few lines of the file) when data is downloaded to a
computer. Table definitions include the data logger type and OS version, name of the CRBasic
program associated with the data, name of the data table (limited to 20 characters), and
alphanumeric field names.
4. Working with data54
4.5.1.1 Header rows
The first header row of the data table is the environment line, which consists of eight fields. The
following list describes the fields using the previous table entries as an example:
l
TOA5 - Table output format. Changed via LoggerNet SetupStandard View, Data Files
tab.
l MyStation - Station name. Changed via LoggerNet Setup, Device Configuration Utility, or
CRBasic program.
l CR6 - Data logger model.
l 1142 - Data logger serial number.
l CR6.Std.01 - Data logger OS version.
l CPU:MyTemperature.CR6 - Data logger program name. Changed by sending a new
program (see Sending a program to the data logger (p. 46) for more information).
l 1958 - Data logger program signature. Changed by revising a program or sending a new
program (see Sending a program to the data logger (p. 46) for more information).
l OneMin - Table name as declared in the running program (see Creating data tables in a
program (p. 57) for more information).
The second header row reports field names. Default field names are a combination of the
variable names (or aliases) from which data is derived, and a three-letter suffix. The suffix is an
abbreviation of the data process that outputs the data to storage. A list of these abbreviations
follows in Data processing abbreviations (p. 56).
If a field is an element of an array, the field name will be followed by a indices within parentheses
that identify the element in the array. For example, a variable named Values, which is declared
as a two-by-two array in the data logger program, will be represented by four field names:
Values(1,1), Values(1,2), Values(2,1), and Values(2,2). There will be one
value in the second header row for each scalar value defined by the table.
If the default field names are not acceptable to the programmer, the FieldNames()
instruction can be used in the CRBasic program to customize the names. TIMESTAMP, RECORD,
BattV_Avg, PTemp_C_Avg, and Temp_C_Avg are the default field names in the previous
Example data (p. 54).
The third header row identifies engineering units for that field. These units are declared at the
beginning of a CRBasic program using the optional Units() declaration. In Short Cut, units are
chosen when sensors or measurements are added. Units are strictly for documentation. The data
logger does not make use of declared units, nor does it check their accuracy.
The fourth header row reports abbreviations of the data process used to produce the field of
data.
4. Working with data55
Table 4-5: Data processing abbreviations
Data processing nameAbbreviation
Totalize
Average
Maximum
Minimum
Sample at Max or Min
Standard Deviation
Moment
SampleNo abbreviation
Histogram1
Histogram4D
FFT
Covariance
Level Crossing
Tot
Avg
Max
Min
SMM
Std
MMT
Hst
H4D
FFT
Cov
LCr
WindVector
Median
ET
Solar Radiation (from ET)
Time of Max
Time of Min
WVc
Med
ETsz
RSo
TMx
TMn
4.5.1.2 Data records
Subsequent rows are called data records. They include observed data and associated record
keeping. The first field is a time stamp (TS), and the second field is the record number (RN).
The time stamp shown represents the time at the beginning of the scan in which the data is
written. Therefore, in record number 3 in the previous Example data (p. 54), Temp_C_Avg shows
the average of the measurements taken over the minute beginning at 14:26:01 and ending at
14:27:00. As another example, consider rainfall measured every second with a daily total rainfall
recorded in a data table written at midnight. The record time stamped 2019-03-08 00:00:00 will
contain the total rainfall beginning at 2019-03-07 00:00:01 and ending at 2019-03-08 00:00:00.
4. Working with data56
4.6 Creating data tables in a program
Data is stored in tables as directed by the CRBasic program. In Short Cut, data tables are created
in the Output steps (see Creating a Short Cut data logger program (p. 43)). Data tables are
created within the CRBasic data logger program using the DataTable()/EndTable
instructions. They are placed after variable declarations and before the BeginProg instruction.
Between DataTable() and EndTable() are instructions that define what data to store and
under what conditions data is stored. A data table must be called by the CRBasic program for
data processing and storage to occur. Typically, data tables are called by the CallTable()
instruction once each Scan. These instructions include:
DataTable()
'Output Trigger Condition(s)
'Output Processing Instructions
EndTable
See the CRBasic Editor help for detailed instruction information and program examples:
https://help.campbellsci.com/crbasic/cr6/.
Use the DataTable()instruction to define the number of records, or rows, allocated to a data
table. You can set a specific number of records, which is recommended for conditional tables, or
allow your data logger to auto-allocate table size. With auto-allocation, the data logger balances
the memory so the tables “fill up” (newest data starts to overwrite the oldest data) at about the
same time. It is recommended you reserve the use of auto-allocation for data tables that store
data based only on time (tables that store data based on the DataInterval() instruction).
Event or conditional tables are usually set to a fixed number of records. View data table fill times
for your program on the Station Status > Table Fill Times tab (see Checking station status (p. 138)
for more information). An example of the Table Fill Times tab follows. For information on data
table storage see Data memory (p. 59).
4. Working with data57
4. Working with data58
5. Data memory
The data logger includes three types of memory: SRAM, Flash, and Serial Flash. A memory card
slot is also available for an optional microSD card. Note that the data logger USB port does not
support USB flash or thumb drives (see Communications ports (p. 13) for more information).
5.1 Data tables
Measurement data is primarily stored in data tables within SRAM. Data is usually erased from this
area when a program is sent to the data logger.
During data table initialization, memory sectors are assigned to each data table according to the
parameters set in the program. Program options that affect the allocation of memory include the
Size parameter of the DataTable() instruction, the Interval and Units parameters of
the DataInterval() instruction. The data logger uses those parameters to assign sectors in a
way that maximizes the life of its memory. See the CRBasic Editor help for detailed instruction
information and program examples: https://help.campbellsci.com/crbasic/cr6/.
By default, data memory sectors are organized as ring memory. When the ring is full, oldest data
is overwritten by newest data. Using the FillStop statement sets a program to stop writing to
the data table when it is full, and no more data is stored until the table is reset. To see the total
number of records that can be stored before the oldest data is overwritten, or to reset tables, go
to Station Status > Table Fill Times in your data logger support software.
Data concerning the data logger memory are posted in the Status and DataTableInfo tables. For
additional information on these tables, see Information tables and settings (advanced) (p. 173).
For additional information on data logger memory, visit the Campbell Scientific blog
article,"How to Know when Your Datalogger Memory is Getting Full."
5.2 Memory allocation
Data table SRAM and the CPU drive are automatically partitioned by the data logger. The USR
drive can be partitioned as needed. The CRD drive is automatically partitioned when a memory
card is installed.
The CPU and USR drives use the FAT file system. There is no limit, beyond practicality and
available memory, to the number of files that can be stored. While a FAT file system is subject to
fragmentation, performance degradation is not likely to be noticed since the drive has a relatively
small amount of solid state RAM and is accessed very quickly.
5. Data memory59
5.3 SRAM
SRAM holds program variables, communications buffers, final-data memory, and, if allocated,
the USR drive. An internal lithium battery retains this memory when primary power is removed.
The structure of the data logger SRAMmemory is as follows:
l Static Memory: This is memory used by the operating system, regardless of the running
program. This sector is rebuilt at power-up, program recompile, and watchdog events.
l Operating Settings and Properties: Also known as the "Keep" memory, this memory is used
to store settings such as PakBus address, station name, beacon intervals, and allowed
neighbor lists. This memory also stores dynamic properties such as known routes and
communications timeouts.
l CRBasic Program Operating Memory: This memory stores the currently compiled and
running user program. This sector is rebuilt on power-up, recompile, and watchdog events.
l Variables & Constants: This memory stores constants and public variables used by the
CRBasic program. Variables may persist through power-up, recompile, and watchdog
events if the PreserveVariables instruction is in the running program.
l Final-Data Memory: This memory stores data. Auto-allocated tables fill whatever memory
remains after all other demands are satisfied. A compile error occurs if insufficient memory
is available for user-allocated data tables. This memory is given lowest priority in SRAM
memory allocation.
l Communication Memory 1: Memory used for construction and temporary storage of
PakBus packets.
l Communication Memory 2: Memory used to store the list of known nodes and routes to
nodes. Routers use more memory than leaf nodes because routes store information about
other routers in the network. You can increase the Communication Allocation field in
Device Configuration Utility to increase this memory allocation.
5. Data memory60
l USR drive: Optionally allocated. Holds image files. Holds a copy of final-data memory
when TableFile() instruction used. Provides memory for FileRead() and
FileWrite() operations. Managed in File Control. Status reported in Status table fields
USRDriveSize and USRDriveFree.
5.3.1 USRdrive
Battery-backed SRAM can be partitioned to create a FAT USR drive, analogous to partitioning a
second drive on a computer hard disk. Certain types of files are stored to USR to reserve limited
CPU drive memory for data logger programs and calibration files. Partitioning also helps prevent
interference from data table SRAM. The USR drive holds any file type within the constraints of the
size of the drive and the limitations on filenames. Files typically stored include image files from
cameras, certain configuration files, files written for FTP retrieval, HTML files for viewing with web
access, and files created with the TableFile() instruction. Measurement data can also be
stored on USR as discrete files by using the TableFile() instruction. Files on USR can be
collected using data logger support software Retrieve command in File Control, or automatically
using the LoggerNet Setup > File Retrieval tab functions.
USR is not affected by program recompilation or formatting of other drives. It will only be reset if
the USR drive is formatted, a new operating system is loaded, or the size of USR is changed. USR
size is set manually by accessing it in the Settings Editor, or programmatically by loading a
CRBasic program with a USR drive size entered in a SetSetting() instruction. Partition the
USR drive to at least 11264 bytes in 512-byte increments. If the value entered is not a multiple of
512 bytes, the size is rounded up. Maximum size of USR 2990080 bytes.
WARNING:
Partitioning or changing the size of the USRdrive will delete stored data from tables. Collect
data first.
NOTE:
Placing an optional USR size setting in the CRBasic program overrides manual changes to
USR size. When USR size is changed manually, the CRBasic program restarts and the
programmed size for USR takes immediate effect.
Files in the USRdrive can be managed through data logger support software File Control or
through the FileManage() instruction in CRBasic program.
5. Data memory61
5.4 Flash memory
The data logger operating system is stored in a separate section of flash memory. To update the
operating system, see Updating the operating system (p. 131).
Serial flash memory holds the CPU drive, web page, and data logger settings. Because flash
memory has a limited number of write/erase cycles, care must be taken to avoid continuously
writing to files on the CPU drive.
5.4.1 CPU drive
The serial flash memory CPU drive contains data logger programs and other files. This memory is
managed in File Control.
NOTE:
When writing to files under program control, take care to write infrequently to prevent
premature failure of serial flash memory. Internal chip manufacturers specify the flash
technology used in Campbell Scientific CPU: drives at about 100,000 write/erase cycles. While
Campbell Scientific's in-house testing has found the manufacturers' specifications to be very
conservative, it is prudent to note the risk associated with repeated file writes via program
control.
Also, see System specifications (p. 220) for information on data logger memory.
5.5 MicroSD (CRD:drive)
The data logger has a microSD card slot for removable, supplemental memory. The card can be
configured as an extension of the data logger final-data memory or as a repository of discrete
data files. In data file mode, sub folders are not supported.
Use CardOut() to create a new DataTable saved on a card. When storing high-frequency data,
or when storing data to cards greater than 2 GB, TableFile() with Option 64 may be a better
method to write final storage data to a card.
See the CRBasic Editor help for detailed instruction information and program examples:
https://help.campbellsci.com/crbasic/cr6/.
The CRD: drive uses microSD cards exclusively. Campbell Scientific recommends and supports
only the use of microSD cards obtained from Campbell Scientific. These cards are industrialgrade and have passed Campbell Scientific hardware testing. Use of consumer grade cards
substantially increases the risk of data loss. Following are listed advantages Campbell Scientific
cards have over less expensive commercial-grade cards:
5. Data memory62
l Less susceptible to failure and data loss.
l Match the data logger operating temperature range.
l Provide faster read/write times.
l Include vibration and shock resistance.
l Have longer life spans (more read/write cycles).
A "card controller error"indicates that the data logger has failed to communicate with the card. It
is an error caused by the micro-controller built into the microSD card. If the error repeats itself, try
an industrial-grade card.
A maximum of 30 data tables can be created using CardOut() on a microSD card. When a
data table is sent to a microSD card, a data table of the same name in SRAM is used as a buffer
for transferring data to the card. When the card is present, the Status table will show the size of
the table on the card. If the card is removed, the size of the table in SRAM is shown. For more
information, see File system error codes (p. 171).
When a new program is compiled that sends data to the card, the data logger checks if a card is
present and if the card has adequate space for the data tables. If no card is present, or if space is
inadequate, the data logger will warn that the card is not being used. However, the CRBasic
program runs anyway and data is stored to SRAM. When a card is inserted later, data
accumulated in the SRAM table is copied to the card.
A microSD card can also facilitate the use of powerup.ini (see File management via powerup.ini
(p. 133) for more information).
5.5.1 Formatting microSD cards
The data logger accepts microSD cards formatted as FAT16 or FAT32; however, FAT32 is
recommended. Otherwise, some functionality, such as the ability to manage large numbers of
files (>254) is lost. The data logger formats memory cards as FAT32.
Because of the way the FAT32 card format works, you can avoid long data logger compile times
with a freshly formatted card by first formatting the new card on a computer, then copying a
small file to the card from the computer, and then deleting the file with the computer. When the
small file is copied to the card, the computer updates a sector on the card that allows the data
logger program to compile faster. This only needs to be done once when the card is formatted. If
you have the data logger update the card sector, the first data logger program compile with the
card can take up to 10 minutes. After that, compile times will be normal.
5.5.2 MicroSDcard precautions
Observe the following precautions when using optional memory cards:
5. Data memory63
l Before removing a card from the data logger, disable the card by pressing the Eject button
and wait for the green LED. You then have 15 seconds to remove the card before normal
operations resume.
l Do not remove a memory card while the drive is active, or data corruption and damage to
the card may result.
l Prevent data loss by collecting data before sending a program. Sending a program to the
data logger often erases all data.
l See System specifications (p. 220) for information on maximum card size.
5.5.3 Act LED indicator
When the data logger is powered and a microSD card installed, the Act (Activity) LED will turn on
according to card activity or status:
l Red flash: Card read/write activity
l Solid green: Formatted card inserted, powered up. This LEDalso indicates it is OKto
remove card. The Eject button must be pressed before removing a card to allow the data
logger to store buffered data to the card and then power it off.
l Solid orange: Error
l Dim/flashing orange: Card has been removed and has been out long enough that CPU
memory has wrapped and data is being overwritten without being stored to the card.
5. Data memory64
6. Measurements
6.1 Voltage measurements65
6.2 Current-loop measurements67
6.3 Resistance measurements70
6.4 Period-averaging measurements78
6.5 Pulse measurements79
6.6 Vibrating wire measurements86
6.7 Sequential and pipeline processing modes89
6.1 Voltage measurements
Voltage measurements are made using an Analog-to-Digital Converter (ADC). A highimpedance Programmable-Gain Amplifier (PGA) amplifies the signal. Internal multiplexers route
individual terminals within the amplifier. The CRBasic measurement instruction controls the ADC
gain and configuration – either single-ended or differential input. Information on the differences
between single-ended and differential measurements can be found here: Deciding between
single-ended or differential measurements (p. 157).
A voltage measurement proceeds as follows:
1. Set PGAgain for the voltage range selected with the CRBasic measurement instruction
parameter Range. Set the ADC for the first notch frequency selected with fN1.
2. If used, turn on excitation to the level selected with ExmV.
3. Multiplex selected terminals (SEChan or DiffChan).
4. Delay for the entered settling time (SettlingTime).
5. Perform the analog-to-digital conversion.
6. Repeat for input reversal as determined by parameters RevEx and RevDiff.
7. Apply multiplier (Mult) and offset (Offset) to measured result.
Conceptually, analog voltage sensors output two signals: high and low. For example, a sensor
that outputs 1000 mV on the high signal and 0 mV on the low has an overall output of 1000 mV.
A sensor that outputs 2000 mV on the high signal and 1000 mV on the low also has an overall
output of 1000 mV. Sometimes, the low signal is simply sensor ground (0 mV). A single-ended
6. Measurements65
measurement measures the high signal with reference to ground; the low signal is tied to
ground. A differential measurement measures the high signal with reference to the low signal.
Each configuration has a purpose, but the differential configuration is usually preferred.
In general, use the smallest input range that accommodates the full-scale output of the sensor.
This results in the best measurement accuracy and resolution (see Analog measurement
specifications (p. 226) for more information).
A set overhead reduces the chance of overrange. Overrange limits are available in the
specifications. The data logger indicates a measurement overrange by returning a NAN for the
measurement.
WARNING:
Sustained voltages in excess of ±20 V applied to terminals configured for analog input will
damage CR6 circuitry.
6.1.1 Single-ended measurements
A single-ended measurement measures the difference in voltage between the terminal
configured for single-ended input and the reference ground. For example, single-ended channel
1 is comprised of terminals U1 and. For more information, see Wiring panel and terminal
functions (p. 5). The single-ended configuration is used with the following CRBasic instructions:
l
VoltSE()
l
BrHalf()
l
BrHalf3W()
l
TCSE()
l
Therm107()
l
Therm108()
l
Therm109()
l
Thermistor()
See the CRBasic Editor help for detailed instruction information and program examples:
https://help.campbellsci.com/crbasic/cr6/.
6. Measurements66
6.1.2 Differential measurements
A differential measurement measures the difference in voltage between two input terminals. For
example, differential channel 1 is comprised of terminals U1 and U2, with U1 as high and U2 as
low. For more information, see Wiring panel and terminal functions (p. 5). The differential
configuration is used with the following CRBasic instructions:
l
VoltDiff()
l
BrFull()
l
BrFull6W()
l
BrHalf4W()
l
TCDiff()
6.1.2.1 Reverse differential
Differential measurements have the advantage of an input reversal option, RevDiff. When
RevDiff is set to True, two differential measurements are made, the first with a positive
polarity and the second reversed. Subtraction of opposite polarity measurements cancels some
offset voltages associated with the measurement.
For more information on voltage measurements, see Improving voltage measurement quality (p.
157) and Analog measurement specifications (p. 226).
6.2 Current-loop measurements
NOTE:
This information applies to CR6 data loggers with serial numbers 7502 and greater. These
data loggers have two blue stripes on the label.
6. Measurements67
RG terminals can be configured to make analog current measurements using the CurrentSE()
instruction. When configured to measure current, terminals each have an internal resistance of
101 Ω in the current measurement loop. The return path of the sensor must be connected directly
to the RG terminal. The following image shows a simplified schematic of a current measurement.
6.2.1 Example Current-Loop Measurement Connections
The following table shows example schematics for connecting typical current sensors and
devices. See also Current-loop measurement specifications (p. 230).
6. Measurements68
Sensor TypeConnection Example
2-wire transmitter using data logger power
2-wire transmitter using external power
3-wire transmitter using data logger power
6. Measurements69
Sensor TypeConnection Example
3-wire transmitter using external power
4-wire transmitter using data logger power
4-wire transmitter using external power
6.3 Resistance measurements
Bridge resistance is determined by measuring the difference between a known voltage or current
applied to the excitation (input) of a resistor bridge and the voltage measured on the output
arm. The data logger supplies a precise voltage or current excitation via U terminals. Resulting
6. Measurements70
voltage is measured on analog input terminals configured for single-ended or differential input.
The result of the measurement is a ratio of excitation voltage or current and measured voltages.
See also Resistance measurement specifications (p. 228).
6.3.1 Resistance measurements with voltage excitation
CRBasic instructions for measuring resistance with voltage excitation include:
l BrHalf() - half bridge
l BrHalf3W() - three-wire half bridge
l BrHalf4W() - four-wire half bridge
l BrFull() - four-wire full bridge
l BrFull6W() - six-wire full bridge
See the CRBasic Editor help for detailed instruction information and program examples:
Campbell Scientific offers terminal input modules to facilitate this measurement.
Offset voltage compensation applies to bridge measurements. In addition to RevDiff and
MeasOff parameters discussed in Minimizing offset voltages (p. 166), CRBasic bridge
6. Measurements72
measurement instructions include the RevEx parameter that provides the option to program a
second set of measurements with the excitation polarity reversed. Much of the offset error
inherent in bridge measurements is canceled out by setting RevDiff, RevEx, and MeasOff
to True.
Measurement speed may be reduced when using RevDiff, MeasOff, and RevEx. When
more than one measurement per sensor is necessary, such as occurs with the BrHalf3W(),
BrHalf4W(), and BrFull6W() instructions, input and excitation reversal are applied
separately to each measurement. For example, in the four-wire half-bridge (BrHalf4W()),
when excitation is reversed, the differential measurement of the voltage drop across the sensor is
made with excitation at both polarities and then excitation is again applied and reversed for the
measurement of the voltage drop across the fixed resistor. The results of the measurements (X)
must then be processed further to obtain the resistance value, which requires additional program
execution time.
CRBasic Example 1: Four-Wire Full Bridge Measurement and Processing
'This program example demonstrates the measurement and
'processing of a four-wire resistive full bridge.
'In this example, the default measurement stored
'in variable X is deconstructed to determine the
'resistance of the R1 resistor, which is the variable
'resistor in most sensors that have a four-wire
'full-bridge as the active element.
'Declare Variables
Public X
Public X_1
Public R_1
Public R_2 = 1000 'Resistance of fixed resistor R2
Public R_3 = 1000 'Resistance of fixed resistor R3
Public R_4 = 1000 'Resistance of fixed resistor R4
6.3.2 Resistance measurements with current excitation
U terminals can be configured to supply precise current excitation for use with resistive bridges.
Resistance can be measured by supplying a precise current and measuring the return voltage.
6. Measurements73
The data logger supplies a precise current from terminals configured for current excitation.
Return voltage is measured on U terminals configured for single-ended or differential analog
input.
U terminals can be configured as current-output terminals under program control for making
resistance measurements. For the current return, use the signal ground () terminal closest to
the current source terminal. CRBasic instructions that control current excitation include:
l Resistance() - Applies an excitation current to a circuit and measures the resistance.
The maximum excitation current is ±2500 μA.
l Resistance3W() - Makes a three-wire resistance measurement. The maximum
excitation current is ±2500 μA.
Resistive Bridge Circuits with Current Excitation: (use the signal ground () terminal adjacent to
the current excitation terminal)
Resistive-Bridge Type and
Circuit Diagram
Four Wire
Four Wire Full Bridge
CRBasic Instruction and
Relational Formulas
Fundamental Relationship
CRBasic Instruction:
Resistance()
Fundamental Relationship1:
CRBasic Instruction:
Resistance()
Fundamental Relationship1:
6. Measurements74
Resistive-Bridge Type and
CRBasic Instruction and
Relational Formulas
Circuit Diagram
Fundamental Relationship
Three Wire
CRBasic Instruction:
Resistance3W()
Fundamental Relationship2:
1
Where X = result of the CRBasic bridge measurement instruction with a multiplier of 1 and an offset of 0.
2
Where Ri is the precision internal resistor value that is saved as part of the factory calibration procedure and Rs is
the sense resistance.
6.3.3 Strain measurements
A principal use of the four-wire full bridge is the measurement of strain gages in structural stress
analysis. StrainCalc() calculates microstrain (µɛ) from the formula for the specific bridge
configuration used. All strain gages supported by StrainCalc() use the full-bridge
schematic. 'Quarter-bridge', 'half-bridge' and 'full-bridge' refer to the number of active elements
in the bridge schematic. In other words, a quarter-bridge strain gage has one active element, a
half-bridge has two, and a full-bridge has four.
StrainCalc() requires a bridge-configuration code. The following table shows the equation
used by each configuration code. Each code can be preceded by a dash (-). Use a code without
the dash when the bridge is configured so the output decreases with increasing strain. Use a
dashed code when the bridge is configured so the output increases with increasing strain. A
dashed code sets the polarity of Vrto negative.
6. Measurements75
Table 6-1: StrainCalc() configuration codes
BrConfig CodeConfiguration
Quarter-bridge strain gage:
1
Half-bridge strain gage. One gage parallel to strain, the other at 90°
to strain:
2
Half-bridge strain gage. One gage parallel to +ɛ, the other parallel
to -ɛ:
3
Full-bridge strain gage. Two gages parallel to +ɛ, the other two
parallel to -ɛ:
4
6. Measurements76
Table 6-1: StrainCalc() configuration codes
BrConfig CodeConfiguration
Full-bridge strain gage. Half the bridge has two gages parallel to +ɛ
and -ɛ, and the other half to +νɛ and -νɛ
5
Full-bridge strain gage. Half the bridge has two gages parallel to +ɛ
and -νɛ , and the other half to -νɛ and +ɛ:
6
Where:
ν : Poisson's Ratio (0 if not applicable).
GF: Gage Factor.
Vr: 0.001 (Source-Zero) if BRConfig code is positive (+).
Vr: –0.001 (Source-Zero) if BRConfig code is negative (–).
and where:
"source": the result of the full-bridge measurement (X = 1000 • V1 / Vx) when multiplier = 1 and offset = 0.
"zero": gage offset to establish an arbitrary zero.
6.3.4 AC excitation
Some resistive sensors require AC excitation. AC excitation is defined as excitation with equal
positive (+) and negative (–) duration and magnitude. These include electrolytic tilt sensors, soil
moisture blocks, water-conductivity sensors, and wetness-sensing grids. The use of single polarity
DC excitation with these sensors can result in polarization of sensor materials and the substance
measured. Polarization may cause erroneous measurement, calibration changes, or rapid sensor
decay.
Other sensors, for example, LVDTs (linear variable differential transformers), require AC excitation
because they require inductive coupling to provide a signal. DC excitation in an LVDT will result
in no measurement.
CRBasic bridge-measurement instructions have the option to reverse polarity to provide AC
excitation by setting the RevEx parameter to True.
6. Measurements77
NOTE:
Take precautions against ground loops when measuring sensors that require AC excitation.
See also Ground loops (p. 152).
For more information, see Accuracy for resistance measurements (p. 78).
6.3.5 Accuracy for resistance measurements
Consult the following technical papers for in-depth treatments of several topics addressing
voltage measurement quality:
l Preventing and Attacking Measurement Noise Problems
l Benefits of Input Reversal and Excitation Reversal for Voltage Measurements
l Voltage Measurement Accuracy, Self- Calibration, and Ratiometric Measurements
NOTE:
Error discussed in this section and error-related specifications of the CR6 do not include error
introduced by the sensor, or by the transmission of the sensor signal to the data logger.
For accuracy specifications of ratiometric resistance measurements, see Resistance measurement
specifications (p. 228). Voltage measurement is variable V1or V2in resistance measurements.
Offset is the same as that for simple analog voltage measurements.
Assumptions that support the ratiometric-accuracy specification include:
l Data logger is within factory calibration specification.
l Input reversal for differential measurements and excitation reversal for excitation voltage
are within specifications.
l Effects due to the following are not included in the specification:
o
Bridge-resistor errors
o
Sensor noise
o
Measurement noise
6.4 Period-averaging measurements
Use PeriodAvg() to measure the period (in microseconds) or the frequency (in Hz) of a signal
on a single-ended channel. For these measurements, the data logger uses a high-frequency
digital clock to measure time differences between signal transitions, whereas pulse-count
measurements simply accumulate the number of counts. As a result, period-average
measurements offer much better frequency resolution per measurement interval than pulsecount measurements. See also Pulse measurements (p. 79).
U terminals on the data logger are configurable for measuring the period of a signal.
6. Measurements78
The measurement is performed as follows: low-level signals are amplified prior to a voltage
comparator. The internal voltage comparator is referenced to the programmed threshold. The
threshold parameter allows referencing the internal voltage comparator to voltages other than 0
V. For example, a threshold of 2500 mV allows a 0 to 5 VDC digital signal to be sensed by the
internal comparator without the need for additional input conditioning circuitry. The threshold
allows direct connection of standard digital signals, but it is not recommended for smallamplitude sensor signals.
A threshold other than zero results in offset voltage drift, limited accuracy (approximately ±10
mV) and limited resolution (approximately 1.2 mV).
See also Period-averaging measurement specifications (p. 229).
TIP:
Both pulse count and period-average measurements are used to measure frequency output
sensors. However, their measurement methods are different. Pulse count measurements use
dedicated hardware - pulse count accumulators, which are always monitoring the input
signal, even when the data logger is between program scans. In contrast, period-average
measurements use program instructions that only monitor the input signal during a program
scan. Consequently, pulse count scans can occur less frequently than period-average scans.
Pulse counters may be more susceptible to low-frequency noise because they are always
"listening", whereas period-averaging measurements may filter the noise by reason of being
"asleep" most of the time.
Pulse count measurements are not appropriate for sensors that are powered off between
scans, whereas period-average measurements work well since they can be placed in the scan
to execute only when the sensor is powered and transmitting the signal.
6.5 Pulse measurements
The output signal generated by a pulse sensor is a series of voltage waves. The sensor couples its
output signal to the measured phenomenon by modulating wave frequency. The data logger
detects the state transition as each wave varies between voltage extremes (high-to-low or low-tohigh). Measurements are processed and presented as counts, frequency, or timing data. Both
pulse count and period-average measurements are used to measure frequency-output sensors.
For more information, see Period-averaging measurements (p. 78).
6. Measurements79
The data logger includes terminals that are configurable for pulse input as shown in the
following image.
Table 6-2: Pulse input terminals and the input types they can measure
Input TypePulse Input Terminal
High-frequency
C (all)
U (all)
Low-level AC
U (even numbered terminals)
P1
P2
Switch-closure
C (all)
U (all)
Using the PulseCount() instruction, U and C terminals are configurable for pulse input to
measure counts or frequency. Maximum input frequency is dependent on input voltage. If pulse
input voltages exceed the maximum voltage, third-party external-signal conditioners should be
employed. Do not measure voltages greater than 20 V.
NOTE:
Conflicts can occur when a control port pair is used for different instructions (TimerInput(),
PulseCount(), SDI12Recorder(), WaitDigTrig()). For example, if C1 is used for
SDI12Recorder(), C2 cannot be used for TimerInput(), PulseCount(), or
WaitDigTrig().
6. Measurements80
U terminals configured for pulse input have internal filters that reduce electronic noise, and thus
reduce false counts. Internal AC coupling is used to eliminate DC offset voltages. For tips on
working with pulse measurements, see Pulse measurement tips (p. 85).
Output can be recorded as counts, frequency or a running average of frequency.
For more information, see Pulse measurement specifications (p. 231).
See the CRBasic Editor help for detailed instruction information and program examples:
https://help.campbellsci.com/crbasic/cr6/.
6.5.1 Low-level AC measurements
Low-level AC (alternating current or sine-wave) signals can be measured on U terminals. AC
generator anemometers typically output low-level AC.
Measurement output options include the following:
l Counts
l Frequency (Hz)
l Running average
Rotating magnetic-pickup sensors commonly generate ac voltage ranging from millivolts at lowrotational speeds to several volts at high-rotational speeds.
CRBasic instruction: PulseCount(). See the CRBasic Editor help for detailed instruction
information and program examples: https://help.campbellsci.com/crbasic/cr6/.
Low-level AC signals cannot be measured directly by C terminals. Peripheral terminal expansion
modules, such as the Campbell Scientific LLAC4, are available for converting low-level AC signals
to square-wave signals measurable by C terminals.
For more information, see Pulse measurement specifications (p. 231).
6.5.2 High-frequency measurements
High-frequency (square-wave) signals can be measured on terminals:
l U or C
Common sensors that output high-frequency pulses include:
l Photo-chopper anemometers
l Flow meters
Measurement output optionss include counts, frequency in hertz, and running average. Note
that the resolution of a frequency measurement can be different depending on the terminal used
in the PulseCount() instruction. See the CRBasic help for more information.
6. Measurements81
The data logger has built-in pull-up and pull-down resistors for different pulse measurements
which can be accessed using the PulseCount()instruction. Note that pull down options are
usually used for sensors that source their own power.
6.5.2.1 U terminals
l CRBasic instruction: PulseCount()
6.5.2.2 C terminals
l CRBasic instructions: PulseCount()
See Pulse measurement specifications (p. 231) for more information.
6.5.3 Switch-closure and open-collector measurements
Switch-closure and open-collector (also called current-sinking) signals can be measured on
terminals:
l U or C
Mechanical switch-closures have a tendency to bounce before solidly closing. Unless filtered,
bounces can cause multiple counts per event. The data logger automatically filters bounce.
Because of the filtering, the maximum switch-closure frequency is less than the maximum highfrequency measurement frequency. Sensors that commonly output a switch-closure or an opencollector signal include:
l Tipping-bucket rain gages
l Switch-closure anemometers
l Flow meters
The data logger has built-in pull-up and pull-down resistors for different pulse measurements
which can be accessed using the PulseCount() instruction. Note that pull down options are
usually used for sensors that source their own power.
Data output options include counts, frequency (Hz), and running average.
6.5.3.1 U Terminals
An internal 100 kΩ pull-up resistor pulls an input to 5 VDC with the switch open, whereas a
switch-closure to ground pulls the input to 0 V.
l CRBasic instruction: PulseCount(). See the CRBasic Editor help for detailed instruction
information and program examples: https://help.campbellsci.com/crbasic/cr6/.
6. Measurements82
Switch Closure on U or C TerminalOpen Collector on U or C Terminal
6.5.3.2 C terminals
Switch-closure mode is a special case edge-count function that measures dry-contact switchclosures or open collectors. The operating system filters bounces.
l CRBasic instruction: PulseCount().
See also Pulse measurement specifications (p. 231).
6.5.4 Edge timing and edge counting
Edge time, period, and counts can be measured on U or C terminals. Feedback control using
pulse-width modulation (PWM) is an example of an edge timing application.
6.5.4.1 Single edge timing
A single edge or state transition can be measured on U or C terminals. Measurements can be
expressed as a time (µs), frequency (Hz) or period (µs).
CRBasic instruction: TimerInput()
6.5.4.2 Multiple edge counting
Time between edges, time from an edge on the previous terminal, and edges that span the scan
interval can be measured on U or C terminals. Measurements can be expressed as a time (µs),
frequency (Hz) or period (µs).
l CRBasic instruction: TimerInput()
6. Measurements83
6.5.4.3 Timer input NAN conditions
NAN is the result of a TimerInput() measurement if one of the following occurs:
l Measurement timer expires
l The signal frequency is too fast
For more information, see:
l Pulse measurement specifications (p. 231)
l Digital input/output specifications (p. 232)
l Period-averaging measurement specifications (p. 229)
6.5.5 Quadrature measurements
The Quadrature() instruction is used to measure shaft or rotary encoders. A shaft encoder
outputs a signal to represent the angular position or motion of the shaft. Each encoder will have
two output signals, an A line and a B line. As the shaft rotates the A and B lines will generate
digital pulses that can be read, or counted, by the data logger.
In the following example, channel A leads channel B, therefore the encoder is determined to be
moving in a clockwise direction. If channel B led channel A, it would be determined that the
encoder was moving in a counterclockwise direction.
Terminals U1-U12 can be configured as digital pairs to monitor the two channels of an encoder.
The Quadrature() instruction can return:
l The accumulated number of counts from channel A and channel B. Count will increase if
channel A leads channel B. Count will decrease if channel B leads channel A.
l The net direction.
l Number of counts in the A-leading-B direction.
l Number of counts in the B-leading-A direction.
6. Measurements84
Counting modes:
l Counting the increase on rising edge of channel A when channel A leads channel B.
Counting the decrease on falling edge of channel A when channel B leads channel A.
l Counting the increase at each rising and falling edge of channel A when channel A leads
channel B. Counting the decrease at each rising and falling edge of channel A when
channel A leads channel B.
l Counting the increase at each rising and falling edge of both channels when channel A
leads channel B. Counting the decrease at each rising and falling edge of both channels
when channel B leads channel A.
For more information, see Digital input/output specifications (p. 232).
6.5.6 Pulse measurement tips
The PulseCount() instruction uses dedicated 32-bit counters to accumulate all counts over
the programmed scan interval. The resolution of pulse counters is one count. Counters are read
at the beginning of each scan and then cleared. Counters will overflow if accumulated counts
exceed 4,294,967,296 (232), resulting in erroneous measurements. See the CRBasic Editor help for
detailed instruction information and program examples:
https://help.campbellsci.com/crbasic/cr6/.
Counts are the preferred PulseCount() output option when measuring the number of tips
from a tipping-bucket rain gage or the number of times a door opens. Many pulse-output
sensors, such as anemometers and flow meters, are calibrated in terms of frequency (Hz) so are
usually measured using the PulseCount() frequency-output option.
Use the LLAC4 module to convert non-TTL-level signals, including low-level ac signals, to TTL
levels for input to C terminals
Conflicts can occur when a control port pair is used for different instructions (TimerInput(),
PulseCount(), SDI12Recorder(), WaitDigTrig()). For example, if C1 is used for
SDI12Recorder(), C2 cannot be used for TimerInput(), PulseCount(), or
WaitDigTrig().
Understanding the signal to be measured and compatible input terminals and CRBasic
instructions is helpful. See Pulse input terminals and the input types they can measure (p. 80).
6.5.6.1 Input filters and signal attenuation
Terminals configured for pulse input have internal filters that reduce electronic noise. The
electronic noise can result in false counts. However, input filters attenuate (reduce) the amplitude
(voltage) of the signal. Attenuation is a function of the frequency of the signal. Higher-frequency
signals are attenuated more. If a signal is attenuated too much, it may not pass the detection
6. Measurements85
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.