Campbell CR9000 Instruction Manual

INSTRUCTION MANUAL
CR9000 Measurement and
Control System
Revision: 5/05
Copyright (c) 1995-2005
Campbell Scientific, Inc.

Warranty and Assistance

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.
CR9000 Table of Contents
Overview..................................................................... OV-1
OV1. Physical Description ......................................................................OV-1
OV1.1 Basic System.........................................................................OV-1
OV1.2 Measurement Modules..........................................................OV-3
OV1.3 Communication Interfaces ....................................................OV-8
OV2. Memory and Programming Concepts............................................OV-9
OV2.1 Memory.................................................................................OV-9
OV2.2 Measurements, Processing, Data Storage..............................OV-9
OV2.3 Data Tables..........................................................................OV-10
OV3. PC9000 Application Software .....................................................OV-10
OV3.1 Hardware and Software Requirements................................OV-11
OV3.2 PC9000 Installation.............................................................OV-11
OV3.3 PC9000 Software Overview................................................OV-11
OV4. Specifications...............................................................................OV-14
1. Installation.................................................................1-1
1.1 Enclosure..............................................................................................1-1
1.1.1 Connecting Sensors..................................................................... 1-1
1.1.2 Quick Connectors ....................................................................... 1-1
1.1.3 Junction Boxes............................................................................ 1-2
1.2 System Power Requirements and Options............................................ 1-3
1.2.1 Power Supply and Charging Circuitry........................................ 1-3
1.2.2 Connecting to Vehicle Power Supply......................................... 1-6
1.2.3 Solar Panels................................................................................. 1-7
1.2.4 External Battery Connection....................................................... 1-7
1.2.5 Safety Precautions....................................................................... 1-8
1.3 Humidity Effects and Control............................................................... 1-8
1.3.1 Desiccant..................................................................................... 1-8
1.3.2 Nitrogen Purging......................................................................... 1-8
1.4 Recommended Grounding Practices..................................................... 1-9
1.4.1 Protection from Lightning........................................................... 1-9
1.4.2 Effect on Measurements: Common Mode Range...................... 1-9
1.5 Use of Digital Control Ports for Switching Relays............................. 1-10
2. Data Storage and Retrieval......................................2-1
2.1 Data Storage in CR9000....................................................................... 2-1
2.1.1 Internal Static Ram...................................................................... 2-1
2.1.2 Internal Flash Memory................................................................ 2-1
2.1.3 9080 PAM Module — PCMCIA PC Card.................................. 2-2
2.2 Internal Data Format............................................................................. 2-2
2.3 Data Collection..................................................................................... 2-3
2.3.1 The Collect Menu ....................................................................... 2-4
2.3.2 RealTime Write File.................................................................... 2-6
2.3.3 Logger Files Retrieve.................................................................. 2-7
2.3.4 Via PCMCIA PC Card................................................................ 2-8
i
CR9000 Table of Contents
3. CR9000 Measurement Details................................. 3-1
2.4 Data Format on Computer.....................................................................2-9
2.4.1 Header Information.....................................................................2-9
2.4.2 TOA5 ASCII File Format .........................................................2-11
2.4.3 TOB1 Binary File Format.........................................................2-12
2.4.4 TOB2 Binary File Format.........................................................2-12
3.1 Measurements using the CR9041 A/D..................................................3-1
3.1.1 Analog Voltage Measurement Sequence ....................................3-1
3.1.2 Single Ended and Differential Voltage Measurements...............3-3
3.1.3 Signal Settling Time.................................................................... 3-6
3.1.4 Thermocouple Measurements.....................................................3-7
3.1.5 Bridge Resistance Measurements..............................................3-14
3.1.6 Measurements Requiring AC Excitation...................................3-16
3.1.7 Influence of Ground Loop on Measurements ...........................3-16
3.2 CR9058E Isolation Module Measurements........................................3-17
3.2.1 CR9058E Supported Instructions.............................................. 3-18
3.2.2 CR9058E Sampling, Noise and Filtering..................................3-20
3.3 CR9052 Filter Module Measurements................................................3-22
3.4 Pulse Count Measurements.................................................................3-25
4. CRBASIC - Native Language Programming .......... 4-1
4.1 Format Introduction..............................................................................4-1
4.1.1 Mathematical Operations ............................................................4-1
4.1.2 Measurement and Output Processing Instructions...................... 4-1
4.1.3 Inserting Comments Into Program.............................................. 4-2
4.2 Programming Sequence........................................................................4-2
4.3 Example Program..................................................................................4-3
4.3.1 Data Tables..................................................................................4-4
4.3.2 The Scan — Measurement Timing and Processing ....................4-5
4.4 Numerical Entries .................................................................................4-6
4.5 Logical Expression Evaluation .............................................................4-7
4.5.1 What is true? ...............................................................................4-7
4.5.2 Expression Evaluation.................................................................4-7
4.5.3 Numeric Results of Expression Evaluation................................. 4-7
4.6 Flags...................................................................................................... 4-8
4.7 Parameter Types....................................................................................4-8
4.7.1 Expressions in Parameters...........................................................4-9
4.7.2 Arrays of Multiplier Offsets for Sensor Calibration ...................4-9
4.8 Program Access to Data Tables............................................................4-9
5. Program Declarations.............................................. 5-1
6. Data Table Declarations and Output
Processing Instructions..................................... 6-1
6.1 Data Table Declaration .........................................................................6-1
6.2 Trigger Modifiers.................................................................................. 6-2
6.3 Export Data Instructions.......................................................................6-8
6.4 Output Processing Instructions.............................................................6-9
ii
CR9000 Table of Contents
7. Measurement Instructions.......................................7-1
7.1 Voltage Measurements ......................................................................... 7-3
7.2 Thermocouple Measurements............................................................... 7-3
7.3 Half Bridges.......................................................................................... 7-6
7.4 Full Bridges .......................................................................................... 7-9
7.5 Excitation/Continuous Analog Output ............................................... 7-10
7.6 Self Measurements.............................................................................. 7-11
7.7 Peripheral Devices.............................................................................. 7-12
7.8 Digital I/O ........................................................................................... 7-21
7.9 CR9052DC Filter Module Measurements..........................................7-26
8. Processing and Math Instructions..........................8-1
9. Program Control Instructions ..................................9-1
A. Keywords and Predefined Constants....................A-1
Index .......................................................................Index-1
iii
CR9000 Table of Contents
This is a blank page.
iv

Overview

CR9000
AC ADAPTOR
The CR9000 is a modular, multi-processor system that provides precision measurement capabilities in a rugged, battery-operated package. The system makes measurements at a rate of up to 100 K samples/second with 16-bit resolution. Higher sample rates and resolutions can be attained using some of our higher end modules (CR9052E filter module, or the CR9058E isolation module). The CR9000 Base System includes CPU, power supply, and A/D modules. Up to nine I/O modules are inserted to configure a system for specific applications. The on-board, BASIC-like programming language includes data processing and analysis routines. PC9000 Windows generation and editing, data retrieval, and realtime monitoring.
Software provides program
FIGURE OV1-1. CR9000 Measurement and Control System

OV1. Physical Description

OV1.1 Basic System

CR9031 CPU Module
The CR9031 CPU Module provides system control, processing, and communication to a PC via Transputer Link (TLINK) and fiber optic. The main processor is a 32-bit Inmos T805 Transputer. The module has 2MB static RAM and 2MB Flash EEPROM.
OV-1
CR9000 Overview
FIBER OPTIC LINK IN
9031 CPU
FIBER OPTIC LINK OUT TLINK
FIGURE OV1-2. CR9031
CR9041 A/D and Amplifier Module
The CR9041 A/D and Amplifier Module provides signal conditioning and 16 bit, 100 kHz A/D conversions.
CR9000
MEASUREMENT & CONTROL SYSTEM
9041 A D
FIGURE OV1-3. CR9041
CR9011 Power Supply Module and AC Adapter
The CR9011 Power Supply Module provides regulated power to the CR9000 from the internal battery modules. It also regulates battery charging from power supplied by the AC adapter, a DC input, or other external sources. The AC adapter may be used where AC power is available (100 - 240 volts) to provide power to the CR9000 and charge its batteries.
LOGAN, UTAH
MADE IN USA
MADE IN USA
The CR9011 has a relay that allows shutting off power under program control. The Power Up inputs allow an external signal to awaken the CR9000 from a powered down state (PowerOff, Section 9). When the CR9000 is in this power off state the ON Off switch is in the on position but the internal relay is open. The power LED is not lit. If the "<0.5 " input is switched to ground or if the ">2" input has a voltage greater than 2 volts applied, the CR9000 will awake, load the program in memory and run. If the "< 0.5" input continues to be held at ground while the CR9000 is powered on and goes through its 2–5 second initialization sequence, the CR9000 will not run the program in memory.
MEASUREMENTS:
Battery (voltage and current)
CONTROL:
PowerOff
OV-2
CR9000 Overview
POWER CHARGE
9011 POWER SUPPLY
ON OFF
FIGURE OV1-4. CR9011

OV1.2 Measurement Modules

CR9050(E) Analog Input Module
The CR9050(E) Analog Input Module has 14 differential or 28 single-ended inputs for measuring voltages up to ±5 V. Voltages exceeding ±9 V may cause errors on other channels. An on-board PRT provides the reference temperature for thermocouple measurements, while 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 1.6 µV.
MEASUREMENTS:
Voltage
Differential Voltage (VoltDiff) Single-Ended Voltage (VoltSE)
Thermocouple, Differential Voltage (TCDiff) Thermocouple, Single-Ended Voltage (TCSE)
MADE IN USA
CHARGE(9-18VDC)
12VOUT POWER UP
>2.0V
<0.8V
Bridge measurements (also require CR9060 Excitation Module)
Full Bridge (BrFull) 6 Wire Full Bridge (BrFull6W) Half Bridge (BrHalf) 3 Wire Half Bridge (BrHalf3W) 4 Wire Half Bridge (BrHalf4W)
Module Temperature (ModuleTemp)
1
3
5
7
9
11
13
15
SE
2
1
H
DIF
9050 ANALOG INPUT W RTD
4
2
H
L
L
6
8
10
12
3
4
5
H
H
L
H
L
6
H
L
14
7
H
L
L
17
16
8
H
9
H
L
FIGURE OV1-5. CR9050
CR9051E Fault Protected 5V Analog Input Module
The number of channels and measurements are the same as for the CR9050 Analog Input Module. Each input channel is fault-protected so as to permit over-voltages between +50 V and –40 V without corruption of measurements on other input channels. All the CR9051E input channels become open switches when the CR9000 is powered off. The CR9051E is recommended
19
21
23
25
18
20
22
10
H
L
11
H
L
24
12
H
L
L
27
26
13
H
28
14
H
L
L
MADE IN USA
OV-3
CR9000 Overview
over the CR9050E for applications where fault voltages beyond ±9 V could come in contact with the inputs, or when the CR9000 could be powered off while still connected to sensors that have power applied to them.
CR9050EC
CR9051E FAULT MADE IN USA
5V ANALOG INPUT CONNECTOR FOR CR9050E OR CR9051E MADE IN USA
FIGURE OV1-6. CR9051E
CR9052DC Anti-Alias Filter Module with DC Excitation
The CR9052DC is a high-performance anti-alias filter module that extends the capability of the CR9000 Measurement and Control System. The module includes six anti-aliased analog measurement channels with differential input ranges from ±20 mV to ±5 V. Each input channel has current and voltage excitation options. Measurement rates up to 50 kHz per channel are possible.
MEASUREMENTS:
VoltFilt FFTFilt
CR9052EC
CR9052DC MADE IN USA
FILTER MODULE CONNECTOR DC EXCITATION MADE IN USA
FIGURE OV1-7. CR9052DC
CR9052IEPE Anti-Alias Filter Module with DC Excitation
The The CR9052IEPE module allows direct connection of Internal Electronics Piezo-Electric (IEPE) accelerometers and microphones to CR9000- or CR9000X-series dataloggers. Each CR9052IEPE includes six channels. Each channel has a BNC connector, an open circuit indicator LED, and a short circuit indicator LED which can indicate if the channel is over-or under-driven. Each channel has a built-in constant current source which is software programmable to 0, 2, 4, or 6 mA.
MEASUREMENTS:
VoltFilt FFTFilt
OV-4
CR9000 Overview
CR9052IEPE
SHORT
OPEN
CH 1
SHORT
OPEN
CH 2
SHORT
OPEN
FIGURE OV1-8. CR9052IEPE
CR9058E Isolation Module
The CR9058E is a 10 channel, differential input isolation module. Each channel has a 24 bit A/D converter which supplies input isolation for up to ±60 V continuous common mode voltage conditions. The full scale ranges available are ±60 V, ±20 V, and ±2 V with a resolution to 2 µVolts. Due to its superb signal to noise ratio, and good resolution, an accurate thermocouple measurement can be made on the 2 Volt range code. An on-board programmable DSP provides digital filtering.
MEASUREMENTS:
VoltDiff TCDiff
CH 3
SHORT
OPEN
CH 4
SHORT
OPEN
CH 5
SHORT
OPEN
CH 6
MADE IN USA
CR9058EC
CR9058E 60V ISOLATED ANALOG INPUT MODULE W/RTD MADE IN USA
60V ISOLATED ANALOG INPUT CONNECTOR FOR CR9058E MADE IN USA
FIGURE OV1-9. CR9058
CR9055 50-Volt Analog Input Module
The CR9055 50-Volt Analog Input Module has 14 differential or 28 single­ended inputs for measuring voltages up to ± 50 V. Resolution on the most sensitive range is 16 µV. The CR9055 has a common mode range of ± 50 V.
MEASUREMENTS:
Voltage
Differential Voltage (VoltDiff) Single-Ended Voltage (VoltSE)
Normally thermocouple measurements would be made on the CR9050 Analog Input Module (±5 Volt) because of its greater resolution, however they can be made on the CR9055 if the ±50 V common mode range is necessary.
Thermocouple, Differential Voltage (TCDiff) Thermocouple, Single-Ended Voltage (TCDiff)
OV-5
CR9000 Overview
1
SE DIF
3
2
1
H
4
2
H
L
L
5
7
9
11
13
15
17
19
21
23
25
6
8
10
12
14
16
18
20
22
3
4
5
6
7
8
9
10
H
H
H
H
H
H
H
L
L
L
L
L
L
H
L
11
H
L
24
12
H
L
L
27
26
13
H
28
14
H
L
L
9055 50V ANALOG INPUT
CR9060 Excitation Module
MADE IN USA
FIGURE OV1-10. CR9055
The CR9060 Excitation Module has six continuous analog outputs with individual digital-to-analog converters for PID Algorithm, waveform generation, and excitation for bridge measurements. Ten switched excitation channels provide precision voltages for bridge measurements. Each analog output will provide up to 50 mA between ±5 V. Also includes eight digital control outputs (0 V low, 5 V high).
MEASUREMENTS:
Excite PortSet
Full Bridge (BrFull) 6 Wire Full Bridge (BrFull6w) Half Bridge (BrHalf) 3 Wire Half Bridge (BrHalf3W) 4 Wire Half Bridge (BrHalf4W)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 3 6 82457
9060 EXCITATION C.A.O. SWITCHED EXCITATION DIGITAL CONTROL OUTPUT
FIGURE OV1-11. CR9060
CR9070 Counter - Timer / Digital I/O Module — Obsolete
Features 12 channels capable of high-level (5 V square wave) pulse counting at frequencies up to 5 MHz. Four channels can also count switch closures; the other eight can count low-level A/C signals. In addition, there are 16 independent digital I/O channels for digital control, communications, and triggering.
MEASUREMENTS:
Count Pulses or frequency (PulseCount) Read state of I/O Channels (ReadI/O) Write to I/O Channels (WriteI/O)
MADE
IN USA
OV-6
CR9000 Overview
1 2
45 78 9 10 12 13 15 16 1 2 3 4 5 6 7 8 9 10 11 12
3 6 11 14
9070 COUNTER & DIGITAL I O
DIGITAL I/O
FIGURE OV1-12. CR9070
CR9071E Counter and Digital I/O Module
Features 12 channels capable of high-level (5 V square wave) pulse counting at frequencies up to 1 MHz. The pulse channels can also do interval timing measurements with 40 ηs resolution. Four channels can also count switch closures; the other eight can count low-level A/C signals. In addition, there are 16 independent digital I/O channels for digital control, communications, and triggering.
MEASUREMENTS:
Count Pulses or frequency (PulseCount) Read state of I/O Channels (ReadI/O) Write to I/O Channels (WriteI/O) Interval and Timing Measurements (TimerI/O)
LOW LEVEL AC SWITCH CLOSURRE
MADE IN USA
CR9071EC
CR9071E COUNTER MADE IN USA
COUNTER & DIGITAL I/O MADE IN USA
FIGURE OV1-13. CR9071E
Data Storage Peripheral and Memory Module
Contains slots for two type I/II PCMCIA cards or one type III PCMCIA card. A 9-pin serial I/O port supports CSI peripherals. The LEDs indicate the status of the cards in slots A and B. Not lit: no card detected, green: present and correctly formatted, red: present but corrupt or unrecognized, orange: accessing the card. Press the button next to the status LED to power down a card before removing it. The LED will blink green several times then go out for ten seconds. Remove the card while the LED is not lit. The card will be reactivated if not removed.
CAUTION
Removing a card while it is active can cause garbled data and can actually damage the card. Do not switch off the power (CR9011 Module) while the cards are present and active.
MEASUREMENTS:
Output data to PAM (PAMOut) DSP4 Display (DSP4) CSAT3 Sonic Anemometer (CSAT)
OV-7
CR9000 Overview
CSI SERIAL I O
9080 PERIPHERAL AND MEMORY
CARD A CARD B
STATUS AND CONTROL
FIGURE OV1-14. CR9080

