TheCR5000 MEASUREMENT AND CONTROL SYSTEM is warranted
by CAMPBELL SCIENTIFIC, INC. to be free from defects in materials and
workmanship under normal use and service for thirty-six (36) months from
date of shipment unless specified otherwise. Batteries have no warranty.
CAMPBELL SCIENTIFIC, INC.'s obligation under this warranty is limited to
repairing or replacing (at CAMPBELL SCIENTIFIC, INC.'s option) defective
products. The customer shall assume all costs of removing, reinstalling, and
shipping defective products to CAMPBELL SCIENTIFIC, INC. CAMPBELL
SCIENTIFIC, INC. will return such products by surface carrier prepaid. This
warranty shall not apply to any CAMPBELL SCIENTIFIC, INC. products
which have been subjected to modification, misuse, neglect, accidents of
nature, or shipping damage. This warranty is in lieu of all other warranties,
expressed or implied, including warranties of merchantability or fitness for a
particular purpose. CAMPBELL SCIENTIFIC, INC. is not liable for special,
indirect, incidental, or consequential damages.
Products may not be returned without prior authorization. The following
contact information is for US and International customers residing in countries
served by Campbell Scientific, Inc. directly. Affiliate companies handle
repairs for customers within their territories. Please visit
www.campbellsci.com to determine which Campbell Scientific company
serves your country. To obtain a Returned Materials Authorization (RMA),
contact CAMPBELL SCIENTIFIC, INC., phone (435) 753-2342. After an
applications engineer determines the nature of the problem, an RMA number
will be issued. Please write this number clearly on the outside of the shipping
container. CAMPBELL SCIENTIFIC's shipping address is:
CAMPBELL SCIENTIFIC, INC.
RMA#_____
815 West 1800 North
Logan, Utah 84321-1784
CAMPBELL SCIENTIFIC, INC. does not accept collect calls.
CR5000 MEASUREMENT AND CONTROL SYSTEM
TABLE OF CONTENTS
PDF viewers note: These page numbers refer to the printed version of this document. Use
the Adobe Acrobat® bookmarks tab for links to specific sections.
8. PROCESSING AND MATH INSTRUCTIONS............................................................... 8-1
9. PROGRAM CONTROL INSTRUCTIONS....................................................................... 9-1
APPENDIX
A. CR5000 STATUS TABLE....................................................................................................A-1
INDEX ......................................................................................................................................... INDEX-1
ii
CR5000 Overview
The CR5000 provides precision measurement capabilities in a rugged, battery-operated
package. The system makes measurements at a rate of up to 5,000 samples/second with
16-bit resolution. The CR5000 includes CPU, keyboard display, power supply, and analog
and digital inputs and outputs. The on-board, BASIC-like programming language includes
data processing and analysis routines. PC9000 Software provides program generation
and editing, data retrieval, and realtime monitoring.
19 20
17 18
15 16
13 14
11 12
910
56
34
12
SE
2
1
HL
HL
HL
DIFF
25 26
23 24
21 22
SE
12
11
H L
H L
H L
DIFF
VX1
VX3
VX2
VX4
G
C6
C5
C7
C8
G
CONTROL I/O
POWER
Logan, Utah
CR5000 MICROLOGGER
78
4
3
HL
27 28
14
13
HL
CAO1
CAO2
IX1
IX2
>2.0V
G
<0.8V
5V
5V
UP
7
6
5
HL
HL
HL
33 34
31 32
29 30
17
16
15
H L
HL
HL
CONTRO
IX3
IX4
IXR
P1
P1
C1C2C3
G
SDI-12
12V
G
SDM-C1
SDM-C2
SDM-C3
G
12V
POWER OUT
'
,
_
A B C
D E F
Hm
PgUp
1
2
G H I
J K L
M N O
Graph/
char
4
5
P R S
T U V
W X Y
End
PgDn
7
8
- + (
* / )
< = >
Del
Ins
ESC
0
SN:
3
6
9
HL
35 36
H L
G
8
18
L I/O
C4
SW-12
SW-12
CURSOR
ALPHA
SHIFT
Spc Cap
BKSPC
$ Q Z
ENTER
HL
37 38
H L
G
G
POWER IN
11 - 16 VDC
9
19
CAUTION
DC ONLY
12V
G
12V
MADE IN USA
10
HL
CS I/O
39 40
20
H L
RS-232
COMPUTER
(OPTICALLY ISOLATED)
GROUND
LUG
pc card
status
FIGURE OV1-1. CR5000 Measurement and Control System
OV1. Physical Description
Figure OV1-2 shows the CR5000 panel and the associated program
instructions. Unless otherwise noted, they are measurement instructions
(Section 7).
OV1.1 Measurement Inputs
OV1.1.1 Analog Inputs
There are 20 differential or 40 single-ended inputs for measuring voltages up
to ±5 V. A thermistor installed in the wiring panel can be used to measure the
reference temperature for thermocouple measurements, and a heavy copper
grounding bar and connectors combine with the case design to reduce
temperature gradients for accurate thermocouple measurements. Resolution on
the most sensitive range is 0.67 µV
FIGURE OV1-2. CR5000 Panel and Associated Instructions.
OV1.1.2 Signal Grounds ()
The Signal Grounds ( ) should be used as the reference for Single-ended
Analog inputs, Excitation returns, and sensor shield wires.
Signal returns from the CAO and Pulse channels should use the
located on the CAO and Pulse terminal strip to minimize current flow through
grounds on the analog terminal strips.
the
OV1.1.3 Power Grounds (G)
The Power Grounds (G) should be used as the returns for the 5V, SW12, 12V,
and C1-C8 outputs. Use of the G grounds for these outputs with potentially
large currents will minimize current flow through the analog section, which
can cause Single-ended voltage measurement errors.
OV1.1.4 Ground Lug
The large ground lug is used to connect a heavy gage wire to earth ground. A
good earth connection is necessary fix the ground potential of the datalogger
and to send to earth transients that come in on either the G or
are shunted to ground via the spark gaps protecting other inputs.
CR5000 Overview
terminals
terminals or
OV1.1.5 Power In
The G and 12V terminals on the unplugable Power In connector are for
connecting power from an external battery to the CR5000. These are the only
terminals that can be used to input battery power; the other 12V and SW-12V
terminals are out only. Power from this input will not charge internal CR5000
batteries. Power to charge the internal batteries (17-28 VDC or 18 VRMS AC)
must be connected to the charger input on the side of the LA battery back.
OV1.1.6 Switched 12 Volts SW-12
The SW-12 terminals provide an unregulated 12 volts that can be switched on
and off under program control.
OV1.1.7 Switched Voltage Excitation (VX)
Four switched excitation channels provide precision programmable voltages
within the ±5 Volt range for bridge measurements. Each analog output will
provide up to 50 mA between ±5 V.
OV1.1.8 Switched Current Excitation (IX)
Four Switched Current Excitation channels provide precision current
excitations programmable within ±2.5 mA for resistance or bridge
measurements.
OV1.1.9 Continuous Analog Outputs (CAO)
Two Continuous Analog Outputs (CAO) with individual outputs under
program control for proportional control (e.g., PID algorithm) and waveform
generation. Each analog output will provide up to 15 mA between ±5 V.
OV-3
CR5000 Overview
OV1.1.10 Control I/O
OV1.1.11 Pulse Inputs
OV1.1.12 Power Up
There are 8 digital Input/Output channels (0 V low, 5 V high) for frequency
measurement, digital control, and triggering.
Two Pulse input channels can count pulses from high-level (5 V square wave),
switch closure, or low-level A/C signals.
The CR5000 allows shutting off power under program control. The Power Up
inputs allow an external signal to awaken the CR5000 from a powered down
state (PowerOff, Section 9). When the CR5000 is in this power off state the
ON Off switch is in the on position but the CR5000 is off. If the "<0.5 " input
is switched to ground or if the ">2" input has a voltage greater than 2 volts
applied, the CR5000 will awake, load and run the “run on power-up” program.
If the "< 0.5" input continues to be held at ground while the CR5000 is
powered on and goes through its 2-5 second initialization sequence, the
CR5000 will not run “run on power-up” program.
OV1.1.13 SDM Connections
The Synchronous Device for Measurement (SDM) connections C1,C2, and C3
along with the adjacent 12 volts and ground terminals are used to connect
SDM sensors and peripherals.
OV1.2 Communication and Data Storage
OV1.2.1 PCMCIA PC Card
One slot for a Type I/II/III PCMCIA card. The keyboard display is used to
check card status. The card must be powered down before removing it. The
card will be reactivated if not removed.
CAUTION
OV1.2.2 CS I/O
OV1.2.3 Computer RS-232
Removing a card while it is active can cause garbled data
and can actually damage the card. Do not switch off the
CR5000 power while the card is present and active.
A 9-pin serial I/O port supports CSI peripherals.
OV-4
RS-232 Port
OV1.3 Power Supply and AC Adapter
The CR5000 has two base options the low profile without any power supply
and the lead acid battery power supply base. The low profile base requires an
external DC power source connected to the Power In terminal on the panel.
The battery base has a 7 amp hour battery with built in charging regulator and
includes an AC adapter for use where 120 VAC is available (18 VAC RMS
output). Charging power can also come from a 17-28 VDC input such as a
solar panel. The DCDC18R is available for stepping the voltage up from a
nominal 12 volt source (e.g., vehicle power supply) to the DC voltage required
for charging the internal battery.
OV2. Memory and Programming Concepts
OV2.1 Memory
The CR5000 has 2MB SRAM and 1MB Flash EEPROM. The operating
system and user programs are stored in the flash EEPROM. The memory that
is not used by the operating system and program is available for data storage.
The size of available memory may be seen in the status file. Additional data
storage is available by using a PCMCIA card in the built in card slot.
CR5000 Overview
OV2.2 Measurements, Processing, Data Storage
The CR5000 divides a program into two tasks. The measurement task
manipulates the measurement and control hardware on a rigidly timed
sequence. The processing task processes and stores the resulting
measurements and makes the decisions to actuate controls.
The measurement task stores raw Analog to Digital Converter (ADC) data
directly into memory. As soon as the data from a scan is in memory, the
processing task starts. There are at least two buffers allocated for this raw
ADC data (more under program control), thus the buffer from one scan can be
processed while the measurement task is filling another.
When a program is compiled, the measurement tasks are separated from the
processing tasks. When the program runs, the measurement tasks are
performed at a precise rate, ensuring that the measurement timing is exact and
invariant.
Processing Task: Measurement Task:
Digital I/O task
Read and writes to digital I/O ports
(ReadI/O, WriteI/O)
Processes measurements
Determines controls (port states) to set next scan
Stores data
Analog measurement and excitation sequence and
timing
Reads Pulse Counters
Reads Control Ports (GetPort)
Sets control ports (SetPort)
OV-5
CR5000 Overview
OV2.3 Data Tables
The CR5000 can store individual measurements or it may use its extensive
processing capabilities to calculate averages, maxima, minima, histogams,
FFTs, etc., on periodic or conditional intervals. Data are stored in tables such
as listed in Table OV2-1. The values to output are selected when running the
program generator or when writing a datalogger program directly.
PC9000 is a Windows™ application for use with the CR5000. The software
supports CR5000 program generation, real-time display of datalogger
measurements, graphing, and retrieval of data files.
OV3.1 Hardware and Software Requirements
The following computer resources are necessary:
• IBM PC, Portable or Desktop
• 8 Meg of Ram
• VGA Monitor
• Windows 95 or newer
• 30 Meg of Hard Drive Space for software
• 40 Meg of Hard Drive Space for data
• RS232 Serial Port
OV-6
The following computer resources are recommended:
• 16 Meg of Ram
• 33 MHz 486 or faster
• Mouse
OV3.2 PC9000 Installation
To install the PC9000 Software:
• Start Microsoft Windows
• Insert diskette 1 (marked 1 of 2) in a disk drive.
• From the Program Manager, select F
• Type (disk drive):\setup and press Enter e.g. a:\setup<Enter>
• The setup routine will prompt for disk 2.
ile menu and choose Run
You may use the default directory of PC9000 or install the software in a
different directory. The directory will be created for you.
To abort the installation, type Ctrl-C or Break at any time.
OV3.3 PC9000 Software Overview
This overview points out the main PC9000 functions and where to find them.
PC9000 has extensive on-line help to guide the user in its operation, run
PC9000 to get the details. A CR5000 is not necessary to try out the
programming and real time display options; a demo uses canned data for
viewing. Without a CR5000, there are no communications with the
datalogger; operations such as downloading programs and retrieving data will
not function.
Figures OV3-1 and OV3-2 show the main PC9000 menus. The primary
functions of PC9000 are accessed from the File, Comm, Realtime, and
Analysis selections on the main menu (Figure OV3-1).
CR5000 Overview
OV-7
CR5000 Overview
File Edit Realtime Analysis Tools Collect Display Windows Help
CommLink
Alarms List . . .
ield Monitor . . .
F
Virtual M
Virtual O
-Y Plotter . . .
X
istogram . . .
H
Fast Fourier T
Level Crossing Histogram . . .
et/Set Variable . . .
G
Display Data Graph 1 . . .
Display Data Graph 2
ID2000 . . . Ctrl + I
eter . . .
'Scope . . .
ransform . . .
Select S
Select P
Logger C
Logger Status . . .
D
ownload . . .
Save and Download
Logger F
Di
agnostics
Data Retrieval . . .
cheduled Data Retrieval . . .
S
eries Linked Station . . .
arallel Linked Station . . .
lock . . .
iles . . .
. . .
Realtime Display
& Graphing
Display Data in Tables Collected From CR5000.
Graphing requires no special processing of the data
and provides rapid feedback to the operator.
Collect data from CR5000
PC to CR5000
communications.
CR9000 Program Generator
000 Program Generator
CR5
CR9000 Program Editor . . .
CR5000 Program Editor . . .
Open W
Open Data Table I
Open D
Convert Binary to ASCII File . . .
P
Printer Setup . . .
D
File Manager . . .
E
Exit PC9000
iring Diagram . . .
ata File . . .
rint . . .
OS Shell . . .
xplorer . . .
nfo File . . .
Menu-driven Program Generation.
Direct Editing of Program
View/Edit Wiring Diagram & DataTable
Information (Created by Program Generator)
View Data Collected from CR5000
OV3-1. PC9000 Primary Functions
OV-8
CR5000 Overview
File Edit Realtime Analysis Tools Collect Display Windows Help
Undo Ctrl + Z
Date & Time
Select All
Strip Remarks and Spaces Ctrl + S
Cut Ctrl + X
Copy Ctrl + C
Paste Ctrl + V
Delete
Delete Line Ctrl + Y
Wrap Text Ctrl + W
Guides the user through a series of menus to configure the measurement types:
thermocouple, voltage, bridge, pulse counting, frequency, and others. Creates
a CR5000 program, wiring diagram, output table, description, and
configuration file.
Program Editor
Create programs directly or edit those created by the program generator or
retrieved from the CR5000. Provides context-sensitive help for the CR5000's
BASIC-like language.
REALTIME
Virtual Meter
Updates up to five displays simultaneously. Choices include analog meter,
horizontal and vertical bars, independent scaling/offset, multiple alarms, and
rapid on-site calibration of sensors
OV-9
CR5000 Overview
OV3.3.3 Analysis
OV3.3.4 Tools
OV3.3.5 Collect
Virtual Oscilloscope
Displays up to six channels. Time base variable from milliseconds to hours.
X-Y Plotter
Allows comparison of any two measurements in real time.
Data Graphing
Displays up to 16 fields simultaneously as strip charts or two multi-charts with
up to 8 traces each. Includes 2D/3D bars, line, log/linear, area, and scatter.
Line statistics available for max/min, best fit, mean, and standard deviation.
Handles files of unlimited size. Historical graphing requires no special
processing of the data and provides rapid feedback to the operator.
Control and Communications
Supports PC to CR5000 communications: clock read/set, status read, program
download, and program retrieval.
OV3.3.6 Display
OV3.3.7 Windows
OV3.3.8 Help
Collect data from CR5000 data tables
Configure the font and color scheme in an active window.
Size and arrange windows.
On-line help for PC9000 software.
OV-10
OV4. Keyboard Display
CR5000 Overview
Power Up Screen
Press any key
CAMPBELL
SCIENTIFIC
CR5000 Datalogger
06/18/2000, 18:24:35
CPU: TRIG.CR5
Running.
for Main Menu
(except < >)
Data
Run/Stop Program
File
Status
Configure, Settings
Adjust contrast with < >
< lighter darker >
Real Time Tables
Real Time Custom
Final Storage Data
Reset Data Tables
Graph Setup
New
Edit
Copy
Delete
Run Options
Directory
Format
ROM Version : xxxx
OS Version : xxxx
OS Date : xxxx
OS Signature
Serial Number
Rev Board
Station Name : xxxx
Program Name : xxxxx
StartTime : xxxxx
Run Signature
DLD Signature
Battery : xxxx
Set Time/Date
Settings
Display
OV-11
CR5000 Overview
OV4.1 Data Display
Data
Run/Stop Program
File
Status
Configure, Settings
Curs or to Data
and Press
Enter
Real Time Tables
Real Time Custom
Final Storage Data
Reset Data Table
Graph Setup
List of Data Tables created by
active program
List of Data Tables created by
active program
List of Data Tables created by
active program
OV-12
All Tables
List of Data Tables created by
active program
Graph Type: Scope
Scaler: Manual
Upper: 0.000000
Lower: 0.000000
Display Val Off
Display Max Off
Display Mi n Off
OV4.1.1 Real Time Tables
List of Data Tables created by
active program. For Example,
Cursor down to
highlight desired
block and press
Enter
INSERT
Instruction
Function
Blank Line
Block
Insert Off
arameter names and some pick lists:
DataTable
TableName
> Temps
TrigVar
1
Size
1000
Insert blank line
Block Commands
Copy
Cut
Delete
BeginProg
Scan(1,sec,3,0)
To insert a block created by this
operation, cursor to desired place in
rogram and press Ins.
OV-18
OV4.4 Configure Display
Data
Run/Stop Program
File
Status
Configure, Settings
Cursor to
Configure,
Settings and
Press Enter
Set Tim e /Date
Settings
Display
CR5000 Overview
05/24/2000, 15:10:40
Year 2000
Month 5
Day 24
Hour 15
Minute 10
Set
Cancel
Security Enable
RS-23 2 Time Out: No
CR5000 Off
Light Dark
<- * ->
Enter Passwords:
Level 1:
Level 2:
Level 3:
click
Enter
Num
Password
Turn off dis play
Back Light
Contrast Adjust
Display Time O ut: No, Ye s (if yes)
Time out (min) 1
OV-19
CR5000 Overview
OV5. Specifications
Electrical specifications are valid over a -25° to +50°C range unless otherwise specified;testing over -40° to +85°C available as
an option, excludes batteries. Non-condensing environment required. Yearly calibrations are recommended to maintain electrical specifications.
PROGRAM EXECUTION RATE
The CR5000 can measure one channel and store the
result in 500 µs; all 40 SE* channels can be measured
in 8 ms (5 kHz aggregate rate).
ANALOG INPUTS
DESCRIPTION: 20 DF* or 40 SE, individually
configured. Channel expansion provided through
AM16/32, AM416, and AM25T Multiplexers.
RANGES, RESOLUTION, AND TYPICAL INPUT
NOISE: Basic Resolution (Basic Res) is the A/D
resolution of a single conversion. Resolution of DFM* with input reversal is half the Basic Res.
Noise values are for DFM with input reversal;noise
is greater with SEM.*
COMMON MODE RANGE: ±5 V
DC COMMON MODE REJECTION: >100 dB with
NORMAL MODE REJECTION: 70 dB @ 60 Hz
SUSTAINED INPUT VOLTAGE WITHOUT DAMAGE:
INPUT CURRENT: ±2 nA typ., ±10 nA max. @ 50°C
INPUT RESISTANCE: 20 GΩ typical
ACCURACY OF INTERNAL THERMOCOUPLE
REFERENCE JUNCTION:
†
:
±(0.05% of Reading + Offset)0° to 40°C
±(0.075% of Reading + Offset)-25° to 50°C
±(0.10% of Reading + Offset)-40° to 85°C
Offset for DFM w/input reversal =
Offset for DFM w/o input reversal =
Offset for SEM = 2Basic Res + 10 µV
Zero Integration:125 µs
250 µs Integration:475 µs
16.7 ms Integration:19.9 ms
20 ms Integration:23.2 ms
input reversal (>80 dB without input reversal)
when using 60 Hz rejection
±16 Vdc
±0.25°C, 0° to 40°C
±0.5°C, -25° to 50°C
±0.7°C, -40° to 85°C
Basic Res +1 µV
2Basic Res + 2 µV
ANALOG OUTPUTS
DESCRIPTION: 4 switched voltage; 4 switched cur-
rent; 2 continuous voltage; switched outputs active
only during measurements, one at a time.
RANGE: Voltage (current) outputs programmable
between ±5 V (±2.5 mA)
RESOLUTION: 1.2 mV (0.6 µA) for voltage (current)
outputs
ACCURACY: ±10 mV (±10 µA) for voltage (current)
outputs
CURRENT SOURCING: 50 mA for switched voltage;
15 mA for continuous
CURRENT SINKING: 50 mA for switched voltage;
5 mA for continuous (15 mA w/selectable option)
COMPLIANCE VOLTAGE: ±5 V for switched current
excitation
RESISTANCE MEASUREMENTS
Provides voltage ratio measurements of 4- and 6-wire
full bridges, and 2-, 3-, 4-wire half bridges. Direct
resistance measurements available with current excitation. Dual-polarity excitation is recommended.
VOLTAGE RATIO ACCURACY
excitation reversal and an excitation voltage of at
least 2000 mV.
±(0.04% Reading + Basic Res/4)0° to 40°C
±(0.05% Reading + Basic Res/4) -25° to 50°C
±(0.06% Reading + Basic Res/4) -40° to 85°C
ACCURACY
†
WITH CURRENT EXCITATION:
Assumes input and excitation reversal, and an
excitation current, I
cycle is determined by measuring the duration of a
specified number of cycles. Any of the 40 SE
analog inputs can be used; signal attenuation and
ac coupling may be required.
datalogger ground.
RESOLUTION: 70 ns/number of cycles measured
ACCURACY: ±(0.03% of Reading + Resolution)
1
Pulse W. Freq
PULSE COUNTERS
DESCRIPTION: Two 16-bit inputs selectable for switch
closure, high frequency pulse, or low-level ac.
MAXIMUM COUNT: 4 x 10
SWITCH CLOSURE MODE:
Minimum Switch Closed Time: 5 ms
Minimum Switch Open Time: 6 ms
Maximum Bounce Time: 1 ms open without
being counted.
HIGH FREQUENCY PULSE MODE:
Maximum Input Frequency: 400 kHz
Maximum Input Voltage: ±20 V
Voltage Thresholds: Count upon transition
from below 1.5 V to above 3.5 V at low frequen-
cies. Larger input transitions are required at high
frequencies because of 1.2 µs time constant filter.
LOW LEVEL AC MODE:
Internal ac coupling removes dc offsets up to
±0.5 V .
Input Hysteresis: 15 mV
Maximum ac Input Voltage: ±20 V
Minimum ac Input Voltage (sine wave):
(mV RMS)Range (Hz)
20 1.0 to 1000
200 0.5 to 10,000
1000 0.3 to 16,000
9
counts per scan
DIGITAL I/O PORTS
DESCRIPTION: 8 por ts selectable as binar y inputs or
control outputs.
OUTPUT VOLTAGES (no load):high 5.0 V ±0.1 V;
low < 0.1 V
OUTPUT RESISTANCE: 330 Ω
INPUT STATE: high 3.0 to 5.3 V; low -0.3 to 0.8 V
INPUT RESISTANCE: 100 kΩ
EMI and ESD PROTECTION
The CR5000 is encased in metal and incorporates
EMI filtering on all inputs and outputs. Gas discharge
tubes provide robust ESD protection on all terminal
block inputs and outputs. The following European
standards apply.
EMC tested and conforms to BS EN61326:1998.
Details of performance criteria applied are available
upon request.
Warning: This is a Class A product. In a domestic
environment this product may cause radio interference
in which case the user may be required to correct the
interference at the user’s own expense.
The normal environmental variables of concern are temperature and moisture.
The standard CR5000 is designed to operate reliably from -25 to +50°C (-40°C
to +85°C, optional) in noncondensing humidity. When humidity tolerances are
exceeded, damage to IC chips, microprocessor failure, and/or measurement
inaccuracies due to condensation on the various PC board runners may result.
Effective humidity control is the responsibility of the user.
The CR5000 is not hermetically sealed. Two half unit packets of DESI PAK
desiccant are located by the batteries. A dry package weighs approximately 19
grams and will absorb a maximum of six grams of water at 40% humidity and
11 grams at 80%. Desiccant packets can be dried out by placing the packets in
an oven at 120°C for 16 hours (desiccant only, not the CR5000).
Campbell Scientific offers two enclosures for housing a CR5000 and
peripherals. The fiberglass enclosures are classified as NEMA 4X (water-tight,
dust-tight, corrosion-resistant, indoor and outdoor use). A 1.25" diameter
entry/exit port is located at the bottom of the enclosure for routing cables and
wires. The enclosure door can be fastened with the hasp for easy access, or
with the two supplied screws for more p e r m anent applications. The white
plastic inserts at the corners of the enclosure must be removed to insert the
screws. Both enclosures are white for reflecting solar radiation, thus reducing
the internal enclosure temperature.
The Model ENC 12/14 fiberglass enclosure houses the CR5000 and one or
more peripherals. Inside dimensions of the ENC 12/14 are 14"x12"x5.5",
outside dimensions are 18"x13.5"x8.13" (with brackets); weight is 11.16 lbs.
The Model ENC 16/18 fiberglass enclosure houses the CR5000 and several
peripherals. Inside dimensions of the ENC 16/18 are 18"x16"x8¾", outside
dimensions are 18½"x18¾"x10½" (with brackets); weight is 18 lbs.
1.2 Power Requirements
The CR5000 operates at a nominal 12 VDC. Below 11.0 V or above 16 volts
the CR5000 does not operate properly.
The CR5000 is diode protected against accidental reversal of the positive and
ground leads from the battery. Input voltages in excess of 18 V may damage
the CR5000 and/or power supply. A transzorb provides transient protection by
limiting voltage at approximately 20 V.
System operating time for the batteries can be determined by dividing the battery
capacity (amp-hours) by the average system current drain. The CR5000
typically draws 1.5 mA in the sleep state (with display off), 4.5 mA with a 1 Hz
sample rate, and 200 mA with a 5 kHz sample rate.
1-1
Section 1. Installation and Maintenance
1.3 CR5000 Power Supplies
The CR5000 may be purchased with either a rechargeable lead acid battery or
with a low profile case without a battery.
While the CR5000 has a wide operating temperature range (-40 to +85°C
optional), the lead acid battery base is limited to -40 to +60°C. Exceeding this
range will degrade battery capacity and lifetime and could also cause
permanent damage.
1.3.1 CR5000 Lead Acid Battery BASE
Temperature range:-40° to +60°C
Charging voltage:17 to 24 VDC or 18 V RMS AC
NOTE
In normal operation a charging source should be connected to
the base at all times. The CR5000 stops measuring at ~11 V.
Battery life is shortened when discharged below 10.5 V.
The CR5000 includes a 12 V, 7.0 amp-hour lead acid battery, an AC
transformer (18 V RMS AC), and a temperature compensated charging circuit
with a charge indicating LED (Light Emitting Dio de). An AC transformer or
solar panel should be connected to the base at all times. The charging source
powers the CR5000 while float charging the lead acid batteries. The internal
lead acid battery powers the datalogger if the charging source is interrupted.
The lead acid battery specifications are given in Table 1.3-1.
The leads from the charging source connect to a wiring terminal plug on the
side of the base. Polarity of the leads to the connector does not matter. A
transzorb provides transient protection to the charging circuit. A sustained
input voltage in excess of 40V will cause the transzorb to limit voltage.
The red light (LED) on the base is on during charging with 17 to 24 VDC or
18 V RMS AC. The switch turns power to the CR5000 on or off. Battery
charging still occurs when the switch is o ff.
Should the lead acid batteries require replacement, consult Figure 1.3-1 for
wiring.
1-2
Section 1. Installation and Maintenance
LEAD ACID BATTERY REPLACEMENT
6V 7AH
LEAD ACID
BATTERY
++
6V 7AH
LEAD ACID
BATTERY
RED
BLACK
WHITE
--
FIGURE 1.3-1. Lead Acid Battery Wiring
Monitor the power supply using datalogger Instruction “Battery”. Incorporate
this instruction into data acquisition programs to keep track of the state of the
power supply. If the system voltage level consistently decreases through time,
some element(s) of the charging system has failed. Battery measures the
voltage at the CR5000 electronics, not the voltage of the lead acid battery. The
measured voltage will normally be about 0.3 V less than the voltage at the
internal or external 12 V input. This voltage drop is on account of a Schottkey
diode. External power sources must be disconnected from the CR5000 to
measure the actual lead acid battery voltage.
TABLE 1.3-1. CR5000 Rechargeable Battery and AC Transformer
Specifications
Lead Acid Battery
Battery TypeYuasa NP7-6
Float Life @ 25oC3 years minimum
Capacity7.0 amp-hour
Shelf Life, full charge6 months
Charge Time (AC Source)40 hr full charge, 20 hr 95% charge
Operating temperature-40°C to 60°C
There are inherent hazards associated with the use of sealed lead acid batteries.
Under normal operation, lead acid batteries generate a small amount of
hydrogen gas. This gaseous by-product is generally insignificant because the
hydrogen dissipates naturally before build-up to an explosive level (4%)
occurs. However, if the batteries are shorted or overcharging takes place,
hydrogen gas may be generated at a rate sufficient to create a hazard.
Campbell Scientific recommends:
1.A CR5000 equipped with standard lead acid batteries should NEVER be
used in applications requiring INTRINSICALLY SAFE equipment.
2.A lead acid battery should not be housed in a gas-tight enclosure.
1-3
Section 1. Installation and Maintenance
1.3.2 Low Profile CR5000
The low profile CR5000 option is not supplied with a battery base. See
Section 1.5 and 1.6 for external power connection considerations.
1.4 Solar Panels
Auxiliary photovoltaic power sources may be used to maintain charge on lead
acid batteries.
When selecting a solar panel, a rule-of-thumb is that on a stormy overcast day
the panel should provide enough charge to meet the system current drain
(assume 10% of average annual global radiation, kW/m
information, if available, could strongly influence the solar panel selection.
For example, local effects such as mountain shadows, fog from valley
inversion, snow, ice, leaves, birds, etc. shading the panel should be considered.
Guidelines are available from the Solar e x Corporation for solar panel selection
called "DESIGN AIDS FOR SMALL PV POWER SYSTEMS". It provid e s a
method for calculating solar panel size based on general site location and
system power requirements. If you need help in determining your system
power requirements contact Campbell Scientific's Marketing Department.
2
). Specific site
1.5 Direct Battery Connection to the CR5000 Wiring
Panel
Any clean, battery backed 11 to 16 VDC supply may be connected to the 12 V
and G connector terminals on the front panel. When connecting external
power to the CR5000, first, remove the green power connector from the
CR5000 front panel. Insert the positive 12 V lead into the right-most terminal
of the green connector. Insert the ground lead in the left terminal. Double
check polarity before plugging the green connector into the panel.
Diode protection exists so that an external battery can be connected to the green
G and 12 V power input connector, without loading or charging the internal
batteries. The CR5000 will draw current from the source with the largest
voltage. When power is connected through the front panel, switch control on
the standard CR5000 power supplies is by-passed (Figure 1.7-1).
1.6 Vehicle Power Supply Connections
1.6.1 CR5000 with Battery Base
The best way to power a CR5000 with battery base from a vehicle’s 12 V
power system is to use the DCDC18R to input the power to the CR5000’s
charger input (Figure 1.6-1). With this configuration the CR5000’s batteries
are charged when the vehicle power is available. When the vehicle’s voltage is
too low or off, the CR5000 is powered from its internal batteries.
1-4
Section 1. Installation and Maintenance
19 20
17 18
15 16
13 14
11 12
910
12
SE
2
1
HL
HL
DIFF
3
HL
4
HL
5
HL
6
HL
HL
8
7
HL
78
56
34
9
HL
10
HL
23 24
21 22
SE
12
11
H L
H L
DIFF
VX1
VX3
VX2
VX4
G
C6
C5
C7
C8
G
CONTROL I/O
Logan tah
CR5000
easurement and Control System
25 26
13
H L
POWER
UP
CAO1
>2.0V
G
CAO2
<0.8V
27 28
HL
IX1
5V
ROND
CS I/O
RS-232
COPTER
(OPTICALLY ISOLATED)
L
pc card
status
DCDC1R
BOOST REGULATOR
V in
V out
(11-16)
V
G 18V G
MADE IN
USA
29 30
16
15
14
H L
HL
IX2
IX3
IX4
IXR
P1
5V
G
SDI-12
12V
G
SDM-C1
SDM-C2
A B C
m
1
L
raph
char
4
P R S
T V
End
-
Del
ns
SN
2
5
0
P1
SDM-C3
17
H L
CONTROL I/O
C1C2C3
G
12V
POWER OUT
D E
Pgp
3
N O
6
W
PgDn
ESC
18
H L
G
SW-12
CRSOR
ST
Spc Cap
BSPC
ENTER
ALPA
C4
SW-12
19
HL
G
12V
POWER N
11 - 16 VDC
CATON
DC ONL
12V
ADE N SA
H L
20
39 40
37 38
35 36
33 34
31 32
FIGURE 1.6-1. CR5000 with DCDC18R
It is also possible to use the vehicle's 12 V power system as the primary supply
for a CR5000 with a battery base (Figure 1.6-2). When a vehicle’s starting
motor is engaged, the system voltage drops considerably below the 11 volts
needed for uninterrupted datalogger function. Diodes in the CR5000 in series
with the 12 V Power In connector allow the battery base to supply the needed
voltage during motor start. The diodes also prevent the separate power
systems of the CR5000 and vehicle from attempting to charge each other.
Because this configuration does not charge the CR5000 batteries, it is not
recommended.
CR5000
Panel
+12V
G
FIGURE 1.6-2. Alternate Connect on to Vehicle Power Supply
1-5
Section 1. Installation and Maintenance
1.6.2 CR5000 with Low Profile Base (No Battery)
If a CR5000 without batteries is to be powered from the 12 Volts of a motor
vehicle, a second 12 V supply is required. When the starting motor of a
vehicle with a 12 V electrical system is engaged, the voltage drops
considerably below 11 V, which would cause the CR5000 to stop measurement
every time the vehicle is started. The second 12 V supply prevents this
malfunction. Figure 1.6-3 shows connecting the two supplies to a CR5000
without a battery base. The diodes allows the vehicle to power the CR5000
without the second supply attempting to power the vehicle.
CR5000
Panel
+12V
G
FIGURE 1.6-3. Connecting CR5000 without Battery Base to Vehicle
1.7 CR5000 GROUNDING
Grounding of the CR5000 and its peripheral devices and sensors is critical in
all applications. Proper grounding will ensure the maximum ESD
(electrostatic discharge) protection and higher measurement accuracy.
1.7.1 ESD Protection
An ESD (electrostatic discharge) can originate from several sources. However,
the most common, and by far potentially the most destructive, are primary and
secondary lightning strikes. Primary lightning strikes hit the datalogger or
sensors directly. Secondary strikes induce a voltage in power lines or sensor
wires.
The primary devices for protection against ESD are gas-discharge tubes
(GDT). All critical inputs and outputs on the CR5000 are protected with GDTs
or transient voltage suppression diodes. The GDTs fire at 150 V to allow
current to be diverted to the earth ground lug. To be effective, the earth
ground lug must be properly connected to earth (chassis) ground. As shown in
Figure 1.7-1, the power ground and signal ground are independent lines until
joined inside the CR5000.
Power Supply
1-6
Section 1. Installation and Maintenance
Tie analog signal
shields and returns to
grounds (
) located in
analog input terminal
strips.
Analog Grounds
Excitation, CAO,
Pulse Counter Grounds ( )
Power Grounds (G)
Tie CAO and pulse-counter returns into grounds ( ) in CAO and pulse-counter
terminal strip. Large excitation return currents may also be tied into this ground
in order to minimize induced single-ended offset voltages in half bridge
measurements.
Tie 5 V, SW-12, 12 V and C1-C8
returns into power grounds (G).
12
34
56
78
910
11 12
13 14
15 16
17 18
G
3
6
9
HL
37 38
19
HL
POWER IN
11 - 16 V
CURSOR
ALPA
SIT
Spc Cap
BSPC
ENTER
19 20
HL
39 40
HL
CAUTION
DC ONL
G 12V
DC
5A Thermal fuse
1.5k E20A
10
20
GROUND
LUG
CS IO
COPUTER RS-232
(OPTICALL ISOLATED)
Batteries
pc card
status
On/Off
SE
1
2
HL
DIFF
SE
21
22
11
DIFF
HL
VX1
VX2
GC5C6C7C8G>2.0VG>0.8V5V5VGSDI-12
CONTROL I/OPOWER
Logan Utah
3
HL
HL
Ground Plane
23 24
25 26
12
13
HL
HL
VX3
VX4
CAO1
CAO2
UP
CR5000 ICROLOGGER
4
HL
27 28
14
HL
IX1
IX2
IX3
To CR5000
Electronics
5
HL
29 30
15
HL
IX4
6
HL
31 32
16
HL
IXR
P1
12VGSDM-C1
7
HL
33 34
17
HL
CONTROL I/O
P2C1C2C3C4
SDM-C2
SDM-C3G12VGSW-12
POWER UP
SW12
Control
1.85A
Thermal fuse
A B C
m
1
G I
L
Graph
char
4
10µf
T U V
P R S
End
7
)
- (
Ins
Del
HL
35 36
HL
2
5
0
8
18
SW-12
0.9A
Thermal
fuse
D E
PgUp
N O
W
PgDn
ESC
Star Ground at
Ground Lug
1.85A
Thermal fuse
External
Power Input
SN
ADE IN USA
FIGURE 1.7-1. Schematic of CR5000 Grounds
The 9-pin serial I/O ports on the CR5000 are another path for transients to
enter and damage the CR5000. Communications devices such a telephone or
short-haul modem lines should have spark gap protection. Spark gap
protection is often an option with these products, so it should always be
requested when ordering. The spark gaps for these devices must be connected
to either the CR5000 earth ground lug, the enclosure ground, or to the earth
(chassis) ground.
1-7
Section 1. Installation and Maintenance
A good earth (chassis) ground will minimize damage to the datalogger and
sensors by providing a low resistance path around the system to a point of low
potential. Campbell Scientific recommends that all dataloggers be earth
(chassis) grounded. All components of the system (dataloggers, sensors,
external power supplies, mounts, housings, etc.) should be referenced to one
common earth (chassis) ground.
In the field, at a minimum, a proper earth ground will consist of a 6 to 8 foot
copper sheathed grounding rod driven into the earth and connected to the
CR5000 Ground Lug with a 12 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, consult the literature
on lightning protection or contact a qualified lightning protection consultant.
An excellent source of information on lightning protection can be located via
the web at http://www.polyphaser.com.
In vehicle applications, the earth ground lug should be firmly attached to the
vehicle chassis with 12 AWG wire or larger.
In laboratory applications, locating a stable earth ground is not always obvious.
In older buildings, new cover plates on old AC sockets may indicate that a
safety ground exists when in fact the socket is not grounded. If a safety ground
does exist, it is good practice to verify that it carries no current. If the integrity
of the AC power ground is in doubt, also ground the system through the
buildings, plumbing or another connection to earth ground.
1.7.2 Effect of Grounding on Measurements: Common Mode
Range
The common mode range is the voltage range, relative to the CR5000 ground,
within which both inputs of a differential measurement must lie in order for the
differential measurement to be made correctly. Common mode range for the
CR5000 is ±5.0 V. For example, if the high side of a differential input is at 2 V
and the low side is at 0.5 V relative to CR5000 ground, a measurement made on
the ±5.0 V range would indicate a signal of 1.5 V. However, if the high input
changed to 6 V, the common mode range is exceeded and the measurement may
be in error.
Common mode range may be exceeded when the CR5000 is measuring the
output from a sensor which has its own grounded power supply and the low
side of the signal is referenced to the sensors power supply ground. If the
CR5000 ground and the sensor ground are at sufficiently different potentials,
the signal will exceed the common mode rang e. To solve this problem, the
sensor power ground and the CR5000 ground should be connected, creating
one ground for the system.
In a laboratory application, where more than one AC socket may be used to
power various sensors, it is not safe to assume that the power grounds are at the
same potential. To be safe, the ground of all the AC sockets in use should be
tied together with a 12 AWG wire.
1-8
Section 1. Installation and Maintenance
1.7.3 Effect of Grounding on Single-Ended Measurements
Low-level single-ended voltage measurements can be problematic because of
ground potential fluctuations. The grounding scheme in the CR5000 has been
designed to eliminate ground potential fluctuations due to changing return
currents from 12 V, SW-12, 5 V, and the control ports. This is accomplished
by utilizing separate signal grounds (
advantage of this design, observe the following grounding rule:
) and power grounds (G). To take
NOTE
Always connect a device’s ground next to the active terminal
associated with that ground.
Examples:
1.Connect 5 Volt, 12 Volt, and control grounds to G terminals.
2.Connect excitation grounds to the closest
terminal block.
3.Connect the low side of single-ended sensors to the nearest
the analog input terminal blocks.
4.Connect shield wires to the nearest
terminal blocks.
If offset problems occur because of shield or ground leads with large current
flow, tying the problem leads into the
and pulse-counter channels should help. Problem leads can also be tied
directly to the ground lug to minimize induced single-ended offset voltages.
terminal on the analog input
terminals next to the excitation, CAO,
1.8 Powering Sensors and Peripherals
terminal on the excitation
terminal on
The CR5000 is a convenient source of power for sensors and peripherals
requiring a continuous or semi-continuous 5 VDC or 12 VDC source. The
CR5000 has 2 continuous 12 Volt (12V) supply terminals, 2 switched 12 Volt
(SW-12) supply terminals, and 2 continuous 5 Volt (5V) supply terminals.
Voltage on the 12V and SW-12 terminals will change with the CR5000 supply
voltage. The 5V terminal is regulated and will always remain near 5 Volts
(±4%)so long as the CR5000 supply voltage remains above 11 Volts. The 5V
terminal is not suitable for resistive bridge sensor excitation. Table 1.8-1
shows the current limits of the 12 Volt and 5 Volt ports. Table 1.8-2 shows
current requirements for several CSI peripherals. Other devices normally have
current requirements listed in their specifications. Current drain of all
peripherals and sensors combined should not exceed current sourcing limits of
the CR5000.
1-9
Section 1. Installation and Maintenance
Make certain that the primary source of power for the CR5000 can sustain the
current drain for the period of time required. Contact a CSI applications
engineer for help in determining a power budget for applications that approach
the limits of a given power supply’s capabilities. Be particularly cautious
about any application using solar panels and cellular telephone or radio,
applications requiring long periods of time between site visits, or applications
at extreme temperatures.
Table 1.8-1 Current Sourcing Limits
TerminalsCurrent Source Limit
SW12< 900 mA @ 20°C
< 729 mA @ 40°C
< 630 mA @ 50°C
< 567 mA @ 60°C
< 400 mA @ 80°C
12V + SW12< 1.85 A @ 20°C
< 1.50 A @ 40°C
< 1.30 A @ 50°C
< 1.17 A @ 60°C
< 0.85 A @ 80°C
5V + CSI/O< 200 mA
TABLE 1.8-2. Typical Current Drain for Some CR5000 Peripherals
Controlling power to an external device is a common function of the CR5000.
Many devices can conveniently be controlled with the SW-12 (Switched 12
Volt) terminals on the CR5000. Table 1.8-1 shows the current available from
SW-12 port.
Applications requiring more control channels or greater power sourcing
capacity can usually be satisfied with the use of Campbell Scientific’s
A21REL-12 Four Channel Relay Driver, A6REL-12 Six Channel Relay
Driver, SDM-CD16AC 16 Channel AC/DC Relay Module, or by using the
control (C1-C8) ports as described in Section 1.9.1
1-10
Section 1. Installation and Maintenance
1.9.1 Use of Digital I/O Ports for Switching Relays
Each of the eight digital I/O ports can be configured as an output port and set
low or high (0 V low, 5 V high) using the PortSet or WriteIO instructions. A
digital output port is normally used to operate an external relay driver circuit
because the port itself has a limited drive capability (2 .0 mA minimum at 3.5
V).
Figure 1.9-1 shows a typical relay driver circuit in conjunction with a coil
driven relay which may be used to switch external power to some device. In
this example, when the control port is set high, 12 V from the datalogger passes
through the relay coil, closing the relay which completes the power circuit to a
fan, turning the fan on.
In other applications it may be desirable to simply switch power to a device
without going through a relay. Figure 1.9-2 illustrates a circuit for switching
external power to a device without going through a relay. If the peripheral to be
powered draws in excess of 75 mA at room temperature (limit of the 2N2907A
medium power transistor), the use of a relay (Figure 1.9-1) would be required.
Other control port activated circuits are possible for applications with greater
current/voltage demands than shown in Figures 1.9-1 and 2. For more
information contact a Campbell Scientific applications engineer.
FIGURE 1.9-1. Relay Driver Circuit with Relay
1-11
Section 1. Installation and Maintenance
FIGURE 1.9-2. Power Switching without Relay
1.10 Maintenance
The CR5000 power supplies require a minimum of routine maintenance.
When not in use, the rechargeable supply should be stored in a cool, dry
environment with the AC charger active.
1.10.1 Desiccant
The CR5000 is shipped with desiccant to reduce humidity. Desiccant should
be changed periodically. To prevent corrosion in uncontrolled or condensing
atmospheres, the CR5000 must be placed inside a weather tight instrument
enclosure with desiccant. Do not completely seal the enclosure if lead acid
batteries are present. Hydrogen gas generated by the batteries may build up to
an explosive concentration.
1.10.2 Replacing the Internal Battery
CAUTION
Misuse of the lithium battery or installing it improperly can
cause severe injury. Fire, explosion, and severe burn
hazard! Do not recharge, disass emble, heat above 100°C
(212°F), solder directly to the cell, incinerate, nor expose
contents to water.
The CR5000 contains a lithium battery that operates the clock and SRAM
when the CR5000 is not powered. The CR5000 does not draw any power from
the lithium battery while it is powered by a 12 VDC supply. In a CR5000
stored at room temperature, the lithium battery should last approximately 10
years (less at temperature extremes). Where the CR5000 is powered most or
all of the time the lithium cell should last much longer.
1-12
Section 1. Installation and Maintenance
While powered from an external source, the CR5000 measures the voltage of
the lithium battery daily. This voltage is displayed in the status table (Section
1.6) A new battery will have approximately 3.6 volts. The CR5000 Status
Table has a “Lithium Battery” field. This field is either “ True” (battery is
good) or “False” (replace battery). If the lithium cell is removed or allowed to
discharge below the safe level, the CR5000 will still operate correctly while
powered. Without the lithium battery, the clock will reset and data will be lost
when power is removed.
A replacement lithium battery can be purchased from Campbell (p art number
13497). Table 1.10-1 lists the specifications of the battery.
Capacity1650 mAh
self discharge rate1%/year @ 20°C
Diameter14.5 mm
Length33.5 mm
Operating temperature range-55°C to 85°C
The CR5000 must be partially disassembled to replace the lithium cell.
The battery is replaced as shown in Figures 1.10-4 to 1.10-6. The battery is
held in place by a band clamp. It can be removed by gently prying the band
from the sides of the battery holder.
SANYO
FIGURE 1.10-4. Removal of CR5000 back plate and lithium battery
location.
1-13
Section 1. Installation and Maintenance
The new cell is placed into the battery holder, observing the polarity markings
on the holder. Replace the band clamp, ensuring that both ends snap securely
into the battery holder.
BATTERY2
(datalogger/cr5000)
FIGURE 1.10-5. Loosening of band clamp.
SANYO
1-14
Section 1. Installation and Maintenance
FIGURE 1.11-6. Removal of band clamp and battery.
SANYO
1-15
Section 1. Installation and Maintenance
This is a blank page.
1-16
Section 2. Data Storage and Retrieval
The CR5000 can store individual measurements or it may use its extensive processing
capabilities to calculate averages, maxima, minima, histograms, FFTs, etc., on periodic or
conditional intervals. Data are stored in tables. For simplicity, the PC9000 program
generator allows a maximum of three data tables (in the native language up to 30 data
tables can be created). The number of tables and the values to output in each table are
selected when running the program generator (Overview) or when writing a datalogger
program directly (Sections 4 – 9).
2.1 Data Storage in CR5000
There are two areas for data storage on the CR5000:
Internal Static RAM
PCMCIA PC Card
Internal RAM is used as either the sole storage area for a data table or as a
buffer area when data are sent to PC card.
When the CR5000 gets a request for data that is stored on a PC card, the
CR5000 only looks for the data in the PC card when the oldest data are
requested or if the data are not available in internal RAM.
In the CRBASIC program, the DataTable instr uction sets the size of the data
table or buffer area. A data table can be stored in a PC card by including the
CardOut instruction within the data table declaration. A maximum of 30
tables can be created by the program.
2.1.1 Internal Static RAM
Internal RAM is used as either the sole storage area for a data table or as a
buffer area when data are sent to a PC card. The only limit on the number of
tables is the available memory. Internal RAM is battery backed. Data remain in
memory when the CR5000 is powered down under program control. Data in
RAM are erased when a different program is loaded and run.
There are 2 Mbytes of SRAM. Some of this is used by the operating system
and for program storage. The rest is available for data storage. When a new
program is compiled, the CR5000 checks that there is adequate space in SRAM
for the data tables; a program that requests more space than is available will
not run.
2.1.2 PCMCIA PC Card
The CR5000 has a built in PC card slot for a Type I, Type II, or Type III
PCMCIA card. PCMCIA PC Cards allows expanding the CR5000’s storage
capacity. SRAM and ATA cards are supported. A program can send a
maximum of 30 data tables to PC cards.
2-1
Section 2. Data Storage and Retrieval
When a new program is compiled that sends data to the PC card, the CR5000
checks if a card is present and if the card has adequate space for the data
tables. If the card has adequate space, the tables will be allocated an d the
CR5000 will start storing data to them. If there is no card or if there is not
enough space, the CR5000 will warn that the card is not being used and will
run the program, storing the data in SRAM only. When a card with enough
available memory is inserted the CR5000 will create the data tables on the card
and store the data that is accumulated in SRAM (Section 2.3.4).
Data stored on cards can be retrieved through the communication link to the
CR5000 or by removing the card and inserting it in a PC card slot in a
computer. The PCMCIA interface is much faster than the communication link.
With large files transferring the PC card is faster than collecting the data over
the link.
The CR5000 uses an MS DOS format for the PC cards. Cards can be
formatted in a PC or in the CR5000.
2.2 Internal Data Format
TABLE 2.2-1 CR5000 DATA TYPES
Data TypeSizeRangeResolution
LONG4 bytes-2,147,483,648 to +2,147,483,6471 bit (1)
IEEE44 bytes1.8 E -38 to 1.7 E 3824 bits (about 7 digits)
FP22 bytes-7999 to +799913 bits (about 4 digits)
Data are stored internally in a binary format. Variables and calculations are
performed internally in IEEE 4 byte floating point with some operations
calculated in double precision. There are two data types used to store data:
IEEE4 four byte floating point and Campbell Scientific two byte floating point
(FP2). The data format is selected in th e instruction that outputs the data.
Within the CR5000, time is stored as integer seconds and nanoseconds into the
second since midnight, the start of 1990. While 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 provides 3 or 4 significant
digits of resolution, and requires half the memory space as IEEE 4 byte
floating point (2 bytes per value vs 4).
TABLE 2.2-2. Resolution and Range Limits of FP2 Data
ZeroMinimum MagnitudeMaximum Magnitude
0.000±0.001±7999.
The resolution of FP2 is redu ced to 3 significant digits when the first (left
most) digit is 8 or greater (Table 2.2-2). 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 low resolution 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 high resolution or could be offset by 20 feet
(transforming the range to 30 to 70 feet).
2-2
Absolute ValueDecimal Location
80 -799.9XXX.X
800 - 7999.XXXX.
2.3 Data Collection
Data can be transferred into a computer using PC9000 via a communications
link or by transferring a PC card from the PC9000 to the computer. There are
three ways to collect data via a link to the CR5000 using the PC9000 software.
The collect menu is used to collect any or all stored data and is used for most
archival purposes.
On each of the RealTime screens, there is a "write file" check box. Data
stored to the table while the box is checked are also stored in a file on the
PC.Logger Files under the T
PC card. This can be used to retrieve a data file.
Section 2. Data Storage and Retrieval
TABLE 2.2-3 FP2 D ecimal Location
0 -7.999X.XXX
8 -79.99XX.XX
ools menu has the option of retrieving a file from a
When the CR5000 is used without a computer in the field, or large data files
are collected on a PC card, the PC card can be transported to the computer
with the data on it.
The format of the data files on the PC card is different than the data file
formats created by PC9000 when the collect or write file options are used.
Data files retrieved from the Logger Files screen or read directly from the PC
card generally need to be converted into another format to be used (Section
2.3.4.2).
2.3.1 The Collect Menu
When Retrieve Data is selected in the Collect menu, PC9000 displays the
Collect Data dialog box (Figure 2.3.1). The station name (may be entered by
the user when a program is downloaded) is retrieved from the connected
CR5000 and shown at the top.
2-3
Section 2. Data Storage and Retrieval
FIGURE 2.3.1. Collect Data Dialog Box
2.3.1.1 File Type
ASCII With Time – Click here to store the data as an ASCII (TOA5, Section
2.4) file. Each record will be date and time stam ped.
Binary With Time – Click here to store the data as a binary file (TOB1,
Section 2.4). Each record will be date and tim e stamped.
ASCII Without Time – Click here to store the data as an ASCII file (TOA5,
Section 2.4). There will be no date and tim e stamps.
Binary Without Time – Click here to store the data as a binary file (TOB1,
Section 2.4). There will be no date and tim e stamps.
2.3.1.2 Collection Method
All Records, Create New File – Collects the entire table stored in the
CR5000. PC9000 gets the current record number from the table in the CR5000
and then retrieves the oldest record in the table up to the current record
number. The number in the file name is incremented to create the file name in
which the data are stored.
2-4
Section 2. Data Storage and Retrieval
Since Last, Create New File – Click here to save new data in a new file.
PC9000 searches for the last file with the Root name, gets the last record
number from that file, then the current record from the table in the CR5000,
and requests all records in between those numbers from the CR5000. The
number in the file name is incremen ted to create the file name in which the
data are stored.
Since Last, Append To File – Click here to append retrieved data to the end
of the named file. PC9000 searches for the last file with the Root name, gets
the last record number from that file, then the current record from the table in
the CR5000, and requests all records in between those numbers from the
CR5000. The data are appended to the existing file.
Number of Records, Create New File Collects the number of records entered
in Num of Recs box. Retrieves that many records back from the current record
number. The number in the file name is incremented to create the file name in
which the data are stored.
Num of Recs – Enabled when Number of Records, Create New File is
checked. Enter the number of records back from the current record number to
retrieve.
2.3.1.3 Table Selection
All Tables – When the All Tables box is checked, all data tables except the
Public and Status tables are collected when collection is executed. The data
from each table are stored in a file with the table name and increment number
(see Table naming). This is a convenient method of collecting all data from
the CR5000. The first time data are collected, all data is checked and the file
type and collection method are selected. PC9000 remembers the settings, and
on subsequent collections the operator only needs to click on execute.
Stream – acts the same as Write file for the selected Table Name (Section
2.3.2).
Table Name – When "All tables" is not checked, a single data table can be
selected for collection. The Table Name box is used to select the table to be
retrieved.
Reset Table – Resetting a data table erases all data in the table and sets the
record number back to 0. Unless the table is configured as fill and stop by the
CR5000 program, it is not necessary to reset the table because the "Since Last"
collection option can be used to get only the new data. If the table is
configured as fill and stop, it stops collecting data once full and must be reset
before more data can be collected. Use with caution.
2.3.1.4 File Control
The default naming for a file stored to disk is to use the data table name
appended with a 2 digit number and the extension .DAT. If the table name is
longer than 6 characters, it is truncated. For example, the table name EVENTS
is stored as EVENTS00.DAT. A table named CYLTEMP is stored as
CYLTEM00.DAT.
2-5
Section 2. Data Storage and Retrieval
When the file collection options that create a new file are used, each time a
table is collected, the 2 digit number is incremented (e.g., EVENTS00.DAT,
EVENTS01.DAT, EVENTS03.DAT ...). PC9000 searches the selected
directory and adds 1 to the number of the highest numbered file of the
matching name to create the new name.
When the new data are to be appended to the existing file, PC9000 searches the
selected directory for the highest numbered file of the matching name, and
appends the data to that file.
Change File – Press the Change File button to change the n a me of the file to
be stored on disk. This is not possible when "All Tables" is selected.
Set Path – Press here to select a different disk or directory to write the files to.
EXECUTE – Press here to begin collecting data.
2.3.1.5 Status Messages
TABLE SIZE – Shows the size (in records) of the table highlighted in the
Table Name box above.
COLLECTION RANGE – Displays the range of records to be collected.
More records than the last number in this range may actually be retrieved.
LOGGER MESSAGE – Displays messages from the CR5000.
2.3.2 RealTime Write File
This feature is provided to allow the user to start and stop collecting data for
some event without leaving the real-time window. Check this box to write the
current table to a file in the computer. Writing begins with the current record
and continues until the Write File box is unchecked or until the window is
closed.
This collection method requires that the PC is connected to the CR5000 while
the data are collected. Because the beginning and end points of the data file
are roughly determined by when the box is checked, this is best suited to
collecting data when the user rather than the measurements determine when
data should be collected.
The bottom line of the screen will periodically display the current record being
written. The name of the file written will be the f ir st six characters of the table
name plus 2 digits and an extension of .DAT. If the table name is MAIN then
the first file created will be named MAIN00.DAT. The nex t file will be named
MAIN01.DAT and so on. It takes a little tim e to open the file so be sure it is
opened in advance of the event you want to store.
2-6
The file is written to every 1 second so it is important the table size be large
enough to store sufficient data between writes. During each write operation,
the data may not be updated on the screen but this will not effect the stored
data.
2.3.3 Logger Files Retrieve
Logger Files under the PC9000 tools menu allows the user to check the
programs stored in CPU Flash memory and the files stored on the PCMCIA
cards. Any of the files shown in logger files can be copied to the computer by
highlighting the file and pressing the retrieve button. Data files in the CR5000
CPU and Flash memory are not shown.
The retrieved data file is stored on the co mputer in the same form that it was
stored on the PC card (TOB2). This format generally needs to be converted to
another format for analysis (Section 2.3.4)
Section 2. Data Storage and Retrieval
2.3.4 Via PCMCIA PC Card
When the CR5000 is used without a computer in the field, or large data files
are collected on a PC card, the PC card can be transported to the computer
with the data on it.
2.3.4.1 Inserting a PC Card
A card inserted in the PCMCIA slot when no program is running or when a
program is running that does not use the PC card does not cause a response
FIGURE 2.3-2. Logger Files Dialog Box
2-7
Section 2. Data Storage and Retrieval
from the CR5000. When a new program is compiled that sends data to the PC
card, the CR5000 checks if a card is present and if the card has adequate space
for the data tables. If the card has adequate space, the tables will b e allo cated
and the CR5000 will start storing data to them.
When the running program sends data to the card, and a card is inserted, the
CR5000 will detect the card and display a message.
A card that has no data tables files with the same names as those created by the
program causes the message:
If the card has existing data table files that match those created by the program
there is the message:
New Card. Start Storing?
No
Yes
Tables on Card Must be Reset. Proceed?
No
Yes
Same Card
The “No” option [do not start storing data to the card] allows using the
CR5000 to check the card and to erase files or to format the card if necessary.
The “Yes” option is to start storing data right away, resetting any tables with
the same name that exist on the card. This is the option that is generally used
when a blank (but formatted) card is inserted or when a card is reinserted after
transferring data to a computer.
The “Same Card” option is only available if the data table header matches the
program exactly and the program has already run with a card. This option
allows removing the card to read it and then returning it to the CR5000 and
having the new data appended to the data already on the card. If you choose to
use this option be aware that if the CR5000 overwrites its buffer while the card
is out, there will be a gap in the data on the car d.
2.3.4.2 Removing Card from CR5000
The PC Card Status LED just above the PC card door is lit when the card is
being written to.
CAUTION
Removing a card while it is active can cause garbled data
and can actually damage the card. Do not switch off the
power while the cards are present and active.
2-8
To remove a card, use the keyboard display to go to the PcCard menu; move
the cursor to “Remove Card : and press Enter. The Status will show “You may
now remove the card”. Remove the card. Th e card will be reactivated if not
removed.
When the PC card is inserted in a computer, the data files can be copied to
another drive or used directly from the PC card just as one would from any
other disk. In most cases, however, it will be necessary to convert the file
format before using the data.
2.3.4.3 Converting File Format
The CR5000 stores data on the PC card in TOB2 Format. TOB2 is a binary
format that incorporates featu r es to improve reliability of the PC Cards. TOB2
allows the accurate determination of each record’s time without the space
required for individual time stamps.
When TOB2 files are converted to another format, the number of records may
be greater or less than the number requested in the data table declaration.
There are always at least two additional frames of data allocated. When the
file is converted these will result in additional records if no lapses occurred. If
more lapses occur than were anticipated, there may be fewer records in the file
than were allocated.
PC9000’s file converter will convert TOB1 or TOB2 files to other formats.
The Convert Data Files option is in the File Menu. The options for TOB2
appear after the name of the file to convert has been selected (Figure 2.3-3.)
Section 2. Data Storage and Retrieval
FIGURE 2.3-3 File Conversion Dialog Box
2-9
Section 2. Data Storage and Retrieval
"File Format","Station","Logger","Serial No.","OS Ver","DLD File","DLD Sig","Table Name"
"TIMESTAMP","RECORD","Field Name","Field Name","Field Name"
"TS","RN","Field Units","Field Units","Field Units"
"","","Processing","Processing","Processing"
"Field Data Type","Field Data Type","Field Data Type","Field Data Type","Field Data Type"
timestamp,record number,field data , field data,field data,
FIGURE 2.4.1 Header Information
2.4 Data Format on Computer
The format of the file stored on disk can be either ASCII or Binary depending
on the file type selected in the collect data dialog box. Files collected from a
real time window are always stored in ASCII format.
2.4.1. Header Information
Every data file stored on disk has an ASCII header at the beginning. The
header gives information on the format, datalogger and program used to collect
the data. Figure 2.4.1 is a sample header where the text in the header is a
generic name for the information contained in the header. The entries are
described following the figure.
File Format
The format of the file on disk. TOA5 is an ASCII format. TOB1 is a Binary
format. This information is used by the historical graphing and file conversion
functions of PC9000.
Station Name
The station name set in the logger that the data was collected from.
Logger Model
The datalogger model that the data was collected from.
Logger Serial Number
The serial number of the logger that the data was collected from. This is the
serial number of the CR5000 CPU.
Operating System Version
The version of the operating system in the logger that the data was collected
from.
DLD File
The name of the DLD file that was running when the data were created.
DLD Signature
The signature of the DLD file that created the data.
2-10
Table Name
The data table name.
Section 2. Data Storage and Retrieval
Field Name
The name of the field in the data table. This name is created by the CR5000 by
appending underscore ( _ ) and a three character mnemonic for the output
processing.
Field Units
The units for the field in the data table. Units ar e assigned in the program with
the units declaration.
Field Processing
The output processing that was used when the field was stored.
Smp = Sample
Max = Maximum
Min = Minimum
Avg = Average
Field Data Type
This header line is only in TOB1 binary f ormat and identifies the data type for
each of the fields in the data table.
This field is the date and time stamp for this r ecord. It indicates the time,
according to the logger clock, that each record was stored.
Record Number
This field is the record number of this record. The number will increase up to
2E32 and then start over with zero. The record number will also start over at
zero if the table is reset.
Field Data
This is the data for each of the fields in the record.
2.4.2 TOA5 ASCII File Format
The following is a sample of a file collected as ASCII with time stamps.
This is a sample of a file collected as Binary with time stamps.
TOB1,Bob's9K,CR5000,1048575,1.00,EXPLDAT.DLD,4339,Temp
SECONDS,NANOSECONDS,RECORD,RefTemp_Avg,TC_Avg(1),TC_Avg(2),TC_Avg(3),TC_Avg(4)
SECONDS,NANOSECONDS,RN,degC,degC,degC,degC,degC
,,,Avg,Avg,Avg,Avg,Avg
UINT4,UINT4,UINT4,IEEE4,IEEE4,IEEE4,IEEE4,IEEE4
(data lines are binary and not directly readable )
This is an example of binary without time stamps.
TOB1,Bob's9K,CR5000,1048575,1.00,EXPLDAT.DLD,4339,Temp
RefTemp_Avg,TC_Avg(1),TC_Avg(2),TC_Avg(3),TC_Avg(4)
degC,degC,degC,degC,degC
Avg,Avg,Avg,Avg,Avg
IEEE4,IEEE4,IEEE4,IEEE4,IEEE4
(data lines are binary and not directly readable )
2.4.3 TOB2 Binary File Format
The TOB2 binary format has a header similar to the other formats. TOB2 data
is stored in fixed size “frames” that generally contain a number of records.
The size of the frames is a function of the record size. The frames are time
2-12
Section 2. Data Storage and Retrieval
stamped, allowing the calculation of time stamps for their records. If there is a
lapse in periodic interval records that does not occur on a frame boundary, an
additional time stamp is written within th e frame and its occurrence noted in
the frame boundary. This additional time stamp takes up space that would
otherwise hold data.
When TOB2 files are converted to another format, the number of records may
be greater or less than the number requested in the data table declaration.
There are always at least two additional frames of data allocated. When the
file is converted these will result in additional records if no lapses occurred. If
more lapses occur than were anticipated, there may be fewer records in the file
than were allocated.
2-13
Section 2. Data Storage and Retrieval
This is a blank page.
2-14
Section 3. CR5000 Measurement Details
3.1 Analog Voltage Measurement Sequence
The CR5000 measures analog voltages with either an integrate and hold or a
sample and hold analog to digital (A/D) conversion. The A/D conversion is
made with a 16 bit successive approximation technique which resolves the
signal voltage to approximately one part in 60,000 of the full scale range. The
maximum conversion rate is 5000 per second or one measurement every 200
µs (10,000 measurements per second on a single channel).
The timing of CR5000 measurements is precisely controlled. The measurement
schedule is determined at compile time and loaded into memory. This schedule
sets interrupts that drive the measur ement task.
Using two different voltage measurement instructions with the same
voltage range takes the same measurement time as using one instruction
with two repetitions. (This is not the case in the CR10X, 21X, CR23X and
CR7 dataloggers where there is always a setup time for each instruction.)
There are four parameters in the measurement instructions that may vary the
sequence and timing of the measurement. These are options to measure and
correct the ground offset on single-ended measurements each time
measurements are made (MeasOfs), reverse the high and low differential
inputs (RevDiff), to set the time to allow the signal to settle between switchin g
to a channel and making a measurement (SettlingTime), and the length of time
to integrate a measurement (Integ), and to reverse the polarity of excitation
voltage (RevEx).
3.1.1 Voltage Range
The CR5000 has 5 fixed voltage ranges and autorange. The 16 bit A/D has a
resolution of 1 part in 2
the A/D is applied to a range approxim ately 9% greater than the Full Scale
Range resulting in the 1 part in 60,000 resolution over the FSR. For example,
on the ±20 mV range the full scale range is 40 mV [20 - (-20)] and the
resolution is two thirds of a microvolt; 0.04 / 0.000000667 = 60,000. The
smaller the voltage range, the b etter the absolute resolution. In general, a
measurement should use the smallest fixed voltage range that will
accommodate the full scale output of the sensor being measured. If the voltage
exceeds the range, the CR5000 indicates the overrange by returning Not-ANumber (NAN) for the measurement.
For signals that do not fluctuate too rapidly, AutoRange allows the CR5000 to
automatically choose the voltage range to use. AutoRange causes the CR5000
to make two measurements. The first measurement determines the range to
use. It is made with no integration on the ±5000 mV range. The second
measurement is made on the appropriate range using the integration specified
in the instruction. Both measurements use the settling time programmed in the
instruction. AutoRange optimizes resolution but takes longer than a
measurement on a fixed range, because of the two measurements required.
16
(65,536). To allow for some overrange capabilities
3-1
Section 3. CR5000 Measurement Details
An AutoRange measurement will return Not-A-Number if th e voltage exceeds
the range picked by the first measurement. To avoid problems with a signal on
the edge of a range, AutoRange selects the next larger range when the signal
exceeds 90% of a range.
AutoRange is very good for a signal that occasionally exceeds a particular
range, for example, a Type J thermocouple that most of the time will be less
than 360 °C (±20 mV range) but will occasionally see temperatu r es as h ig h as
400 °C (±50 mV range, Table 3.4-2). AutoRange should not be used for
rapidly fluctuating signals, particularly those whose signal traverses several
voltage ranges rapidly because of the possibility that the signal could change
ranges between the range check and the actual measurement.
3.1.2 Reversing Excitation or the Di ffer ential Input
Reversing the excitation polarity or the differential input are techniques to
cancel voltage offsets that are not part of the signal. For example, if there is a
+5 µV offset in the measurement circuitry, a 5 mV signal will be m easured as
5.005 mV. When the input is reversed, the measurement will be
-4.995 mV. Subtracting the second measurement from the first and dividing
by 2 gives the correct answer: 5.005-(-4.995)=10, 10/2=5. Most offsets are
thermocouple effects caused by temperature gradients in the measurement
circuitry or wiring.
Reversing the excitation polarity cancels voltage offsets in the sensor, wiring,
and measurement circuitry. One measurement is made with the excitation
voltage with the polarity programmed and a second measurement is made with
the polarity reversed. The excitation "on time" for each polarity is exactly the
same to ensure that ionic sensors do not polarize with repetitive measurements.
Reversing the inputs of a differential measurement cancels offsets in the
CR5000 measurement circuitry and improves common-mode rejection. One
measurement is made with the high input referenced to the low input and a
second with the low referenced to the high.
3.1.3 Measuring Single-Ended Offset
The single-ended offset is a voltage offset on a single-ended input. It is
measured by internally switching the input to ground and measuring the
voltage. When a single-ended measurement is made this offset is corrected for
in the calibration. The offset can either be measured automatically as part of
the background calibration or as part of the measurement sequence each time
the measurement is made (adding to the time to make the measurement).
When the offset is measured in the measurement sequence, the offset is
measured once prior to completing all of the instruction reps.
The MeasOfs parameter in instructions that make single-ended voltage
measurements is used to force the offset measurement. In most cases the
background calibration is adequate. Additional accuracy can be gained by
making the offset measurement with each measurement instruction when the
offset is changing rapidly as it would during when the CR5000 is undergoing
rapid temperature swings.
3-2
3.1.4 SettlingTime
When the CR5000 switches to a new channel or switches on the excitation for
a bridge measurement, there is a finite amount of time required for the signal to
reach its true value. Delaying between setting up a measurement (switching to
the channel, setting the excitation) and making the measurement allows the
signal to settle to the correct value. The default settling times are the
minimum required for the CR5000 to settle to within its accuracy
specifications. Additional time is necessary when working with high sensor
resistances or long lead lengths (higher capacitance). Using a longer settling
time increases the time required for each measurement. Section 3.3 goes into
more detail on determining an adequate settling time.
When the CR5000 Reverses the differential input or the excitation polarity it
delays the same settling time after the reve r sal as it d oes before the first
measurement. Thus there are two delays per channel when either RevDiff or
RevEx is used. If both RevDiff and RevEx are selected, there are four
measurement segments, positive and negative excitations with the inputs one
way and positive and negative excitations with the inputs reversed. The
CR5000 switches to the channel:
Section 3. CR5000 Measurement Details
sets the excitation, delays, measures,
reverses the excitation, delays, measures,
reverses the excitation, reverses the inputs, delays, measures,
reverses the excitation, delays, measures.
3.1.5 Integration
Thus there are four delays per channel measured. The CR5000 processes the
measurement segments into the single value it returns for the measurement.
Integration is used to reduce the noise included in a measurement. The CR5000
may use a combination of analog and digital integration.
For the fastest measurements, there is a zero integration measurement. This
measurement does not integrate. The signal at a precise instant is sampled and
this voltage is held for A/D conversion.
With analog integration, the input signal is integrated for a precise period of
time. The integrated value is held for the A/D conversion. There are three
possible analog integration times 20 ms, 16.67 ms and 250 µs. The 20 ms
(1/50 second) and 16.667 ms (1/60 second) are available to integrate out the
effects of noise from 50 or 60 Hz AC power sources.
An integration time in microseconds is specified as part of the measurement
instruction. An integration time of 0 selects the sample-and-hold, 250 selects
the 250 µs integration, 16667 or “_60 Hz” selects the 60 Hz rejection
(16667 µs), and 20000 or “_50 Hz” selects 50 Hz rejection (20000 µs).
In addition to the analog integrations, it is possible to average a number of the
sample-and-hold or 250 µs integration measurements. The A/D conversions
are made as rapidly as possible: every 100 µs for the samples and every 500 µs
for the 250 µs integrations. If the integration time specified is 250 µs or a
3-3
Section 3. CR5000 Measurement Details
multiple of 500 µs, the CR5000 will repeat 250 µs integration measurements
every 500 µs throughout the integration interval. If the integration time
specified is 100 µs or 200 µs, the CR5000 makes one or two samples in the
integration interval. The average of these measurements is stored as the result
of the measurement.
The random noise level is decreased by the square root of the number of
measurements made. For example, the input noise on the ±5000 mV range
with one 250 µs integration is 120 µV RMS; entering 2000 µs for the
integration (four measurements) will cut this noise in half (120/(√4)=60).
The integration time specified in the measurement instruction is used for each
segment of the measurement. Thus, if reversing the differential input or
reversing the excitation is specified, th ere will be two integrations per channel;
if both reversals are specified, there will b e four integrations.
3.2 Single Ended and Differential Voltage
Measurements
A single-ended voltage measurement is made on a single input which is
measured relative to ground. A differential measurement measures the
difference in voltage between two inputs.
NOTE
There are two sets of channel numbers on the analog channels.
Differential channels (1-20) have two inputs: high (H) and low
(L). Either the high or low side of a differential channel can be
used for a single ended measurement. The single-ended
channels are numbered 1-40.
Because a single ended measurement is referenced to CR5000 ground, any
difference in ground potential between the sensor and the CR5000 will result in
an error in the measurement. For example, if the measuring junction of a
copper-constantan thermocouple, being used to measure soil temperature, is
not insulated and the potential of earth ground is 1 mV greater at the sensor
than at the point where the CR5000 is grounded, the measured voltage would
be 1 mV greater than the thermocouple output, or approximately 25
Another instance where a ground potential difference creates a problem is
where external signal conditioning circuitry is powered from the same source
as the CR5000. Despite being tied to the same ground, differences in current
drain and lead resistance result in different ground potential at the two
instruments. For this reason, a differential measurement should be made on an
analog output from the external signal conditioner. Differential measurements
MUST be used when the inputs are known to be different from ground, such as
the output from a full bridge.
Common mode range
o
C high.
3-4
In order to make a differential measurement, the inputs must be within the
5 V. The common mode range is the
CR5000 common mode range of
voltage range, relative to CR5000 ground, within which both inputs of a
differential measurement must lie, in order for the differential measurement to
±
Section 3. CR5000 Measurement Details
be made. For example, if the high side of a differential input is at 4 V and the
low side is at 3 V relative to CR5000 ground, there is no problem. A
measurement made on the
the high input is at 5.8 V and the low input is at 4.8 V, the measurement can
not be made because the high input is outside of the
range (the CR5000 will indicate the overrange by returning not-a-number
(NAN)).
Sensors that have a floating output or are not referenced to ground through a
separate connection may need to have one side of the differential input
connected to ground to ensure the signal remains within the common mode
range.
Problems with exceeding common mode range may be encountered when the
CR5000 is used to read the output of external signal conditioning circuitry if a
good ground connection does not exist between the external circuitry and the
CR5000. When operating where AC power is available, it is not always safe to
assume that a good ground connection exists through the AC wiring. If a
CR5000 is used to measure the output from a laboratory instrument (both
plugged into AC power and referencing ground to outlet ground), it is best to
run a ground wire between the CR5000 and the external circuitry. Even with
this ground connection, the ground potential of the two instruments may not be
at exactly the same level, which is why a differential measurement is desired.
5000 mV range will return 1000 mV. However, if
±
5 V common mode
±
A differential measurement has the option of reversing the inputs to cancel
offsets as described above.
NOTE
Sustained voltages in excess of ±16 V will damage the CR5000
circuitry.
3.3 Signal Settling Time
Whenever an analog input is switched into the CR5000 measurement circuitry
prior to making a measurement, a finite amount of time is required for the
signal to stabilize at it's correct value. The rate at which the signal settles is
determined by the input settling time constant which is a function of both the
source resistance and input capacitance.
The CR5000 delays after switching to a channel to allow the input to settle
before initiating the measurement. The default delays used by the CR5000
depend on the integration used and the voltage range. For the sample-andhold, the default delay is 100 µs on the ±5000, ±1000, ±200, and ±50 mV
ranges and 200 µs on the ±20 mV range. The default delay is 200 µs for 250
µs integrations and 3 ms for 50 Hz or 60 Hz rejection integrations. This
settling time is the minimum required to allow the input to settle to the
resolution specification.
Additional wire capacitance associated with long sensor leads can increase the
settling time constant to the point that measurement errors may occur. There
are three potential sources of error wh ich must settle before the measurement is
made:
3-5
Section 3. CR5000 Measurement Details
1.The signal must rise to its correct valu e.
2.A small transient caused by switching the analog input into the
measurement circuitry must settle.
3.When a resistive bridge measurement is made using a switched excitation
channel, a larger transient caused when the excitation is switched must
settle.
3.3.1 Minimizing Settl i ng Errors
When long lead lengths are mandatory, the following general practices can be
used to minimize or measure settling error s:
1.DO NOT USE WIRE WITH PVC INSULATED CONDUCTORS. PVC
has a high dielectric which extends input settling time.
2.Where possible run excitation leads and signal leads in separate shields to
minimize transients.
3.When measurement speed is not a prime consideration, additional time
can be used to ensure ample settling time. The settlin g time required can
be measured with the CR5000.
3.3.2 Measuring the Necessary Settling Time
The CR5000 can measure the time required for a particular sensor/cable
configuration to settle. This is done by allowing the signal to settle the
minimum amount of time and then making zero integration measurements
every 100 µs. Looking at the series of measurements it is possible to see the
settling of the sensor signal. By counting the number of measurements before
the signal settles the correct settling time can be determined (100 µs per
measurement plus an extra 100 µs if the measurement is made on the 20 mV
range where the default settling time is 200 µs).
NOTE
This technique for measuring settling time can only be u sed with
instructions that measure only one voltage per repetition. The
settling time to use with instructions that make more than one
measurement can be determined with an instruction that uses
only one measurement. For example, for the BrFull6W
determine the settling time with BrFull; for BrHalf3W use
BrHalf.
The following example demo nstrates measuring the settling time for a
differential voltage measurement. If you are not yet familiar with CR5000
programming, you may want to read Section 4 before trying to follow the
example.
3-6
The series of measurements on the sensor is made with one instruction.
Measurement instructions have a repetitions parameter that allow one
instruction to repeat the measurement on a number of channels. There is also
the capability to repeat measurements on th e same channel. When
Section 3. CR5000 Measurement Details
measurements are repeated on the same ch annel the settling time is only
necessary before the first measurement (as long as the excitation polarity and
differential inputs are not reversed).
Before the program to measu re the settling time is run, the sensor with the
cable that will be used in the installation needs to be connected and the sensor
needs to be stabilized. If the sensed value is changing rapidly it will be
difficult to separate the settling time from true changes in the value measured.
The following program measures the settling time on a full bridge pressure
transducer.
'CR5000
'Program to measure the settling time on a Pressure Transducer
'Declare the variable array for the 20 Pressure Transducer measurements:
public PT(20)
'Set up the output table for the measurement data:
'The following program repeats the 20 measurements 5 times:
BeginProg
Scan (1,Sec,3,5)
'The -1 in the differential channel parameter of BrFull tells'the CR5000 to make the 20 measurements on channel 1:
BrFull (PT(),20,mV50,-1,Vx1,20,5000,False,False,0,0,1.0,0)
CallTable SetlDat
NextScan
EndProg
The program was run on a Druck water level pressure transducer with 200 feet
of cable. The first six measurements of each of the 5 readings are shown in
Table 3.3-1. The reading has settled by the second measurement, PT(2), thus a
settling time of 200 µs is adequate.
Table 3.3-1. First Six Values of Settling Time Data
PT(1)PT(2)PT(3)PT(4)PT(5)PT(6)
0.2912570.0529250.0539370.0542740.0576450.056296
0.2922690.0529250.0532620.0549480.0556220.056633
0.2865380.0539370.0542740.0559590.0535990.054948
0.2845150.0529250.0529250.0535990.0576450.055285
0.2868750.0529250.0529250.0546110.0562960.057308
3.4 Thermocouple Measurements
A thermocouple consists of two wires, each of a different metal or alloy, which
are joined together at each end. If the two junctions are at different
temperatures, a voltage proportional to the difference in temperatures is
induced in the wires. If the junctions are at the same temperature, there is no
voltage. When a thermocouple is used for temperature measurement, the wires
are soldered or welded together at the measuring junction. The second
3-7
Section 3. CR5000 Measurement Details
junction, which becomes the reference junction, is formed where the other ends
of the wires are connected to the measuring device. (With the connectors at
the same temperature, the chemical dissimilarity between the thermocouple
wire and the connector does not induce any voltage.) When the temperature of
the reference junction is known, the temperature of the measuring junction can
be determined by measuring the thermocouple voltage and adding the
corresponding temperature difference to the reference temperature.
The CR5000 determines thermocouple temperatures using the following
sequence. First the temperature of the reference junction is measured and
stored in °C. If the reference junction is the CR5000 analog input terminals,
the temperature is measured with the bu ilt in thermistor (PanelTemp
instruction). The thermocouple measurement instruction measures the
thermocouple voltage (TCDiff or TCSE). The thermocouple instruction
calculates the voltage that a thermocouple of the type specified would output at
the reference junction temperature if its reference junction were at 0
adds this voltage to the thermocouple voltage. The temperature of the
measuring junction is then calculated from a polynomial approximation of the
NIST TC calibrations
3.4.1 Error Analysis
o
C, and
Panel Temperature
The error in the measurement of a thermocouple temperature is the sum of the
errors in the reference junction temperature, the thermocouple output
(deviation from standards published in NIST Monograph 175), the
thermocouple voltage measurement, and the linearization error (difference
between NIST standard and CR5000 polynomial approximations). The
discussion of errors which fo llows is limited to these errors in calibration and
measurement and does not include errors in installation or matching the sensor
to the environment being measured.
A brass bar is just under the CR5000 panel between the two rows of analog
input terminals. This bar helps to reduce temperature gradients between the
terminals. The panel temperature thermistor is in a depression in the center of
this bar.
The thermistor (Betatherm 10K3A1A) has an interchangability specification of
0.1 °C for temperatures between 0 and 70 °C. Below freezing and at higher
temperatures this specification is degraded (Figure 3.4.1). Combined with
possible errors in completion resistors and the measurement, the accuracy of
panel temperature is ±0.25 °C 0 to 40 °C, ±0.5 °C -25 to 50 °C, and ±0.7 °C
-40 to 85 °C.
3-8
Section 3. CR5000 Measurement Details
0.3
0.25
0.2
0.15
Thermistor Tolerance ºC
0.1
0.05
0
-60-50-40-30-20-100 102030405060708090100
Temperature ºC
FIGURE 3.4-1. Thermistor Tolerance
The error in the reference temperature measurement is a combination of the
error in the thermistor temperature and the difference in temperature between
the panel thermistor and the terminals the thermocouple is connected to. The
terminal strip cover should always be used when making thermocouple
measurements. It insulates the terminals from drafts and rapid fluctuations in
temperature as well as conducting heat to reduce temperature gradients. In a
typical installation where the CR5000 is in a weather proof enclosure not
subject to violent swings in temperature or lopsided solar radiation loading, the
temperature difference between the terminals and the thermistor is likely to be
less than 0.2 °C.
With an external driving gradient, the temperature gradients on the input panel
can be much worse. For example, the CR5000 with the rechargeable battery
back was placed in a controlled temperature chamber. Thermocouples in
channels at the ends and middle of each analog terminal strip measured the
temperature of an insulated aluminum bar outside the chamber. The
temperature of this bar was also measured by another datalogger. Differences
between the temperature measured by one of the thermocouples and the actual
temperature of the bar are due to the temperature difference between the
terminals the thermocouple is connected to and the thermistor reference (the
figures have been corrected for thermistor errors). Figure 3.4-2 shows the
errors when the chamber was changed from -55 to 80 °C in approximately 15
minutes. Figure 3.4-3 shows the results when going from 80 to 25 °C in
approximately 45 minutes, a less dramatic change but still greater than would
be seen in most natural circumstances. During these rapid changes in
temperature, the temperature of panel thermistor will tend to lag behind the
terminals because it is buried a bit deeper in the CR5000 and is closer to the
3-9
Section 3. CR5000 Measurement Details
thermal mass of the batteries. Note that the smallest errors are on channels 5
and 16 in the middle of th e ter minal strips closest to the thermistor.
Reference Temperature Errors Due to Panel Gradient
Chamber changed from -55 to 80 °C at maximum rate
The standard reference which lists thermocouple output voltage as a function
o
of temperature (reference junction at 0
C) is the National Institute of Standa r ds
and Technology Monograph 175 (1993). The American National Standards
Institute has established limits of error on thermocouple wire which is accepted
as an industry standard (ANSI MC 96.1, 1975). Table 3.4-1 gives the ANSI
limits of error for standard and special grade thermocouple wire of the types
accommodated by the CR5000.
TABLE 3.4-1. Limits of Error for Thermocouple Wire (Reference Junction at 0
Limits of Error
ThermocoupleTemperature(Whichever is greater)
TypeRange oCStandardSpecial
T-200 to 0
0 to 350
J0 to 750
E-200 to 0
0 to 900
K-200 to 0
0 to 1250
R or S0 to 1450
B800 to 1700
1.0oC or 1.5%
±
1.0oC or 0.75%
±
2.2oC or 0.75%
±
1.7oC or 1.0%
±
1.7oC or 0.5%
±
2.2oC or 2.0%
±
2.2oC or 0.75%
±
1.5oC or 0.25%
±
0.5%Not Estab.
±
0.5oC or 0.4%
±
1.1oC or 0.4%
±
1.0oC or 0.4%
±
1.1oC or 0.4%
±
0.6oC or 0.1%
±
o
C)
3-11
Section 3. CR5000 Measurement Details
When both junctions of a thermocouple are at the same temperature there is no
voltage produced (law of interm ed iate metals). A consequence of this is that a
thermocouple can not have an offset error; any deviation from a standard
(assuming the wires are each homogeneous and no secondary junctions exist) is
due to a deviation in slope. In light of this, the fixed temperature limits of error
1.0 °C for type T as opposed to the slope error of 0.75% of the temperature)
±
(e.g.,
in the table above are probably greater than one would experience when
considering temperatures in the environmental range (i.e., the reference junction, at
0 °C, is relatively close to the temperature being measured, so the absolute error the product of the temperature difference and the slope error - should be closer to
the percentage error than the fixed error). Likewise, because thermocouple
calibration error is a slope error, accuracy can be increased when the reference
junction temperature is close to the measurement temperature. For the same reason
differential temperature measurements, over a small temperature gradient, can be
extremely accurate.
In order to quantitatively evaluate thermocouple error when the reference
o
junction is not fixed at 0
C, one needs limits of error for the Seebeck
coefficient (slope of thermocouple voltage vs. temperature curve) for the
various thermocouples. Lacking this information, a reasonable approach is to
apply the percentage errors, with perhaps 0.25% added on, to the difference in
temperature being measured by the thermocouple.
Accuracy of the Thermocouple Voltage Measurement
The -25 to 50 °C accuracy of a CR5000 differential voltage measurement is
specified as ± (0.075% of the measured voltage plus the input offset error of 2
times the basic resolution of the range being used to make the measurement
plus 2 µV). The input offset error reduces to the basic resolution if the
differential measurement is made utilizin g the option to reverse the differential
input.
For optimum resolution, the ±20 mV range is used for all but high temperature
measurements (Table 3.4-2). The input offset error dominates the voltage
measurement error for environmental measurements. A temperature difference
of 45 to 65 °C between the measurement and reference junctions is required for
a thermocouple to output 2.67 mV, the voltage at which 0.075% of the reading
is equal to 2 µV. For example, assume that a type T thermocouple is used to
measure a temperature of 45 °C and that the reference temperature is 25 °C.
The voltage output by the thermocouple is 830.7 µV. At 45 degrees a type T
thermocouple outputs 42.4 µV per
measurement is 0.00075x830.7 µV = 0.62 µV or 0.014
basic resolution on the ±20 mV range is 0.67 µV or 0.01
o
is an error of 0.047
measurement is 0.081
C. Thus, the possible error due to the voltage
o
C on a non-reversing differential, or 0.024 oC with a
reversing differential measurement. The value of using a differential
measurement with reversing input to improve accuracy is readily apparent.
o
C. The possible slope error in the voltage
o
C (0.62/42.4). The
o
C. The 2 µV offset
3-12
The error in the temperature due to inaccuracy in the measurement of the
thermocouple voltage is worst at temperature extremes, particularly when the
temperature and thermocouple type require using the 200 mV range. For
example, assume type K (chromel-alumel) thermocouples are used to measure
o
temperatures around 1300
C. The TC output is on the order of 52 mV,
Section 3. CR5000 Measurement Details
requiring the ±200 mV input range. At 1300
o
34.9 µV per
0.00075x52 mV = 39 µV or 1.12
mV range is 6.67 µV or 0.19
measurement is 1.56
C. The possible slope error in the voltage measurement is
o
C (39/34.9). The basic resolution on the 200
o
o
C on a non-reversing differential, or 1.31 oC with a
C. Thus, the possible error due to the voltage
o
C, a K thermocouple outputs
reversing differential measurement.
TABLE 3.4-2. Voltage Range for maximum Thermocouple reso l ution
TC Type and temp.
o
C
range
Temp. range for
±20 mV range
Temp. range for
±50 mV range
Temp. range for
±200 mV range
T -270 to 400-270 to 400not usednot used
E -270 to 1000-270 to 280-270 to 660>660
K --270 to 1372-270 to 610-270 to 1230>1230
J -210 to 1200-210 to 360-210 to 870> 870
B 0 to 18200 to 1820not usednot used
R -50 to 1768-50 to 1680-50 to 1768not used
S -50 to 1768-50 to 1768not usednot used
N -270 to 1300-270 to 580-270 to 1300not used
When the thermocouple measurement junction is in electrical contact with the
object being measured (or has the possibility of making contact) a differential
measurement should be made.
Noise on Voltage Measurement
The typical input noise on the ±20 mV range for a differential measurement
with no integration and input reversal is 1.8 µV RMS. On a type T
o
thermocouple (approximately 40 µV/
C) this is 0.05 oC. Note that this is an
RMS value, some individual read ings will vary by greater than this. By
integrating for 250 µs the noise level is reduced to 0.6 µV RMS.
Thermocouple Polynomial: Voltage to Temperature
NIST Monograph 175 gives high order polynomials for computing the output
voltage of a given thermocouple type over a broad range of temperatures. In
order to speed processing and accommodate the CR5000's math and storage
capabilities, 4 separate 6th order polynomials are used to convert from volts to
temperature over the range covered by each thermocouple type. Table 3.4-3
gives error limits for the thermocouple polynomials.
3-13
Section 3. CR5000 Measurement Details
TABLE 3.4-3. Limits o f Error on CR5000 Thermocouple Polynomials
TC
TypeRange oCLimits of Error oC
T-270to400
(Relative to NIST Standards)
-270to-200
-200to-100
-100to100
100to400
18 @ -270
+
0.08
±
0.001
±
0.015
±
J-150to760
-100to300
±
±
0.008
0.002
E-240to1000
-240to-130
-130to200
200to1000
±
±
±
0.4
0.005
0.02
K-50to1372
-50to950
950to1372
±
±
0.01
0.04
Reference Junction Compensation: Temperature to Voltage
The polynomials used for reference junction compensation (converting
reference temperature to equivalent TC output voltage) do not cover the entire
thermocouple range. Substantial errors will result if the reference junction
temperature is outside of the linearization range. The ranges covered by these
linearizations include the CR5000 environmental operating range, so there is
no problem when the CR5000 is used as the reference junction. External
reference junction boxes however, must also be within these temperature
ranges. Temperature difference measurements made outside of the reference
temperature range should be made by obtaining the actual temperatures
referenced to a junction within the reference temperature range and subtracting
one temperature from the other. Table 3.4-3 gives the reference temperature
ranges covered and the lim its of error in the linearizations within these ranges.
3-14
Two sources of error arise when the reference temperature is out of range. The
most significant error is in the calculated compensation voltage, however error
is also created in the temperature difference calculated from the thermocouple
output. For example, suppose the reference temperature for a measurement on
o
a type T thermocouple is 300
CR5000 corresponds to a temperature of 272.6
T thermocouple with the measuring junction at 290
would output -578.7
V; using the reference temperature of 272.6
µ
CR5000 calculates a temperature difference of -10.2
temperature calculated by the CR5000 would be 262.4
C. The compensation voltage calculated by the
o
C, a -27.4
o
C error. The type
o
C and reference at 300
o
C, a -0.2
o
C, 27.6
o
C, the
o
C error. Th e
o
C low.
o
C
Section 3. CR5000 Measurement Details
TABLE 3.4-4. Reference Temperature Compensation Range and
Polynomial Error Relative to NIST St andards
TC
TypeRange oCLimits of Error oC
Error Summary
T-100 to 100
0.001
±
J-150 to 296± 0.005
E-150 to 206± 0.005
K-50 to 100± 0.01
The magnitude of the errors descr ib ed in the previous sections illustrate that
the greatest sources of error in a thermocouple temperature measurement with
the CR5000 are likely to be due to the limits of error on the thermocouple wire
and in the reference temperature. Errors in the thermocouple and reference
temperature linearizations are extremely small, and error in the voltage
measurement is negligible.
To illustrate the relative magnitude of these errors in the environmental range,
we will take a worst case situation where all errors are maximu m and additive.
o
A temperature of 45
thermocouple, using the
1 µV (0.01% of 10 mV) which at 45
The RTD is 25
thermocouple is connected to is 0.05
C is measured with a type T (copper-constantan)
20 mV range. The nominal accuracy on this range is
±
o
C but is indicating 25.1
o
C changes the temperature by 0.012
o
C, and the terminal that the
o
C cooler than the RTD.
o
C.
TABLE 3.4-5. Example of Errors in Thermocouple Temperature
:0.1%0.001o:0.2%0.001o:0.1%0.001o:0.25%
Linearization
Total Error1.303o:100%0.503o:100%1.191o:100%0.391o:100%
3.4.2 Use of External Reference Junction or Junction Box
An external junction box is often used to facilitate connections and to reduce
the expense of thermocouple wire when the temperature measurements are to
be made at a distance from the CR5000. In most situations it is preferable to
make the box the reference junction in which case its temperature is measured
and used as the reference for the thermocouples and copper wires are run from
3-15
Section 3. CR5000 Measurement Details
the box to the CR5000. Alternatively, the junction box can be used to couple
extension grade thermocouple wire to the thermocouples, and the CR5000
panel temperature used as the reference. Extension grade thermocouple wire
has a smaller temperature range than standard thermocouple wire, but meets
the same limits of error within that ran g e . Th e only situation where it would be
necessary to use extension grade wire instead of a external measuring junction
is where the junction box temperature is outside the range of reference junction
compensation provided by the CR5000. This is only a factor when using type
K thermocouples, where the upper limit of the reference compensation
linearization is 100
o
C. With the other types of thermocouples the reference compensation range
equals or is greater than the extension wire range. In any case, errors can arise
if temperature gradients exist within the junction box.
Figure 3.4-1 illustrates a typical junction box. Terminal strips will be a
different metal than the thermocouple wire. Thus, if a temperature gradient
exists between A and A' or B and B', the junction box will act as another
thermocouple in series, creating an error in the voltage measured by the
CR5000. This thermoelectric offset voltage is a factor whether or not the
junction box is used for the reference. This offset can be minimized by making
the thermal conduction between the two points large and the distance small.
The best solution in the case where extension grade wire is being connected to
thermocouple wire would be to use connectors which clamped the two wires in
contact with each other.
o
C and the upper limit of the extension grade wire is 200
CR9000
CR5000Junction Box
H
L
Junction Box
A'A
B'B
TC
FIGURE 3.4-1. Diagram of Junction Box
An external reference junction box must be constructed so that the entire
terminal area is very close to the same temperature. This is necessary so that a
valid reference temperature can be measured and to avoid a thermoelectric
offset voltage which will be induced if the terminals at which the thermocouple
leads are connected (points A and B in Figure 3.4-1) are at different
temperatures. The box should contain elements of high thermal conductivity,
which will act to rapidly equilibrate any thermal gradients to which the box is
subjected. It is not necessary to design a constant temperature box, it is
desirable that the box respond slowly to external temperature fluctuations.
Radiation shielding must be provided when a junction box is installed in the
field. Care must also be taken that a thermal gradient is not induced by
conduction through the incoming wires. The CR5000 can be used to measure
the temperature gradients within the junction box.
3-16
Section 3. CR5000 Measurement Details
3.5 Bridge Resistance Measurements
There are six bridge measurement instructions included in the standard
CR5000 software. Figure 3.5-1 shows the circuits that would typically be
measured with these instructions. In the diagrams, the resistors labeled R
would normally be the sensors and those labeled Rf would normally be fixed
resistors. Circuits other than those diagrammed could be measured, provided
the excitation and type of measurements were appropriate.
All of the bridge measurements have the option (RevEx) to make one set of
measurements with the excitation as programmed and another set of
measurements with the excitation polarity reversed. The offset error in the two
measurements due to thermal emfs can then be accounted for in the processing
of the measurement instruction. The excitation channel maintains the excitation
voltage or current until the hold for the analog to digital conversion is
completed. When more than one measurement per sensor is necessary (four
wire half bridge, three wire half bridge, six wire full bridge), excitation is
applied separately for each measurement. For example, in the four wire half
bridge when the excitation is reversed, the differential measurement of the
voltage drop across the sensor is made with the excitation at both polarities and
then excitation is again applied and reversed for the measurement of the
voltage drop across the fixed resistor.
s
BrHalf
BrHalf3W
Calculating the actual resistance of a sensor which is one of the legs of a
resistive bridge usually requires additional processing following the bridge
measurement instruction. In addition to the schematics of the typical bridge
configurations, Figure 3.5-1 lists the calculations necessary to compute the
resistance of any single resistor, provided the values of the other resistors in the
bridge circuit are known.
X = result w/mult = 1, offset = 0
V
1
==
X
VRRR
xssf
+
X = result w/mult = 1, offset = 0
−
2
VV
=
X
VVRR
21
−
X
s
=
f
1
RR
sf
R
f
RRX
sf
=
RRX
fs
X
=
−
X
1
−
1
RX
()
s
=
X
=
/
3-17
Section 3. CR5000 Measurement Details
BrHalf4W
H
L
H
L
BrFull
H
L
BrFull6W
H
L
H
L
X = result w/mult = 1, offset = 0
VVR
==
X
s
2
R
f
1
X = result w/mult = 1, offset = 0
X 1000
V
V
==
R3R
R
3
+
1
1000
x
4
−
R1R
R
2
+
X = result w/mult = 1, offset = 0
V
==
X
2
10001000
V
1
R
3
RRRRR
−
+
34212
+
2
=
RRX
sf
=
RRX
XXRRR
R
R
XXRRR
R
R
/
fs
=−++
1000
//
1334
−
RX
1
()
21
=
1
2
3
4
X
1
RX
11
=
−
X
1
1
=++
1000
//
2212
RX
42
=
−
X
1
2
−
RX
1
()
32
=
X
2
()
()
Resistance
I
H
L
H
IXR
Resistance
used to measure full bridge
H
L
IXR
FIGURE 3.5-1. Circuits Used with Bridge Measurement Instructions
X = result w/mult = 1, offset = 0
V
X
==
X = result w/mult = 1, offset = 0
V
==
X
RR R RR R
31 2 23 4
=
R
I
13
I
x
()()
s
x
R
R
bridge
+
RRRRR
34212
+−+
+++
RRRR
1234
−
+
−− ++
RR X R R R
242 3 4
=
R
1
RRX R R R
131 3 4
=
R
2
−−++
RR X R R R
241 2 4
=
R
3
RRX R R R
131 2 3
=
R
4
()
−
XR
3
−++
()
+
XR
4
()
−
XR
1
−++
()
+
XR
2
3-18
Section 3. CR5000 Measurement Details
3.6 Measurements Requiring AC Excitation
Some resistive sensors require AC excitation. These include electrolytic tilt
sensors, soil moisture blocks, water conductivity sensors and wetness sensing
grids. The use of DC excitation with these sensors can result in polarization,
which will cause an erroneous measuremen t, and may shift the calibration of
the sensor and/or lead to its rapid decay.
Other sensors like LVDTs (without built in electronics) require an AC
excitation because they rely on inductive coupling to provide a signal. DC
excitation would provide no output.
Any of the bridge measurements can reverse excitation polarity to provide AC
excitation and avoid ion polarization. The frequency of the excitation can be
determined by the delay and integ r ation time used with the measurement. The
highest frequency possible is 5 kHz, the excitation is switched on and then
reversed 100 µs later when the first measurement is held and then is switched
off after another 100 µs when the second measurement is held (i.e., reverse the
excitation, 100 µs delay, no integration).
Influence of Ground Loop on Measurements
When measuring soil moisture blocks or water conductivity the potential exists
for a ground loop which can adversely affect the measurement. This ground
loop arises because the soil and water provide an alternate path for the
excitation to return to CR5000 ground, and can be represented by the model
diagrammed in Figure 3.6-1.
FIGURE 3.6-1. Model of Resistive Sensor with Ground Loop
In Figure 3.6-1, V
sensor resistance, and R
CR5000 earth ground. With R
is the excitation voltage, Rf is a fixed resistor, Rs is the
x
is the resistance between the excited electrode and
G
=
VV
1
in the network, the measured signal is:
G
R
x
()
RRRRR
sf sfG
s
++
/
[3.6-1]
R
equation reduces to the ideal. The geometry of the electrodes has a great effect
on the magnitude of this error. The Delmhorst gypsum block used in the 227
probe has two concentric cylindrical electrodes. The center electrode is used
is the source of error due to the ground loop. When RG is large the
sRf/RG
3-19
Section 3. CR5000 Measurement Details
for excitation; because it is encircled by the ground electrode, the path for a
ground loop through the soil is greatly reduced. Moisture blocks which consist
of two parallel plate electrodes are particularly susceptible to ground loop
problems. Similar considerations apply to the geometry of the electrodes in
water conductivity sensors.
The ground electrode of the conductivity or soil moisture probe and the
CR5000 earth ground form a galvanic cell, with the water/soil solution acting
as the electrolyte. If current was allowed to f low, the resulting oxidation or
reduction would soon damage the electrode, just as if DC excitation was used
to make the measurement. Campb ell Scientific probes are built with series
capacitors in the leads to block this DC curren t. I n addition to preventing
sensor deterioration, the capacitors block any DC component from affecting
the measurement.
3.7 Pulse Count Measurements
Many pulse output type sensors (e.g., anemometers and flow-meters) are
calibrated in terms of frequency (counts/second). For these measurements the
accuracy is related directly to the accuracy of the time interval over which the
pulses are accumulated. Frequency dependent measurements should have the
PulseCount instruction programmed to return frequency. If the number of
counts is primary interest, PulseCount should be programmed to return counts
(i.e., the number of times a door opens, the number of tips of a tipping bucket
rain gage).
The interval of the scan loop that PulseCount is in is not the sole determining
factor in the calculation of frequency. While normally the counters will be
read on the scan interval, if execution is delayed, for example by lengthy
output processing, the pulse counters are not read until the scan is
synchronized with real time and restarted. The CR5000 actually measures the
elapsed time since the last time the counters were read when determining
frequency so in the case of an overrun, the correct frequency will still be
output.
The resolution of the pulse counters is one count. The resolution of the
calculated frequency depends on the scan interval: frequency resolution =
1/scan interval (e.g., a pulse count in a 1 second scan has a frequency
resolution of 1 Hz, a 0.5 second scan gives a resolution of 2 Hz, and a 1 ms
scan gives a resolution of 1000 Hz). The resultant measurement will bounce
around by the resolution. For example, if you are scanning a 2.5 Hz input once
a second, in some intervals there will be 2 counts and in some 3 as shown in
figure 3.7-1. If the pulse measur em ent is averaged, the correct value will be
the result.
3232
3-20
FIGURE 3.7-1. Varying counts within Pulse interval.
The resolution gets much wo r se with the shorter intervals used with higher
speed measurements. As an example, assume that engine RPM is being
measured from a signal that outputs 30 pulses per revolution. At 2000 RPM,
the signal has a frequency of 100 Hz (2000 RPMx(1 min/60 s)x30=1000). The
multiplier to convert from frequency to RPM is 2 RPM/Hz (1 RPM/(30
pulses/60s) = 2). At a 1 second scan interval, the resolution is 2 RPM.
However, if the scan interval were 1 ms, the resolution would be 2000 RPM.
At the 1 ms scan, if every thing was perfect, each interval there would be 1
count. However, a slight variation in the frequency might cause 2 counts
within one interval and none in the next, causing the result to vary between 0
and 4000 RPM!
3.8 Self Calibration
The CR5000 performs a self-calibration of the analog voltage measurements
and excitation voltages. The range gains and offsets and the excitation voltage
output will vary with temperature. The self calibration allows the CR5000 to
maintain its specifications over the temp erature range.
Rather than make all of the measurements required to calibrate all
range/integration type combinations possible in the CR5000, the calibration
only measures the range/integration type combinations that occur in the
running CR5000 program. The calibration may occur in three different modes.
Section 3. CR5000 Measurement Details
1.Compile time calibration. This occurs prior to running the program and
calibrates all integration/range combinations needed. For the 250 usc and
zero integrations multiple measurements are m ade and averaged to come
up with gain values to use in the measurements. Ten measurements are
made on the zero integration ranges and five measurements for the 250
usec integrations. When this calibration is performed the values in the
calibration table are completely replaced (i.e., no filtering is used).
2.System background calibration. This automatically takes place in the
background while the user program is running. Multiple measurements
are not averaged, but a filter is applied to th e new gain/offset values
obtained. The filter is used so that the calibration values change slowly.
The filter combines the newly measu r ed value multiplied by 0.1 with the
previous calibration value by 0.9 to arrive at the new calibration value. A
piece of the background calibration is added to each fast scan in the user
program. The background calibration measurements will be repeated
every 4 seconds or the time it takes to complete them, whichever is
longer. If there is not enough time to do the background calibration, the
CR5000 will display: “Warning when Fast Scan X is running
background calibration will be disabled.” (X is the number of the fast
scan where the first scan entered in the program is 1, the next scan is 2,
etc.)
3.Calibration under program control. When the calibrate instruction is
included in a program, the calibr ation is identical to the compile time
calibration. The calibration table values are replaced with those
calculated. The fast integrations have averaging as in the compile
calibrate. When a calibrate instruction is found in any scan the
3-21
Section 3. CR5000 Measurement Details
background calibration will be disabled (even if the scan is not executed).
The calibrate instruction is described in Section 7.
The self calibration does not take place if there is not enough time to run it or if
the calibrate instruction is in the CR5000 program and never executed.
Without the self calibration the drift in accuracy with temperature is about a
factor of 10 worse. For example, over the extended temperature range (-40 to
85°C) the accuracy specification is approximately 0.1% of reading. If the self
calibration is disabled, the accuracy over the range is approximately 1% of
reading. Temperature is the main factor causing a calibration shift and the
need for the self calibration. If the temperature of the CR5000 remains the
same there will be little calibration drift with the self calibration disabled.
The time constant for the background calibration (at the 4 second rate) is
approximately 36 seconds. This allows the CR5000 to remain calibrated
during fairly rapid temperature changes. In cases of extreme temperature
change, such as bringing a vehicle fr o m equilibrium in a chamber at -30°C out
into a hot Arizona day, it may be worthwhile to override the background
calibration by running the calibration instruction in the scan with the
measurements.
Another case where using the calibration instruction makes sense is where
there is not time for the background calibration in the normal scan but the
program can periodically stop making measurements and run the calibration
instruction in a separate scan.
3-22
Section 4. CRBasic - Native Language
Programming
The CR5000 is programmed in a language that has some similarities to a structured basic.
There are special instructions for making measurements and for creating tables of output
data. The results of all measurements are assigned variables (given names).
Mathematical operations are written out much as they would be algebraically. This
section describes a program, its syntax, structure, and sequence.
4.1 Format Introduction
4.1.1 Mathematical Operations
Mathematical operations are written out much as th ey would be algebraically.
For example, to convert a temperature in Celsius to Fahrenheit one might
write:
TempF = TempC * 1.8 + 32
With the CR5000 there may be 2 or 20 temperature (or other) measurements.
Rather than have 20 different names, a
elements may be used. A thermocouple temperature might be called TCTemp.
With an array of 20 elements the names of the individual temperatures are
TCTemp(1), TCTemp(2), TCTemp(3), ... TCTemp(20). The array notation
allows compact code to perform operations on all the variables. For example,
to convert ten temperatures in a variable array from C to F:
variable array
with one name and 20
For I=1 to 10
TCTemp(I)=TCTemp(I)*1.8+32
Next I
4.1.2 Measurement and Output Processing Instructions
Measurement instructions are procedures that set up the measurement
hardware to make a measurement and place the results in a variable or a
variable array. Output processing instructions are procedures that store the
results of measurements or calculated values. Output processing includes
averaging, saving maximum or minimum, standard deviation, FFT, etc.
The instructions for making measurements and outputting data are not found in
a standard basic language. The instructions Campbell Scientific has created for
these operations are in the form of procedures. The procedure has a keyword
name and a series of parameters that contain the information needed to
complete the procedure. For example, the instruction for measuring the
temperature of the CR5000 input panel is:
PanelTemp
(Dest, Integ)
4-1
Section 4. CRBasic - Native Language Programming
PanelTemp is the keyword name of the instruction. The two parameters
associated with PanelTemp are:
to put the temperature; and
measurement. To place the panel temperature in the variable RefTemp (using
a 250 microsecond measurement integration time) the code is:
PanelTemp(RefTemp, 250)
The use of these instructions should become clearer as we go through an
introductory example.
4.1.3 Inserting Comments Into Program
Comments can be inserted into a program by preceding the comment with a
single quote ('). Comments can be entered either as independent lines or
following CR5000 code. When the CR5000 compiler sees the ' it ignores the
rest of the line.
' The declaration of variables starts here.
Public Start(6)'Declare the start time array
ination, the name of the variable in wh ich
Dest
ration, the length of time to integrate the
Integ
4.2 Programming Sequence
The following table describes the structure of a typical CR5000 program:
Declarations
Declare constants
Declare Public variables
Dimension variables
Define Aliases
Define data tables.
Process/store trigger
Table size
Other on-line storage
devices
Make a list of what to measure and calculate.
Within this list, include the fixed constants used,
indicate the values that the user is able to view
while the program is running,
the number of each measurement that will be
made,
and specific names for any of the measurements.
Describe, in detail, tables of data th at will be
saved from the experiment.
Set when the data should be stored. Are they
stored when some condition is met? Are data
stored on a fixed interval? Are they stored on
a fixed interval only while some condition is
met?
Set the size of the table in CR5000 RAM
Should the data also be sent to the PC card?
4-2
Processing of Data
What data are to be output (current value,
average, maximum, minimum, etc.)
Section 4. CRBasic - Native Language Programming
Define Subroutines
Program
Set scan interval
Measurements
Processing
Call Data Table(s)
Initiate controls
NextScan
End Program
If there is a process or series of calculations
that need to be repeated several times in the
program, it can be packaged in a subroutine
and called when needed rather than repeating
all the code each time.
The program section defines the action of
datalogging
The scan sets the interval for a series of
measurements
Enter the measurements to make
Enter any additional processing with the
measurements
The Data Table must be called to process output
data
Check measurements and Initiate controls if
necessary
Loop back (and wait if necessary) for the next
The user's program determines the values that are output and their sequence.
The CR5000 automatically assigns names to each field in the data table. In the
above table, TIMESTAMP, RECORD, RefTemp_Avg, and TC_Avg(1) are
fieldnames. The fieldnames are a combination of the variable name (or alias if
one exists) and a three letter mnemonic for the processing instruction that
outputs the data. Alternatively, the FieldNames instruction can be used to
override the default names.
The data table header also has a row that lists units for the output values. The
units must be declared for the CR5000 to fill this row out (e.g., Units RefTemp
4-4
Section 4. CRBasic - Native Language Programming
= degC). The units are strictly for the user's documentation; the CR5000
makes no checks on their accuracy.
The above table is the result of the data table description in the example
program:
All data table descriptions begin with DataTable and end with EndTable.
Within the description are instructions that tell what to output and that can
modify the conditions under which output occurs.
DataTable(
DataTable (Temp,1,2000)
DataInterval(
DataInterval(0,10,msec,10)
Name, Trigger, Size
The DataTable instruction has three parameters: a user specified name for the
table, a trigger condition, and the size to make the table in CR5000 RAM. The
trigger condition may be a variable, expression, or constant. The trigger is true
if it is not equal to 0. Data are output if the tr igger is true and there are no
other conditions to be met. No output occurs if the trigger is false (=0). The
example creates a table name Temp, outputs any time other conditions are met,
and retains 2000 records in RAM.
TintoInt, Interval, Units, Lapses
DataInterval is an instruction that modifies the conditions under which data are
stored. The four parameters are the time into the interval, the interval on
which data are stored, the units for time, and the number of lapses or gaps in
the interval to keep track of. The example outputs at 0 time into (on) the
interval relative to real time, the interval is 10 milliseconds, and the table will
keep track of 10 lapses. The DataInterval instruction reduces the memory
required for the data table because the time of each record can be calculated
from the interval and the time of the most recent record stored. Other output
condition modifiers are: Worst Case and FillandStop.
The output processing instructions included in a data table declaration
determine the values output in the table. The table must be called by the
program in order for the output processing to take place. That is, each time a
new measurement is made, the data table is called. When the table is called,
the output processing instructions within the table process the current inputs.
If the trigger conditions for the are true, the processed values are output to the
data table. In the example, several averages are output.
FP2Campbell Scientific floating point2 bytes
IEEE4IEEE four byte floating point4 bytes1.8 E -38 to 1.7 E 3824 bits (about 7 digits)
LONG4 byte Signed Integer4 bytes-2,147,483,648 to
Reps, Source, DataType, DisableVar
Average is an output processing instr uction that will output the average of a
variable over the output interval. The parameters are repetitions - the number
of elements in an array to calculate averages for, the Source variable or array to
average, the data format to store the result in (Table 4.3-1), and a disable
variable that allows excluding readings from the average if conditions are not
met. A reading will not be included in th e average if the disable variable is not
equal to 0; the example has 0 entered for the disable variable so all readings are
included in the average.
TABLE 4.3-1 Formats for Output Data
)
±7999
+2,147,483,647
13 bits (about 4 digits)
1 bit (1)
4.3.2 The Scan -- Measurement Timing and Processing
Once you know what you want, the measurements and calculations have been
listed and the output tables defined, the program itself may be relatively short.
The executable program begins with BeginProg and ends with EndProg. The
measurements, processing, and calls to output tables bracketed by the Scan and
NextScan instructions determine the sequence and timing of the datalogging.
The Scan instruction determines h ow frequently the measurements within the
scan are made:
Scan
(Interval, Units, BufferSize, Count)
Scan(1,MSEC,3,0)
The Scan instruction has four parameters. The
scans.
one minute. The
RAM that holds the raw results of measur ements. Using a buffer allows the
processing in the scan to at times lag behind the measurements without
affecting the measurement timing (see the scan instruction in Section 9 for
more details).
instruction following NextScan. A count of 0 means to continue looping
are the time units for the interval. The max im u m scan interval is
Units
BufferSize
Count
Interval
is the size (in the number of scans) of a buffer in
is the number of scans to make before proceeding to the
is the interval between
4-6
forever (or until ExitScan). In the example the scan is 1 millisecond, three
scans are buffered, and the measurements and output continue indefinitely.
4.4 Numerical Entries
In addition to entering regular base 10 numbers there are 3 additional ways to
represent numbers in a program: scientific notation, binary, and hexadecimal
(Table 4.4-1).
TABLE 4.4-1 Formats for Entering Numbers in CRBasic
The binary format makes it easy to visualize operations where the ones and
zeros translate into specific commands. For example, a block of ports can be
set with a number, the binary form of which represents the status of the ports
(1= high, 0=low). To set ports 1, 3, 4, and 6 high and 2, 5, 7, and 8 low; the
number is &B00101101. The least significant bit is on the right and represents
port 1. This is much easier to visualize than en tering 72, the decimal
equivalent.
Section 4. CRBasic - Native Language Programming
-8
4.5 Logical Expression Evaluation
4.5.1 What is True?
Several different words get used to describe a condition or the result of a test.
The expression, X>5, is either true or false. However, when describing the
state of a port or flag, on or off or high or low sounds better. In CRBasic there
are a number of conditional tests or instruction parameters the result of which
may be described with one of the words in Table 4.5-1. The CR5000 evaluates
the test or parameter as a number; 0 is false, not equal to 0 is true.
TABLE 4.5-1. Syno nyms for True and False
Predefined ConstantTrue (-1)False (0)
SynonymHighLow
SynonymOnOff
SynonymYesNo
SynonymTriggerDo Not Trigger
Number
Digital port5 Volts0 Volts
≠0
0
4-7
Section 4. CRBasic - Native Language Programming
4.5.2 Expression Evaluation
Conditional tests require the CR5000 to evaluate an expression and take one
path if the expression is true and another if the expression is false. For
example:
If X>=5 then Y=0
will set the variable Y to 0 if X is greater than or equal to 5.
The CR5000 will also evaluate multiple expressions linked with and or or.
For example:
If X>=5 and Z=2 then Y=0
will only set Y=0 if both X>=5 and Z=2 are true.
If X>=5 or Z=2 then Y=0
will set Y=0 if either X>=5 or Z=2 is true (see And and Or in Section 9). A
condition can include multiple and and or links.
4.5.3 Numeric Results of Expression Evaluation
The CR5000 expression evaluator evaluates an expression and returns a
number. A conditional statement uses the number to decide which way to
branch. The conditional statement is false if the number is 0 and true if the
number is not 0. For example:
If 6 then Y=0,
is always true, Y will be set to 0 any time the conditional statement is executed.
If 0 then Y=0
is always false, Y will never be set to 0 by this conditional statement.
4.6 Flags
The CR5000 expression evaluator evaluates the expression, X>=5, and returns
-1, if the expression is true, and 0, if the expression is false.
W=(X>Y)
will set W equal to -1 if X>Y or will set W equal to 0 if X<=Y.
The CR5000 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 (see and and or in Section 8). 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
Any variable can be used as a flag as far as logical tests in CRBasic are
concerned. If the value of the variable is non-zero the flag is high. If the value
of the variable is 0 the flag is low (Section 4.5). PC9000 looks for the variable
array with the name Flag when the option to display flag status is used in one
of the real time screens.
4-8
4.7 Parameter Types
Instructions parameters allow different types of inputs these types are listed
below and specifically identified in the description of the parameter in the
following sections or in PC9000 CRBasic help.
Table 4.7-1 list the maximum length and allowed characters for the names for
Variables, Arrays, Constants, etc.
TABLE 4.7-1. Rules for Names
Section 4. CRBasic - Native Language Programming
Constant
Variable
Variable or Array
Constant, Variable, or Expression
Constant, Variable, Array, or Expression
Name
Name or list of Names
Variable, or Expression
Variable, Array, or Expression
Name forMaximum Length (number of
characters)
Variable or Array16Letters A-Z, upper or lower.
Constant16case, underscore “_”, and
Alias16numbers 0-9. The name must
Data Table Name8start with a letter. CRBasic is
Field name16not case sensitive
Allowed characters
4.7.1 Expressions in Parameters
Many parameters allow the entry of expressions. If an expression is a
comparison, it will return -1 if the comparison is true and 0 if it is false
(Section 4.5.3). An example of the use of this is in the DataTable instruction
where the trigger condition can be entered as an expression. Suppose the
variable TC(1) is a thermocouple temperature:
DataTable(Name, TrigVar, Size)
DataTable(Temp, TC(1)>100, 5000)
Entering the trigger as the expression, TC(1)>100, will cause the trigger to be
true and data to be stored whenever the temperature TC(1) is greater than 100.
4.7.2 Arrays of Multipliers Offsets for Sensor Calibration
If variable arrays are used as the multiplier and offset parameters in
measurements that use repetitions, the in str uction will automatically step
through the multiplier and offset arrays as it steps through the channels. This
allows a single measurement instruction to measure a series of individually
4-9
Section 4. CRBasic - Native Language Programming
calibrated sensors, applying the correct calibration to each sensor. If the
multiplier and offset are not arrays, the same m u ltiplier and offset are used for
each repetition.
Data stored in a table can be accessed from within the program. The format
used is:
Tablename.Fieldname(fieldname index,records back)
Where
Tablename
Fieldname
array even if it consists of only one variable; the
be specified.
from the current time (1 is the most recent record stored, 2 is the record stored
prior to the most recent). For example, the expression:
Tdiff=Temp.TC_Avg(1,1)–Temp.TC_Avg(1,101)
could be used in the example program (Section 4.3) to calculate the change in
the 10 ms average temperature of the first thermocouple between the most
recent average and the one that occurred a second (100 x 10 ms) earlier.
In addition to accessing the data actually output in a table, there are some
pseudo fields related to the data table that can be retrieved:
Tablename
Tablename
table was called, = 0 if data were not output.
Tablename
where:
is the name of the field in the table. The fieldname is always an
.record(1,n) = the record number of the record output n records ago.
.output(1,1) = 1 if data were outpu t to the table the last time the
.timestamp(m,n) = element m of the timestamp output n records ago
timestamp(1,n) = microseconds since 1990
timestamp(2,n) = microseconds into the current year
timestamp(3,n) = microseconds into the current month
timestamp(4,n) = microseconds into the current day
timestamp(5,n) = microseconds into the current hour
timestamp(6,n) = microseconds into the current minute
timestamp(7,n) = microseconds into the current second
is the name of the table in which the desired value is stored.
must always
Records back
fieldname index
is the number of records back in the data table
4-10
Section 4. CRBasic - Native Language Programming
NOTE
Tablename
instruction,
the last time the table was called, = 0 if the data table did not sto r e a record or
if it is in the middle of an event.
The values of Tablename.output(1,1) and Tablename.eventend
(1,1) are only updated when the tables are called.
The WorstCase example in Section 6.2 illu str a tes the use of this syntax.
.eventend(1,1) is only valid for a data table using the DataEvent
Tablename
.eventend(1,1) = 1 if the last record of an event occurred
4-11
Section 4. CRBasic - Native Language Programming
This is a blank page.
4-12
Section 5. Program Declarations
Alias
Used to assign a second name to a variable.
Syntax
Alias
VariableA
Remarks
Alias allows assigning a second name to a variable. Within the datalogger
program, either name can be used. Only the alias is av ailable for Public variables.
The alias is also used as the root name for data table fieldnames.
With aliases the program can have the efficiency of arrays for measurement and
processing yet still have individually named measurements.
Alias Declaration Example
The example shows how to use the Alias declaration.
Dim TCTemp(4)
Alias TCTemp(1) = CoolantT
Alias TCTemp(2) = Manifold T
Alias TCTemp(3) = Exhau stT
Alias TCTemp(4) = CatConvT
VariableB
=
Const
Declares symbolic constants for use in place of numeric entries.
Syntax
Const
Remarks
The Const statement has these parts:
PartDescription
constantname
expression
TipConstants can make your programs self-documenting and easier to
CautionConstants must be defined before referring to them.
TipUse all uppercase letters for constant names to make them easy to
constantname
Name of the constant.
Expression assigned to the constant. It can consist of literals
modify. Unlike variables, constants can't be changed while your
program is running.
recognize in your program listings.
expression
=
(such as 1.0), other constants, or any of the arithmetic or
logical operators.
5-1
Section 5. Program Declarations
Dim
Const Declaration Example
The example uses Const to define the symbolic constant PI.
Const PI = 3.141592654'Define constant.
Dim Area, Circum, Radius'Declare variables.
Radius = Volt( 1 )'Get measurement.
Circum = 2 * PI * Radius'Calculate circumference.
Area = PI * ( Radius ^ 2 )'Calculate area.
Declares variables and allocates storage space. In CRBasic, ALL variables MUST
be declared.
Syntax
varname
Dim
Remarks
The Dim statement has these parts:
PartDescription
varname
subscripts
subscripts
[([
Name of a variable.
Dimensions of an array variable. You can declare multip le
dimensions.
]) [,
varname
subscripts
[([
])]]
Public
The argument subscripts has the following syntax:
size [size, size]
In CRBasic the Option Base is always 1. This means the lowest number in a
dimension is 1 and not 0.
Dim A( 8, 3 )
The maximum number of array dimensions allowed in a Dim statement is 3. If a
program uses a subscript that is greater than the dimensioned value, a subscript out
of bounds error is recorded.
When variables are initialized, they are initialized to 0
TipPut Dim statements at the beginning of the program.
Dimensions a variable as public and available in the Public table of the CR5000.
Syntax
Public
Remarks
More than one Public statement can be made.
list of [dimensioned] variables that make up the Public Table
(
)
5-2
Station Name
Section 5. Program Declarations
Public Declaration Example
The example shows the use of the Pu blic declaration.
Dim x( 3 ), y, z( 2, 3, 4 )
Public x, y, z
Public Dim x( 3 ), y, z( 2, 3, 4 )'Dim is optional
Public x( 3 ),y, z( 2, 3, 4 )
Public w
Sets the station name.
Syntax
StationName
Remarks
StationName is used to set the datalogger station name with the program. The
station name is displayed by PC9000 and stored in the data table headers
(Section 2.4).
StaName
Units
Used to assign a unit name to a field associated with a variable.
Syntax
Units
Variable
Remarks
Units allows assigning a unit name to a field. Units are displayed on demand
in the real-time windows of PC9000. The unit name also appears in the header
of the output files and in the Data Table Info file of PC9000. The unit name is
a text field that allows the user to label data. When the u ser m odifies the units,
the text entered is not checked by PC9000 or the CR5000.
Example
Dim TCTemp( 1 )
TCTemp( 1 ) = Deg_C
Units
Sub, Exit Sub, End Sub
Declares the name, variables, and code that form a Subro utine.
Syntax
Sub
SubName
[
[
[
End Sub
= UnitName
VariableList
[(
statementblock
Exit Sub
statementblock
]
)]
]
]
5-3
Section 5. Program Declarations
The Sub statement has these parts:
PartDescription
SubMarks the beginning of a Subroutine.
SubName
VariableList
Name of the Subroutine. Because Subroutine n ames are
recognized by all procedures in all modules,
be the same as any other globally recognized name in the
program.
List of variables that are passed to the Subroutine when it is
called. The variable names used in this list should not be the
same names as variables, aliases, or constants declared
elsewhere. The variable names in this list can only be used
within the Subroutine. Multiple variables are sep arated by
commas. When the Subroutine is called, the call statement
must list the program variables or values to pass into the
subroutine variable. The number and sequence of the
program variables/values in the call statement must match the
number and sequence of the variable list in the sub
declaration. Changing the value of one of the variables in this
list inside the Subroutine changes the v alue of the variable
passed into it in the calling procedure.
The call may pass constants or expressions that evaluate to
constants (i.e., do not contain a variable) into some of the
variables. If a constant is passed, the “ v ariab le” it is passed
to becomes a constant and cannot be changed by the
subroutine. If constants will be passed, the subroutine should
be written to not try to change the value of the “variables”
they will be passed into.
subname
cannot
statementblock
Exit SubCau s es an immediate exit from a Subroutine. Program
End SubMarks the end of a Subroutine.
A Subroutine is a procedure that can take variables, perform a series of statements,
and change the value of the variables. However, a Subroutine can't be used in an
expression. You can call a Subroutine using the name followed by the variable list.
See the Call statement for specific information on how to call Subroutines.
The list of Subroutine variables to pass is optional. Subroutines can operate on the
global program variables declared by the Public or Dim statements. The advantage
of passing variables is that the subroutine can be used to operate on whatever
program variable is passed (see example).
CautionSubroutines can be recursive; that is, they can call themselves to
perform a given task. However, recursion can lead to strange results.
Any group of statements that are executed within the body of
the Subroutine.
execution continues with the statement follo wing the
statement that called the Subroutine. Any number of ExitSub statements can appear anywhere in a Subroutin e.
5-4
Subroutine Example
'CR5000
'Declare Variables used in Program:
Public RefT, TC(4),PRTresist,PRTtemp,I
'Data output in deg C:
DataTable (TempsC,1,-1)
DataInterval (0,5,Min,10)
Average (1,RefT,FP2,0)
Average (4,TC(),FP2,0)
Average (1,PRTtemp,FP2,0)
EndTable
'Same Data output in F:
DataTable (TempsF,1,-1)
DataInterval (0,5,Min,10)
Average (1,RefT,FP2,0)
Average (4,TC(),FP2,0)
Average (1,PRTtemp,FP2,0)
EndTable
Section 5. Program Declarations
'Subroutine to convert temperature in degrees C to degrees F
Sub ConvertCtoF (Tmp)
Tmp = Tmp*1.8 +32
EndSub
BeginProg
Scan (1,Sec,3,0)
'Measure Temperatures (panel, 4 thermocouples, and 100 ohm PRT) in deg C
Section 6. Data Table Declarations and
Output Processing Instructions
6.1 Data Table Declaration
DataTable (Name, TrigVar, Size)
output trigger modifier
export data destinations
output processing instructions
EndTable
DataTable is used to declare/define a data table. The name of the table, output
trigger and size of the table in RAM are set with DataTable. The Tab le
declaration must be at the beginning of the code prior to BeginProg. The table
declaration starts with DataTable and ends with EndTable. Within the
declaration are output trigger modifiers (optional, e.g., DataInterval, DataEvent
or WorstCase), the on-line storage devices to send the data to (optional, e.g.,
CardOut, DSP4), and the output processing instructions describing the data set
in the table.
Parameter
& Data Type
Name
Name
TrigVar
Constant
Variable, or
Expression
Size
Constant
EndTable
Enter
The name for the data tab le. The table name is limited to eight characters.
The name of the variable to test for the trigger. Trigger modifiers add additional
conditions.
ValueResult
0Do not trigger
≠
0Trigger
The size to make the data table. The number of data sets (records) to allo cate memory for
in static RAM. Each time a variable or interval trigger occurs, a line (or row) of data is
output with the number of values determined by the output Instructions within the table.
This data is called a record. The total number of records stored equals the size..
Note
DataTable Example - see native language Section 4.
Enter a negative number and all remaining memory
(after creating fixed size data tables) will be
allocated to the table or partitioned between all
tables with a negative value for size. The
partitioning algorithm attempts to have the tables fill
at the same time.
Used to mark the end of a data table.
See DataTable
6-1
Section 6. Data Table Declarations and Output Processing Instructions
6.2 Trigger Modifiers
DataInterval (TintoInt, Interval, Units, Lapses)
Used to set the time interval for an outpu t tab le. DataI nterval is inserted into a
data table declaration following th e DataTable instruction to establish a fixed
interval table. The fixed interval table requires less memory than a conditional
table because time is not stored with each record. The time of each record is
calculated by knowing the time of the most recent output and the interval of
the data. DataInterval does not override the Trigger in the DataTable
instruction. If the trigger is not set always true by entering a constant, it is a
condition that must be met in addition to the time interval before data will be
stored.
The Interval determines how frequently data are stored to the tab le. Th e
interval is synchronized with the real tim e clo c k . Time is kept internally as the
elapsed time since the start of 1990 (01-01-1990 00:00:00). When the interval
divides evenly into this elapsed time it is time to output (elapsed time MOD
interval = 0). Entering 0 for the I n terval sets it equal to the scan Interval.
TintoInt allows the user to set the time into the I nterval, or offset relative to
real time, at which the output occurs([elapsed time + TintoInt] MOD interval =
0). For example, 360 (TintoInt) minutes into a 720 (Interval) minute (Units)
interval specifies that output should occur at 6:00 (6 AM, 360 minutes from
midnight) and 18:00 (6 PM, 360 minutes from noon) where the 720 minute (12
hour) interval is set relative to midnight 00:00. Enter 0 to keep output on the
even interval.
Interval driven data allows a more efficient use of memory because it is not
necessary to store time with each record. The CR5000 still stores time but on a
fixed spacing, only about once per 1 K of memory used for the table. As each
new record is stored, time is checked to ensure that the interval is correct. The
datalogger keeps track of lapses or discontinuities in the data. If a lapse has
occurred, the CR5000 inserts a time stamp into the data. When the data are
retrieved a time stamp can be calculated and stored with each record.
This lapse time stamp takes up some memory that would otherwise be used for
data. While the CR5000 allocates some extra memory for the table, if there are
a lot of lapses, it is not possible to store as many records as requested in the
DataTable declaration. The Lapses parameter allows the programmer to
allocate additional space for the number of lapses entered. This is used in
particular when the program is written in a way that will create lapses. For
example, if the data output is controlled by a trigger (e.g., a user flag) in the
DataTable instruction in addition to the DataInterval, lapses would occur each
time the trigger was false for a period of time longer than the interval.
To take advantage of the more efficient memory use, always enter 1 or greater
for the lapses parameter even if no lapses are expected. Entering 0 causes
every record to be time stamped.
Entering a negative number tells the CR5000 not to keep track of lapses. Only
the periodic time stamps (approximately once per K of data) are inserted.
6-2
Section 6. Data Table Declarations and Output Processing Instructions
Parameter
& Data Type
TintoInt
Constant
Interval
Constant
Units
Constant
Lapses
Constant
OpenInterval
Enter
The time into the interval (offset to the interval) at which the table is to be output. The
units for time are the same as for the interval.
Enter the time interval on which the data in the table is to be recorded. The interval may
be in µs, ms, s, or minutes, whichever is selected with the
make the data interval the same as the scan interval.
The units for the time parameters, PowerOff is the only instruction that uses hours or
days.
Alpha
Code
USEC0microseconds
MSEC1milliseconds
SEC2seconds
MIN3minutes
As each new record is stored, time is checked to ensure that the in terval is correct. The
datalogger keeps track of lapses or discontinuities in the data.
Numeric
CodeUnits
Units
parameter. Enter 0 to
When the DataInterval instruction is included in a data table, the CR5000 uses
only values from within an interval for time series processing (e.g., average,
maximum, minimum, etc.). When data are output every interval, the output
processing instructions reset each time output occurs. To ensure that data from
previous intervals is not included in a processed output, processing is reset any
time an output interval is skipped. (An interval could be skipped because the
table was not called or another trigger condition was not met.) The CR5000
resets the processing the next time th at the table is called after an output
interval is skipped. If this next call to the table is on a scheduled interval, it
will not output. Output will resume on the next interval. (If Sample is the only
output processing instruction in the table, data will be output any time the table
is called on the interval because sampling uses only the current value and
involves no processing.)
OpenInterval is used to modify an interval driven table so that tim e series
processing in the table will include all values input since the last time the table
output data. Data will be output whenever th e tab le is called on the output
interval (provided the other trigger conditions are met), regardless of whether
or not output occurred on the previous interval.
OpenInterval Example:
In the following example, 5 thermocouples are measured every 500
milliseconds. Every 10 seconds, while Flag(1) is true, the averages of the
reference and thermocouple temperatures are output. The user can toggle
Flag(1) to enable or disable the output. Without the OpenInterval Instruction,
the first averages output after Flag(1) is set high would include only the
measurements within the previous 10 second interval. This is the default and is
what most users desire. With the Open interval in the program (remove the
initial single quote (‘) to uncomment the instruction) all the measurements
made while the flag was low will be included in the first averages output after
the flag is set high.
6-3
Section 6. Data Table Declarations and Output Processing Instructions
Const RevDiff 1'Reverse input to cancel offsets
Const Del 0'Use default delay
Const Integ 0'Use no integration
Public RefTemp'Declare the variable used for reference temperature
Public TC(5)'Declare the variable used for thermocouple measurements
Public Flag(8)
Units RefTemp=degC'
Units TC=degC
DataTable (AvgTemp,Flag(1),1000)'Output when Flag(1)=true
DataInterval(0,10,sec,10)'Output every 10 seconds(while Flag(1)=true)
'OpenInterval 'When Not Commented, include data while Flag(1)=false in next average
Used to set a trigger to start storing records and another trigger to stop storing
records within a table. The number of records before the start trigger and the
number of records after the stop trigger can also be set. A filemark (Section 8) is
automatically stored in the table between each event.
Parameter
& Data Type
RecsBefore
Constant
StartTrigThe variable or expression test to Trigger copying the pre trigger records into the
Variable, or
Expression
StopTrig
Variable,
Expression or
Constant
RecsAfter
Constant
Enter
The number of records to store before the Start Trigger.
data table and start storing each new record..
ValueResult
0Do not trigger
≠
0Trigger
The variable, expression or constant to test to stop storing to the data table. The
CR5000 does not start checking for the stop trigger until after the Start Trigger
occurs. A non-zero (true) constant may be used to store a fixed number of
records when the start trigger occurs (total number of records = PreTrigRecs+ 1
record for the trigger +PostTrigRecs.). Zero (false) could be entered if it was
desired to continuously store data once the start trigger occurred.
ValueResult
0Do not trigger
≠
0Trigger
The number of records to store after the Stop Trigger occurs.
6-4
Section 6. Data Table Declarations and Output Processing Instructions
DataEvent Example:
In this example, 5 type T thermocouples are measured. The trigger for the start
of an event is when TCTemp(1) exceeds 30 degrees C. The stop trigger is
when TCTemp(1) less than 29 degrees C. The event consists of 20 records
prior to the start trigger an d continues to store data until 10 records following
the stop trigger.
Const RevDiff 1'Reverse input to cancel offsets
Const Del 0'Use default delay
Const Integ 0'Use no integration
Public RefTemp‘Declare the variable used for reference temperature
Public TC(5)'Declare the variable used for thermocouple measurements
Public Flag(8)
Units RefTemp=degC'
Units TC=degC
DataTable (Event,1,1000)
DataInterval(0,00,msec,10)'Set the sample interval equal to the scan
DataEvent(20,TC(1)>30,TC(1)<29,10)'20 records before TC(1)>30,
'after TC(1)<29 store 10 more records
Sample(1,RefTemp,IEEE4)'Sample the reference temperature
Sample(5,TC,IEEE4) 'Sample the 5 thermocouple temperatures
Data Tables are by default ring memory where, once full, the newest data are
written over the oldest. Entering FillStop into a data table declaration makes
the table fill and stop. Once the table is filled, no more data are stored until the
table has been reset. The table can be reset from within the program by
executing the ResetTable instruction. Tables can also be reset from PC9000
real time windows or the collect data window.
Example:
DataTable (Temp,1,2000)
DataInterval(0,10,msec,10)
FillStop' the table will stop collecting data after 2000 records.
Average(1,RefTemp,fp2,0)
Average(6,TC(1),fp2,0)
EndTable
6-5
Section 6. Data Table Declarations and Output Processing Instructions
Allows saving the most significant or “worst-case” events in separate data
tables.
A data table is created that is sized to hold one event. This table acts as the
event buffer. Each event that occurs is stored to this table. This table may use
the DataEvent instruction or some othe r condition to determine when an event
is stored. The significance of an event is determined by an algorithm in the
program and a numerical ranking of the event is stored in a variable.
WorstCase creates as many clones of the specified table as the number of cases
for which to keep data. When WorstCase is executed, it checks the ranking
variable; if the value of the variable is a new worst case, the data in the event
table replace the data in the cloned table that holds the least significant event
currently stored.
An additional data table, nameWC (e.g., EvntWC) is created that holds the
values of the rank variables for each of the worst case tables and the time that
that table was stored.
WorstCase must be used with data tables sent to th e CPU. I t will not work if
the event table is sent to the PC card.
Parameter
& Data Type
TableName
name
NumCases
MaxMin
Constant
Change
Constant
RankVar
Variable
While WorstCase acts as Trigger Modifier and a data table declaration
(creating the cloned data tables), it is entered within the program to call the
worst case tables (see example).
Enter
The name of the data table to clone. The length of this name should be 4 characters or
less so the complete names o f the worst case tables are retained when collected (see
NumCases).
The number of “worst” cases to store. This is the number of clones of the data table to
create. The cloned tables use the name of the table being cloned (up to the first 6
characters) plus a 2 digit number (e.g., Evnt01, Evnt02, Evnt03, …). The numbers give
the tables unique names, they have no relationship to the ranking of the events. PC9000
uses this same name modification when creating a new data file for a table. To avoid
confusion and ambiguous names when collecting data with PC9000, keep the base name
four characters or less (4ch aract er base name + 2 digit case identifier + 2 digit collection
identifier = 8 character maximum length).
A code specifying whether the maximum or minimum events should be saved.
ValueResult
0
1
The minimum chang e t hat must occur in the RankVariable before a new worst case is
stored.
The Variable to rank the events by.
Min
, save the events associ ated with the minimum ranking; i.e.,
Keep track of the RankVar associated with each event stored.
If a new RankVar is less than previous maximum, copy the
event over the event with previous maximum)
Max
, save the events associ ated with the maximum ranking;
i.e., copy if RankVar is greater than previous lowest (over event
with previous minimum)
6-6
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.