OV1.3 Communication Interfaces

TL925 RS232-TLINK Interface
The TL925 CR9000 to Computer Interface converts RS232 signals from the computer into a transputer link for the CR9000. The TLINK cable can be up to 30 meters long.
COMPUTER / RS232
S/N: 0004
TOP OF CARDS FACE UP A B
Logan Utah
TL925
CR9000 TO RS232 SERIAL INTERFACE
MADE IN USA
MADE IN USA
CR9000 / RS422
FIGURE OV1-15. TL925
BLC100 Bus Link Card and Fiber Optic Link Interface — Obsolete
The BLC100 is an interface board that plugs into a half-length card slot (AT bus) in the user's computer. It can be used for either TLINK (8 wire, up to 30 meters) or for fiber optic (separate transmit and receive) communications. Communication rates up to 10 MBPS can be attained.
TLINK
OUT
IN
FIGURE OV1-16. BLC100 Bus Link Card
TLINK
OV-8
PLA100-L Parallel Link Interface
The PLA100-L converts a parallel port on a computer to a TLINK for communication with the CR9000.
SN: TB300-238 PN: 50-100300-001
TB300C
CONNECT TO PC
FIGURE 0V1-17. PLA100-L Parallel Link Interface

OV2. Memory and Programming Concepts

OV2.1 Memory

CR9000 Overview
The CR9031 CPU Module in the CR9000 base system has 2MB static RAM and 2MB Flash EEPROM. The static RAM allows fast read write cycles (150 ηs). The Flash EEPROM is much slower to write to (15 µs minimum) but it retains its information when power is shut off. The operating system and user program listing(s) are stored in the flash EEPROM. When the CR9000 is powered up, the operating system and the compiled program are loaded into RAM. 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 with the 9080 PAM Module.

OV2.2 Measurements, Processing, Data Storage

The CR9000 divides datalogging and control between two entities. The task sequencer manipulates the measurement and control hardware on a rigidly
timed sequence. The main processor, an Inmos T805 Transputer, processes and stores the resulting measurements and makes the decisions to actuate controls.
The Transputer is a 32-bit processor that has parallel processing capabilities. Four communication links allow rapid transfer of data with little processor time. One link is used to transfer data to and from intelligent modules in the CR9000 (e.g., the PAM module). One link is used for TLINK communications and another for the fiber optic link. The forth link gives the task sequencer direct memory access (DMA) to store raw Analog to Digital Converter (ADC) data directly into transputer memory. As soon as the data from a scan is in memory, the transputer starts processing it. There are two buffers allocated for this raw ADC data, thus the transputer can be busy full time processing one scan of data while the task sequencer is filling the other.
OV-9
CR9000 Overview
The transputer directly controls the 9070/CR9071E Counter and Digital I/O Module.
The task sequencer is a combination of components that include memory, a Xylinx Programmable Gate Array (i.e., a CSI customized chip), and the digital bus. When a program is compiled by the transputer, it loads the task sequencer memory with a series of instructions that define the sequence and timing of the measurements. This control includes channel and gain switching and ADC control that is done in our other dataloggers by the CPU. When the program runs, the task sequencer steps through the instructions at a precise rate, ensuring that the measurement timing is exact and invariant.
Transputer: Task sequencer:
Digital I/O task
Read ports and counters on 9070 and append data to that sent by Task sequencer Set ports on 9070 Counter timer
Processes measurements
Determines controls (port states) to set next scan Stores data
Analog measurement and excitation sequence and timing Pipelines data from measurements to transputer Sets ports on 9060 Excitation Module Sends interrupt to Transputer task that reads and sets ports/counters.

OV2.3 Data Tables

The CR9000 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 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.
Table OV2-1. Typical Data Table
TOA4 StnName Temp TIMESTAMP RECORD RefTemp_Avg TC_Avg(1) TC_Avg(2) TC_Avg(3) TC_Avg(4) TC_Avg(5) TC_Avg(6) TS RN DegC DegC DegC degC degC degC degC Avg Avg Avg Avg Avg Avg Avg 1995-02-16 15:15:04.61 278822 31.08 24.23 25.12 26.8 24.14 24.47 23.76 1995-02-16 15:15:04.62 278823 31.07 24.23 25.13 26.82 24.15 24.45 23.8 1995-02-16 15:15:04.63 278824 31.07 24.2 25.09 26.8 24.11 24.45 23.75 1995-02-16 15:15:04.64 278825 31.07 24.21 25.1 26.77 24.13 24.39 23.76

OV3. PC9000 Application Software

PC9000 is a Windows application for use with the CR9000. The software supports CR9000 program generation, real-time display of datalogger measurements, graphing, and retrieval of data files.
OV-10

OV3.1 Hardware and Software Requirements

The following computer resources are recommended:
IBM PC, Portable or Desktop
64 Meg of Ram
VGA Monitor
Windows 2000, Windows XP, Windows NT, or Windows 4.0
60 Meg of Hard Drive Space for software
400 Meg of Hard Drive Space for data
Parallel port and a PLA100-L, RS232 Serial Port and TL925, or BLC100
Bus Link Card
The following computer resources are recommended:
128 Meg of Ram
233 MHz 486 or faster
Mouse

OV3.2 PC9000 Installation

CR9000 Overview
To install the PC9000 Software:
Start Microsoft Windows 2000, NT, or XP
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.
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. Install PC9000 to get the details. A CR9000 is not necessary to try out the programming and real time display options; the demo uses canned data for viewing. Without a CR9000, 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).
ile menu and choose Run
OV-11
CR9000 Overview
File Edit Realtime Analysis Tools Collect Display Windows Help
Display Data Graph 1 . . . Display Data Graph 2 . . .
ID2000 . . . Ctrl + I
Field Monitor . . . Virtual Meter . . . Virtual O'Scope . . . X-Y Plotter . . . Histogram . . . Fast Fourier Transform . . .
Get/Set Variable . . .
Data Retrieval . . . Scheduled Data Retrieval . . .
CommLink Select Series Linked Station . . . Select Parallel Linked Station . . .
Logger Clock . . . Logger Status . . .
Download . . . Logger Files . . .
Diagnostics
Display Data in Tables Collected From CR9000. Graphing requires no special processing of the data and provides rapid feedback to the operator.
Realt ime Display & Graphing
Collect data from CR9000
PC to CR9000 communications.
Program Generator Open Program File . . .
Open Wiring File . . . Open Data Table Info File . . .
Open Data File . . . Convert Binary to ASCII File . . .
Print . . . Printer Setup . . .
DOS Shell . . . File Manager . . . Explorer . . .
Exit PC9000
Menu-driven Program Gener ation.
Direct Editing of Program View/Edit Wir ing Diagram & DataTable
Information (Created by Program Generator) View Data Collected from CR9000
OV3-1. PC9000 Primary Functions
OV-12
CR9000 Overview
y
A
A
A
A
File Edit RealtimeAnalysis Tools Collect Displa
Undo Ctrl + Z Date & Time Select All
Cut Ctrl + X Copy Ctrl + C Paste Ctrl + V Delete Wrap Text Ctrl + W
Go To Line . . . Find Ctrl + F Replace Ctrl + R
Colors . . . Fonts . . . Defaults . . .
Editing Options for
ctive Windows
Change fonts and/or Colors for
OV3-2. PC9000 Editing, Help, and User Preferences
Windows Help
ctive Windows.
Tile Horizontal . . . Tile Vertical . . . Cascade . . .
rrange Icons . . .
List of Windows
PC9000 Help Contents . . . Search PC9000 Help . . .
CRBasic Help Contents . . . Search CRBasic Help . . .
Obtaining Technical Support . . .
bout PC9000 . . .
Software Versions . . .
File
Edit
Program Generator
Guides the user through a series of menus to configure the measurement types: thermocouple, voltage, bridge, pulse counting, frequency, and others. Creates a CR9000 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 CR9000. Provides context-sensitive help for the CR9000'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
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.
OV-13
CR9000 Overview
Analysis
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.
TOOLS Control and Communications
Supports PC to CR9000 communications: clock read/set, status read, program download, and program retrieval.
COLLECT Collect data from CR9000 data tables DISPLAY
Configure the font and color scheme in an active window.
WINDOWS
Size and arrange windows.
HELP
On-line help for PC9000 software.

OV4. Specifications

General CR9000 & CR9000C Specifications
Electrical specifications are valid o ver a -25° to +50°C range unless otherwise specified; testing over -40° to +70°C availab le as an option, exc luding batteries. Non-condensing environment is required. To maintain specifi­cations, Campbell Scientific recommends recalibrating datalogg er s ever y two y ears .
9031 CPU MODULE
P ROCESSORS: Main CPU is 32-bit with on-chip
floating point unit. Measurements,timing, and setup done by hardware task sequencer with DMA type tr ansf er to CPU memory .
MEMORY:2 MB Flash EEPROM, 2 MB Static RAM
9011 POWER SUPPLY MODULE
V O L TA G E: 9.6 to 18 V d c TYPICAL CURRENT DRAIN: Base system with no
modules is 500 mA active ; 300 mA standby. Current drain of individual I/O modules varies. Ref er to specifications f or each I/O module f or specific v alues . P o w er supply module can place the system in standby mode by shutting off pow er to the rest of the modules.
DC CHARGING: 9.6 to 18 Vdc input charges internal
batter ies at up to 2 A r ate. Charging circuit includes temperature compensation.
INTERNAL BATTERIES: Se a l e d r e c h ar geable with 14
Ahr (7 Ahr for the CR9000C) capacity per charge .
EXTERNAL BATTERIES: Exter nal 12 V batter ies can
be connected.
9041 A/D and AMPLIFIER MODULE
A/D Conversions: 16-bit, 100 kHz
PC9000(C) INTERFA CES
PLA100
TYPICAL CURRENT DRAIN: 50 mA, supplied b y
the CR9000(C)
SIZE (excluding cab le): 2.25” x 0.5” x 4.0”
(5.7 x 1.3 x 10.2 cm)
CABLE LENGTH: Specified, in feet, b y the user,
50 ft maximum length
WEIGHT:2.5 lb (0.11 kg)
TL925
TYPICAL CURRENT DRAIN: 50 mA, supplied b y
the CR9000(C)
B AU D RATE: 300 bps to 115.2 kbps with auto baud
detection. SIZE: 2.1” x 1.0” x 6.8” (5.3 x 2.5 x 17.3 cm) WEIGHT:2.5 lb (0.11 kg)
TRANSIENT PRO TECTION
All analog and digital inputs and outputs use gas discharge tubes and tr ansient filters to protect against high-voltage tr ansients . Digital I/Os also have o ver­voltage protection clamping.
PHYSICAL SPECIFICA TIONS
Siz e
Lab Enclosure: 15.75"L x 9.75"W x 8"D
Fiberglass Enclosure: 18"L x 13.5"W x 9"D
CR9000C: 10"L x 11"W X 9"D
W eight
Lab Enclosure: 30 lbs including modules (13.6 kg) Fiberglass Enclosure: 42 lbs including modules
(19.1 kg) CR9000C: 27 lbs including modules (12.3 kg) Replacement Batteri es: 6.4 lbs (2.9 kg) Additional Modules: 1 lb each (0.5 kg)
(40 x 24.8 x 20.3 cm)
(45.7 x 34.3 x 22.9 cm)
(25.4 x 27.9 x 22.9 cm)
W ARRANTY
Three years against defects in materials and workmanship.
W e recommend that y ou confirm system
configuration and cr itical specifications with
Campbell Scientific before purchase .
OV-14
CR9000 & CR9000C I/O Module Specifications
CR9000 Overview
CR9050(E) and CR9051E ANALOG INPUT MODULE with RTD
INPUT CHANNELS PER MODULE: 14 diff erential
or 28 single-ended.
RANGE AND RESOLUTION:
Input Resolution Input Sample
Range (1 A/D count) Noise Rates
(mV) (µV) (µV RMS) (kHz) ±5000 158.0 105 100 ±1000 32.0 35 100
±200 6.3 7 50
±50 1 .6 4 50
Input
Range Input Noise (µV RMS)
±5000 105 130 ±1000 35 35
ACCURACY OF VOLTAGE MEASUREMENTS:
COMMON MODE RANGE: ±5 V DC COMMON MODE REJECTION: >120 dB INPUT RESISTANCE:2.5 gigaohms typical MAXIMUM INPUT VO LTAGE WITHOUT
D A M AGE : ±20 V CR9050(E), -40 to +50 V CR9051E TYPICAL CURRENT DRAIN: 25 mA active
Resistance & Conductivity Measurements
CR9050(E) CR9051E
(mV)
±200 7 7
±50 4 4
Note: Measurement aver aging provides lo w er
noise and better resolution.
Single-Ended & Differential:
±(0.07% of reading + 4 A/D counts) -25° to +50°C
±(0.14% of reading + 4 A/D counts) -40° to +70°C
Dual Differential:
(t wo measurements with input polar ity re versed)
±(0.07% of reading + 1 A/D count) -25° to +50°C
±(0.14% of reading + 1 A/D count) -40° to +70°C
(Also requires 9060 Excitation Module)
ACCURAC Y:± (0.04% of reading + 2 A/D counts)
limited b y accuracy of e xter nal br idge resistors .
MEASUREMENT TYPES:6-wire and 4-wire full
br idge , 4-wire , 3-wire , and 2-wire half br idge . Uses excitation re versal to remove th ermal EMF errors.
Max
CR9052 ANTI-ALIAS FILTER MODULE
INPUT CHANNELS PER MODULE: six diff erential CONTINUOUS EXCITATION CHANNELS PER
MODULE: 1 2 ( 6 current, 6 voltage) TYPICAL CURRENT DRAIN: 400 mA + 1.5*[ I
Ref er to the CR9052 product liter ature fo r a complete listing of specifications .
is the sum of excitation currents pro vid-
where I
ex
ed b y all channels .
],
ex
CR9055(E) 50 V-ANALOG INPUT MODULE
INPUT CHANNELS PER MODULE: 14 diff erential
or 28 single-ended.
RANGE AND RESOLUTION:
Input Resolution Input Sample Range (1 A/D count) Noise Rates
(V)
±50 1580 1050 100 ±10 320 350 100
(µV) (µV RMS) (kHz)
±2 63 85 50 ±0.5 16 60 50
Max
Note: Measurement aver aging provides lo w er
noise and better resolution.
ACCURACY OF VOLTAGE MEASUREMENTS:
Single-Ended & Differential: ±(0.1% of reading + 4 A/D counts) -25° to +50°C ±(0.2% of reading + 4 A/D counts) -40° to +70°C
Dual Differential: (t wo measurements with input polar ity re versed) ±(0.1% of reading + 1 A/D count) -25° to +50°C
±(0.2% of reading + 1 A/D counts) -40° to +70°C COMMON MODE RANGE: ±50 V DC COMMON MODE REJECTION: >62 dB
INPUT RESISTANCE:100 Kohms typical
MAXIMUM INPUT VO LTAGE WITHOUT D A M AGE: ±150 V
TYPICAL CURRENT DRAIN: 15 mA active
CR9058E ISOLATION MODULE
INPUT CHANNELS PER MODULE: 10 isolated, diff e r­ential; each channel has its o wn isolation g round f or shielded cable connection.
RANGE, RESOLUTION, AND INPUT RESISTANCE:
Input Resolution Resolution Input
Range w/o Ave raging w/ Averaging Resistance
(Vdc) (µV) (µV) (K ohms)
±2 ±10 ±2 10,000 ±20 ±100 ±20 88.9 ±60 ±300 ±60 26 9
ACCURAC Y: ±0.02% of Full Scale Range ove r
-40° to +70°C MINIMUM SCAN TIME PER MODULE:
VoltDiff: 1285 µs (778 samples per second) +
integ ration time for no input reversal (Re vDiff=0);
or 2990 µs (334 samples per second) +
integ ration time with input reversal (Re vDiff=1)
TCDiff (r ange parameter set to V2C): 2570 µs
(389 samples per second) + integr ation time for
no input reversal (Re vDiff=0); or 4275 µs (233
samples per second) + integr ation time with input
re versal (Re vDiff=1). MAXIMUM CONTINUOUS VOLTAGE W/O DA M AGE:
Input H or L to ISO Ground to H o r L to
Ran ge H to L ISO Ground Systm Ground Systm Ground
(Vdc) (Vdc) (Vdc) (Vdc) (Vdc)
±2 ±208 ±109 ±360 ±469 ±20 ±223 ±121 ±360 ±481 ±60 ±448 ±233 ±360 ±593
MAXIMUM ESD VOLTAGE ON INPUTS: ±5000V
CR9060 EXCITA TION MODULE
TYPICAL CURRENTDRAIN:
108 mA quiescent, 125 mA active Analog Outputs ANALOG OUTPUTS PER MODULE:
10 switched, 6 continuous SWITCHED: Provides excitation f or resistance
measurements.Only one output can be active a t
a time. CONTINUOUS: All outputs can be activ e
sim ultaneously. RANGE: ±5 V ACCURAC Y:± (0.2% of output ±4 mV) RESOLUTION: 12-bit A/D (2.4 mV) OUTPUT CURRENT:±50 mA
Digital Control Outputs CONTROL CHANNELS PER MODULE: 8 OUTPUT VOLTAGES (no load):
High: 5.0 V ±0.2 V Lo w: < 0.2 V
OUTPUT RESISTANCE: 100 ohms
CR9071E COUNTER & DIGITAL I/O MODULE
Counter Channels COUNTER CHANNELS PER MODULE: 12 MAXIMUM COUNTS PER INTERVAL: 232Maximu m
counts per inter val should never be reached because with a maximum input frequency of 1 MHz, the 32-bit counter will go 71.58 minutes before it rolls o ver. The maximum CR9000 scan rate is 1 min ute .
SWITCH CLOSURE MODE (4 channels)
Minimum switch closed time: 5 ms Minimum switch open time: 6 ms Maximum bounce time: 1 ms open without
being counted
HIGH FREQUENCY MODE (all channels)
Minimum pulse width: 500 ns Maximum input frequency: 1 MHz Thresholds: Pulse counted on tr ansition from
below 1.5 V to abo ve 3.5 V
Maximum input voltage: ±20 V
LOW LEVEL AC MODE (8 channels)
Input hysteresis: 10 m V Minimum ac voltage: 2 5 m V R M S Maximum input voltage: ±20 V Frequency r ange:
(mV RMS) 25 mV 1 to 10,000 50 mV 0.5 to 20,000
Digital Inputs/Outputs I/O CHANNELS PER MODULE: 16 OUTPUT VOLTAGES (no load)
High: 5.0 V ±0.2 V Lo w: < 0.2 V
OUTPUT RESISTANCE: 320 ohms
Input State
High: 3.5 to 5 V Lo w: -0.5 to 1.2 V
Input Resistance: 100 KOhms
Inter v a l Measurement
I/O CHANNELS:
Resolution is the scan rate
PULSE CHANNELS
Maximum inter va l: 1 minut e Resolution: ±40 ns
RANGE (Hz)
CR9080 PCMCIA and MEMORY MODULE
PCMCIA CARD INTERFACE: Accepts two Type I/II, or
one Type III SRAM or ATA Flash Memory Ca rd s.
SERIAL I/O: Allo w s ser ial communications with CSI
per ipher als at up to 115,200 bps.
TYPICAL CURRENT DRAIN: 300 mA activ e
W e recommend that y ou confirm system
configuration and cr itical specifications with
Campbell Scientific before purchase .
Copyright © 1994, 2003 Campbell Scientific, Inc. Printed November 2003
OV-15
CR9000 Overview
This is a blank page.
OV-16

Section 1. Installation

1.1 Enclosure

The CR9000 is equipped with either the –L option laboratory case or the –F option fiberglass case. The laboratory case can be used in a clean, dry, indoor environment or mounted in an enclosure. The fiberglass case provides a self­contained field enclosure. Campbell Scientific does not punch holes in the fiberglass case because it is our experience that most users like to customize the wire entry locations for their applications.
During the manufacturing of the fiberglass case, the base and lid are formed together to insure a perfectly matched fit. A six-digit serial number is stamped into the extruded aluminum rims on both the base and lid. When more than one CR9000 is owned, care should be taken to avoid a mismatch which could prevent a gas-tight seal. (Note that there is a pressure release valve on the enclosure. If you have difficulty removing the lid, try pressing the release valve to equalize the pressure differential between the case and atmosphere.)

1.1.1 Connecting Sensors

The CR9000 input modules use screw terminals for connecting sensor wires (Figure 1.1-1). Terminals for individual wires provide the most flexibility for connection to the wide range of sensors the CR9000 is used to measure as well as allowing the simplest field repair of the wire termination (strip and twist or tin).

1.1.2 Quick Connectors

Some customers who use CR9000s for numerous tests requiring the same or similar sets of sensors have found it useful to pre-wire the CR9000 to a set of plug-in quick connectors that mate with those installed on their sensors. Bulkhead type connectors can be installed either in the aluminum wiring panel cover or in the fiberglass case (Figure 1.1-2).
1-1
Section 1. Installation
Strip
0.5”
FIGURE 1.1-1 CR9000 Input Terminals
1-2
FIGURE 1.1-2 Quick Connectors Installed in CR9000 Cover

1.1.3 Junction Boxes

Individual sensor leads (and multiconductor cables) may be routed directly from the sensor locations to the CR9000 or routed to a junction box and then to the CR9000. When sensors are spread out over a large area, a junction box provides a convenient method for changing sensors in one location quickly. Junction boxes can also provide more localized protection against instrumentation damage as a result of lightning induced high voltages. Junction boxes should be sealed adequately to limit air exchange and stocked with fresh desiccant (Section 1.3). When used for thermocouple lead wires junction boxes need to be insulated to reduce thermal gradients (Section 3.4).
Section 1. Installation

1.2 System Power Requirements and Options

The standard CR9000 is equipped with sealed lead acid battery packs and charging circuitry for charging the batteries from a 9-18 volt DC input. The input can come from 120/240 VAC line power via the universal AC power adapter (included with CR9000), vehicular 12V power sources, solar panels, et cetera. When fully charged, the internal batteries of the CR9000 are capable of providing 13-14 Amp-Hours, between 4 and 13 hours of operation in a typical application where the CR9000 is active continuously (not powering itself down).

1.2.1 Power Supply and Charging Circuitry

The 9011 Power Supply Module has two CHARGE inputs for connecting a DC Power source: either the plug connector used with the AC adapter or the screw terminals. A DC source with voltage in the range of 9 to 18 VDC will charge the internal lead acid batteries and power CR9000 provided sufficient current is available and the system is setup to use 3 amps or less (see Table
1.2-2). If the CR9000 system configuration requires greater than 3 amps, consult a Campbell Scientific applications engineer for information on the CR9011 Power Supply High-Current modification. The voltage is automatically stepped up to an adequate voltage for charging. A temperature compensated charging regulator circuit regulates the charging voltage supplied to the lead acid batteries and the CR9000. The charging circuitry operates with the ON/OFF switch in either position. The charging circuitry is NOT designed to charge a large external 12V battery.
Power for running the CR9000 and charging the internal batteries from AC line power is provided via the CR9000's universal AC adapter through the power input connector located on the 9011 Power Supply Module. The universal adapter converts 100–240 VAC 50–60 Hz to 17.5 VDC.
On the left end of the Power Supply Module there are two LEDs, Power and Charge. The charge LED is lit when there is sufficient power connected to charge the batteries. Power to the CR9000 is controlled by the ON/OFF toggle switch. The power LED is lit when the CR9000 is on. It goes off when the switch is in the off position or when the CR9000 is powered off under program control (PowerOff instruction).
The sealed lead acid battery packs are located at each end of the CR9000 (Figure 1.1-3).
1-3
Section 1. Installation
CR9000
FIGURE 1.1-3 CR9000 Battery Pack
1-4
Section 1. Installation
TABLE 1.2-1. CR9000 Battery and Charging Circuitry Specifications
CR9000 WITH STANDARD BATTERIES (4):
Battery life, no supplemental
13 hours to 10.5 V (assuming 1A current) charge Voltage at full discharge 10.5 volts Recharge time
9 hours from 100% discharge (AC Adapter input) 5 hours from 50% discharge.
Individual Batteries
Type Yuasa NP7-6 Nominal Voltage 6 Volts Nominal Capacity 20 hr rate of 350 mA to 5.25 V, 7 Ahr 10 hr rate of 650 mA to 5.25 V, 6.5 Ahr Operating Temperature range: Charge –15 to 50 ºC Discharge –20 to 60 ºC Shelf Life @ 20 ºC: 1 month 97% 3 months 91% 6 months 85% Life Expectancy: Standby 3 to 5 years Cycle use 100% depth of discharge 250 cycles 50% depth of discharge 550 cycles 30% depth of discharge 1200 cycles Number of batteries 4
CHARGING CIRCUIT
Type Controlled voltage with temperature
compensated voltage regulation Charging Current limited to 2 Amps max
POWER SUPPLY TRANSFORMER
Input Voltage 100-240 VAC,
50-60 Hz Input Current 1.4 A maximum Output Voltage 17.5 VDC Output Current 3.5 A maximum
NOTE
At typical CR9000 current demand, the batteries are 100% discharged at a system battery voltage of 10.5 V. Discharging the batteries below this voltage damages the cells. As can be seen from the above table, battery life expectancy decreases with depth of discharge. CSI's warranty does NOT cover battery or cell damage resulting from deep discharge.
Avoid deep discharge states by storing the battery voltage as part of the collected data and periodically checking the voltage record to be sure the batteries and charging system are working correctly.
1-5
Section 1. Installation
All external charging devices must be disconnected from the CR9000 in order to measure the true voltage level of the internal batteries.
This CR9000 current drain depends on the number and type of modules installed, the sensors excited, and the scan interval and measurements made. The current drain of a specific CR9000 can be approximated from the information provided in Table 1.2-2.
TABLE 1.2-2. Current required by CR9000 modules
Model No. Module Quiescent
Current
9031 9041 9011
9050(E) 9051E 9052DC Filtered Analog
9055 50–Volt Analog
9058E 60 V Isolation
9060 Excitation Module 108 mA 125 mA 9070 Counter–Timer
9071E Counter–Timer
9080 Peripheral Adapter
As an example, the current drain of a CR9000 System containing the base system (CPU Module, A/D Module, and Power Supply Module: 410 mA / 485 mA) 1 9060 Excitation Module (108 mA / 125 mA, this does not include the current required for exciting the sensors), 2 9070 Counter/Timer Modules (0 mA / 30 mA), and 4 Analog Input Modules (0 mA / 60 mA) is about 518 mA between measurement scans and 700 mA during measurement. If it was active measuring close to 100 percent of the time, fully charged internal batteries (1 Ahr) would be depleted to a full SAFE discharge level (10.5 V) in about 20 hours. If the CR9000 system configuration requires greater than 3 amps, consult a Campbell Scientific applications engineer for information on the CR9011 Power Supply High-Current modification.
CPU Module A/D Module Power Supply Module Analog Input Module
Input Module
Input Module
Module
Module
Module
Module
410 mA 485 mA
0 mA 15 mA
5 mA if not
programmed
0 mA 15 mA
5 mA 360 mA
0 mA 80 mA
25 mA 35 mA
Current During
Measurement
500 mA + 1.5 (sum of
excitation currents on
channels)
1-6

1.2.2 Connecting to Vehicle Power Supply

A vehicle 12 Volt electrical system can be connected directly to the charge input on the Power Supply Module. The Power Supply Module will step the voltage from the vehicle up or down to the proper voltage for charging the CR9000 batteries. The input is diode protected so the CR9000 batteries will not leak power to the vehicle if the vehicle's battery is low.
Because the charge input supplies power to charge the CR9000 batteries (up to two amps when discharged) as well as power the CR9000, the current drawn from the vehicle could be in excess of three amps.

1.2.3 Solar Panels

In a remote installation, solar panels, in conjunction with a large external battery, may be used to power the CR9000. The solar panels that Campbell Scientific carries on it's price list are sized for lower power requirements and will only be adequate if the CR9000 is programmed to periodically power itself off so that it is active less than 25 percent of the time. Other panels are available for continuous operation. Contact a Campbell Scientific application engineer for help in configuring a solar powered CR9000 installation.

1.2.4 External Battery Connection

An external battery may be used in place of the internal lead acid batteries of the CR9000. The external battery is connected using a special cable that is plugged into the CR9000 in place of a standard battery pack (Figure 1.2-1).
Section 1. Installation
CAUTION
Reverse polarity protection is NOT provided on these terminals and CR9000 damage will occur if external power is connected with reverse polarity.
CSI recommends using 16 AWG lead wires or larger when connecting an external battery to the CR9000.
FIGURE 1.2-1 Connector for External Battery
1-7
Section 1. Installation

1.2.5 Safety Precautions

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. Because the potential for excessive hydrogen build up does exist, CSI makes the following recommendations:
1. A CR9000 equipped with standard lead acid batteries should NEVER be used in environments requiring INTRINSICALLY SAFE EQUIPMENT.
2. When attaching an external battery to the CR9000, insulate the bare lead ends to protect against accidental shorting while routing the power leads.
3. When the CR9000 is to be located in a gas-tight enclosure or used in a gas-tight mode with the standard ENVIRONMENTALLY SEALED FIBERGLASS CASE, the internal lead acid batteries SHOULD BE REMOVED and an external battery substituted.

1.3 Humidity Effects and Control

The CR9000 system is designed to operate reliably under environmental conditions where the relative humidity inside its enclosure does not exceed 90% (noncondensing). Condensing humidity may result in damage to IC chips, microprocessor failure and/or measurement inaccuracies due to condensation on the various PC board runners. Effective humidity control is the responsibility of the user and is particularly important in environments where the CR9000 is exposed to salty air.
Two humidity control methods are:
1. the use of desiccant
2. nitrogen purging

1.3.1 Desiccant

As a minimal precaution, the packets of HUMI-SORB desiccant shipped with the CR9000 should be placed inside the case. These packets should be routinely replaced. Obviously, the desiccant requires more frequent attention in environments where the relative humidity is high.

1.3.2 Nitrogen Purging

1-8
Several CSI customers have had success in preventing humidity-related equipment malfunctions in harsh environments by allowing nitrogen gas to slowly bleed into the datalogger enclosure. The sensor leads, power cables, etc., are routed to the terminal blocks of the datalogger through simple, inexpensive conduit elbows which are left unplugged. A nitrogen bottle is then left at the field site with its regulator valve slightly open so that nitrogen is
allowed to escape slowly through a rubber tube which is routed along with the sensor leads through the conduit elbows into the CR9000 enclosure.
Equipment required for this method of humidity control generally can be obtained from any local welding supply shop and includes a nitrogen bottle, regulator with tube adapter (content gauge, optional), hose clamp and a suitable length of small diameter rubber tubing. Nitrogen bottles are available in various sizes and capacities. The size of the nitrogen bo ttle used depends on the transport facilities available to and from the field site and on the time interval between visiting the site. Where practical, larger nitrogen bottles should be used to reduce cost and refilling frequency.

1.4 Recommended Grounding Practices

1.4.1 Protection from Lightning

Primary lightning strikes are those where the lightning hits the datalogger or sensors. Secondary strikes occur when the lightning strikes somewhere near the lead in wires and induces a voltage in the wires. All input and output connections in the I/O Module are protected using spark gaps. This transient protection is useless if there is not a good connection between the CR9000 and earth ground.
Section 1. Installation
All dataloggers in use in the field should be grounded. A 12 AWG or larger wire should be run from the grounding terminal on the right side of the I/O Module case to a grounding rod driven far enough into the soil to provide a good earth ground.
A modem/phone line connection to the CR9000 provides another pathway for transients to enter and damage the datalogger. The phone lines should have proper spark gap protection at or just before the modem at the CR9000. The phone line spark gaps should also have a solid connection to earth ground.

1.4.2 Effect on Measurements: Common Mode Range

A difference in ground potential between a sensor or signal conditioner and the CR9000 can offset the measurement. A differential voltage measurement gets rid of offset caused by a difference in ground potential. However, in order to make a differential measurement, the inputs must be within the CR9000 common mode range of
9055 module, or
The common mode range is the voltage range, relative to CR9000 ground, within which both inputs of a differential measurement must lie, in order for the differential measurement to be made. For example, if the high side of a differential input is at 4V and the low side is at 3V relative to CR9000 ground, there is no problem, a measurement made on the
signal of 1V. However, if the high input is at 5.8V and the low input is at
4.8V, the measurement cannot be made because the high input is outside of the CR9000 common mode range.
±5V (+15/-5 for the CR9052E module, ±50V for the
±60V for the CR9058E module).
±1.5V range would indicate a
1-9
Section 1. Installation
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 CR9000 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 CR9000. 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 CR9000 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 CR9000 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.

1.5 Use of Digital Control Ports for Switching Relays

The digital control outputs on the 9060 Excitation Module and the I/O channels on the CR9070/CR9071E Counter Timer Module may be used to actuate controls but, because of current supply limitations, the output ports are not used directly to drive a relay coil. Relay driver circuitry is used to switch current from another source to actually power the relay. These relays may be used for activating an external power source to run a fan motor or for altering an external circuit as a means of multiplexing signal lines, etc. CSI's Model A21REL-12 and A6 REL12 are Relay Controllers using a 12 VDC source for switching the relays. Solid state relays that may be controlled with a 0-5 V logic signal are also available for switching AC or DC power.
Figure 1.5-1 is a schematic representation of a typical external coil driven relay configuration which may be used in conjunction with one of the CR9000s digital control output ports. The example shows a DC fan motor and 12V battery in the circuit. This particular configuration has a coil cu rrent limitation of 75mA because of the NPN Medium Power Transistors used (Part No. 2N2222).
FIGURE 1.5-1. Typical Connection for Activating/Powering External
Devices, Using a Digital Control Output Port and Relay Driver
1-10

Section 2. Data Storage and Retrieval

The CR9000 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 six data tables (in the native language the limit on the number of data tables depends on where the tables are stored). 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 CR9000

There are three possible areas for data storage on the CR9000:
Internal Static Ram–avaliable storage the only limit on the number of tables Internal Flash Memory–6 data tables maximum PCMCIA PC Card–30 data tables maximum
Internal Ram is used as either the sole storage area for a data table or as a buffer area when data are sent to the PC card or to internal flash memory.
When PC9000 requests data from a table that is stored in Flash memory or a PC card, the CR9000 only looks for the data in flash memory or in the PC card when the oldest data are requested or if the data are not available in CPU memory.
In the CRBASIC program, the DataTable instruction sets the size of the data table or buffer area. A data table can be stored in a PC card by including the PAMOut instruction within the data table declaration. A data table can be stored in internal flash memory by including the FlashOut instruction within the data table declaration. A data table cannot be sent to both a PC card and to internal flash memory; the CR9000 will flag an error if both PAMOut and FlashOut are in a data table declaration.

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 PC card or to internal flash memory. The only limit on the number of tables is the available memory. Data in RAM are lost if the CR9000 is powered down either by switching off the power switch or with the PowerOff instruction.

2.1.2 Internal Flash Memory

There are 1.5 M bytes of flash memory available for data storage. No more than six data tables can be stored in flash memory. Flash Memory is always fill and stop, that is, once the space allocated for the data table is full, no more data are stored until the table is reset.
2-1
Section 2. Data Storage and Retrieval
When the CR9000 compiles and runs a program that uses flash memory, it checks to see if the program is different from the last program it ran. If the program has changed (including any changes to comments), flash memory is erased and reset. If the program is the same, the CR9000 leaves the flash memory as it was, appending data to tables that are not yet full.
The 1.5 M bytes of flash memory available for data storage is in six 256 K erasable segments. A segment can only store data from 1 table (otherwise the tables could not be individually reset). This is the reason a maximum of six tables are possible (none larger than 256 K). Automatic allocation (negative number for FlashOut size) will divide tables on the 256 K boundaries.

2.1.3 9080 PAM Module – PCMCIA PC Card

The CR9000 9080 PAM Module allows expanding the CR9000’s storage capacity with Type I, II, or III PCMCIA Cards. SRAM, ATA Flash, and ATA hard disk cards are supported. ATA hard disks cards cannot withstand the environmental temperature range of the CR9000’s specifications. A program can send a maximum of 30 data tables to PC cards.
Data stored on cards can be retrieved through one of the communication links to the CR9000 or by removing the card and inserting it in a PC card slot in a computer. Converting the data using the computer's PC card slot is much faster than retrieving it through the CR9000 using one of the communication links.
The CR9000 uses an MS DOS format for the PC cards. Cards can be formatted in a PC or in the CR9000.
TABLE 2.2-1. CR9000 DATA TYPES
Data Type Size Range Resolution LONG 4 bytes -2,147,483,648 to +2,147,483,647 1 bit (1) IEEE4 4 bytes 1.8 E –38 to 1.7 E 38 24 bits (about 7 digits) FP2 2 bytes -7999 to +7999 13 bits (about 4 digits)

2.2 Internal Data Format

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 the instruction that outputs the data. A third data type, the four byte integer format (LONG) is used by the CR9000 for storing time and record number. Within the CR9000, 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).
2-2
Section 2. Data Storage and Retrieval
TABLE 2.2-1. Resolution and Range Limits
of FP2 Data
Zero Minimum
0.000 ±0.001 ±7999.
The resolution of FP2 is reduced to 3 significant digits when the first (left most) digit is 8 or greater (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).
TABLE 2.2-2. FP2 Decimal Location
Absolute Value Decimal Location
0 - 7.999 X.XXX 8 - 79.99 XX.XX 80 - 799.9 XXX.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 CR9000 using the PC9000 software:.
Magnitude
Maximum Magnitude
1. The collect menu is used to collect any or all stored data Tables and is
used for most archival purposes.
2. In PC9000’s Field Monitor RealTime window there is a "Disc file"
check box. Data stored to the table while the box is checked are also stored to a file on the PC. If communications cannot keep up with the measurement rate, there will be holes (missing data) in the data files.
3. Logger Files under the T from a PC card. This can be used to retrieve a data file in the raw binary format.
When the CR9000 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).
ools menu has the option of retrieving a file
2-3
Section 2. Data Storage and Retrieval

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 CR9000 and shown at the top.
2-4
2.3.1.1 File Type
FIGURE 2.3-1. Collect Data Dialog Box
ASCII With Time – Click here to store the data as an ASCII (TOA5, Section 2.4) file. Each record will be date and time stamped.
inary With Time Click here to store the data as a binary file (TOB1,
B
Section 2.4). Each record will be date and time stamped.
II Without Time – Click here to store the data as an ASCII file
ASC
(TOA5, Section 2.4). There will be no date and time stamps.
Binary Without Time – Click here to store the data as a binary file (TOB1, Section 2.4). There will be no date and time stamps.
2.3.1.2 Collection Method
All Records, Create New File – Collects the entire table stored in the CR9000. PC9000 gets the current record number from the table in the CR9000 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.
Section 2. Data Storage and Retrieval
Since Last, Create N
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 CR9000, and requests all records in between those numbers from the CR9000. The number in the file name is incremented to create the file name in which the data are stored.
Since L
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 CR9000, and requests all records in between those numbers from the CR9000. The data are appended to the existing file.
mber of Records, Create New File – Collects the number of records
Nu
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 CR9000. 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.
ew File – Click here to save new data in a new file.
ast, Append To File – Click here to append retrieved data to the
eam – acts the same as Write file for the selected Table Name (Section
Str
2.3.2).
Table Nam
selected for collection. The Table Name box is used to select the table to be retrieved.
Reset Tabl
record number back to 0. Unless the table is configured as fill and stop by the CR9000 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.
e – When "All tables" is not checked, a single data table can be
e – Resetting a data table erases all data in the table and sets the
2-5
Section 2. Data Storage and Retrieval
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.
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 F
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.
ile – Press the Change File button to change the name of the file
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 CR9000.

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.
2-6
This collection method requires that the PC is connected to the CR9000 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 first 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 next
file will be named MAIN01.DAT and so on. It takes a little time to open the file so be sure it is opened in advance of the event you want to store.
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 CR9000 CPU and Flash memory are not shown.
The retrieved data file is stored on the computer 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
FIGURE 2.3-2. Logger Files Dialog Box
2-7
Section 2. Data Storage and Retrieval

2.3.4 Via PCMCIA PC Card

When the CR9000 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 Removing Card from CR9000
The 9080 PCMCIA Adapter Module contains slots for two Type I/II PCMCIA cards or one type III PCMCIA card. The LEDs indicate the status of the cards in slots A and B.
Not lit: no card detected.
green: present and correctly formatted.
red: present but corrupt.
orange: accessing the card.
To remove a card, press the button next to the status LED to power down the card. The LED will blink green several times then go out for 10 seconds. Remove the card while the LED is not lit. The card will be reactivated if not removed.
Caution: Removing a card while it is active can cause garbled data and can actually damage the card. Do not switch off the power (9011 Module) while the cards are present and active.
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.2 Converting File Format
The CR9000 stores data on PC cards in TOB2 Format. TOB2 is a binary format that incorporates features 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 files to ASCII or TOB2 files to TOB1, ASCII, DaDisp, or ID-2000W. 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.)
2-8
Section 2. Data Storage and Retrieval
FIGURE 2.3-3. File Conversion Dialog Box

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","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
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.
2-9
Section 2. Data Storage and Retrieval
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 CR9000 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.
Table Name
The data table name.
Field Name
The name of the field in the data table. This name is created by the CR9000 by appending underscore ( _ ) and a three character mnemonic for the output processing.
Field Units
The units for the field in the data table. Units are 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 format and identifies the data type for each of the fields in the data table.
UINT4 = Unsigned 4 byte integer IEEE4 = 4 byte floating point
2-10
Time Stamp
This field is the date and time stamp for this record. It indicates the time, according to the logger clock, that each record was stored.
Section 2. Data Storage and Retrieval
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.
"TOA5","Bob's9K","CR9000","1048575","1.00","EXPLDAT.DLD","4339","Temp" "TIMESTAMP","RECORD","RefTemp_Avg","TC_Avg(1)","TC_Avg(2)","TC_Avg(3)","TC_Avg(4) " "TS","RN","degC","degC","degC","degC","degC" "","","Avg","Avg","Avg","Avg","Avg" "1995-09-19 14:31:43.84",458,29.94,25.6,25.36,25.48,25.4 "1995-09-19 14:31:43.85",459,29.93,25.6,25.36,25.41,25.35
The following is an example of how the above data might look when imported into a spread sheet.
TOA5 Bob's9K CR9000 1048575 1.00 EXPLDAT.
DLD TIMESTAMP RECORD RefTemp_Avg TC_Avg(1) TC_Avg(2) TC_Avg(3) TC_Avg(4) TS RN degC degC degC degC degC Avg Avg Avg Avg Avg 1995-09-19 14:31:43.84 458 29.94 25.6 25.36 25.48 25.4 1995-09-19 14:31:43.85 459 29.93 25.6 25.36 25.41 25.35
This is the same data table collected as ASCII without time stamps
"TOA5","Bob's9K","CR9000","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"
29.94,25.6,25.36,25.48,25.4
29.93,25.6,25.36,25.41,25.35
And again, an example of how the above data might look when imported into a spread sheet.
TOA5 Bob's9K CR9000 1048575 1.00 EXPLDAT.
DLD RefTemp_Avg TC_Avg(1) TC_Avg(2) TC_Avg(3) TC_Avg(4) degC degC degC degC degC Avg Avg Avg Avg Avg
29.94 25.6 25.36 25.48 25.4
29.93 25.6 25.36 25.41 25.35
4339 Temp
4339 Temp
2-11
Section 2. Data Storage and Retrieval

2.4.3 TOB1 Binary File Format

This is a sample of a file collected as Binary with time stamps.
TOB1,Bob's9K,CR9000,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,CR9000,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.4 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 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 the 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-12

Section 3. CR9000 Measurement Details

3.1 Measurements using the CR9041 A/D

The CR9050(E), CR9051E, and the CR9055(E) modules all use the A/D module to digitize their analog measurements. Section 3.1 documents measurement details for the measurements made using these modules. The Filter module (CR9052DC) and the Isolation Module (CR9058E) both have an A/D converter for each channel. The analog inputs are digitized by the modules (the CR9041 A/D module is not used) and the digital data is sent directly to the CR9000’s CPU module. The differences in measurement details for these modules are covered in Sections 3.2 and 3.3. The measurement details for the CR9070 and CR9071 Pulse modules are covered in Section 3.4.

3.1.1 Analog Voltage Measurement Sequence

The CR9000 measures analog voltages with a sample and hold analog to digital (A/D) conversion. The signal at a precise instant is sampled and this voltage is held or "frozen" while the digitization takes place. The A/D conversion is made with a 16 bit successive approximation technique which resolves the signal voltage to approximately one part in 62,500 of the full scale range (e.g., for the ±5000 mV range, 10 V/62,500 = 160 µV). The analog measurements are multiplexed through a single A/D converter with a maximum conversion rate of 100,000 per second or one every 10 µs.
The timing of the CR9000 measurements is precisely controlled by the task sequencer, a combination of components that switches the measurement circuitry on a rigid schedule that is determined at compile time and loaded into the task sequencer's memory. The basic tick of the task sequencer measurement clock may be thought of as 10 µs. The minimum time between measurements is 10 µs. When voltage signals are measured at a 10 µs/measurement rate, every 10 µs the task sequencer holds the signal from one channel and then switches to the next channel. W hen the signal is held, the A/D converter goes to work and ships the result off to the transputer memory.
The instructions executed by the task sequencer (e.g., hold, turn on the excitation, switch to the next channel, etc.) take 400 ηs each. When measuring every 10 µs, after holding for one measurement, the task sequencer switches to the next channel (400 ηs), waits 9200 ηs, then holds for the next measurement (400 ηs).
Changing voltage ranges requires one 10 µs tick; the task sequencer sets up the new voltage range then delays until the next 10 µs boundary before switching to the first channel. This only occurs before the first measurement within a scan or when the voltage range actually changes. 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 CR10, 21X and CR7 dataloggers where there is always a setup time for each instruction.)
3-1
Section 3. CR9000 Measurement Details
There are four parameters in the measurement instructions that may vary the sequence and timing of the measurement. These are options to reverse the polarity of the excitation voltage (RevEx), reverse the high and low differential inputs (RevDiff), to set the time to wait between switching to a channel and making a measurement (Delay), and the length of time to integrate a measurement (Integ).
3.1.1.1 Reversing Excitation or the Differential 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, a 5 mV signal will be measured 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.
3.1.1.2 Delay
Reversing the inputs of a differential measurement cancels offsets in the CR9000 measurement circuitry. One measurement is made with the high input referenced to the low input and a second with the low referenced to the high.
When the CR9000 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 CR9000 delays, 10 µs for the 5000 and 1000 mV ranges and 20 µs for the 200 and 50 mV ranges, are the minimum required for the CR9000 to settle to within its accuracy specifications. Additional delay is necessary when working with high sensor resistances or long lead lengths (higher capacitance). It is also possible to shorten the delay on the 200 and 50 mV ranges to 10 µs when speed and resolution is more important than high accuracy. Using a delay increases the time required for each measurement.
When the CR9000 Reverses the differential input or the excitation polarity It delays the same time after the reversal as it does 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 CR9000 switches to the channel:
3-2
3.1.1.3 Integration
Section 3. CR9000 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.
Thus there are four delays per channel measured.
With the 9050 and 9055 analog input modules, there is no analog integration of the signal and minimal filtering from the 422 ohm series resistor and 0.001 µF capacitor to ground that protect the input. The signal is sampled when the task sequencer issues a hold command and any noise that may be on the signal becomes part of the measured voltage. The rapid sample is a necessity for high speed measurements. Integrating the signal will reduce noise. When lower noise measurements are needed or speed is not an issue, integration can be specified as part of the measurement.
The CR9000 uses digital integration. An integration time in microseconds (10 µs resolution) is specified as part of the measurement instruction. The CR9000 will repeat measurements every 10 µs throughout the integration interval and store the average 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 no integration (one measurement) is 90 µV RMS; integrating for 40 µs (four measurements) will cut this noise in half (90/(4)=45).
One of the most common sources of noise is not random but is 60 Hz from AC power lines. An integration time of 16,670 µs is equal to one 60 Hz cycle. Integrating for one cycle will integrate the AC noise to 0.
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, there will be two integration s per channel; if both reversals are specified, there will be four integrations.

3.1.2 Single Ended and Differential Voltage Measurements

A single-ended measurement is made on a single input which is measured relative to ground. A differential measurement measures the difference in voltage between two inputs. Twice as many single ended measurements can be made per Analog Input Module.
NOTE
There are two sets of channel numbers on the Analog Input Modules. Differential channels (1-14) 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-28.
Because a single ended measurement is referenced to CR9000 ground, any difference in ground potential between the sensor and the CR9000 will result
3-3
Section 3. CR9000 Measurement Details
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 CR9000 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 in a where external signal conditioning circuitry is powered from the same source as the CR9000. 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.
3.1.2.1 Single Ended Voltage Range
The voltage range for single ended measurements is the range in which the input voltage must be, relative to CR9000 ground, for the measurement to be made.
The resolution (the smallest difference that can be detected) for the A/D conversion is a fixed percentage of the full scale range. To obtain the best resolution, select the smallest range that will cover the voltage output by the sensor. For example, the resolution of an A/D conversion made on the ± 50 mV range is 1.6 µV; the resolution on the ±5000 mV range is 160 µV. A copper-constantan thermocouple outputs a voltage of about 40 µV / °C (difference in temperature between the measurement and reference junction). The temperature resolution on the ± 50 mV range is 0.04 degrees (1.6 µV / 40 µV / 1°C); the resolution on the ±5000 mV range is 4 degrees (160 µV / 40 µV / °C). Because the smallest ± 50 mV range will allow a 1250 degree difference (0.05 V / 0.00006 V), which is greater than the sensor capability (-200 to 400 degrees C) there is no reason to use a larger range.
o
C high.
3-4
3.1.2.2 Differential Voltage Range
When a differential voltage measurement is made, the high (H) input is referenced to the low (L) input. To obtain the best resolution, select the smallest range that will cover the voltage output by the sensor as described for single ended voltage measurements above.
Common mode range
In order to make a differential measurement, the inputs must be within the CR9000 common mode range of
the 9051E Fault-Tolerant Analog Input Module or ±50 V for the 9055 Analog input Module. The common mode range is the voltage range, relative to CR9000 ground, within which both inputs of a differential measurement must lie, in order for the differential measurement to 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 CR9000 ground, there is no problem. A measurement made on the 9050 module with the
input is at 5.8 V and the low input is at 4.8 V, the measurement should not be trusted because the high input is outside of the 9050 Module's mode range. Differential made on signals outside the common mode range
±5000 mV range will return 1000 mV. However, if the high
±5 V for the 9050 Analog Input Module and
±5 V common
Section 3. CR9000 Measurement Details
may return the over range value Not-A-Number (NAN) or a valid, but incorrect, number. To avoid misleading data, either be sure the signal is referenced to CR9000 ground or use the voltage range R option to check common mode range as described below.
Sensors that have a floating output (the output is not referenced to ground through a separate connection) may float out of common-mode range, causing measurement problems. The voltage range C option described below can be used to keep floating differential inputs within common-mode range. Another solution is to connect one side of the differential input to ground to ensure the signal remains within the common mode range.
There are several measurement options for differential voltage measurements and differential voltage thermocouple measurements (VoltDiff and TCDiff), specified in the range code, that are related to common mode:
Range Code C option : Before making the differential measurement, the H and L inputs are briefly connected to internal voltages within the common mode range allowing floating inputs to remain within common mode for the differential measurement.
The C option has the added benefit of being able to detect an open input (e.g., broken thermocouple). The H input is connected to a voltage approximately
2.8 V above the L input so that an open input will result in an over range on the ±200 mV and ±50 mV input ranges. With an open input the high and low inputs are floating independently and remain close to the values they reached while connected to the excitation, over ranging voltage ranges up to ±200 mV and causing Not a Number (NAN) to be returned for the result.
Check common mode range, R, option (e.g., mV1000R): After making the differential measurement, appropriate single-ended measurements are made on the H and L inputs to determine if the differential measurement was within common-mode range. The result of the differential measurement is set to the over range value (NAN) if the measurement was determined to be out of common-mode range.
The options to pull into common mode before the differential measurement and to check that the input remained in common mode with a single ended measurement after the differential measurement can be combined (e.g., mV1000CR).
Problems with exceeding common mode range may be encountered when the CR9000 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 CR9000. 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 CR9000 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 CR9000 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.
A differential measurement has the option of reversing the inputs to cancel offsets as described above. The maximum offset when the inputs are reversed on a differential measurement offset is about one quarter what it is on a single ended or one way differential.
3-5
Section 3. CR9000 Measurement Details
NOTE
Sustained voltages in excess of ±20 V on the 9050 Module inputs or ±150 V on the 9055 Module inputs will damage the CR9000 circuitry.

3.1.3 Signal Settling Time

Whenever an analog input is switched into the CR9000 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 CR9000 delays after switching to a channel to allow the input to settle before initiating the measurement. The default delays used by the CR9000 are 10 µs on the ±5000 and ±1000 mV ranges and 20 µs on the ±200 and ±50 mV range. This settling time is the minimum required to allow the input to settle to the resolution specification. The 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 which must settle before the measurement is made:
1. The signal must rise to its correct value.
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.
MINIMIZING SETTLING ERRORS
When long lead lengths are mandatory, the following general practices can be used to minimize or measure settling errors:
1. When measurement speed is not a prime consideration, additional delay time can be used to ensure ample settling time.
2 W hen making fast bridge measurements, use the continuous excitation
channels (1-6) to excite the bridges so the excitation doesn't have to settle before each measurement.
3. Where possible run excitation leads and signal leads in separate shields to minimize transients.
4. DO NOT USE WIRE WITH PVC INSULATED CONDUCTORS. PVC has a high dielectric which extends input settling time.
5. Use the CR9000 to measure the input settling error associated with a given configuration. Stabilize the sensor so that its output is not changing. Program the CR9000 to make the measurement with the delay you would like to use and a second time with a much longer delay that ensures adequate settling time. The difference between the two measurements is the error due to inadequate settling time.
3-6

3.1.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. When a thermocouple is used for temperature measurement, the wires are soldered or welded together at the measuring junction. The second 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 CR9000 determines thermocouple temperatures using the following sequence. First the temperature of the reference junction is measured. If the reference junction is the CR9000 Analog Input Module, the temperature is measured with the PRT in the 9050 Analog Input Module (ModuleTemp instruction). The reference junction temperature in referenced by the thermocouple measurement instruction (TCDiff or TCSE). The CR9000 calculates the voltage that a thermocouple of the type specified would output at the reference junction temperature if its reference junction were at 0 temperature of the measuring junction is then calculated from a polynomial approximation of the NIST TC calibrations
o
C, and adds this voltage to the measured thermocouple voltage. The
Section 3. CR9000 Measurement Details
o
C is stored and then
3.1.4.1 Error Analysis
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 CR9000 polynomial approximations). The discussion of errors which follows 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.
Reference Junction Temperature with 9050
The PRT in the CR9000 is mounted on the circuit board near the center of the 9050 terminal strip. This resistance temperature device (RTD) is accurate to
o
C over the CR9000 operating range. The I/O Module was designed to
±0.1 minimize thermal gradients. It is encased in an aluminum box which is thermally isolated from the CR9000 fiberglass enclosure. Measurement modules have aluminum mounting plates extending beyond the edges of the circuit cards that provide thermal conduction for rapid equilibration of thermal gradients. Sources of heat within the CR9000 enclosure exist due to power dissipation by the electronic components or charging batteries. In a situation where the CR9000 is at an ambient temperature of approximately 20 external temperature gradients exist, the temperature gradient between one end of an Analog Input card to the other is likely to be less than 0.1°C. The gradient from one end of the I/O Module to the other, is likely to be about
o
C and no
3-7
Section 3. CR9000 Measurement Details
4°C. The end of the enclosure with the CPU Module will be warmer due to heat dissipated by the processor.
For the best accuracy, use the temperature of each 9050 module as the reference temperature for any thermocouples attached to it. Given the above conditions, this would keep the reference junctions within 0.05°C of the temperature of the RTD. When making more thermocouple measurements than can be accomplished on a single 9050 module, it is faster to measure the temperature of one 9050 module and use it for all thermocouples. If speed is more important than the reduced accuracy, the temperature of a single 9050 module can be used for thermocouples connected to other modules.
A foam block that fits under the terminal cover is sent with the CR9000. When installed, this block insulates and limits air circulation around the terminals. This helps to limit temperature gradients on the analog input modules, particularly when the CR9000 is subjected to rapid temperature changes. Figure 3.4-1 shows the thermocouple temperature errors experienced on different channels of the analog module when the CR9000 was subjected to an abrupt change in temperature (-40ºC to +60ºC in approximately 12 minutes).
Thermocouple Limits of Error
The standard reference which lists thermocouple output voltage as a function of temperature (reference junction at 0 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 CR9000.
4
3
2
1
0
-1
-2
Temperature Difference Deg. C
-3
-4
1700
1705
1710
1715
1720
1725
1730
1735
1740
1745
Time
o
Chanel 1 - Ac tual Channel 6 - Actual Channel 12 - Actual Re f Tem p - C as e Tem p CR9000 Case Temp., Deg. C
1750
1755
1800
1805
C) is the National Institute of Standards
60 50 40 30 20 10 0
-10
-20
CR9000 CaseTemperature, Deg. C
-30
-40
1810
1815
1820
1825
1830
3-8
FIGURE 3.4-1. Thermocouple Temperature Errors During Rapid Temperature Change
Section 3. CR9000 Measurement Details
TABLE 3.4-1. Limits of Error for Thermocouple Wire (Reference
Junction at 0
o
C)
Limits of Error
Thermocouple Temperature (Whichever is greater)
Type Range
o
C Standard Special
T -200 to 0 ± 1.0oC or 1.5%
0 to 350 ± 1.0oC or 0.75% ± 0.5oC or 0.4%
J 0 to 750 ± 2.2oC or 0.75% ± 1.1oC or 0.4%
E -200 to 0 ± 1.7oC or 1.0%
0 to 900 ± 1.7oC or 0.5% ± 1.0oC or 0.4%
K -200 to 0 ± 2.2oC or 2.0%
0 to 1250 ± 2.2oC or 0.75% ± 1.1oC or 0.4%
R or S 0 to 1450
B 800 to 1700
o
± 1.5
C or 0.25% ± 0.6oC or 0.1%
± 0.5%
Not Estab.
When both junctions of a thermocouple are at the same temperature there is no voltage produced (law of intermediate 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 accuracy of a CR9000 voltage measurement is specified as 0.07% the measured voltage plus 4 A/D counts of the range being used to make the measurement. The input offset error reduces to 1 A/D count if a differential measurement is made utilizing the option to reverse the differential input.
3-9
Section 3. CR9000 Measurement Details
For optimum resolution, the ±50 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 40 to 60 °C between the measurement and reference junctions is required for a thermocouple to output 2.285 mV, the voltage at which 0.07% of the reading is equal to 1 A/D count (1.6 mV). 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 error in the voltage measurement is 0.0007x830.7 µV = 0.58 µV or 0.014 (0.58/42.4). An A/D count on the ±50 mV range is worth 1.6 µV or 0.038 Thus, the possible error due to the voltage measurement is 0.166 single-ended or non-reversing differential, or 0.052 differential measurement. The value of using a differential measurement with reversing input to improve accuracy is readily apparent.
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 temperatures around 1300 requiring the ±200 mV input range. At 1300
34.9 µV per
0.0007x52 mV = 36.4 µV or 1.04 mV range is worth 6.3 µV or 0.18 voltage measurement is 1.77 differential, or 1.22
o
C. The possible slope
o
o
C with a reversing
o
C. The TC output is on the order of 52 mV,
o
C. The possible slope error in the voltage measurement is
o
C with a reversing differential measurement.
o
C (36.4/34.9). An A/D count on the 200
o
C. Thus, the possible error due to the
o
C on a single-ended or non-reversing
o
C, a K thermocouple outputs
C on a
o
C
o
C.
TABLE 3.4-2. Voltage Range for maximum
Thermocouple resolution
Thermocouple
Type and
temperature
o
range
C
Temperature
range for ±50
mV range
Temperature
range for ±200
mV range
T -270 to 400 -270 to 400 not used
E -270 to 1000 -270 to 660 >660
K --270 to 1372 -270 to 1230 >1230
J -210 to 1200 -210 to 870 > 870
B 0 to 1820 0 to 1820 not used
R -50 to 1768 -50 to 1768 not used
S -50 to 1768 -50 to 1768 not used
N -270 to 1300 -270 to 1300 not 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. If the voltage potential exceeds the common mode range of the 9050 module (e.g., the +12 V terminal of an automotive battery) it is possible to use the 9055 ±50 V Analog Input Module to make the Thermocouple measurement. The resolution and noise level are much worse than with the 9050 Module. The ±500 mV range offers the best resolution, 1
o
A/D count is 16 µV, about 0.4
C for most thermocouples.
3-10
Noise on Voltage Measurement
Section 3. CR9000 Measurement Details
The input noise on the ±50 mV range for a measurement with no integration is 4 µV RMS. On a type T thermocouple (approximately 40 µV/
o
C. Note that this is an RMS value, some individual readings will vary by greater than this. By integrating for 500 µs (50 samples) the noise level is reduced to 0.6 µV RMS (4/50=0.6). If a 500 µs integration is combined with reversing the differential input, there are 100 samples in the measurement and the noise level is reduced to 0.4 µ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 CR9000'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.
TABLE 3.4-3. Limits of Error on CR9000
Thermocouple Polynomials (Relative to
NIST Standards)
TC
Type Range
T
-270 to 400
-270 to -200 +18@ -270
-200 to -100 ±0.08
-100 to 100 ±0.001 100 to 400 ±0.015
o
C Limits of Error oC
o
C) this is 0.1
J
-150 to 760
±0.008
-100 to 300 ±0.002
E
-240 to 1000
-240 to -130 ±0.4
-130 to 200 ±0.005 200 to 1000 ±0.02
K
-50 to 1372
-50 to 950 ±0.01 950 to 1372 ±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 CR9000 environmental operating range, so there is no problem when the CR9000 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
3-11
Section 3. CR9000 Measurement Details
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 limits of error in the linearizations within these ranges.
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 a type T thermocouple is 300 CR9000 corresponds to a temperature of 272.6 T thermocouple with the measuring junction at 290 would output -578.7
CR9000 calculates a temperature difference of -10.2 temperature calculated by the CR9000 would be 262.4
TABLE 3.4-4. Reference Temperature
Compensation Range and Polynomial
Error Relative to NIST Standards
Type Range oC Limits of Error oC
o
C. The compensation voltage calculated by the
o
C, a -27.4 oC error. The type
o
C and reference at 300 oC
µV; using the reference temperature of 272.6
o
C, a -0.2 oC error. The
o
C, 27.6 oC low.
o
C, the
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 described in the previous sectio ns illustrate that the greatest sources of error in a thermocouple temperature measurement with the CR9000 are likely to be due to the limits of error on the thermocouple wire and in the reference temperature determined with the 9050 RTD. 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 maximum 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)
±50 mV range. The nominal accuracy on this range is
o
o
C but is indicating 25.1 oC, and the terminal that the
C changes the temperature by 0.012 oC.
o
C cooler than the RTD.
3-12
Section 3. CR9000 Measurement Details
TABLE 3.4-5. Example of Errors in Thermocouple Temperature
Source Error: oC : % of Total Error Single-Ended or single
Differential
ANSI TC
Error (1oC)
o
Reference
0.15
:10.6% 0.15o:24.3% 0.15o:12.3% 0.15o:36.2%
TC Error 1% Slope
Reversing Differential
w:500 µs Integration ANSI TC Error (1oC)
Temp. TC Output 1.0o:70.5% 0.2o:32.3% 1.0o:82.4% 0.2o:48.3%
o
Voltage
0.166
:11.7% 0.166o:26.8% 0.052o:4.3% 0.052o:12.6% Measurement Noise 0.1o:7% 0.1o:16.2% 0.01o:0.8% 0.01o:2.4%
o
Reference
0.001
:0.1% 0.001o:0.2% 0.001o:0.1% 0.001o:0.25% Linearization
o
Output
0.001
:0.1% 0.001o:0.2% 0.001o:0.1% 0.001o:0.25% Linearization Total Error 1.418o:100% 0.618o:100% 1.214o:100% 0.414o:100%
3.1.4.2 Use of External Reference Junction or Junction Box
TC Error 1% Slope
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 CR9000. 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 the box to the CR9000. Alternatively, the junction box can be used to couple extension grade thermocouple wire to the thermocouples being used for measurement, and the CR9000 I/O Module used as the reference junction. Extension grade thermocouple wire has a smaller temperature range than standard thermocouple wire, but meets the same limits of error within that range. The 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 CR9000. This is only a factor when using type K thermocouples, where
o
the upper limit of the reference compensation linearization is 100
o
upper limit of the extension grade wire is 200
C. With the other types of
C and the
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 CR9000. 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.
3-13
Section 3. CR9000 Measurement Details
CR9000
H L
Junction Box
A' A B' B
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 CR9000 can be used to measure the temperature gradients within the junction box.

3.1.5 Bridge Resistance Measurements

TC
There are four bridge measurement instructions included in the standard CR9000 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 R
would normally be fixed
f
s
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 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 bo th polarities and then excitation is again applied and reversed for the measurement of the voltage drop across the fixed resistor.
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.
3-14
Section 3. CR9000 Measurement Details
f
f
f
f
f
(
BrHalf
BrHalf3W
BrHalf4W
H
L
H
X = result w/mult = 1, offset = 0
V
1
X
==
VRRR
x
s
+
s
X = result w/mult = 1, offset = 0
VV
2
X
=
VVRR
X
21
s
=
1
X = result w/mult = 1, offset = 0
VVR
X
==
s
2 1
R
X
RR
=
sf
R
f
1
X
()
1
RX
s
=
R
s
RRX
=
sf
RRX
= /
s
RRX
=
sf
RRX
= /
s
L
BrFull
H
L
BrFull6W
H
L
H
L
X = result w/mult = 1, offset = 0
V
X
==
13
1000 1000
V
x
R
RRRRR
+
34212
X = result w/mult = 1, offset = 0
V
X
==
2
1000 1000
V
1
R
RRRRR
34212
− +
3
+
+
=− + +
XX RRR
1334
⎟ ⎠
⎟ ⎠
RX
()
21
=
R
1
RX
11
=
R
2
1
//
=++
XX RRR
2212
RX
42
=
R
3
1 RX
()
32
=
R
4
FIGURE 3.5-1. Circuits Used with Bridge Measurement Instructions
//
1000
1
X
1
X
1
1000
X
2
1
X
2
()
)
3-15
Section 3. CR9000 Measurement Details

3.1.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 resu lt in polarization, which will cause an erroneous measurement, 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 integration time used with the measurement. The highest frequency possible is 50 kHz, the excitation is switched on and then reversed 10 µs later when the first measurement is held and then is switched off after another 10 µs when the second measurement is held (i.e., reverse the excitation, 10 µs delay, no integration). A switched excitation channel (7-16 on the 9060 Module) should be used when AC excitation is required because it will be switched out as soon as the measurement is completed. The continuous excitation channels (1-6 on the 9060 Module) should not be used because they retain the last voltage programmed (i.e., after reversing the excitation, the channel would be left at the reversed polarity voltage until th e next instruction that acted on the excitation channel).

3.1.7 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 CR9000 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 CR9000 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
in the network, the measured signal is:
G
3-16
Section 3. CR9000 Measurement Details
R
VV
=
x
1
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 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 CR9000 earth ground form a galvanic cell, with the water/soil solution acting as the electrolyte. If current was allowed to flow, the resulting oxidation or reduction would soon damage the electrode, just as if DC excitation was used to make the measurement. Campbell Scientific probes are built with series capacitors in the leads to block this DC current. In addition to preventing sensor deterioration, the capacitors block any DC component from affecting the measurement.
is the source of error due to the ground loop. When RG is large the
sRf/RG

3.2 CR9058E Isolation Module Measurements

Each CR9058E input channel has its own 24 bit sigma delta analog to digital converter taking 10,000 measurements per second, or one measurement sample per 100 microseconds. The effective resolution at this sample rate is 18.7 bits, or +/- 9.4 microvolts when using the +/- 2 Volt range, because of the inherent noise of the A/D converter and noise from other sources. The effective resolution can be dramatically improved through filtering, and/or integrating, multiple measurements. Thus, noise reduction and measurement speed can be traded off using the Integration parameter. Noise is reduced by approximately the square root of the number of samples within the integration time. Thus, if the integration time is set to 10000 versus 100 microseconds, noise should be reduced approximately by a factor of ten . This approximation assumes that the noise is white noise, which is not due to interference from sources at fixed frequencies. Noise reduction by filtering can go just so far, and the best the CR9058E can achieve is approximately 21 bits of resolution (+/- 1.9 microvolts on the 2 Volt range).
entirely true because some of the noise is
The CR9058E isolated input module is similar in operation to the CR9050 analog input module except for:
The CR9058E has ten differential input channels instead of 16 differential
/ 32 single-ended inputs.
The CR9058E has different voltage ranges of +/- 60 Volts DC, +/- 20
Volts DC, and +/- 2 Volts DC.
The CR9058E has a slower maximum scan rate than the CR9050, but this
is somewhat balanced by the fact that the CR9058E measures all of its channels simultaneously, as each channel has its own 24 bit sigma delta analog to digital converter. Conversely, the measurements from the
3-17
Section 3. CR9000 Measurement Details
CR9050(E) are multiplexed sequentially through a single A to D converter.

3.2.1 CR9058E Supported Instructions

The CR9058E currently supports three CR9000X measurement instructions:
1. VoltDiff (Dest, Reps, Range, ASlot, DiffChan, RevDiff, Settle, Integ, Mult, Offset)
2. TCDiff (Dest, Reps, Range, ASlot, DiffChan, TCType, TRef, RevDiff, Settle, Integ, Mult, Offset)
3. ModuleTemp (Dest, Reps, ASlot, Integ)
These instructions operate the same as with the CR9050 with these differences:
DiffChan must be within 1..10.
VoltDiff supports these voltage ranges: V2 (+/- 2 Volts DC), V2C (+/- 2
Volts with open thermocouple checking), V20 (+/- 20 Volts DC), and V60 (+/- 60 Volts DC).
TCDiff will work with the same range settings as the VoltDiff instruction,
but only V2 (no open thermocouple checking) or V2C ( +/-2 volt range with open thermocouple checking) should be used with TCDiff. When the range is set = V2C, an open circuit will report an over-range condition to the CR9000X.
The Settle time parameter is unused.
The minimum scan time when using the VoltDiff instruction, without
input reversal, for the CR9058E is 1290 microseconds for integration times under 200 microseconds. If the integration time is greater than 200 microseconds, then the minimum scan interval is 1090 + integration time (microseconds). When using the VoltDiff instruction with input reversal and integration under 200 microseconds, the minimum scan interval is 2990 microseconds. With input reversal and integration times greater than 200 microseconds, the minimum scan time is (2790 + (2 x integration time)).
The minimum scan time when using the TCDiff instruction, without input
reversal, for the CR9058E is 2570 microseconds for integration times under 200 microseconds. If the integration time is greater than 200 microseconds, then the minimum scan interval is 1370 + integration time (microseconds). When using the VoltDiff instruction with input reversal and integration under 200 microseconds, the minimum scan interval is 4280 microseconds. When using input reversal and integration times greater than 200 microseconds, the minimum scan time is (4080 + (2 x integration time)).
3-18
Section 3. CR9000 Measurement Details
The Integ parameter in VoltDiff and in TCDiff (not in ModuleTemp) can
be set to –1, -2, -3, -4, or -5 and the CR9058E will set the corresponding synch filter of 1, 2, 3, 4, or 5. The integration time will be maximized for the given synch filter and scan interval. The integration and synch filter order that a given CR9058E is using can be seen through PC9000's terminal mode window (Tools/Diagnostics/Terminal Mode). In the I/O Port area, click on "Open Port". Next, click in the Low Level I/O section and hit Enter several times until the CR9000> prompt is returned. Type in "4" and enter. The CR9058Es' slot numbers, integration times, and sync filters will be returned.
Input reversal (for offset cancellation) isn’t individually selectable
within the ten channels of a CR9058E module. If any one channel of a CR9058E’s ten input channels has input reversal selected, by setting the Rev parameter of the VoltDiff or TCDiff instruction to true, input reversal will be applied to all ten channels. If other VoltDiff or TCDiff instructions tied to this module within the same scan don’t have the Rev parameter set True, then, without generating an error, input reversal will be applied to them all anyway.
A CR9058E can only have one integration time per scan interval that
applies to all ten of its channels. If multiple measurement instructions within a scan are tied to a single CR9058E module, and they don’t all have the same Integ time parameter, then the Integration time for all of that module's channels will be set by the value of the Integ time parameter of the last measurement instruction, tied to that module, within the scan.
The Integ parameter in the VoltDiff and TCDiff instructions, within the
constraints listed above, can be used to adjust the measurement frequency response. For example, for both 60 Hz and 50 Hz rejection the Integ parameter could be set = 100,000 microseconds.
The CR9058E ModuleTemp measurement is independent of the isolated
input measurements. The CR9058E ModuleTemp measurement method is identical to that of the CR9050, using a platinum resistance thermometer to obtain the thermocouple reference junction temperature at the EZ­connect terminal module.
Because heat is generated within the CR9058E, a thermal gradient can
develop across the EZ-connect terminal block which can produce errors in thermocouple measurements. To minimize this error, keep the CR9058EC covers in place. Also, type E or K thermocouples are better than type T because type T thermocouples have a copper conductor which is an excellent conductor of heat increasing the thermal gradient across the terminal block.
Each channel has an H (high) input terminal, a L (low) terminal, and a G
(isolated ground) terminal. The isolated ground terminals are not connected to the CR9000X system ground. The isolated ground terminal can be used to connect the shield of a shielded cable. Also, when un­shielded thermocouples are used, the G terminal can be tied to the H or L terminal to reduce noise in the readings.
3-19
Section 3. CR9000 Measurement Details
(
The CR9058E does not directly support Bridge measurements, but Bridge
type measurements can be performed through using the CR9060s CAOs or external excitation and adjusting the multiplier according to the excitation level.

3.2.2 CR9058E Sampling, Noise and Filtering

The ten analog to digital converters are re-synchronized at the beginning of each scan. There are 1290 process and other tasks. Therefore the minimum scan period for the CR9058E is 1290 microseconds when setting the integration parameter to 200 or less (two measurement samples 100 microseconds apart per channel is attained at this rate). The integration time (microseconds) divided by 100 determines the number of measurements taken during a scan. Setting the integration parameter to a value greater than 200 microseconds requires a minimum scan interval of 1090 + integration time. If reverse measurement is set true, then the over-head is 2990 microseconds. With reversal on, and setting the integration parameter to a value of 200 or less, a minimum scan interval of 2990 microseconds will be required.
The CR9058E has a digital signal processor that performs “sync-n” filtering of the analog to digital converter results to reduce noise. At compile time the CR9058E computes the order of the sync-n filter based on the integration time and Scan interval. The more samples available, the higher the order of sync-n filter is implemented up to an order of five. The equation used to calculate the filter is:
microseconds of over-head associated with this
rfilterorde
=
()
where:
AvailTime = Scan Interval with the following adjustments:
Subtract off 1290 microseconds if range code v2C is used. Divide by 2 and subtract off 420 microseconds if input reversal is true. Finally, subtract another 1090 microseconds
IntegTime = user entered Integration time in microseconds. SampleTime = 100 (microseconds) or
SampleTime = N X 100 (microseconds). See below.
Where N is the number of integrated values that are averaged together before the sync-n filter is applied. Initially N is set to 1 (no averaging of the integrated values). If the CR9058E finds that it doesn’t have enough memory to implement the filter, it increments N above and repeats the calculation until the filter will fit in its memory.
If the Integration time parameter is set = -1, the IntegTime above is set = AvailTime. This gives a filter order of 1, which amounts to simple averaging of all the samples measured in a scan interval.
SampleTimeAvailTime
SampleTimeIntegTime
)
3-20
Section 3. CR9000 Measurement Details
1.2
1.0
0.8
0.6
REL
RESPONSE
0.4
0.2
0.0
FREQUENCY RESPONSE OF SYNC FILTER ORDERS 1 - 5
Sync Order 5
Sync Order 1
0123456
FREQUENCY
N O RM AL IZ E D T O (1/IN T E G RA T IO N T IM E)
Chart 3.1 shows the response times for the synch filters available for the CR9058E. As can be seen, the 1rst order sync filter does not filter out the higher frequency components of the input signal. This could result in higher frequency signals being aliased back to lower frequencies. While the 5th order sync filter does a fairly good job filtering out higher order frequencies, the trade off is that it also attenuates the signal at lower frequencies as can be seen in Chart 3.2.
CHART 3.1
1.01
1.00
0.99
0.98
0.97
0.96
REL
RESPONSE
0.95
0.94
0.93
0.92
0.91
0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10
FREQUENCY RESPONSE OF SYNC FILTER ORDERS 1 THROUGH 5
Sync_order_1 Sync_order_2 Sync_order_3 Sync_order_4 Sync_order_5
FREQUENCY
NOR MA L IZED T O (1 /IN T E G RA TION T IME )
CHART 3.2
3-21
Section 3. CR9000 Measurement Details

3.3 CR9052 Filter Module Measurements

Each CR9052 module has six differential analog measurement channels with programmable input ranges from ±20 mV to ±5 V. Each channel has its own programmable-gain instrumentation amplifier, pre-sampling analog filter, and sigma-delta analog-to-digital converter. All CR9052 channels in a single CR9000X chassis are sampled simultaneously.
The CR9052 implements anti-aliasing with programmable, real-time, low-pass, finite impulse response (FIR) filters. An on-board digital signal processor (DSP) collects alias-free, 50-kHz samples from each of the module's sigma­delta converters, and then applies real-time, programmable low-pass filtering and decimation to anti-alias and down-sample the data to the selected measurement rate, selectable from 5 Hz to 50 kHz. The CR9052 can also accumulate snapshots of anti-aliased time-series, Fourier transform them into frequency spectra, and send the resulting real-time spectra to the CR9000X's main processor.
The CR9052 can burst measurements to its on-board, 8-million sample buffer at 50,000 measurements per second per channel. Using the FFT spectrum analyzer mode, the module's DSP can provide real-time spectra from "seamless", anti-aliased, 50-kHz, 2048-point time-series snapshots for each of its six analog input channels. The decimated data can be downloaded to an appropriate PC card at an aggregate rate of 100,000 measurements per second.
The CR9052 filter's pass-band ripple is less than ±0.01 dB (0.1 percent), and the stop-band attenuation exceeds 90 dB (1/32,000). The FIR filter's transition band has a steep roll-off, with the stop-band frequency starting a factor of 1.24 above the pass-band frequency. In comparison, the stop-band frequency of an ideal eight-pole Butterworth filter with the same ripple and attenuation starts a factor of 5.81 above its pass-band frequency.
3-22
The digital implementation of the CR9052 FIR filters maintains a group delay that is independent of frequency (linear phase response). In addition, the digital filter performance does not change with time, temperature, or component tolerances. The on-board DSP automatically chooses the
Section 3. CR9000 Measurement Details
appropriate low-pass filter to anti-alias the input data for the user's desired measurement rate. If desired, users may load their own coefficients into the on-board DSP to tailor the FIR filter's frequency response to their own needs (band pass, band reject, etc.).
CR9052IEPE DC Frequency Response
The CR9052IEPE module has two programmable time constants available: 5 seconds and 0.5 seconds. The advantage of the 0.5 second time constant is that if you have a step in the voltage (either from a shock to the sensor or when initially supplying excitation) it will only take 0.5 seconds for 63% of the voltage step to discharge, while with the 5 second time constant, it would take 5 seconds.
Chart 3.3 Step Discharge Rate
1.2
Tau= 5.0 Seconds Tau = 0.5 Seconds
1
0.8
Time Constant = 5 Seconds
0.6
V/V_STEP RESPONSE
0.4
0.2
0
-10123456789101112131415161718192021
Time Constant = 0.5 Seconds
SECONDS
The 5.0 second time constant will not result in lower frequencies being attenuated as much (3 dB at 0.03 Hz) as the 0.5 second time constant (3 dB at
0.3 Hz). Chart 3.4 Frequency Response
Time Constant = 5 Seconds
1
Tau = 5.0 Seconds
0.8
0.6
Rel Response
0.4
Time Constant = 0.5 Seconds
Tau = 0.5 Seconds
0.2
0
1.0E-04 1.0E -03 1.0E -02 1.0E -01 1.0E+00 1.0E+01 1.0E+02 1.0E+03 1.0E+04 1.0E+05
Frequency (Log S cale)
3-23
Section 3. CR9000 Measurement Details
WINDOWING
The FFT option allows radix-two (2
n
, where n = 5, 6, …16) transform lengths ranging from 32 to 65,536 samples. Users can optionally apply a Hanning, Hamming, Blackman-Harris, or one from a selection of Kaiser-Bessel beta choices, window function to their time series before transforming them. The beta (Kaiser-Bessel) allows the user to trade spectral leakage for spectral resolution. Table 3.3-1 shows the maximum out of band leakage and the full width, half of maximum (FWHM) spectral resolution monitoring a monochromatic signal using four different betas. Chart 3.5-1 shows graphically the bin resolution (or bin smearing effect) for no windowing, the Hanning window and 4 Kaiser-Bessel betas.
Table 3.3-1. Spectral Leakage vs. Resolution
BETA
MAXIMUM LEAKAGE
(dB)
SPECTRAL RESOLUTION
(BINS)
8 -63 2.25 10 -74 2.50 12 -95 2.75 14 -110 3.00
CHART 3.5 COMPARIS ION OF SPEC T RAL RES OLUTIO N FOR VARIOUS
1.0
0.9
0.8
0.7
No Window Hanning Window Kaiser Window, Beta=8 Kaiser Window, Beta=10 Kaiser Window, Beta=12 Kaiser Window, Beta=14
WINDOWING FUNCTIONS
0.6
0.5
PEAK SIGNAL
0.4
0.3
0.2
0.1
0.0 253 254 255 256 257 258 259 260 261
FREQUENCY BIN
Using a Kaiser-Bessler with a beta of around 12 results in a spectral leakage that best matched the attenuation of the CR9052's anti-aliasing filters. Although this spreads the FWHM of a single line source to 2.75 bins, this can be compensated for by increasing the length (or number of bins) of the FFT because the windowing spreads the signal across a finite number of bins, not across an absolute frequency range.
3-24
Section 3. CR9000 Measurement Details
SPECTRAL OUTPUT
The CR9052 offers a variety of spectrum normalizations, including real and imaginary, amplitude and phase, power, power spectral density (PSD), and decibels (dB). In addition, the CR9052 can combine adjacent spectral bins into a single bin to decrease the size of the final spectrum. A built-in function selects an exponentially increasing spectral bin width to give 1/n octave analyses, where n can vary from 1 to 12. A single programming step with either the CRBasic programming language or the CR9000X program generator configures the FFT spectrum analyzer options.
The module has superior noise performance, with an input-referred noise of 8
-1/2
nV Hz
for the ± 20 mV input range. On the ± 20 mV input range, the total noise for a 20 kHz bandwidth is less than 1.4 uV, and for a 1 Hz bandwidth, 250 nV. The programmable anti-alias filter allows users to trade bandwidth for noise, or vice versa. The DSP's floating-point numeric implementation of the FIR anti-alias filters and Fourier transforms preserve this low-noise performance. A 2048-point FFT gives an instantaneous dynamic range exceeding 126 dB (an amplitude ratio of 2x10 gives an instantaneous dynamic range exceeding 140 dB (an amplitude ratio of
7
). Real-time digital temperature compensation ensures gain accuracy
1x10
6
), and the 65,536-point FFT
(±0.03 percent of reading) and offset accuracy (±0.03 percent of full-scale) throughout the -40° to 70° C operating temperature range.
The combined capabilities of the CR9052 and the CR9000X offer numerous measurement and data processing possibilities. For example, this combination allows users to mix high-speed, anti-aliased measurements and spectra from accelerometers, strain gages, and microphones with slower measurements from thermocouples, pressure transducers, and serial data streams. The general­purpose programmability of the CR9000X allows users to process their data before saving it to data tables. For example, users may save measured data only if the amplitude of a specific acoustic frequency exceeds some threshold, or only if an acoustic spectral component correlates to measurements from other sensors.

3.4 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 Transputer 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 would still be output.
3-25
Section 3. CR9000 Measurement Details
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.4-1. If the pulse measurement is averaged, the correct value will be the result.
3 2 3 2
FIGURE 3.4-1. Varying Counts within Pulse Interval
The resolution gets much worse 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 from 0 to 4000 RPM!
The POption parameter in the PulseCount instruction can be used to set an interval period for a running average computation of the frequency output from the sensor. Example: Scan Rate of 10 mSec is for other measurements. The output from the Pulse sensor will vary from 1000 Hz to 10 Hz. Set the POption parameter to 1000 (mSec), and the instruction returns get a running average of the Pulse outputs (getting 100 samples/second) over a 1 second period. This would smooth the output.
3-26
Another method for measuring frequency is to use the TimerIO instruction using one of the Pulse channels on the CR9071E Pulse Module to measure the period of the signal (40 nanosecond resolution). The value returned is in milliseconds. You can take the reciprocal of the returned value and multiply by 1000 to get the frequency of the signal.

3.4.1 High Frequency Pulse Measurements

All twelve pulse channels of the CR9070 and CR9071E can be configured for high frequency inputs. The signal is feed through a filter with a time constant
of 200 ( It is then feed through a Schmitt circuit to convert the signal to a square wave, and to guard against false triggers when the signal is hovering around the threshold level. In the High Frequency mode, the input signal to the Schmitt
τ = 200 nanoseconds) nanoseconds to remove higher frequency noise.
Section 3. CR9000 Measurement Details
trigger must rise from below 1.5 volts to above 3.5 volts in order to trigger an output. Due to the attenuation caused by the filter on the front side of the Schmitt circuit, a larger input voltage transition is required for higher frequencies. The transition required for the input of the Schmitt trigger can be
viewed as 2.5 volts
± 1 volt (from below 1.5 volt to above 3.5 volt). The
equation to calculate the amount that the signal is attenuated by the front end filter is:
V
Out
=
V
In
V
is the voltage level leaving the filter (level into the Schmitt circuit) when
Out
is the input voltage. V
V
In
()
Out
1
()()
21
πτ
+
must be at minimum 1 volt for the Schmitt
2
f
circuit to trigger an output.
Chart 3.6 Required Transition Voltage for High Frequency Pulse
Vin
1.6
Required Input Voltage
1.4
1.2
1
±V Transistion (Centered at 2.5 Volt)
0.8
0.6 0 100000 200000 300000 400000 500000 600000 700000 800000 900000 1000000 1100000
Signal Frequency ( Hz)
Chart 3.6 plots the trace for the minimum transition voltage about 2.5 volts against the input signal frequency. To demonstrate how to use this plot, for a input frequency of 1 MHz, the voltage signal, centered about 2.5 volts, must
have a transition of
± 1.6 volts in order to trigger the Schmitt circuit. In other
words, the signal must rise from below 0.9 volts (2.5 volts minus 1.6 volts) to above 4.1 volts (2.5 volts plus 1.6 volts) for a pulse to be counted.
3-27
Section 3. CR9000 Measurement Details
This is a blank page.
3-28
Section 4. CRBasic – Native Language Programming
The CR9000 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 they would be algebraically. For example, to convert a temperature in Celsius to Fahrenheit one might write:
TempF = TempC * 1.8 + 32
With the CR9000 there may be 5 or 50 temperature (or other) measurements. Rather than have 50 different names, a variable array with one name and 50 elements may be used. A thermocouple temperature might be called TCTemp. With an array of 50 elements the names of the individual temperatures are TCTemp(1), TCTemp(2), TCTemp(3), ... TCTemp(50). 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:
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 RTD on the 9050 Analog Input Module is:
ModuleTemp(Dest, Reps, ASlot, Integ)
4-1
Section 4. CRBasic – Native Language Programming
ModuleTemp is the keyword name of the instruction. There are four parameters associated with ModuleTemp are: Destination, the name of the variable in which to put the temperature; Repetitions, the number of sequential 9050 modules to measure the temperature of; Aslot, the slot in the CR9000 that the analog card is in; and Integration, the length of time to integrate the measurement. To place the temperature of the analog module in slot 5 in the variable RefTemp (using a 10 microsecond measurement integration time) the code is:
ModuleTemp(RefTemp, 1, 5, 10)
The use of these instructions should become more clear 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 CR9000 code. When the CR9000 compiler sees the ' it ignores the rest of the line.
' The declaration of variables starts here. Public Start(6) 'Declare the start time array

4.2 Programming Sequence

The following table describes the structure of a typical CR9000 program:
Declarations
Declare constants Declare Public variables
Dimension variables Define Aliases Define data tables.
Process/store trigger
Table size Other on-line storage devices Processing of Data
Define Subroutines
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 that 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 CR9000 RAM Should the data also be sent to PC card or Flash memory? What data are to be output (current value, average, maximum,
minimum, etc.) 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.
4-2
Section 4. CRBasic – Native Language Programming
Program
Set scan interval
Measurements Processing Call Data Table(s) Initiate controls
NextScan
End Program
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 scan

4.3 Example Program

Const RevDiff 1 Const Del 0 Const Integ 0 Const Mult 1 Const Offset 0 Public RefTemp Public DIM TC(6) Units RefTemp=degC Units TC=degC
DataTable (Temp,1,2000) DataInterval(0,10,msec,10) Average(1,RefTemp,fp2,0) Average(6,TC(),fp2,0) EndTable
BeginProg Scan(1,MSEC,0,0) ModuleTemp(RefTemp,1,4,0) TCDiff(TC(),6,mV50,4,1,TypeT,RefTemp,RevDiff,Del,Integ,Mult,Offset) CallTable Temp NextScan EndProg
Declare constants
Declare public variables , dimension array, and declare units.
Define Data Table
Declarations
Measure
Call Data Table
Scan loop
4-3
Section 4. CRBasic – Native Language Programming

4.3.1 Data Tables

Data storage follows a fixed structure in the CR9000 in order to optimize the time and space required. Data are stored in tables such as:
TOA4 StnName Temp TIMESTAMP RECORD RefTemp_Avg TC_Avg(1) TC_Avg(2) TC_Avg(3) TC_Avg(4) TC_Avg(5) TC_Avg(6) TS RN degC degC degC degC degC degC degC Avg Avg Avg Avg Avg Avg Avg 1995-02-16 15:15:04.61 278822 31.08 24.23 25.12 26.8 24.14 24.47 23.76 1995-02-16 15:15:04.62 278823 31.07 24.23 25.13 26.82 24.15 24.45 23.8 1995-02-16 15:15:04.63 278824 31.07 24.2 25.09 26.8 24.11 24.45 23.75 1995-02-16 15:15:04.64 278825 31.07 24.21 25.1 26.77 24.13 24.39 23.76
The user's program determines the values that are output and their sequence. The CR9000 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 output 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 CR9000 to fill this row out (e.g., Units RefTemp = degC). The units are strictly for the user's documentation; the CR9000 makes no checks on their accuracy.
The above table is the result of the data table description in the example program:
DataTable (Temp,1,2000) DataInterval(0,10,msec,10) Average(1,RefTemp,fp2,0) Average(6,TC(1),fp2,0) EndTable
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(Name, Trigger, Size) DataTable (Temp,1,2000)
The DataTable instruction has three parameters: a user specified name for the table, a trigger condition, and the size to make the table in CR9000 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 trigger 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.
4-4
Section 4. CRBasic – Native Language Programming
DataInterval(TintoInt, Interval, Units, Lapses) DataInterval(0,10,msec,10)
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.
Average(Reps, Source, DataType, DisableVar) Average(1,RefTemp,fp2,0) Average(6,TC(1),fp2,0)
Average is an output processing instruction that will output the average o f 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 the 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
Code Data Format Size Range Resolution
FP2 Campbell Scientific floating point 2 bytes IEEE4 IEEE four byte floating point 4 bytes 1.8 E -38 to 1.7 E 38 24 bits (about 7 digits) LONG 4 byte Signed Integer 4 bytes -2,147,483,648 to
±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.
4-5
Section 4. CRBasic – Native Language Programming
BeginProg Scan(1,MSEC,0,0) ModuleTemp(RefTemp,1,4,0) TCDiff(TC(),6,mV50,4,1,TypeT,RefTemp,RevDiff,Del,Integ,Mult,Offset) CallTable Temp NextScan EndProg
The Scan instruction determines how frequently the measurements within the scan are made:
Scan(Interval, Units, BurstOption, Count) Scan(1,MSEC,0,0)
The Scan instruction has four parameters. The Interval is the interval between scans. Units are the time units for the interval. The maximum scan interval is one minute. The BurstOption determines if processing is concurrent with measurements (0) or if raw values are buffered in RAM (1) or a PCMCIA card (2), for processing after all measurements are made. At the maximum measurement rate, processing time may exceed the time required for measuring. Count is the number of scans to make before proceeding to the instruction following NextScan. A count of 0 means to continue looping forever (or until ExitScan). In the example the scan is 1 millisecond, measurements are processed as they are made, 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
Format Example Value Standard 6.832 6.832 Scientific notation 5.67E-8 5.67X10-8 Binary: &B1101 13 Hexadecimal &HFF 255
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 entering 72, the decimal equivalent.
Numbers in CRBasic
4-6
Section 4. CRBasic – Native Language Programming

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 CR9000 evaluates the test or parameter as a number; 0 is false, not equal to 0 is true.
TABLE 4.5-1. Synonyms for True and False
Predefined Constant True (-1) False (0) Synonym High Low Synonym On Off Synonym Yes No Synonym Trigger Do Not
Trigger Number Digital port 5 Volts 0 Volts
0
0

4.5.2 Expression Evaluation

Conditional tests require the CR9000 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 CR9000 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 CR9000 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. The CR9000 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.
4-7
Section 4. CRBasic – Native Language Programming
The CR9000 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

4.6 Flags

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.7 Parameter Types

Instructions parameters allow different types of inputs these types are listed below and specifically identified in the description of th e parameter in the following sections or in PC9000 CRBasic help.
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
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
Name for Maximum Length
(number of characters)
Variable or Array
Constant 16 Alias 16 Data Table Name Field name 16
16 Letters A-Z, upper or lower
8
Allowed characters
case, underscore “_”, and numbers 0-9. The name must start with a letter. CRBasic is not case sensitive.
4-8
Section 4. CRBasic – Native Language Programming

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 Multiplier Offsets for Sensor Calibration

If variable arrays are used as the multiplier and offset parameters in measurements that use repetitions, the instruction 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 calibrated sensors, applying the correct calibration to each sensor. If the multiplier and offset are not arrays, the same multiplier and offset are used for each repetition.
VoltSE(Dest,Reps,Range,ASlot,SEChan,Delay, Integ,Mult,Offset)
'Calibration factors: Mult(1)=0.123 : Offset(1)= 0.23 Mult(2)=0.115 : Offset(2)= 0.234 Mult(3)=0.114 : Offset(3)= 0.224 VoltSE(Pressure(),3,mV1000,6,1,1,100,Mult(),Offset()

4.8 Program Access to Data Tables

Data stored in a table can be accessed from within the program. The format used is:
Tablename.Fieldname(fieldname index,records back)
Where Tablename is the name of the table in which the desired value is stored. Fieldname is the name of the field in the table. The fieldname is always an array even if it consists of only one variable; the fieldname index must always be specified. Records back is the number of records back in the data table 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.
4-9
Section 4. CRBasic – Native Language Programming
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.record(1,n) = the record number of the record output n records ago.
Tablename.Tablesize(1,1) = the size of the table in records.
Tablename.output(1,1) = 1 if data were output to the table the last time the
table was called, = 0 if data were not output.
Tablename.timestamp(m,n) = element m of the timestamp output n records ago where:
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
Tablename.eventend(1,1) is only valid for a data table using the DataEvent instruction, Tablename.eventend(1,1) = 1 if the last record of an event occurred the last time the table was called, = 0 if the data table did not store a record or if it is in the middle of an event.
NOTE
Tablename.EventCount(1,1) is also only valid for a data table using the DataEvent Instruction.
Tablename.EventCount(1,1) = the number of events that have been completed in the table. An event is complete when the table has stopped storing data for the 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 illustrates the use of this syntax.
4-10

Section 5. Program Declarations

ALIAS

Used to assign a second name to a variable.
Syntax
Alias VariableA = VariableB
Remarks
Alias allows assigning a second name to a variable. Within the datalogger program, either name can be used. Only the alias is available for Public variables. The alias is also used as the root name for datatable 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) = ManifoldT Alias TCTemp(3) = ExhaustT Alias TCTemp(4) = CatConvT

CONST

Declares symbolic constants for use in place of values.
Syntax
Const constantname = expression [, constantname = expression] . . .
Remarks The Const statement has these parts:
Part Description
constantname Name of the constant. expression Expression assigned to the constant. It can consist of literals
(such as 1.0), other constants, or any of the arithmetic or logical operators.
Tip Constants can make your programs self-documenting and easier
to modify. Unlike variables, constants can't be inadvertently changed while your program is running.
Caution Constants must be defined before referring to them.
Tip Use all uppercase letters for constant names to make them easy
to recognize in your program listings.
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
Dim varname[([subscripts]) [, varname[([subscripts])]]
Remarks The Dim statement has these parts:
Part Description
varname Name of a variable. subscripts Dimensions of an array variable. You can declare multiple
dimensions.
The argument subscripts has the following syntax: size [size, size]

PUBLIC

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 dimentioned value, a subscript out of bounds error is recorded.
When variables are initialized, they are initialized to 0
Tip Put Dim statements at the beginning of the program.
Dimensions a variable as public and available in the Public table of the CR9000.
Syntax
Public(list of [dimensioned] variables that make up the Public Table)
Remarks
More than one Public statement can be made.
5-2

STATION NAME

Section 5. Program Declarations
Public Declaration Example
The example shows the use of the Public 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 StaName
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).

UNITS

Used to assign a unit name to a field associated with a variable.
Syntax Units Variable = UnitName
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 user modifies the un its, the text entered is not checked by PC9000 or the CR9000.
Example
Dim TCTemp( 1 )
Units TCTemp( 1 ) = Deg_C

SUB, EXIT SUB, END SUB

Declares the name, variables, and code that form a Subroutine.
Syntax
Sub SubName [(VariableList )]
[ statementblock ]
[ Exit Sub ]
[ statementblock ]
End Sub
5-3
Section 5. Program Declarations
The Sub statement has these parts:
Part Description
Sub Marks the beginning of a
SubName Name of the Subroutine. Because Subroutine names are
recognized by all procedures in all modules, subname cannot be the same as any other globally recognized name in the program.
VariableList 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 separated 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 value 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 “variable” 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.
statementblock Any group of statements that are executed within the body of
the Subroutine.
Exit Sub Causes an immediate exit from a Subroutine. Program
execution continues with the statement following the statement that called the Subroutine. Any number of Exit Sub statements can appear anywhere in a Subroutine.
End Sub Marks the end of a Subroutine.
Subroutine.
5-4
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).
Caution Subroutines can be recursive; that is, they can call themselves to
perform a given task. However, recursion can lead to strange results.
Section 5. Program Declarations
Subroutine Example
'CR9000 ''Declare Variables used in Program:
Public RefT, TC(4),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) EndTable
'Same Data output in F after conversion:
DataTable (TempsF,1,-1) DataInterval (0,5,Min,10) Average (1,RefT,FP2,0) Average (4,TC(),FP2,0) EndTable
'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 (module + 4 thermocouples) in deg C ModuleTemp (RefT,1,1,250) TCDiff (TC(),4,mV50C,1,1,TypeT,RefT,True ,0,250,1.0,0) 'Call Output Table for C CallTable TempsC 'Convert Temperatures to F using Subroutine: Call ConvertCtoF(RefT) 'Subroutine call using Call statement For I = 1 to 4 ConvertCtoF(TC(I)) 'Subroutine call without Call statement Next I 'Call Output Table for F: CallTable TempsF NextScan EndProg
5-5
Section 5. Program Declarations
This is a blank page.
5-6

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 Table 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., PAMOut, FlashOut, 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 table. The table name is limited to eight characters.
The name of the variable to test for the trigger. Trigger modifiers add additional conditions.
Value Result
0 Do not trigger 0 The size to make the data table. The number of data sets (records) to allocate 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 Parameters
Trigger
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.
DataTable Example - see native language Section 4.3.
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 output table. DataInterval is inserted into a data table declaration following the 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 table. The interval is synchronized with the real time clock. 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 Interval sets it equal to the scan Interval.
TintoInt allows the user to set the time into the Interval, 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 CR9000 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 CR9000 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 CR9000 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 CR9000 not to keep track of lapses. Only the periodic time stamps (approximately once per K of data) are inserted.
6-2
Parameter & Data Type
TintoInt
Constant
Interval
Constant
Units
Constant
Lapses
Constant

OpenInterval

Section 6. Data Table Declarations and Output Processing Instructions
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 Units parameter. Enter 0 to 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
USEC 0 microseconds MSEC 1 milliseconds SEC 2 seconds MIN 3 minutes 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.
DataInterval Parameters
Numeric Code
Units
When the DataInterval instruction is included in a data table, the CR9000 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 CR9000 resets the processing the next time that 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 b e 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 time series processing in the table will include all values input since the last time the table output data. Data will be output whenever the table 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 default 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 Average(1,RefTemp,IEEE4,0) Average(5,TC,IEEE4,0) EndTable
BeginProg Scan(500,mSec,0,0) ModuleTemp(RefTemp,1,5,30) TCDiff(TC(),5,mV50C,5,9,TypeT,RefTemp,RevDiff,Del,Integ,1,0) CallTable AvgTemp NextScan EndProg

DataEvent (PreTrigRecs, StartTrig, StopTrig, PostTrigRecs)

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 PreTrigRecs Constant StartTrig The variable or expression test to Trigger copying the pre trigger records into the data table
Variable, or Value Result Expression 0 Do not trigger 0 Trigger StopTrig Variable, Expression or Constant
Value Result 0 Do not trigger 0 Trigger
PostTrigRecs
Constant
Enter
The number of records to store before the Start Trigger.
and start storing each new record..
The variable, expression or constant to test to stop storing to the data table. The CR9000 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.
The number of records to store after the Stop Trigger occurs.
DataEvent Parameters
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 and 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 default integration Public RefTemp 'Declare the variable used for reference temperature Public TC(5) 'Declare the variable used for thermocouple measurements Units RefTemp=degC Units TC=degC
DataTable (Event,1,1000) DataInterval(0,00,msec,10) 'Set th e 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 EndTable
BeginProg Scan(500,mSec,0,0) ModuleTemp(RefTemp,1,5,30) TCDiff(TC(),5,mV50C,5,9,TypeT,RefTemp,RevDiff,Del,Integ,1,0) CallTable Event NextScan EndProg

FillStop

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 th e 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 ta ble 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

WorstCase (TableName, NumCases, MaxMin, Change, RankVar)

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 other 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 if 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 ev ent 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 the CPU. It will not work if the event table is sent to the PAM module or CPU Flash memory.
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 progr am 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 of 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 (4character 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.
Value Result
0
1
The minimum change that must occur in the RankVariable before a new worst case is stored.
The Variable to rank the events by.
WorstCase Parameters
Min, save the events associated 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 associated with the maximum ranking; i.e., copy if RankVar is greater than previous lowest (over event with previous minimum)
6-6
Section 6. Data Table Declarations and Output Processing Instructions
WorstCase Example
This program demonstrates the Worst Case Instruction. Five type T thermocouples are measured. The event is similar to that in the example for the DataEvent instruction; the trigger for the start of a data event is when TC(1) exceeds 30 degrees C. However in this example, the stop trigger is set immediately true. This is done to set a fixed size for the event which can be duplicated in the worst case tables. To use the worst case instruction with events of varying duration, the event table size must be selected to accommodate the maximum duration expected (or needed). The event consists of 20 records prior to the start trigger and continues until 100 records following the start trigger.
The ranking criteria is the number of readings following the trigger that TC(1) stays above 30 degrees C. The greater the number the “worse” the event.
Const RevDiff 1 'Reverse input to cancel offsets Const Del 0 'Use default delay Const Integ 0 'Use default Integration Const NumCases 5 'Number of Worst Cases to save Const Max 1 Public RefTemp 'Declare the variable used for reference temperature Public TC(5) 'Declare the variable used for thermocouple measurements Public I, NumAbove30 Declare index and the ranking variable Units RefTemp=degC ' Units TC=degC
DataTable (Evnt,1,125) DataInterval(0,00,msec,10) 'Set the sample interval equal to the scan DataEvent(20,TC(1)>30,-1,100) '20 records before TC(1)>30,
‘100 records after TC(1)>30
Sample(1,RefTemp,IEEE4) 'Sample the reference temperature Sample(5,TC,IEEE4) 'Sample the 5 thermocouple temperatures EndTable
BeginProg Scan(500,mSec,0,0) ModuleTemp(RefTemp,1,5,30) TCDiff(TC(),5,mV50C,5,9,TypeT,RefTemp,RevDiff,Del,Integ,1,0) CallTable Evnt If Evnt.EventEnd(1,1) Check if an Event just Ended I=100 Initialize Ind ex NumAbove30=0 Zero Ranking Variable Do Loop through the Event table NumAbove30=NumAbove30+1 ‘Counting the # of times TC(1)>30 I=I-1 Loop While I>0 and Evnt.TC(1,I)>=30 Quit looping when at end or TC(1)<30 WorstCase(Evnt,NumCases,Max,0,NumAbove30) ‘Check for worst case End If NextScan EndProg
6-7
Section 6. Data Table Declarations and Output Processing Instructions

6.3 Export Data Instructions

DSP4 (FlagVar, Rate)

Send data to the DSP4. If this instruction appears inside a DataTable, the DSP4 can display the fields of this Table, otherwise, the Public Variables are used by the DSP4. The Instruction can only be used once in a program; hence, only the public variables or a single data table can be viewed.
Parameter & Data Type
FlagVar
Array
Rate
Constant

FlashOut (Size)

Parameter & Data Type
Size
Constant
Enter
The variable array to use for the 8 flags that can be displayed and toggled by the DSP4. A value of 0 = low; 0 = high. If the array is dimensioned to less than 8, the DSP4 will only work with the flags up to the dimension. The array used for flags in the Real Time displays of PC9000 is Flag (). How frequently to send new values to the DSP4 in milliseconds.
Enter
The size to make the data table. The number of data sets (records) to allocate memory for in Flash Memory. 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
DSP4 Parameters
Example
DSP4 (Flag( ), 200) Use Flag( ) to work with the buttons, update the DSP4 display every 200 msec.
(5 times a second).
Used to store data in Flash memory. Used inside DataTable to indicate the table is stored in Flash memory. Flash Memory is always fill and stop. FlashOut cannot be used in a DataTable that uses the WorstCase instruction.
FlashOut Parameters
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.
6-8

PamOut (Slot, Card, StopRing, Size)

Used to send output data to the PCMCIA card. This instruction creates a data table on the specified PCMCIA card in the PAM module. PamOut must be entered within each data table declaration that is to store data on a PCMCIA card.
Parameter & Data Type
Slot
Constant
Card
Constant
StopRing
Constant
Size
Constant
Section 6. Data Table Declarations and Output Processing Instructions
Enter
The number of the slot in the CR9000 card frame that holds the PAM Module.
The card (A or B) in which to store the data on the PAM module
Alpha Code Numeric Code Card
CARDA 0 A CARDB 1 B A code to specify if the Data Table on the PCMCIA card is fill and stop or ring (newest data overwrites
oldest).
Value Result
0 Ring 1 Fill and Stop The size to make the data table. The number of data sets (records) to allocate memory for in the
PCMCIA card. 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.
Note
PamOut Parameters
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.

6.4 Output Processing Instructions

Average (Reps, Source, DataType, DisableVar)

This instruction stores the average value over the output interval for the source variable or each element of the array specified.
Parameter & Data Type
Reps
Constant
Source
Variable
DataType
Constant
DisableVar
Constant, Variable, or Expression
Enter
The number of averages to calculate. When Reps is greater than one, the source must be an array.
The name of the Variable that is to be averaged.
A code to select the data storage format.
Alpha Code Numeric Code Data Format
IEEE4 24 IEEE 4 byte floating point FP2 7 Campbell Scientific 2 byte floating point A non-zero value will disable intermediate processing. Normally 0 is entered so all inputs are processed. For example, in the Average instruction, when the disable variable is 0 the current input is not included
in the average. The average that is eventually stored is the average of the inputs that occurred while the disable variable was 0.
Value Result
0 Process current input 0
Average Parameters
Do not process current input
6-9
Section 6. Data Table Declarations and Output Processing Instructions
X

Covariance (NumVals, Source, DataType, DisableVar, NumCov)

Calculates the covariance of values in an array over time. The Covariance of
and Yis calculated as:
n
XY
()
∑∑
ii
i
===
Cov X Y
(,)=
111
n
where
n is the number of values processed over the output interval and X
Y
are the individual values of Xand Y.
and
i
Parameter& Data Type
NumVals
Enter
The number of elements in the array to include in the covariance calculations
Constant Source Variable Array
The variable array that contains the values from which to calculate the covariances. If the covariance calculations are to start at some element of the array later than the first, be sure to include the element number in the source (e.g., X(3)).
DataType
Constant
DisableVar
Constant, Variable, or Expression 0 Process current input
NumCov Constant
A code to select the data storage format. Alpha Code Numeric Code Data Format
IEEE4 24 IEEE 4 byte floating point FP2 7 Campbell Scientific 2 byte floating point
A non-zero value will disable intermediate processing. When the disable variable is 0 the current input is not included in the Covariance.
Value Result
0
The number of covariances to calculate. The maximum number of covariances is Z/2*(Z+1). Where Z= NumVals. If X(1) is the first specified element of the source array, the covariances are calculated and output in the following sequence: X_Cov(1)…X_Cov(Z/2*(Z+1)) = Cov[X(1),X(1)], Cov[X(1),X(2)], Cov[X(1),X(3)], … Cov[X(1),X(Z)], Cov[X(2),X(2)], Cov[X(2),X(3)], … Cov[X(2),X(Z)], … Cov[X(Z),X(Z)]. The first “NumCov” of these possible covariances are output.
Covariance Parameters
Do not process current input
n
i
n
XY
i
i
i
2
n
i

FFT (Source, DataType, N, Tau, Units, Option)

The FFT performs a Fast Fourier Transform on a time series of measurements stored in an array. It can also perform an inverse FFT, generating a time series from the results of an FFT. Depending on the output option chosen, the output can be: 0) The real and imaginary parts of the FFT; 1) Amplitude spectrum.
2) Amplitude and Phase Spectrum; 3) Power Spectrum; 4) Power Spectral Density (PSD); or 5) Inverse FFT.
6-10
Parameter & Data Type
Source
Variable
DataType
Constant
N
Constant
Tau
Constant
Units
Constant
Options Constant
Section 6. Data Table Declarations and Output Processing Instructions
Enter
The name of the Variable array that contains the input data for the FFT.
A code to select the data storage format.
Alpha Code Numeric Code Data Format
IEEE4 24 IEEE 4 byte floating point FP2 7 Campbell Scientific 2 byte floating point Number of points in the original time series. The number of points must be a power of 2 (i.e., 512, 1024,
2048, etc.). The sampling interval of the time series.
The units for Tau.
Alpha Code
USEC 0 microseconds MSEC 1 milliseconds SEC 2 seconds MIN 3 minutes A code to indicate what values to calculate and output.
Code Result
0
1 2
3
4
5
FFT Parameters
Numeric Code
FFT. The output is N/2 complex data points, i.e., the real and imaginary parts of the FFT.
The first pair is the DC component and the Niquist component. This first pair is an exception because the DC and niquist components have no imaginary part.
Amplitude spectrum. The output is N/2 magnitudes. With Acos(wt); A is magnitude. Amplitude and Phase Spectrum. The output is N/2 pairs of magnitude and phase; with
Acos(wt - φ); A is amplitude, φ is phase (-π,π). Power Spectrum. The output is N/2 values normalized to give a power spectrum. With Acos(wt - φ), the power is A in the time series signal. Power Spectral Density (PSD). The output is N/2 values normalized to give a power spectral density (power per herz). The Power Spectrum multiplied by T = N*tau yields the PSD. The integral of the PSD over a given bandwidth yields the total power in that band. Note that the bandwidth of each value is 1/T herz. Inverse FFT. The input is N/2 complex numbers, organized as in the output of option 0, which is assumed to be the transform of some real time series. The output is the time series whose FFT would result in the input array.
Units
2
/ 2. The summation of the N/2 values yields the total power
T = N*tau: the length, in seconds, of the time series. Processing field: “FFT,N,tau,option”. Tick marks on the x axis are 1/(N*tau) Herz. N/2 values, or pairs of values, are output, depending upon the option code.
Normalization details: Complex FFT result i, i = 1 .. N/2: ai*cos(wi*t) + bi*sin(wi*t).
wi = 2π(i-1)/T. φi = atan2(bi,ai) (4 quadrant arctan) Power(1) = (a1 Power(i) = 2*( ai PSD(i) = Power(i) * T = Power(i) * N * tau A1 = sqrt(a1 Ai = 2*sqrt(ai
2
+ b12)/N2 (DC)
2
+ bi2)/N2 (i = 2..N/2, AC)
2
+ b12)/N (DC)
2
+ bi2)/N (AC)
6-11
Section 6. Data Table Declarations and Output Processing Instructions
Notes:
Power is independent of the sampling rate (1/tau) and of the number of
samples (N).
The PSD is proportional to the length of the sampling period (T=N*tau),
since the “width” of each bin is 1/T.
The sum of the AC bins (excluding DC) of the Power Spectrum is the
Variance (AC Power) of the time series.
The factor of 2 in the Power(i) calculation is due to the power series being
mirrored about the Niquist frequency N/(2*T); only half the power is represented in the FFT bins below N/2, with the exception of DC. Hence, DC does not have the factor of 2.
The Inverse FFT option assumes that the data array input is the transform
of a real time series. Filtering is performed by taking an FFT on a data set, zeroing certain frequency bins, and then taking the Inverse FFT. Interpolation is performed by taking an FFT, zero padding the result, and then taking the Inverse FFT of the larger array. The resolution in the time domain is increased by the ratio of the size of the padded FFT to the size of the unpadded FFT. This can be used to increase the resolution of a maximum or minimum, as long as aliasing is avoided.
6-12
Loading...