TheCR7 MEASUREMENT AND CONTROL SYSTEM is warranted by CAMPBELL SCIENTIFIC, INC. to
be free from defects in materials and workmanship under normal use and service for thirty-six (36)
months from date of shipment unless specified otherwise. Batteries have no warranty. CAMPBELL
SCIENTIFIC, INC.'s obligation under this warranty is limited to repairing or replacing (at CAMPBELL
SCIENTIFIC, INC.'s option) defective products. The customer shall assume all costs of removing,
reinstalling, and shipping defective products to CAMPBELL SCIENTIFIC, INC. CAMPBELL SCIENTIFIC,
INC. will return such products by surface carrier prepaid. This warranty shall not apply to any CAMPBELL
SCIENTIFIC, INC. products which have been subjected to modification, misuse, neglect, accidents of
nature, or shipping damage. This warranty is in lieu of all other warranties, expressed or implied, including
warranties of merchantability or fitness for a particular purpose. CAMPBELL SCIENTIFIC, INC. is not
liable for special, indirect, incidental, or consequential damages.
Products may not be returned without prior authorization. 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.
Non-warranty products returned for repair should be accompanied by a purchase order to cover the repair.
815 W. 1800 N.
Logan, UT 84321-1784
USA
Phone (435) 753-2342
FAX (435) 750-9540
www.campbellsci.com
Campbell Scientific Canada Corp.
11564 -149th Street
Edmonton, Alberta T5M 1W7
CANADA
Phone (780) 454-2505
FAX (780) 454-2655
LIST OF TABLES.......................................................................................................................... LT-1
LIST OF FIGURES........................................................................................................................LF-1
INDEX ................................................................................................................................................... I-1
iv
SELECTED OPERATING DETAILS
The channel numbering on the Analog Input
Card refers to differential measurements. Single
ended measurements assume the HI and LO
side of each differential channel are two
independent single ended channels, e.g., the HI
and LO side of differential channel 2 are single
ended channels 3 and 4 respectively.
When multiple measurements are specified in
one measurement instruction (through use of
the "Repetitions Parameter") the CR7 I/O
Module is capable of sequencing through 500
fast, single-ended measurements per second.
This specification is the MEASUREMENT
SPEED and should not be confused with
throughput which is the rate at which
measurements are made, converted to
engineering units and stored in Final memory.
With the 700X Control Module (6303 CPU
board), the maximum throughput rate for fast,
single-ended measurements is approximately
310 measurements per second (1 second
execution: Instruction 1 entered 4 times, 3 times
with 99 repetitions, once with 11 repetitions).
Data is stored in Final Memory only by Output
Processing Instructions and only when the
Output Flag is set.
The default case for data stored in Final
Memory is low resolution (4 characters). High
resolution values (5 characters) must be
specified through use of Instruction 78. All data
contained in Input Memory is displayed (*6) as
HIGH RESOLUTION (5 characters) but the
default case for all data stored in Final Memory
is LOW RESOLUTION unless high resolution is
specified through use of Instruction 78.
Floating Point Format - The computations
performed in the CR7 use floating point
arithmetic. CSI's 4 byte floating point numbers
contain a 23 bit binary mantissa and a 6 bit
binary exponent. The largest and smallest
numbers that can be stored and processed are
9 x 1018 and 1 x 10
The computations performed in the CR7 are
done in floating point arithmetic. Internally, the
number is stored and processed as a binary
number with a 23 bit binary mantissa and a 6 bit
binary exponent. The largest and smallest
numbers that can be stored and processed are
9 x 1018 and 1 x 10
of the mantissa limits the resolution of the
arithmetic to 1 part in 223 binary (1.3 x 10
decimal).
Time is stored with data in Final Memory only if
specifically requested through use of the Real
Time Instruction 77.
Data in Final Storage can be erased without
altering the program by using the *A Mode to
repartition memory. The simplest method is to
re-enter the current allocation for Input Storage
(32 locations is the default allocation). All
memory can be erased and the CR7 completely
reset by entering 1744 for the number of bytes
left in Program Memory.
On-line (as opposed to a manually initiated
dump) data transfer to peripherals (printer,
storage module, etc.) occurs only if enabled
through use of the *4 Mode or Instruction 96.
Data transfer to cassette tape is no longer
supported.
-19
, respectively.
-19
respectively. The size
9
v
CAUTIONARY NOTES
The typical current drain for the CR7 is
approximately 100 mA while executing and 8-10
mA quiescent. Do not allow the lead-acid
batteries (2.5 Ahr) to drop below 11.76 V as
irreversible battery damage may result.
An external battery connected to the I/O Module
+12V and ground terminals continues to power
the CR7 system even though the CR7 power
switch is off. Reverse polarity protection is NOT
provided on this connection so exercise
extreme care if connecting external power
supplies.
Damage will occur to the analog input channel
circuitry if voltages in excess of +16V are
applied for a sustained period.
A POTENTIALLY DANGEROUS situation can
result due to hydrogen gas build up if the CR7 is
housed in a gas tight enclosure and the internal
lead acid batteries are shorted or overcharged.
Hydrogen concentration levels may occur which
are capable of causing injury or equipment
damage if ignited.
vi
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
The CR7 Measurement and Control System combines precision measurement with processing and
control capability in a battery operated system.
Campbell Scientific, Inc. provides three documents to aid in understanding and operating the CR7:
1.This Overview
2.The CR7 Operator's Manual
3.The CR7 Prompt Sheet
This Overview introduces the concepts required to take advantage of the CR7's capabilities. Hands-on
programming examples start in Section OV4. Working with a CR7 will help the learning process, so
don't just read the examples, turn on the CR7 and do them. If you want to start this minute, go ahead
and try the examples, then come back and read the rest of the Overview.
The sections of the Operator's Manual which should be read to complete a basic understanding of the
CR7 operation are the Programming Sections 1-3, the portions of the data retrieval Sections 4 and 5
appropriate to the method(s) you are using (see OV5), and Section 14 which covers installation and
maintenance.
Section 6 covers the details of serial communications. Sections 7 and 8 contain programming examples.
Sections 9-12 have detailed descriptions of the programming instructions, and Section 13 goes into
detail on the CR7 measurement procedures.
The Prompt Sheet is an abbreviated description of the programming instructions. Once familiar with the
CR7, it is possible to program it using only the Prompt Sheet as a reference, consulting the manual if
further detail is needed.
Read the Selected Operating Details and Cautionary Notes at the front of the Manual before using the
CR7.
OV1. PHYSICAL DESCRIPTION
The CR7 features a modular, multiple
processor design that provides precision
measurement and control capability in a rugged,
battery operated system. Control Module
functions include real-time task initiation,
measurement processing, data storage,
telecommunications, and keyboard/display
interaction. The I/O Module performs all analog
and pulse signal measurement functions as well
as the analog and digital control output
functions. The I/O Module contains its own
processor card, a precision analog interface
card, and seven card slots which can
accommodate any combination of I/O Cards.
Sensor leads are connected to the I/O cards via
screw terminals.
A maximum of four I/O modules, separated by
up to 1,000 feet, may be connected to a single
Control Module in applications that require
distributed measurement capability.
OV1.1 700X CONTROL MODULE
Contains the CPU card, with 24K of system
PROM and 40K of RAM; the serial interface
card for peripheral communication and
connection of up to four I/O Modules; and the
keyboard display card. Two slots are present
for optional RAM expansion. The system's 2.5
Ahr lead-acid batteries and AC charging
circuitry are also contained in this module.
The CS I/O 9-pin port provides connection to
data storage peripherals, such as the
SM192/716 Storage Module, and provides
serial communication to computer or modem
devices for data transfer or remote
programming (Section 6). This 9 pin port does
NOT have the same pin configuration as the
OV-1
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
RS232 9 pin serial ports used on many
computers.
The SDM terminals adjacent to the serial port
allow connection to Synchronous Device for
Measurement (SDM) peripherals. These
peripherals include the SDM-INT8 Interval
Timer, the SDM-SW8A Switch Closure Module,
the SDM-CD16AC AC/DC Controller, and the
SDM-OBDII Engine Controller Interface.
709512K MEMORY CARD: This card
provides RAM storage for an additional 262,126
Final Data values. Only one 709 card may be
installed.
OV1.2 720 I/O MODULE
The processor card provides regulated power
for analog and digital functions from the
unregulated 12 volt supply. The analog
interface card contains a 16-bit A/D-D/A
converter, and a precision voltage reference.
The standard I/O Module contains slots for 7 I/O
Cards; the expanded Model 720XL contains 14
slots. All input and output connections to the
I/O module are transient protected with spark
gaps.
voltage with respect to the CR7 ground. Singleended channels are numbered sequentially,
e.g., the HI and LOW sides of differential
channels 2 are single-ended channels 3 and 4,
respectively (Section 13.2).
724PULSE COUNTER CARD: Provides 4
pulse counting channels for switch closures, low
level AC cycles, or high frequency pulse signals.
725EXCITATION CARD: There are 8
switched analog excitation channels. These
supply programmable excitation voltages for
resistive bridge measurements. The excitation
channels are only switched on during the
measurement. Only one is on at a time.
The two Continuous Analog Output (CAO)
channels supply continuous output voltages,
under program control, for use with strip charts,
X-Y plotters, or proportional controllers.
The 8 Digital Control Ports (0 or 5 volt states)
allow on-off control of external devices. These
control ports have a very limited current output
(5mA) and are used to switch solid state
devices which in turn provide power to relay
coils (Section 14.4).
The +12 volt and ground terminals provide a
direct connection to the CR7 power supply.
723ANALOG INPUT CARD: Contains 14
differential or 28 single ended inputs. Input
ground terminals connect to a heavy copper
bar, which reduces single ended measurement
offsets to less than 5µV.
723-TANALOG INPUT CARD WITH RTD:
Identical to the 723 Card except that a platinum
resistance thermometer is mounted in the
center of the terminal strip. The PRT provides a
reference junction temperature for
thermocouple measurement. The PRT
measurement is accurate to ±0.1oC over a
range of -40oC to +60oC.
The numbering on the terminals refers to the
differential channels; i.e., the voltage on the HI
input is measured with respect to the voltage on
the Low input. When making single-ended
measurements either the HI or the Low channel
may be used independently to measure the
72650 VOLT ANALOG INPUT CARD:
Provides 8 differential or 16 single ended inputs
for full scale DC ranges of ±50 V and ±15V.
Resolution is 1.66 millivolts on the ±50 V and
0.5 millivolts on the ±15 V range. The common
mode range is ±50 volts.
OV1.3 ENCLOSURES AND CONNECTOR
OPTIONS
ENC-7LALUMINUM FRAME FOR
LABORATORY ENVIRONMENTS: 17" x 12" x
6"; provides a housing for benchtop use or a
frame for attachment to a wall or a NEMA type
enclosure.
ENC-7FENVIRONMENTALLY SEALED
FIBERGLASS ENCLOSURE: 20" x 13" x 10";
housing for harsh environments. Sensor leads
enter via two ports fitted with 0.75" conduit
bushings, and plugged with removable
stoppers. The 1.040" hole size accommodates
#14 shell size circular connectors.
OV-2
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
CR7
RELIEF VALVE
N
TTO
U
SS B
E
E
R
CAUTION
PR
SE
FO
A
E
B
C
G
IN
K
C
LO
N
U
FIGURE OV1-1. CR7 Measurement and Control System
OV2. MEMORY AND PROGRAMMING
CONCEPTS
The CR7 must be programmed before it will
make any measurements. A program consists
of a group of instructions entered into a program
table. The program table is given an execution
interval which determines how frequently that
table is executed. When the table is executed,
the instructions are executed in sequence from
beginning to end. After executing the table, the
CR7 waits the remainder of the execution
interval and then executes the table again
starting at the beginning.
The interval at which the table is executed will
generally determine the interval at which the
sensors are measured. The interval at which
data are stored is separate and may range from
samples every execution interval to processed
summaries output hourly, daily, or on longer or
irregular intervals.
Figure OV2-1 represents the measurement,
processing, and data storage sequence in the
CR7 and shows the types of instructions used
to accomplish these tasks.
OV2.1 INTERNAL MEMORY
The CR7 has 40,960 bytes of Random Access
Memory (RAM), divided into five areas. The
five areas of RAM are:
1.Input Storage - Input Storage holds the
results of measurements or calculations.
The *6 Mode is used to view Input Storage
locations to check current sensor readings
or calculated values. Input Storage defaults
to 28 locations. Additional locations can be
assigned using the *A Mode.
2.Intermediate Storage - Certain Processing
Instructions and most of the Output
Processing Instructions maintain
intermediate results in Intermediate
Storage. Intermediate storage is
automatically accessed by the Instructions
and cannot be accessed by the user. The
default allocation is 64 locations. The
number of locations can be changed using
the *A Mode.
Program Control Instructions
96 (Storage Module, Printer)
97 Initiate Telecommunications
98 Print Character
700X CONTROL MODULE
CAMPBELL
SCIENTIFIC
LOGAN, UTAH
INC.
1
CR7 MEASUREMENT & CONTROL SYSTEM
2
I. D.
3
DATA
C3C2C1
+12
SDM
SERIAL I/O
PULSE INPUTS
Input/Output Inst ruc tions
3. Pulse
SWITCHED ANALOG OUT
1 2 3 4 5 6 7 8 1 2
EXCITATION OUTPUTS
Input/Output Inst ruc tions
4.Ex-Del-Se
5.AC Half Br
6.Full Br
7.3W Half Br
9.Full Br-Mex
11. Temp (107)
12. RH (207)
22. Excit-Del
CONTINUOUS ANALOG OUT
725
EXCITATION
DIGITAL CONTROL OUT
1234 5678
CAO
21ANALOG OUT
4
ON
OFF
AUX.
POWER
CONTROL PORTS
Input/Output Inst ruc tions
20 Set Port
Program Control Instructions
83 If Case < F
86 Do
88 If x < = > y
89 If x < = > f
91 If flag, port
92 If Time
Command Codes:
4x Set port x high
5x Set port x low
6x Toggle port x
7x Puls e port x
123A
456B
789C
0#D
*
MADE IN USA
OV-4
FIGURE OV1-2. CR7 Wiring Panel and Associated Programming Instructions
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
INPUT/OUTPUT
INSTRUCTIONS
Specify the conversion of a sensor signal
to a data value and store it in Input
Storage. Programmable entries specify:
(1) the measurement type
(2) the number of channels to measure
(3) the input voltage range
(4) the Input Storage Location
(5) the sensor calibration constants
used to convert the sensor output to
engineering units
I/O Instructions also control analog
outputs and digital control ports.
INPUT STORAGE
Holds the results of measurements or
calculations in user specified locations.
The value in a location is written over
each time a new measurement or
calculation stores data to the locations.
PROCESSING INSTRUCTIONS
Perform calculations with values in Input
Storage. Results are returned to Input
Storage. Arithmetic, transcendental and
polynomial functions are included.
OUTPUT PROCESSING
INSTRUCTIONS
Perform calculations over time on the
values updated in Input Storage.
Summaries for Final Storage are
generated when a Program Control
Instruction sets the Output Flag in
response to time or events. Results
may be redirected to Input Storage for
further processing. Examples include
sums, averages, max/min, standard
deviation, histograms, etc.
Output Flag set high
FINAL STORAGE
Final results from OUTPUT
PROCESSING INSTRUCTIONS are
stored here for on-line or interrogated
transfer to external devices (Figure
OV5.1-1). When memory is full, new
data overwrites the oldest data.
FIGURE OV2-1. Instruction Types and Storage Areas
INTERMEDIATE STORAGE
Provides temporary storage for
intermediate calculations required by the
OUTPUT PROCESSING INSTRUCTIONS;
for example, sums, cross products,
comparative values, etc.
OV-5
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
3. Final Storage - Final, processed values are
stored here for transfer to printer, solid state
Storage Module or for retrieval via
telecommunication links. Values are stored
in Final Storage only by the Output
Processing Instructions and only when the
Output Flag is set in the users program.
The 18,336 locations allocated to Final
Storage at power up is reduced if Input or
Intermediate Storage is increased.
4. System Memory - used for overhead tasks
such as compiling programs, transferring
data, etc. The user cannot access this
memory.
5. Program Memory - available for user
programs entered in Program Tables 1 and
2, and Subroutine Table 3. (Sections OV3,
1.1)
The use of the Input, Intermediate, and Final
Storage in the measurement and data
processing sequence is shown in Figure OV2-1.
While the total size of these three areas
remains constant, memory may be reallocated
between the areas to accommodate different
measurement and processing needs (*A Mode,
Section 1.5). The size of system and program
memory are fixed.
3. OUTPUT PROCESSING INSTRUCTIONS
(69-82, Section 11) are the only
instructions which store data in Final
Storage (destination). Input Storage
(source) values are processed over time to
obtain averages, maxima, minima, etc.
There are two types of processing done by
Output Instructions: Intermediate and Final.
Intermediate processing normally takes
place each time the instruction is executed.
For example, when the Average Instruction
is executed, it adds the values from the
input locations being averaged to running
totals in Intermediate Storage. It also keeps
track of the number of samples.
Final processing occurs only when the
Output Flag is high. The Output Processing
Instructions check the Output Flag. If the
flag is high, final values are calculated and
output. With the Average, accumulated
totals are divided by the number of samples
and the resulting averages sent to Final
Storage. Intermediate locations are zeroed
and the process starts over. The Output
Flag, Flag 0, is set high by a Program
Control Instruction which must precede the
Output Processing Instructions in the user
entered program.
OV2.2 CR7 INSTRUCTION TYPES
Figure OV2.1 illustrates the use of the three
different instruction types which act on data.
The fourth type, Program Control, is used to
control output times and vary program
execution. Instructions are identified by
numbers.
1. INPUT/OUTPUT INSTRUCTIONS (126,101-104, Section 9) control the terminal
strip inputs and outputs (the sensor is the
source, Figure OV1-2), storing the results in
Input Storage (destination). Multiplier and
offset parameters allow conversion of linear
signals into engineering units. The Control
Ports and Continuous Analog Outputs are
also addressed with I/O Instructions.
2. PROCESSING INSTRUCTIONS (30-66,
Section 10) perform numerical operations
on values located in Input Storage (source)
and store the results back in Input Storage
(destination). These instructions can be
used to develop high level algorithms to
process measurements prior to Output
Processing (Section 10).
4. PROGRAM CONTROL INSTRUCTIONS
(85-98, Section 12) are used for logic
decisions and conditional statements. They
can set flags, compare values or times,
execute loops, call subroutines,
conditionally execute portions of the
program, etc.
OV2.3 PROGRAM TABLES AND THE
EXECUTION AND OUTPUT INTERVALS
Programs are entered in Tables 1 and 2.
Subroutines, called from Tables 1 and 2, are
entered in Subroutine Table 3. The size of each
table is flexible, limited only by the total amount
of program memory. If Table 1 is the only table
programmed, the entire program memory is
available for Table 1.
Table 1 and Table 2 have independent
execution intervals, entered in units of seconds
with an allowable range of 0.0125 to 6553
seconds. Intervals shorter than 0.1 seconds are
allowed only in Table 1. Subroutine Table 3 has
no execution interval; subroutines are only
executed when called from Table 1 or 2.
OV-6
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
Table 1.
Execute every x sec.
0.0125 < x < 6553
Instructions are executed
sequentially in the order they
are entered in the table. One
complete pass through the table
is made each execution interval
unless program control
instructions are used to loop or
branch execution.
Normal Order:
MEASURE
PROCESS
CHECK OUTPUT COND.
OUTPUT PROCESSING
FIGURE OV2-2. Program and Subroutine Tables
OV2.3.1 THE EXECUTION INTERVAL
The execution interval specifies how often the
program in the table is executed, which is
usually determined by how often the sensors
are to be measured. Unless two different
measurement rates are needed, use only one
table. A program table is executed sequentially
starting with the first instruction in the table and
proceeding to the end of the table.
Each instruction in the table requires a finite
time to execute. If the execution interval is less
than the time required to process the table, the
CR7 overruns the execution interval, finishes
processing the table and waits for the next
execution interval before initiating the table.
When an overrun occurs, decimal points are
shown on either side of the G on the display in
the LOG mode (*0). Overruns and table priority
are discussed in Section 1.1.
Table 2.
Execute every y sec.
0.1 < y < 6553
Table 2 is used if there is a
need to measure and process
data on a separate interval from
that in Table 1.
Table 3.
Subroutines
A subroutine is executed only
when called from Table 1 or 2.
Subroutine Label
Instructions
End
Subroutine Label
Instructions
End
Subroutine Label
Instructions
End
OV2.3.2 THE OUTPUT INTERVAL
The interval at which output occurs is
independent from the execution interval, other
than the fact that it must occur when the table is
executed (i.e., a table cannot have a 10 minute
execution interval and output every 15 minutes).
A single program table can have many different
output intervals and conditions, each with a unique
data set (output array). Program Control
Instructions are used to set the Output Flag which
determines when output occurs. The Output
Processing Instructions which follow the instruction
setting the Output Flag determine the data output
and its sequence. Each additional output array is
created by another Program Control Instruction
setting the Output Flag high in response to an
output condition, followed by Output Processing
Instructions defining the data set to output.
OV3. PROGRAMMING THE CR7
A program is created by keying it directly into
the datalogger or on a PC using the PC208 or
PC208W Datalogger Support Software program
EDLOG. This manual describes direct
interaction with the CR7. Work through the
direct programming examples in this overview
before using EDLOG and you will have the
basics of CR7 operation as well as an
appreciation for the help provided by the
software. Section OV3.5 describes options for
loading the program into the CR7.
OV-7
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
OV3.1 FUNCTIONAL MODES
User interaction with the CR7 is broken into
different functional MODES, (e.g., programming
the measurements and output, setting time,
manually initiating a block data transfer to
Storage Module, etc.). The modes are referred
to as Star (*) Modes since they are accessed by
first keying *, then the mode number or letter.
Table OV3.1 lists the CR7 Modes.
TABLE OV3-1. * Mode Summary
KeyMode
*0LOG data and indicate active Tables
*1Program Table 1
*2Program Table 2
*3Program Table 3, subroutines only
*4Enable/disable printer output
*5Display/set real time clock
*6Display/alter Input Storage data, toggle
flags
*7Display Final Storage data
*8Final Storage data transfer to cassette
tape
*9Final Storage data transfer to printer
*AMemory allocation/reset
*BSignature test/PROM version
*CSecurity
*DSave/load Program
TABLE OV3-2. Key Description/Editing
Functions
KeyAction
0-9Key numeric entries into display
*Enter Mode (followed by Mode Number)
AEnter/Advance
BBack up
CChange the sign of a number or index
an input location to loop counter
DEnter the decimal point
#Clear the rightmost digit keyed into the
display
#AAdvance to next instruction in program
table (*1, *2, *3) or to next output array
in Final Storage (*7)
#BBack up to previous instruction in
program table or to previous output
array in Final Storage
#DDelete entire instruction
OV3.3 PROGRAMMING SEQUENCE
In routine applications, sensor signals are
measured, processed over some time interval,
and the results are stored in Final Storage. A
generalized programming sequence is:
1. Enter the execution interval, determined by
the desired sensor scan rate.
OV3.2 KEY DEFINITION
Keys and key sequences have specific
functions when using the CR7 keyboard or a
terminal/computer in the remote keyboard state
(Section 5). Table OV3.2 lists these functions.
In some cases, the exact action of a key
depends on the mode the CR7 is in and is
described with the mode in the manual.
2. Enter the Input/Output Instructions required
to measure the sensors.
3. Enter any Processing Instructions required
to get the data ready for Output Processing.
4. Enter a Program Control Instruction to test
the output condition and Set the Output
Flag when the condition is met. For
example, use Instruction 92 to output based
on time, 86 to output each time the table is
executed, and 88 or 89 to compare input
values. This instruction must precede the
Output Processing Instructions.
5. Enter the Output Processing Instructions to
store processed data in Final Storage. The
order in which the data are stored is
determined by the order of the Output
Processing Instructions in the table.
6. Repeat steps 4 and 5 for output on different
intervals or conditions.
OV-8
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
OV3.4 INSTRUCTION FORMAT
Instructions are identified by an instruction
number. Each instruction has a number of
parameters that give the CR7 the information it
needs to execute the instruction.
The CR7 Prompt Sheet has the instruction
numbers in red, with the parameters briefly
listed in columns following the description.
Some parameters are footnoted with further
description under the "Instruction Option Codes"
heading.
For example, Instruction 73 stores the
maximum value that occurred in an Input
Storage Location over the output interval. The
instruction has three parameters (1)
REPetitionS, the number of sequential Input
Storage locations on which to find maxima, (2)
TIME, an option of storing the time of
occurrence with the maximum value, and (3)
LOC the first Input Storage Location operated
on by the Maximum Instruction. The codes for
the TIME parameter are listed in the "Instruction
Option Codes".
The repetitions parameter specifies how many
times an instruction's function is to be repeated.
For example, four 107 thermistor probes, wired
to single-ended channels 1 through 4, are
measured using a single Instruction 11, Temp107, with four repetitions. Parameter 2
specifies the input channel of the first thermistor
(channel 1) and parameter 4 specifies the Input
Storage Location in which to store
measurements from the first thermistor. If
Location 5 were used, the temperature of the
thermistor on channel 1 would be stored in Input
Location 5, the temperature from channel 2 in
Input Location 6, etc.
Detailed descriptions of the instructions are
given in Sections 9-12.
OV3.5 ENTERING A PROGRAM
Programs are entered into the CR7 in one of
four ways:
1. Keyed in using the CR7 keyboard.
b. Stored/loaded from SM192/716 Storage
Module
3. Loaded from Storage Module or internal
PROM (special software) upon power-up.
A program is created by keying it directly into
the datalogger as described in the following
Section, or on a PC using the PC208
Datalogger Support Software.
PC208 Software programs are used to develop
and send programs to the CR7. Program files
developed can be downloaded directly to the
CR7 via direct wire, telephone, or Radio
Frequency (RF).
Programs on disk can be copied to a Storage
Module. Using the *D Mode to save or load a
program from a Storage Module is described in
Section 1.8.
If the SM192/716 Storage Module is connected
when the CR7 is powered-up, the CR7 will
automatically load program number 8, provided
that a program 8 is loaded in the Storage
Module (Section 1.8).
It is also possible (with special software) to
create a PROM (Programmable Read Only
Memory) that contains a datalogger program.
With this PROM installed in the datalogger, the
program will automatically be loaded and run
when the datalogger is powered-up, requiring
only that the clock be set.
OV4. PROGRAMMING EXAMPLE
The best way to become acquainted with the
CR7 is to program it and make some
measurements. If your CR7 contains either a
723 or 723-T Analog Input card, a short
copper-constantan thermocouple (TC) should
be connected to channel 5. In this example, you
will program the CR7 to sample the
thermocouple temperature. If you have not
purchased the 723-T with a Resistive
Temperature Device (RTD) to measure the TC
reference junction temperature, a "dummy"
reference temperature will be used.
2. Loaded from a pre-recorded listing using
the *D Mode. There are two types of
storage/input:
a. Stored on disk/sent from computer
(PC208 software).
OV-9
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
Tables OV3-1 and OV3-2 summarize the
Keyboard Commands and Control Modes used
to program the CR7, monitor Input and Final
Storage and control data output to peripherals.
The instructions, and their associated
parameters, are the CR7's programming steps
and are used to build the CR7's program. It is
not necessary to understand all the commands
to proceed with this programming exercise. It is
helpful to find the example's instructions on the
CR7 Prompt Sheet provided with this manual.
As you become familiar with programming the
CR7, you will find that the Prompt Sheet or the
PC208 program EDLOG has all the information
you need to write your program. By following
along on the Prompt Sheet as you proceed with
this exercise, you will learn how to use it to write
your own programs.
OV4.1 MEASUREMENT
To make a thermocouple temperature
measurement, the CR7 must know the
temperature of the reference junction. The CR7
takes the reference temperature, converts it to
the equivalent TC voltage, adds the measured
TC voltage and converts the sum to
temperature through a polynomial fit to the TC
output curve. In this example, the reference
junction is at the Analog Input Card. Its
temperature is measured with Instruction 17,
Panel Temperature. If you have an Analog
Input Card with RTD, check to see which
number is assigned to it. A tag labeled RTD is
on the left hand side and the card number is on
the right hand side of the Analog Input Card. If
the RTD card is not card 1, you must enter the
correct card number as Parameter 1 of
Instruction 17. If you do not have an Analog
Input Card with RTD, you will omit Instruction 17
from the Program and enter a "dummy"
reference temperature after the Program is
compiled.
The thermocouple temperature measurement is
made using Instruction 14 (differential voltage
measurement of TC) on differential channel 5.
When using a copper-constantan
thermocouple, the copper lead is connected to
the high input of a differential channel and the
constantan lead is connected to the low side.
The channel numbering printed on the Analog
Input Cards refers only to differential channels.
Either the high or low side of a differential
channel may be used for single ended
measurements. (Each side is counted when
assigning single ended channel numbers; e.g.,
the high side of differential channel 8 is single
ended channel 15 and the low side is single
ended channel 16).
The first parameter in Instruction 14 is the
number of times to repeat the measurement: 1
is entered because only one thermocouple is
measured. If more thermocouple
measurements were desired, the copper leads
would be connected to the high sides of
consecutive differential channels, the
constantan leads to the low sides and the
number of repetitions entered in Parameter 1
would equal the number of thermocouples.
Parameter 2 is the voltage range to use when
making the measurement. The output of a
copper-constantan thermocouple is
approximately 40 microvolts per oC difference
in temperature between the two junctions. The
+5000 uV scale will provide a range of +5000/40
= +125 oC (i.e., this scale will not overrange as
long as the measuring junction is within 125 oC
of the panel temperature). The resolution of the
+5000 uV range is 166 nV or 0.004 oC.
Parameter 3 is the Input Card number and
Parameter 4 is the channel on which to make
the first measurement. If more than one
thermocouple is measured, the CR7 will
automatically advance through the channels
and on to the next card if necessary. Similarly,
Parameter 7 is the Input Storage Location in
which to store the first measurement; e.g., if
there are five repetitions and the first
measurement is stored in location 3, the final
measurement will be stored in location 7.
Parameter 6 is the Input Storage location in
which the reference temperature is stored, and
Parameters 8 and 9 are the multiplier and offset
to apply to the temperature value. A multiplier of
1 and an offset of 0 give the result in oC, a
multiplier of 1.8 and an offset of 32 give the
result in oF.
Now that you have some idea of what you are
telling the CR7 by entering the parameters, we
will proceed with programming the CR7.
OV-10
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
TABLE OV4-1. Thermocouple Measurement Programming Example
-------Users without RTD omit next Instruction------
01:P17
1
01:1
1
02:1
-------Users without RTD continue here-------
Instruction Location Number will be 1 less (i.e., 01:P00)
02:P14
1
01:1
2
02:2
1
03:1
5
04:5
1
05:1
1
06:1
2
07:2
1
08:1
09:0.0000
*
A
A
A
A
A
A
A
A
A
A
A
A
A
A
A
*
The number after "HELLO" will count up as memory
is checked. If you have a 512K Memory Card, this
can take a long time; key # to abort the test. The
result of the CPU board memory check is then
displayed (Sect. 1.5)
Enter Program Table 1, advance to Execution
Interval
Enter 2 second Execution Interval advance to first
instruction
Measure Panel Temp., advance to first Parameter
RTD in input card #1, if RTD card other than #1,
enter correct card #
Store temp in location 1
TC temp., differential meas.
1 repetition
Range code (5000uV, slow)
Input card #1
Input channel of 1st TC
TC type (copper-constantan)
Reference temp. is in location 1
Store TC temp. in location 2
Multiplier of 1
No offset entered (offset=0), advance to next
instruction
Exit Table 1
00:00
The CR7 is now programmed to measure the thermocouple temperature and to store the result in Input
Storage Location 2. The colon between the ID and Data fields blinks each time Table 1 is executed,
every 2 seconds in this example. If you do not have an RTD, the "reference temperature" is 0.0 and the
value stored in Location 2 is the difference in temperature between the panel and the thermocouple. The
*6 Mode can be used to monitor the values in the Input Storage and to change the value of the dummy
reference temperature.
0
:LOG 1
Enter *0 Mode, compile table
OV-11
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
TABLE OV4-2. Using *6 Mode to Observe Example TC Measurements
(User with Model 723-T RTD Card)
Display
ID:DataKey
:LOG 1
00:00
Display
ID:DataKey
:LOG 1
:0.0000
00:00
*6
TABLE OV4-3. Using *6 Mode to Observe Example TC Measurements
Enter *6 Mode, advance to first location
Panel temp is 21.234 oC, advance to location 2
TC temp is 22.433 oC, backup to location 1
Panel temp is now 21.199 oC
Return to *0 Mode
Enter *6 Mode, advance to first location
Reference temp is 0.0oC, advance to location 2
TC "temp" is 2.9533 C, backup to location 1
Setup to change stored value
Store 20 in location 1
Advance to location 2
The TC temp in location 2 using a reference
temperature of 20
Return to *0 Mode
o
You can advance through Input Storage by
keying in the advance command, A, or backup
by keying in the backup command, B. The Input
Location you are observing is shown on the left
in the display ID field. The temperature data
stored in the Input locations are updated every 2
seconds, each time Table 1 is executed. Verify
this by changing the temperature of the
thermocouple (hold it in your fingers) while
monitoring the proper Input Location.
It is possible to go directly to a specific Input
Storage location by entering the *6 Mode and
keying in the desired location before keying A.
A similar utility is available in other Modes.
OV4.2 OUTPUT
In the following example instructions are
appended to Table 1 to output the time and the
average temperatures to Final Storage every 5
minutes.
OV-12
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
TABLE OV4-4. Example Programming to Obtain Five Minute Averages
Display
ID:DataKey
00:00
01:00
03:P00
01:0000
02:0000
03:00
04:P00
01:0000
05:P00
01:00
02:0000
06:P00
00:00
05:00
05:0000
05:00:21
13:24:01
: LOG 1
92
10
77
10
71
85
11
1324
Display
ID:DataKeyDescription
1
3
0
5
2
1
5
: LOG 1
01:00
01:3
03:P92
01:0
02:5
03:10
04:P77
:10
05:P71
01:2
02:1
:00:21:32
05:85
05:11
05:13:24
*
A
A
A
A
A
A
A
A
A
A
*
A
A
A
A
*0
Program Table 1
Advance to 3rd Instruction location (Key in 2 if
Instruction 17 was not entered, Instruction Location
Number will be 1 less than shown in table)
Enter If Time Instruction
Enter 0 minutes into interval
Enter 5 minute time interval
Set output Flag 0
Enter Output Time Instruction
Code for HR:MIN
Enter Average Instruction
2 repetitions
Location of 1st input data to be averaged
Exit Table 1
Enter *5 Mode to set clock (the clock will be running)
Enter Year
Enter Julian day (January 11 assumed in this
example)
Enter Hours:Minutes (24 hour time, 1:24 PM
assumed in this example)
Exit *5 Mode, compile Table 1, commence logging
data
The CR7 is now programmed to sample the panel and thermocouple temperatures every 2 seconds and
to output the time and the average temperatures to Final Storage every 5 minutes. Each Output Array
sent to Final Storage will consist of 4 data values. The first value will be an output identifier which gives
the number of the Table which caused the output, and the instruction location number of the instruction
which set the output flag. The second value will be the time, and the third and fourth values will be the
average temperatures of the I/O Module and the thermocouple. Values stored in Final Storage can be
viewed using the *7 Mode. Table 1.2-5 shows an example of the use of the *7 Mode, it is assumed that
the CR7 has been logging data for 8 minutes since the time was set in the previous example.
OV-13
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
TABLE OV4-5. Using *7 Mode to View Values in Final Storage
When editing an existing program in the CR7,
entering a new instruction inserts the
instruction; entering a new value for an
instruction parameter replaces the previous
value.
To insert an instruction, enter the program table
and advance to the position where the
instruction is to be inserted (i.e., P in the data
portion of the display), key in the instruction
number, and then key A. The new instruction
will be inserted at that point in the table,
advance through and enter the parameters.
The Instruction that was at that point and all
instructions following it will be pushed down to
follow the inserted instruction.
An instruction is deleted by advancing to the
instruction number (P in display) and keying #D
(Table OV3-2).
To change the value entered for a parameter,
advance to parameter and key in the correct
value then key A. Note that the new value is not
entered until A is keyed.
OV4.4 EDLOG PROGRAM LISTING
The examples in the rest of this manual use
program listings generated by EDLOG, the
datalogger Program Editor for the PC
(PC208(W) Software). The EDLOG listing does
not show the CR7 display or the "A" keystrokes
used to enter data. The EDLOG listing for the
previous example is given in Table OV4-6.
Display
ID:DataKeyDescription
7007:9.0000
:LOG 1
*
A
Enter *7 Mode. The DSP is at Final Storage location 9,
advance to first data value
A
Output identifier: users who did not enter Instruction 17 will
see 01: 0102 because the output flag is set by the second
instruction in Table 1
A
Time
A
Average panel temp for readings between 1:24 and 1:25 P.M.
A
Average thermocouple temp.
A
Output identifier
A
Time
*
Average panel temp for readings between 1:25 and 1:30 P.M.
Enter *0 Mode
TABLE OV4-6. EDLOG Listing of Example
Program
*1Table 1 Programs
01:2Sec. Execution Interval
01:P17Panel Temperature
01:1IN Card
02:1Loc :
02:P14Thermocouple Temp (DIFF)
01:1Rep
02:25000 uV slow Range
03:1IN Card
04:5IN Chan
05:1Type T (Copper-Constantan)
06:1Ref Temp Loc
07:2Loc [:TC Temp ]
08:1Mult
09:0Offset
03:P92If time is
01:0minutes into a
02:5minute interval
03:10Set high Flag 0 (output)
04:P77Real Time
01:10Hour-Minute
05:P71Average
01:2Reps
02:1Loc
OV-14
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
OV5. DATA RETRIEVAL OPTIONS
There are several options for data storage and
retrieval. These options are covered in detail in
Sections 2, 4, and 5. Figure OV5-1
summarizes the various possible methods.
Regardless of the method used, there are three
general approaches to retrieving data from a
datalogger.
1. On-line output of Final Storage data to a
peripheral storage device. On a regular
schedule, that storage device is brought
back to the office/lab where the data is
transferred to the computer. Another
storage device is usually taken into the field
and exchanged for the one which is
retrieved so that data collection can
continue uninterrupted.
2. Bring a storage device to the datalogger
and transfer all the data that has
accumulated in Final Storage since the last
visit.
3. Retrieve the data over some form of
telecommunications link, that is, Radio
Frequency (RF), telephone, short haul
modem, multi-drop interface, or satellite.
The PC208 software automates this
process.
Regardless of which method is used, the
retrieval of data from the datalogger does NOT
erase those data from Final Storage. The data
remain in the ring memory until:
•they are written over by new data
(Section 2.1)
• memory is reallocated (Section 1.5)
• the power to the datalogger is turned
off.
Table OV5-1 lists the instructions used with the
various methods of data retrieval.
TABLE OV5-1. Data Retrie val Methods and Related Instructions
V = View save to file
F1. . F8 = Toggle flags
P1. . P6 = Toggle ports
C = Collect data
SOLAR
1:
TEMP C
2:
RH %
3:
Scale = Auto
1000
1100
1200
1300
1400
1500
1600
1700
1800
1900
2000
2100
2200
2300
Transceiver
RF Base
Station
FIGURE OV5-1. Data Retrieval Hardware Options
Modem
Phone
Modem
Satellite
Interface
Satellite
Ground
Station
OV-16
OV6. SPECIFICATIONS
Electrical specifications are valid for over a -25° to +50°C range unless otherwise specified.
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
Analog Inputs
(723T or 723 Card specifications below;
726 ±50 V Card specifications discussed in
System Description
Voltage Measurement Types: Single-ended or
differential.
Range and Resolution: Ranges are software
selectable on any input channel.
Full ScaleResolution
Input Range (mV)Differential Single-ended
±5000166µV333µV
±150050µV100µV
±50016.6 µV33.3 µV
±1505µV10µV
±501.66 µV3.33 µV
±15500nV 1000nV
±5166nV333nV
±1.550nV100nV
Accuracy of Voltage Measurements:
Differential: ±0.02% FSR (±0.01%, 0-40°C)
(e.g. ±0.02% FSR = ±2.0 mV for ±5 V range)
Positive single-ended: ±0.02% FSR
(±0.01%, 0-40°C) ±5 µV
Negative single-ended: ±0.03% FSR
(±0.015%, 0-40°C) ±5 µV
Input Sample Rates: Fast A/D conversions are
integrated over 250 µs. Slow A/D conversions
are integrated over 16.67 ms for 60 Hz AC
rejection or optionally, 20.0 ms for 50 Hz AC
rejection. Differential measurements include
two conversions, one with reversed input polarity, to reduce thermal offset and common mode
errors. The following intervals do not include
the self-calibration measurement which occurs
once per instruction.
Fast Single-ended2.9350
Fast Differential4.7250
Slow Single-ended22.043
Slow Differential43.030
Fast Differential (TC) 7.9250
Common Mode Range: ±5 V
Common Mode Rejection: > 140 dB (DC to 100 Hz)
Normal Mode Rejection: 70 dB (60 Hz with
slow differential measurement)
Input Current: 100 pA max
Input Current Noise: 9 pA RMS (slow differential)
Input Resistance: 2.5 GΩ typical
Sustained Input Voltage without Damage:
≤ ±16 VDC
)
Input sample Typical input
ratesnoise
ms/channelnV/RMS
Pulse Counters
(724 Card)
Pulse Counters per Card: 4
Maximum Counts per Interval: 32,767 (with
overrange detection)
Modes: Programmable modes are switch
closure, high frequency pulse, and low level AC.
Switch Closure Mode
Minimum Switch Closed Time:1 ms
Minimum Switch Open Time:4 ms
Maximum Bounce Time:1.4 ms open without
being counted.
High Frequency Pulse Mode
Minimum Pulse Width: 2 µs
Maximum Input Frequency: 250 kHz
Voltage Thresholds: The count is incremented
when the input voltage changes from below
1.5 V to above 3.5 V.
Maximum Input Voltage: ±20 V
Low Level AC Mode
This mode is used for counting the frequency
of low voltage, sine wave signals.
Input Hysteresis: 11 mV
Maximum AC Input Voltage (RMS): 20 V
Frequency Range:
Minimum AC Input Voltage Range (Hz)
(mV RMS)
151 to 100
251 to 1,000
501 to 3,000
1601 to 10,000
Digital Control Outputs
(725 Card)
Each card includes 8 digital control outputs.
Output Voltages (no load):
High: 5.0 V ±0.1 V
Low: < 0.1 V
Output Resistance: 400 Ω
Analog Outputs
(725 Card)
Each card contains 8 switched and 2 continuous
analog outputs.
Switched: Provides a precision voltage for
resistance measurement, then switches off
(high impedance). Only one switched output
can be active at a time.
Continuous: A preset voltage is held until
updated. Voltage degrades 0.17 mV every 7
seconds. All continuous analog outputs (and
digital control ports) can be active simultaneously.
Range: ±5 V
Resolution: 166 µV
Accuracy: Same as voltage measurements.
Output Current: 25 mA at ±5 V, 50 mA at ±2 V
Resistance and Conductivity
Measurements
(Combination of 723 and 725 Cards)
Accuracy: ±0.01% of full scale bridge output
provided the matching bridge resistors are not
the limiting factor.
Measurement Types: 6-wire and 4-wire full
bridge, 4-wire, 3-wire, and 2-wire half bridges.
High accuracy, low impedance bridge
measurements are made ratiometrically with
dual polarity measurements of excitation and
output to eliminate thermal emfs. AC resistance and conductivity measurements use a
750 µs excitation pulse with the signal integration occurring over the last 250 µs. An equal
duration pulse of opposite polarity is applied
for ionic depolarization.
Transient Protection
All input and output connections to the I/O
Module are protected using spark gaps that
are rated to 10,000 A. The spark gaps are
connected directly to a heavy copper bar on
each input card with no more than 2 inches of
20 AWG copper wire.
on the Control Module panel for connection to
storage module, card storage module,
multidrop interface, modem, printer, or RS-232
adapter. Baud rates selectable at 300, 1200,
9600, and 76,800.
I/O Module Interface: Optically isolated current
loops allow connection of up to 4 I/O Modules.
I/O Modules can be separated from the Control
Module by up to 1,000 feet.
Clock Accuracy: ±1 minute per month.
Maximum Program Execution Rate: System
tasks can be initiated in sync with real-time up
to 80 Hz.
System Power Requirements
Voltage: 9.6 to 15 VDC
Typical Current Drain: 3.5 - 6 mA (minimum
system) quiescent, 16 mA during processing,
100 mA during analog measurement.
Internal Batteries: Sealed rechargeable with
2.5 Ahr capacity per charge.
Charging Circuit: Requires DC or rectified AC
voltage from 15 to 25 V. Thermal compensation is included to optimize charging voltage
according to ambient temperature.
External Batteries: Any 12 V external battery
can be a primary power source; internal batteries provide a backup while the external
batteries are changed.
Operation from AC Sources: An AC operated
battery charger is included with the enclosure
to maintain full charge on the batteries where
AC power is available. In the event of power
failure, the internal batteries will keep the
system operational for up to 5 days in most
applications.
Physical Specifications
Size:ENC 7L17” x 12” x 6”
Weight: ~40 lbs (ENC 7F with 700X, 720, &
ENC 7F20” x 13” x 10”
ENC 7XL 19” x 19” x 10”
seven I/O cards).
Warranty
Three years against defects in materials and
workmanship.
OV-17
CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW
This is a blank page.
OV-18
SECTION 1. FUNCTIONAL MODES
1.1 PROGRAM TABLES - *1, *2, AND *3
MODES
Data acquisition and processing functions are
controlled by instructions contained in program
tables. Programming can be separated into two
tables, each having its own programmable
execution interval. A third table is available for
programming subroutines which may be called
by instructions in Tables 1 or 2 or by a special
interrupt. The *1 and *2 Modes are used to
access Tables 1 and 2. The *3 Mode is used to
access Subroutine Table 3.
When a program table is first entered, the
display shows the table number in the ID Field
and 00 in the Data Field. Press A and the CR7
will advance to the execution interval. If there is
an existing program in the table, enter an
instruction location number prior to A and the
CR7 will advance directly to the instruction (e.g.,
5 will advance to the fifth instruction in the
table).
1.1.1 EXECUTION INTERVAL
The execution interval is entered in units of
seconds as follows:
0.0125 .... 0.1 seconds, in multiples of 0.0125
0.1 .....6553 seconds, in multiples of 0.1 second
Intervals less than 0.1 second are allowed in
Table 1 only. Execution of the table is repeated
at the rate determined by this entry. The table
will not be executed if 0 is entered. Values less
than 0.1 are rounded to the nearest even
multiple of 0.0125. If the Interval is 0.1 or
greater, the CR7 will not allow entry of digits
beyond 0.1.
The rate at which the CR7 can execute a given
table must not be confused with the sample
rates for the measurements contained within
the table. When a table is executed and a
measurement is made, the Control Module
instructs the I/O Module which measurement to
make and how many times to repeat it on
successive channels. The I/O module then
repeats the measurement as fast as possible
and stores the data until the Control Module is
ready for it. The Control Module takes the raw
data and scales it as required by the instruction
initiating the measurement. The next instruction
in the table is not executed until the scaling is
completed. The maximum sample rate for a
measurement is the rate at which the I/O
Module can make a number of measurements
specified by a single input instruction. Because
the sample rate does not include the processing
time required to scale the measurements into
engineer units, the execution time of an
instruction will be greater than the sample rate
for the measurement specified by the
instruction. The execution times for the
instructions are given in Section 3.9.
The throughput rate is the rate at which a
measurement can be made and the resulting
value stored in Final Storage. The maximum
throughput rate for fast single ended
measurements is approximately 310
measurements per second.
If the specified execution interval for a table is
less than the time required to process that
table, the CR7 overruns the execution interval,
finishes processing the table and waits for the
next occurrence of the execution interval before
again initiating the table (i.e., when the
execution interval is up and the table is still
executing, that execution is skipped). Since no
advantage is gained in the rate of execution
with this situation, it should be avoided by
specifying an execution interval adequate for
the table processing time.
NOTE: Whenever an overrun occurs,
decimal points are displayed on both sides
of the sixth digit of the CR7 display (e.g., L
O.G. in the *0 Mode).
When the Output Flag is set high, extra time is
consumed by final output processing. It may
be acceptable if the execution interval is
exceeded at this time. For example, suppose it
is desired to measure every 0.1 seconds and
output processed data every ten minutes. The
table requires less than 0.1 seconds to process
except when output occurs (every 10 minutes).
With final output processing the time required is
one second. With the execution interval set at
0.1 seconds, and a one second lag between
samples once every 10 minutes, 10
measurements out of 6000 (.17%) are missed:
an acceptable statistical error for most
populations.
1-1
SECTION 1. FUNCTIONAL MODES
1.1.2 SUBROUTINES
Table 3 is used to enter subroutines which may
be called with Program Control Instructions in
Tables 1 and 2 or other subroutines. The group
of instructions which form a subroutine starts
with Instruction 85, Label Subroutine, and ends
with Instruction 95, End. (Section 12)
1.1.3 TABLE PRIORITY/INTERRUPTS
Table 1 execution has priority over Table 2. If
Table 2 is being executed when it is time to
execute Table 1, Table 2 will be interrupted.
After Table 1 is completed, Table 2 resumes at
the point of interruption. If the execution interval
of Table 2 coincides with Table 1, Table 1 will
be executed first, followed by Table 2.
Interrupts by Table 1 are not allowed in the
middle of a measurement or while output to
Final Storage is in process (the Output Flag,
flag 0, is set high). The interrupt occurs as
soon as the measurement is completed or flag
0 is set low.
1.1.4 COMPILING A PROGRAM
1.2 SETTING AND DISPLAYING THE
CLOCK - *5 MODE
The *5 Mode is used to display time or change
the year, day of year, or time. When *5 is
pressed, the current time is displayed. The time
parameters displayed in the *5 Mode are given
in Table 1.2-1.
The CR7 powers-up with hours and minutes set
to 0 and the day and year set for the date that
the PROMs were first released by Campbell
Scientific. To set the year, day, or time, enter
the *5 Mode and advance to display the
appropriate value. Key in the desired number
and enter the value by pressing A. When a new
value for hours and minutes is entered, the
seconds are set to zero and current time is
again displayed. To exit the *5 Mode, press *.
When the time is changed, a partial recompile
is done automatically to resynchronize program
execution with real time. The resynchronization
process can change the interval of a pulse rate
measurements for one execution interval as
explained in the PULSE COUNT Instruction 3 in
Section 9.
When a program is entered, or any changes are
made in the *1, *2, *3, *4, *A, or *C Modes, the
program must be compiled before it starts
running. The compile function checks for
programming errors and optimizes program
information for execution. If errors are
detected, the appropriate error codes are
indicated on the Display (Section 3.10).
Compiling occurs when the *0 , *6, or *B Modes
are entered and prior to saving a program listing
in the *D Mode. Compiling only occurs after a
program change has been made; subsequent
use of any of these Modes does not cause
compiling.
Compiling with the *0, *B, or *D Mode sets
all output ports and flags low and resets the
timer (Instruction 26) and all data in Input
and Intermediate Storage to ZERO.
When the *6 Mode is used to compile data
in Input Storage, the state of flags, control
ports, and the timer are UNALTERED.
Compiling always zeros Intermediate
Storage.
TABLE 1.2-1. Sequence of Time Parameters
in *5 Mode
Display
KeyID:DATADescription
*5:HH:MM:SSDisplay current time
A05:XXDisplay/enter year
A05:XXXXDispl ay/enter day of y ear
A05:HH:MM:Display/enter
hours:minutes
1.3 DISPLAYING AND ALTERING INPUT
MEMORY OR FLAGS - *6 MODE
The *6 Mode is used to display or change Input
Storage values and to toggle and display user
flags. If the *6 Mode is entered immediately
following any changes in program tables or the
*4 Mode, the programs will be compiled and
execution will begin.
When the *6 Mode is used to compile data
values contained in Input Storage, the state of
flags, control ports, and the timer are
UNALTERED. Compiling always zeros
Intermediate Storage.
1-2
SECTION 1. FUNCTIONAL MODES
TABLE 1.3-1. *6 Mode Commands
KeyAction
AAdvance to next location or enter new
value
BBack-up to previous location
CChange value in displayed location(Key
C, then value, then A)
DDisplay/alter user flags
#Display current location and allow a
location no. to be keyed in, followed by
A to jump to that location
*Exit *6 Mode
1.3.1 DISPLAYING AND ALTERING INPUT
STORAGE
When *6 is keyed, the display will read
"06:0000". One can advance to view the value
stored in Input Storage location 1 by pressing A.
To go directly to a specific location, key in the
location number before keying A. For example,
to view the value contained in Input Storage
location 20, key in *6 20 A. The ID portion of
the display shows the last two digits of the
location number. If the value stored in the
location being monitored is the result of a
program instruction, the value will be updated
each time the instruction is executed.
Values may be entered into input locations
using the change command, C. While viewing
the contents of the input location in which the
value is to be entered, key C; the location
number in the ID field will disappear. Key in the
desired value and then enter it by pressing A.
If an algorithm requires parameters to be
manually modified during execution of the
program WITHOUT INTERRUPTION of the
Table execution process, the parameters can
be loaded in Input Storage locations and the *6
Mode can be used to change the values. If
values must be in place before program
execution commences, use Instruction 91 at the
beginning of the program table to prevent
execution until a flag is set high (see next
section). The initial values can be entered into
input locations using the *6 Mode after
compiling the table. The flag can then be set
high to enable the table(s).
If any program tables *1, *2, *3, or *4 output
options are altered and complied in the *0
Mode, values in Input Storage will be set to 0.
To preserve values entered in Input Storage,
compile with *6.
1.3.2 DISPLAYING AND TOGGLING USER
FLAGS
If D is keyed while the CR7 is displaying a
location value, the current status of the user flags
will be displayed in the following format:
"00:01:00:10". The characters represent the
flags, the left-most digit represents Flag 1 and
right most Flag 8. A "0" indicates the flag is low
and a "1" indicates the flag is high. In the above
example, Flags 4 and 7 are set high. To toggle a
flag, simply key the corresponding number. To
return to displaying the input location, press A.
Entering appropriate flag tests into the program
allows manual control of program execution.
For example: It is desired to be able to
manually start the execution of Table 2.
Instruction 91 is the first instruction entered in
Table 2:
01:P91If Flag
01:255 is set low
02:0Go to end of program table
If Flag 5 is low, all subsequent instructions in
Table 2 will be skipped. Flag 5 can be toggled
from the *6 Mode, effectively starting and
stopping the execution of Table 2.
1.3.3 DISPLAYING AND TOGGLING PORTS
The current status of the Digital Control ports on
the active 725 excitation card can be displayed
by hitting "0" while looking at an input location
(e.g., *6A0). Ports are displayed left to right as
C8, C7, ..., C1 (exactly opposite to the flags). A
port can be toggled by pressing its number on
the keypad while in the port display mode.
The active excitation card defaults to address 1.
The active card may only be changed with
Instruction 20 in the CR7 Program (Section 9).
1.4 COMPILING AND LOGGING DATA *0 MODE
When the *0 Mode is entered after
programming the CR7, the program is compiled
(Section 1.1.4) and the display shows "LOG"
and the numbers of the program tables that
were enabled at compilation. The display is not
updated after entering *0.
1-3
SECTION 1. FUNCTIONAL MODES
When the *0, *B, or *D Mode is used to compile,
all output ports and flags are set low, the timer
(Instruction 26) is reset, and data in Input and
Intermediate Storage are RESET TO ZERO.
The CR7 should normally be left in the *0 Mode
when logging data. This Mode requires slightly
less power than Modes which frequently update
the display.
1.5 MEMORY ALLOCATION - *A
1.5.1 INTERNAL MEMORY
There are eight sockets on the CR7 CPU board
which are used for Read Only Memory (ROM)
or Random Access Memory (RAM). The basic
CR7 is provided with 64K of memory: three 8K
Programmable Read Only Memory (PROM)
chips for a total of 24K ROM and five 8K RAM
chips. Appendix E describes how to change
RAM and ROM chips.
When powered up, the CR7 displays HELLO
while performing a memory check. As the
check is performed, a number on the right of
the display is incremented as each 8 K block of
memory is checked. With standard memory the
count will stop at 8. If additional memory
card(s) are present, the count will proceed
accordingly. The Power-up memory check is
quite extensive and can take considerable time
if the 709 512K Memory Card is installed. To
abort the extensive test (a shorter version is still
performed), press the # key. When the memory
test is completed, the number of K bytes of
RAM plus ROM is displayed.
There are 1744 bytes allotted to program
memory. This memory may be used for one
program table or shared among all program
tables. Tables 3.9-1 to 3.9-4 list the amount of
memory used by each program instruction.
Input Storage is used to store the results of
Input/Output and Processing Instructions. The
values stored in input locations may be
displayed using the *6 Mode (Section 1.3).
Intermediate Storage is used by Output
Processing Instructions to store the results of
intermediate calculations necessary for
averages, standard deviations, histograms, etc.
Final Storage holds output data, the results of
Output Processing Instructions which are stored
when the Output Flag is set high (Section 3.7).
The data in Final Storage can be displayed
using the *7 Mode (Section 2.3).
Figure OV2-1 illustrates the use of Input,
Intermediate, and Final Storage.
Each Input or Intermediate Storage location
requires four bytes of memory. Each Final
Storage location requires 2 bytes of memory.
Low resolution data points require 1 Final
Storage location and high resolution data points
require 2. Section 2 describes Final Storage
and data retrieval in detail.
Table 1.5-1 lists the basic memory areas and
the amount of memory allotted to them in the
standard CR7.
The size of RAM, including any additional
memory cards which may be present, can be
determined with the *A Mode (Section 2.4.2)
*A01: XXXXThe number of memory locations currently allocated to Input Storage. This
value can be changed by keying in the desired number (minimum of 32,
maximum limited by available memory).
A02: XXXXThe number of memory locations currently allocated to Intermediate Storage.
This value can be changed by keying in the desired number (limited by available
memory).
A03: XXXXXThe number of memory locations currently allocated to Final Storage. This
number is automatically altered when the number of memory locations in Input
and/or Intermediate Storage is changed. A minimum of 768 locations are
always retained in Final Storage.
A04:XXXXThe number of bytes remaining in Program memory (1744 bytes total).
Entering 1744 will ERASE ALL MEMORY and put the CR7 through the initial
power-up routine.
1.5.2 *A MODE
The *A Mode is used to 1) determine the
number of locations allocated to Input,
Intermediate, and Final Storage; 2) repartition
this memory; 3) check the number of bytes
remaining in program memory; 4) erase Final
Storage; and 5) to completely reset the
datalogger. When *A is keyed, the first value
displayed is the number of memory locations
allocated to Input Storage. Press A to advance
through the memory values. Table 1.5-2
describes what the values seen in the *A Mode
represent.
The numbers of memory locations allocated to
Input, Intermediate and Final Storage default at
power-up to the values in Table 1.5-1.
The sizes of Input and Intermediate Storage
may be altered by keying in the desired value
and entering it by keying A. The size of Final
Storage will be adjusted automatically.
One input or Intermediate Storage location can
be exchanged for two Final Storage locations
and vice-versa. Input and Intermediate Storage
must reside in the CPU board RAM. If
additional memory boards are present, it is
possible to use all of the CPU board RAM for
Input and Intermediate Storage. A minimum 32
Input and 768 Final Storage locations will
ALWAYS be retained. If no Intermediate
Storage is required, its size may be reduced to
0.
All data in Intermediate and Final Storage are
erased when memory is repartitioned. This
feature may be used to clear memory without
altering programming. The number of locations
does not actually need to be changed; the same
value can be keyed in and entered. After
repartitioning memory, the Tables must be
recompiled. Recompiling with *0 erases Input
Storage; recompiling with *6 leaves Input
Storage unaltered.
If Intermediate Storage size is too small to
accommodate the programs or instructions
entered, the program will not compile and the
"E:04" ERROR CODE will be displayed; the size
of Intermediate Storage must be increased
before the program will compile. Final Storage
size can be maximized by limiting Intermediate
Storage size to the minimum number of
memory locations necessary to accommodate
the programs entered. The number of Final
Storage locations and the rate at which data are
stored determines how long it will take for Final
Storage to fill, at which point new data will write
over old.
1.6 MEMORY TESTING AND SYSTEM
STATUS - *B
The *B Mode is used to 1) read the signature of
the program memory and the software PROMs,
2) display the power-up memory status, 3)
display the number of E08 occurrences
(Section 3.10), 4) display the number of overrun
occurrences (Section 1.1.1), and 5) display
PROM version and revision number. Table 1.6-
1-5
SECTION 1. FUNCTIONAL MODES
1 describes what the values seen in the *B
Mode represent. The correct signatures of the
CR7 PROMs are listed in Appendix B.
A signature is a number which is a function of
the data and the sequence of data in memory.
It is derived using an algorithm which assures a
99.998% probability that if either the data or its
sequence changes, the signature changes.
The signature of the program memory is used
to determine if the program tables have been
altered. During the self check on power-up, the
signature computed for a PROM is compared
with a signature stored in the PROM to
determine if a failure has occurred. The
algorithm used to calculate the signature is
described in Appendix C.
The contents of windows 8 and 9, PROM
version and version revision, are helpful in
determining what PROM is in the datalogger.
Over the years, several different PROM
versions have been released, each with
operational differences. When calling Campbell
Scientific for datalogger assistance, please
have these two numbers available.
TABLE 1.6-1. Description of *B Mode Data
KeyDisplay
EntryID: DataDescription of Data
*B01: XXXXXProgram memory
Signature. The value is
dependent upon the
programming entered
and memory allotment. If
the Tables have not been
previously compiled, they
will be compiled and run.
A02: XXXXXFirst PROM Signature
A07: XXXXXNo. of overrun
occurrences (Key in 88 to
reset)
A08: X.XXXXPROM version number
A09: XXXX.Version revision number
A01:00Enter I/O Module No. to
test (usually 1)
1A01:XXXXXI/O Module 1 RAM
Signature
01:XXXXXI/O Module 1 PROM
Signature
1.7 *C MODE -- SECURITY
The *C Mode is used to secure the user's
program information. If security is activated,
then the CR7 will block keyboard access to the
*1, *2, *3, *4, and *A Modes. Activated security
will also block Telecommunications access to
the *1, *2, *3, *4, *5, and *D Modes and the
Telecommunications C command. A four digit
password allows entry to the *C Mode and
becomes part of the program memory, affecting
the program signature. If security is enabled
when *C is keyed, the password must be keyed
in before one can advance to window 1. If
security is disabled, keying *C brings up window
1 immediately. In window 1 a command can be
entered to either enter a new password (1), or
temporarily disable security (00) in order to
check or alter the programming. The password
on power-up is 0000 (unless *D was used to
create a custom PROM with the password built
in), which disables security. When security is
temporarily disabled, it is possible to enter all
modes and to alter programming. Keying *0 or
*6 will automatically re-enable security, unless
the password is 0000.
Entering the four digit password as an indexed
value (i.e. xxxx--, entered by keying C after
entering the four digits) blocks access to the *1,
*2, *3, *4, and *A Modes, but allows the user to
view and change the password.
SECTION 1. FUNCTIONAL MODES
TABLE 1.7-1. *C Mode Entries and Codes
KeyDisplay
EntryID: DataDescription
*C12:0000Enter current password.
If correct, then advance,
else exit *C Mode. 12:00
indicates *C Mode is not
in PROMs. If security is
disabled, *C advances
directly to window 1.
A01:00Window 1, enter
command:
00 = disable security and
advance to window
2; subsequent *0 or
*6 enables security.
01 = security remains
enabled, but it
advances to window
2 and allows entry of
a new password.
A02:XXXXSet new password
(XXXX is current
password).
TABLE 1.8-1. *D Mode Commands
CommandDescription
1Save ASCII Program
2Load ASCII Program
71Save/Load/Clear Program
from Storage Module
A command is entered by keying the command
number and A. When Command 1, 2, or 71 is
entered, the command number is displayed in
the ID field. The user must then key in a baud
rate code for command 1 or 2 or the command
code for the Storage Module (Table 1.8-2).
After the code is keyed in, key A to execute the
command. After a command is executed,
"13:0000" is displayed; *D must be entered
again before another command can be given.
If the CR7 program has not been compiled
when a command to save the program is
entered, it will be compiled before the command
is executed.
TABLE 1.8-2. *D Mode Baud Rate and
Storage Module Codes
AReturns to window 1.
Entering 0000 disables
security (window 1 must
be set to 0).
1.8 *D MODE -- SAVE OR LOAD
PROGRAM
The *D Mode allows the user's program
information in the *1, *2, *3, *4, *A, *C (if OSX-
0), and *B Modes to be output to or loaded from
printer/computer (ASCII) or SM192/716 Storage
Module. Table execution and on-line printer
outputs are suspended while in the *D Mode.
When *D is keyed, the CR7 will display "13:00".
BAUD RATESTORAGE MODULE
CODESCOMMAND CODES
0 - 300 baud1X Save Program X to
1 - 1200Storage Module
2 - 9600(X=1-8)
3 - 76,8002X Load Program X from
Storage Module
(X=1-8)
3X Erase Program X from
Storage Module
(X=1-8)
1-7
SECTION 1. FUNCTIONAL MODES
All data in Input, Intermediate and Final
Storage are erased when a command to load
a program is executed or when a program is
written to tape.
If nothing is received within 30-40 seconds after
giving the command to load a program, the
command will be aborted and an error code
displayed (E99 for Storage Module or ASCII).
Commands 1, 2, and 71 are the only
commands that can be executed via
telecommunications (Section 5). For
commands 1 and 2, the CR7 will use the baud
rate already established in telecommunications
and will be ready to receive or send the file as
soon as the command is received.
TABLE 1.8-3. Progr am Load Error Codes
E 98Uncorrectable errors detected
E 99Wrong type of file or no data received
1.8.1 TRANSFER TO COMPUTER/PRINTER
This section describes commands 1 and 2
(Table 1.8-1). The PC208 Software
automatically uses these commands for
uploading and downloading programs.
SENDING ASCII PROGRAM INFORMATION
TABLE 1.8-4. Example Program Listing
From *D Command 1
MODE 1
SCAN RATE 2
1:P17
1:1
1:P0
2:P14
1:1
2:1
3:5
4:1
5:1
6:2
7:1
8:0
3:P92
1:0
2:5
3:10
MODE 1
SCAN RATE 2
4:P71
1:2
2:1
Command 1 is to send the program listing in
ASCII. At the end of the listing, the CR7 sends
control E (5 hex or decimal) twice. Except when
in telecommunications, the baud rate code must
be entered after command 1.
Table 1.8-4 is an example of the program listing
sent in response to command 1 (the actual
listing is in one column but is printed in two
columns to save space). Note that the listing
uses numbers for each mode: The numbers for
*A, *B, and *C modes are 10, 11, and 12,
respectively.
5:P0
MODE 2
SCAN RATE 0
MODE 3
MODE 4
1:0
2:0
MODE 10
1:28
2:64
3:19328
4:934
MODE 12
1:0
2:0
MODE 2
SCAN RATE 0
1-8
SECTION 1. FUNCTIONAL MODES
LOAD PROGRAM FROM ASCII FILE
Command 2 sets up the CR7 to load a serial
ASCII program. The format is the same as sent
in response to command 1 (Table 1.8.4).
Except when in telecommunications, the baud
rate code must be entered after command 2.
A download file need not follow exactly the
same format that is used when listing a program
(i.e., some of the characters sent in the listing
are not really used when a program is loaded).
Some rules which must be followed are:
1. "M" must be the first character other than a
carriage return (CR) or line feed (LF). The
"M" serves the same function as "*" does
from the keyboard. The order that the
Modes are sent in does not matter (i.e., the
information for Mode 4 could be sent before
that for Mode 1).
2. "S" is necessary prior to the execution
interval (Scan rate ).
3. The colons (:) are used to mark the start of
actual data.
4. A semicolon (;) tells the CR7 to ignore the
rest of the line and can be used after an
entry so that a comment can be added.
There are 4 two-character control codes which
may be used to verify that the CR7 receives a
file correctly:
As a download file is received, the CR7 buffers
the data in memory; the data is not loaded into
the editor or compiled until the CR7 receives a
command to do so. The minimum file that
could be sent is the program listing, then ^E^E.^C^C tells the CR7 to send the signature
(Section C.3) for the current buffer of data. If
this signature does not match that calculated by
the sending device, ^B^B can be sent to
discard the current buffer and reset the
signature. If the signature is correct, ^D^D can
be sent to tell the CR7 to load the buffer into the
editor and reset the signature. Once the
complete file has been sent and verified, send
^E^E to compile the program and exit the load
command.
1.8.2 PROGRAM TRANSFER WITH STORAGE
MODULE
The SM192/716 Storage Module must be
connected to the CR7. Key *D, then enter
command 71. The command to save, load, or
clear a program and the program number
(Table 1.8-2) is entered. After the operation is
finished, "13:0000" is displayed.
The datalogger can be programmed on powerup using a Storage Module. Storage Modules
can store up to eight separate programs. If a
program is stored as program number 8, and if
the Storage Module is connected to the
datalogger serial port at power-up, program
number 8 is downloaded to the datalogger and
compiled.
^B ^B(2hex, 2hex) Discard current buffer
and reset signature
^C ^C (3hex, 3hex) Send signature for
current buffer
^D ^D (4hex, 4hex) Load current buffer and
reset signature
^E ^E(5hex, 5hex) Exit and compile program
1-9
SECTION 1. FUNCTIONAL MODES
This is a blank page.
1-10
SECTION 2. INTERNAL DATA STORAGE
2.1 FINAL STORAGE AREAS, OUTPUT
ARRAYS, AND MEMORY POINTERS
Final Storage is that portion of memory where
final, processed data are stored. Data must be
sent to Final Storage before they can be
transferred to a computer or external storage
peripheral.
The size of Final Storage is expressed in terms
of memory locations or bytes. A low resolution
data point (4 decimal characters) occupies one
memory location (2 bytes), whereas a high
resolution data point (5 decimal characters)
requires two memory locations (4 bytes). Table
1.5-1 shows the default allocation of memory
locations to Input, Intermediate, and Final
Storage. The *A Mode is used to reallocate
memory or erase Final Storage (Section 1.5). A
minimum of 768 memory locations will
ALWAYS be retained in Final Storage.
Final Storage can be represented as ring
memory (Figure 2.1-1) on which the newest
data are written over the oldest data.
that output array. For example, the ID of
118 in Figure 2.1-2 indicates that the 18th
instruction in Table 1 set the Output Flag
high.
FIGURE 2.1-2. Output Array ID
2) The output array ID can be set by the user
with the second parameter of Instruction 80
(Section 11). The ID can be set to any
positive integer up to 511. Instruction 80
must follow the instruction which set the
Output Flag high. This option allows the
user to make the output array ID
independent of the programming. The
program can be changed (instructions
added or deleted) without changing the
output array ID. This avoids confusion
during data reduction, especially on long
term projects where program changes or
updates are likely.
FIGURE 2.1-1. Ring Memory Representation
of Final Data Storage
Output Processing Instructions store data into
Final Storage only when the Output Flag is set
high. The string of data stored each time the
Output Flag is set high is called an outputarray. The first data point in the output array is
a 4 digit Output Array ID. This ID number is
set in one of two ways:
1) In the default condition, the ID consists of
the program table number and the
Instruction Location Number of the
instruction which set the Output Flag for
NOTE: If Instruction 80 is used to
designate Final Storage and parameter 2 is
0, the output array ID is determined by the
position of Instruction 80 or by the position
of the instruction setting the Output Flag,
whichever occurs last.
Data are stored in Final Storage before being
transmitted to an external device. There are
four pointers which are used to keep track of
data transmission. These pointers are:
1. Data Storage Pointer (DSP)
2. Display Pointer (DPTR)
3. Printer Pointer (PPTR)
4. Telecommunications (Modem) Pointer (MPTR)
2-1
SECTION 2. IN TERNAL DATA STORAGE
The Data Storage Pointer (DSP) is used to
determine where to store each new data point in
the Final Storage area. The DSP advances to
the next available memory location after each
new data point is stored.
The DPTR is used to recall data to the LCD
display. The positioning of this pointer and data
recall are controlled from the keyboard (*7
Mode).
The PPTR is used to control data transmission
to a printer, Storage Module, or other serial
device. Whenever on-line printer transfer is
activated (*4 Mode or Instruction 96), data
between the PPTR and DSP are transmitted.
When on-line transfer to a SM192/716 Storage
Module is activated by Instruction 96 with output
code 30, data is transmitted each time an
output array is stored in Final Storage IF THE
STORAGE MODULE IS CONNECTED TO THE
CR7. If the Storage Module is not connected,
the CR7 does not transmit the data nor does it
advance the PPTR to the new DSP location. It
saves the data until the Storage Module is
connected. Then, during the next execution of
Instruction 96, the CR7 outputs all of the data
between the PPTR and the DSP and updates
the PPTR to the DSP location (Section 4.1)
The MPTR is used in transmitting data over a
telecommunications interface. When
Telecommunications is first entered, the MPTR
is set to the same location as the DSP.
Positioning of the MPTR is then controlled by
commands from the external calling device
(Section 5.1).
NOTE: All memory pointers are set to the
DSP location when the datalogger compiles
a program. For this reason, ALWAYS
RETRIEVE UNCOLLECTED DATA
BEFORE MAKING PROGRAM CHANGES.
2.2 DATA OUTPUT FORMAT AND
RANGE LIMITS
Data are stored internally in Campbell
Scientific's Final Storage Format (Appendix
C.2). Data may be sent to Final Storage in
either LOW RESOLUTION or HIGH
RESOLUTION format. Low resolution is the
default. To change the resolution, Instruction
78 (Section 11) must precede the Output
Instructions in the program table.
2.2.1 RESOLUTION AND RANGE LIMITS
Low resolution data is a 2 byte format with 3 or
4 significant digits and a maximum magnitude
of ±6999. High resolution is a 4 byte format
with 5 significant digits and a maximum possible
output value of ±99999 (see Table 2.2-1 below).
TABLE 2.2-1. Resolution Range Limits of
CR7 Data
MinimumMaximum
ResolutionZeroMagnitude M agnitude
Low0.000±0.001±6999.
High0.0000±.00001±99999.
The resolution of the low resolution format is
reduced to 3 significant digits when the first (left
most) digit is 7 or greater (Table 2.2-2). Thus, it
may be necessary to use high resolution 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 70 feet for low
resolution output to display the 0.01 foot
increment. If the water level is expected to
range from 50 to 80 feet the data could either
be output in high resolution or could be offset by
20 feet (transforming the range to 30 to 60 feet).
2-2
SECTION 2. IN TERNAL DATA STORAGE
TABLE 2.2-2. Decimal Location in Low
Resolution Format
Absolute ValueDecimal Location
0 -6.999X.XXX
7 -69.99XX.XX
70 - 699.9XXX.X
700 - 6999.XXXX.
While output data have the limits described
above, the computations performed in the CR7
are done in floating point arithmetic. Values are
rounded when converting to Final Storage
Format.
2.2.2 INPUT AND INTERMEDIATE STORAGE
DATA FORMAT
In Input and Intermediate Storage, numbers are
stored and processed in a binary format with a
23 bit binary mantissa and a 6 bit binary
exponent. The largest and smallest numbers
that can be stored and processed are 9 x 10
and 1 x 10
number determines the resolution of the
arithmetic. A rough approximation of the
resolution is that it is better than 1 in the
seventh digit. For example, the resolution of
97,386,924 is better than 10. The resolution of
0.0086731924 is better than 0.000000001.
A precise calculation of the resolution of a
number may be determined by representing the
number as a mantissa between .5 and 1
multiplied by 2 raised to some integer power.
The resolution is the product of that power of 2
and 2
.9336 * 29, the resolution is 29 * 2
0.0000305. A description of Campbell
Scientific's floating point format may be found in
the description of the J and K
telecommunications commands in Appendix C.
-19
, respectively. The size of the
-24
. For example, representing 478 as
-24
= 2
-15
18
=
2.3 DISPLAYING STORED DATA ON
KEYBOARD/DISPLAY - *7 MODE
The *7 Mode is used to display Final Storage
data. Enter the Mode by keying *7. The display
will show "07:XXXXX", whe re XXXXX is the
Final Storage location (DSP) where the next
data will be stored. Two options are available:
1. Press A to advance and display the
output array ID of the oldest array in
Final Storage.
2. Enter a Final Storage location number.
When A is pressed, the DPTR will jump
to the location entered and, if it is not at
the start of an array, advance to the first
start of array. The display will show the
Array ID.
Repeated use of the A key advances through
the output array, while use of the B key backs
the DPTR through memory.
The Final Storage location of the data point
being viewed may be displayed by keyi ng #. At
this point, another location may be entered
followed by A to jump to the start of the output
array equal to or just ahead of the location
entered. Whenever a location number is
displayed by keying #, the corresponding data
point can be displayed by keying C. To
advance to the start of the next output array,
key #A. To back up one output array, key #B.
TABLE 2.3-1. *7 Mode Command Summary
KeyAction
AAdvance to next data point
BBack-up to previous data point
#Display location number of currently
displayed data point value
CDisplay value of current location
#AAdvance to start of next output array
#BBack-up to previous output array
2-3
SECTION 2. IN TERNAL DATA STORAGE
This is a blank page.
2-4
SECTION 3. INSTRUCTION SET BASICS
The instructions used to program the CR7 are divided into four types: Input/Output (I/O), Processing,
Output Processing, and Program Control. I/O Instructions are used to make measurements and store
the readings in input locations or to initiate analog or digital port output. Processing Instructions perform
numerical operations using data from Input Storage locations and place the results back into specified
Input Storage locations. Output Processing Instructions provide a method for generating time or event
dependent data summaries from processed sensor readings residing in specified Input Storage
locations. Program Control Instructions are used to direct program execution based on time and/or
conditional tests on input data and to direct output to external devices.
Instructions are identified by a number. Each instruction has a number of parameters which give the
CR7 the information it needs to execute the instruction.
The set of instructions available in the CR7 is determined by the Programmable Read Only Memory
chips (PROMS) that are installed. Appendix B lists the software options available.
3.1 PARAMETER DATA TYPES
There are three different data types used for
Instruction parameters: Floating Point (FP), 4
digit integers (4), and 2 digit integers (2). In the
listings of the instruction parameters (Sections
9-12), the parameter data type is identified by its
abbreviation. Different data types are used to
allow the CR7 to make the most efficient use of
its memory.
Floating Point parameters are used to enter
numeric constants for calibrations or arithmetic
operations. While it is only possible to enter five
digits (magnitude ±.00001 to ±99999.), the
internal format has a much greater range
-19
(1x10
to 9x1018, Section 2.2.1).
3.2 REPETITIONS/CARD NUMBER
The repetitions parameter on many of the I/O,
Processing, and Output Processing Instructions
is used to repeat the instruction on a number of
sequential Input Channels or Input Storage
locations. Separate parameters are used to
specify the card and input channel on which to
make the first measurement. For example, if
you have four differential voltage
measurements to make on the same voltage
range, wire the inputs to sequential channels
and instead of entering the Differential Voltage
Measurement Instruction 4 times, enter it once
with four repetitions. The instruction will make
four measurements starting on the specified
channel number and continuing through the
three succeeding differential channels, with the
results being stored in the specified input
location and the three succeeding input
locations. Averages for all four measurements
can be calculated by entering the Average
Instruction with four repetitions.
The CR7 will automatically continue repetitions
from the last channel of one card to the first
channel of the next sequentially numbered
723(-T) Analog Input Card or 725 Pulse Counter
Card. Measurements on the 726 50 volt Analog
Input Card will not advance correctly from one
card to the next; enter separate measurement
instructions for each card.
When several of the same type of
measurements are to be made but the
calibrations of the sensors are different, it
requires less time to use a single measurement
instruction with repetitions and then apply the
calibrations with Instruction 53 than it does to
enter the instruction several times in order to
use different multipliers and offsets. This is due
to the set up and calibration time for each
measurement instruction. However, if time is
not a constraint, separate instructions may
make the program easier to follow.
3.3 ENTERING NEGATIVE NUMBERS
After keying in a number, press C or "-" to
change the number's sign. On floating point
numbers, a minus sign (-) will appear to the left
of the number.
Excitation voltages in millivolts for I/O
Instructions are 4 digit integers; when C is
pressed, minus signs (-) will appear to the right
of the number indicating a negative excitation.
3-1
SECTION 3. INSTRUCTION SET BASICS
Even though this display is the same as that
indicating an indexed input location, (Section
3.4) there is no indexing effect on excitation
voltage.
3.4 INDEXING INPUT LOCATIONS
When used within a Loop, the parameters for
input locations can be Indexed to the loop
counter. The loop counter is added to the
indexed value to determine the actual input
location the instruction acts on. Normally, the
loop counter is incremented by one after each
pass through the loop. Instruction 90, Step
Loop Index, allows the increment step to be
changed. See Instructions 87 and 90, Section
12, for more details.
To index an input location (4 digit integer), key
C after keying the value but before entering the
parameter. Two minus signs (-) will be
displayed to the right of the parameter.
3.5 VOLTAGE RANGE AND
OVERRANGE DETECTION
The RANGE code parameter on Input/Output
Instructions is used to specify the full scale
voltage range of the measurement and the
integration period for the measurement (Table
3.5-1).
Select the smallest full scale range that is
greater than or equal to the full scale output of
the sensor being measured. Using the smallest
possible range will result in the best resolution
for the measurement.
Two different integration sequences are
possible. The slow integration, 16.67
milliseconds, is one 60 Hz cycle and rejects
noise from 60 Hz AC line power as well as
having better rejection of random noise than the
fast integration. A PROM with 50Hz rejection is
available for countries whose electric utilities
operate at 50 Hz (Appendix B).
When a voltage input exceeds the range
programmed, the value stored is the maximum
negative number, displayed in the *6 Mode as
-99999. In output data from Final Storage, this
becomes -6999 in low resolution or -99999. in
high resolution.
An input voltage greater than +8 volts on one of
the analog inputs will result in errors and
possible overranging on the other analog inputs.
Voltages greater than 16 volts may permanently
damage the CR7.
*Differential measurement, resolution for single-ended measurement is twice value shown.
3.6 OUTPUT PROCESSING
Most Output Processing Instructions require
both an intermediate processing operation and
a final processing operation. For example,
when the Average Instruction, 71, is executed,
the intermediate processing operation
increments a sample count and adds each new
Input Storage value to a cumulative total
residing in Intermediate Storage. When the
Output Flag is set, the final processing
operation divides the total by the number of
3-2
SECTION 3. INSTRUCTION SET BASICS
sample counts, stores the resulting average in
Final Storage and zeros the value in
Intermediate Storage so that the process starts
over with the next execution.
Final Storage is the default destination of data
output by Output Processing Instructions
(Sections OV2, 1.5, 2.1). Instruction 80 may be
used to direct output to Input Storage or to Final
Storage.
Output Processing Instructions requiring
intermediate processing sample the specified
input location(s) each time the Output
Instruction is executed, NOT necessarily each
time the location value is updated by an I/O
Instruction. For example: Suppose a
temperature measurement is initiated by Table
1 which has an execution interval of one
second. The instructions to output the average
temperature every 10 minutes are in Table 2
which has an execution interval of 10 seconds.
The temperature will be measured 600 times in
the 10 minute period, but the average will be the
result of only 60 of those measurements
because the instruction to average is executed
only one tenth as often as the instruction to
make the measurement.
Final processing occurs only when the Output
Flag is set (Section 3.7.1). The Output Flag,
Flag 0, is set at desired intervals or in response
to specified conditions by using an appropriate
Program Control Instruction (Section 11).
3.7 USE OF FLAGS: OUTPUT AND
PROGRAM CONTROL
There are 10 flags which may be used in CR7
programs. Two of the flags have functions with
Output Processing Instructions: Flag 0 controls
final processing and data storage, and Flag 9
can disable intermediate processing. Flags 1-8
may be used as desired in programming the
CR7. Flags 0 and 9 are automatically set low at
the beginning of the program table. Flags 1-8
remain unchanged until acted on by a Program
Control Instruction or until manually toggled
from the *6 Mode.
TABLE 3.7-1. Flag Description
Flag 0- Output Flag
Flag 1 to 8 - User Flags
Flag 9- Intermediate Processing Disable
Flag
Flags are set with Program Control Instructions.
The Output Flag, Flag 0, and the intermediate
processing disable flag, Flag 9, will always be
set low if the set high condition is not met. The
status of flags 1-8 are not changed if a
conditional test is false.
3.7.1 THE OUTPUT FLAG
A set of processed data values is placed in
Final Storage by Output Processing Instructions
when the Output Flag, Flag 0, is set high. This
set of data is called an output array. The
Output Flag is set according to time or event
dependent intervals using Program Control
Instructions specified by the user. The Output
Flag is set low at the beginning of each table.
Each group of Output Processing Instructions
creating an output array must be preceded by a
Program Control Instruction that sets the Output
Flag.
Output is most often desired at fixed intervals;
this is accomplished with Instruction 92, If Time,
which checks the clock to see if it is X minutes
into a Y minute interval. If the time condition is
met, a command is executed. Output at the
beginning of the interval by making Parameter
1, time into the interval, 0. Parameter 2, the
time interval in minutes, is how often output will
occur; i.e., the Output Interval. Enter 10 for
parameter 3, the command code, to set Flag 0
high. Instruction 92 is followed in the program
table by the Output Instructions which define the
output array desired.
The time interval is synchronized to 24 hour
time; output will occur on each integer multiple
of the Output Interval starting from midnight (0
minutes). If the Output Interval is not an even
divisor of 1440 minutes (24 hours), the last
output interval of the day will be less than the
specified time interval. Output will occur at
midnight and will resume synchronized to the
new day.
3-3
SECTION 3. INSTRUCTION SET BASICS
NOTE: If the Output Flag is already set
high and the test condition of a subsequent
Program Control Instruction acting on the
flag fails, the flag is set low. This feature
eliminates having to enter another
instruction to specifically reset the Output
Flag at the end of an output array before
proceeding to another group of Output
Instructions with a different output interval
(see example in OV4.3).
3.7.2 THE INTERMEDIATE PROCESSING
DISABLE FLAG
The Intermediate Processing Disable Flag, Flag
9, suspends intermediate processing when it is
set high. This flag is used to restrict sampling
for averages, totals, maxima, minima, etc., to
times when certain criteria are met. The flag is
automatically set low at the beginning of the
program table.
As an example, suppose it is desired to obtain a
wind speed rose incorporating only wind speeds
greater than or equal to 4.5 m/s. The wind
speed rose is computed using the Histogram
Instruction 75, and wind speed is stored in Input
location 14, in m/s. Instruction 89 is placed just
before Instruction 75 and is used to set Flag 9
high if the wind speed is less than 4.5 m/s:
NOTE: Flag 9 is automatically reset the
same as Flag 0. If the intermediate
processing disable flag is already set high
and the test condition of a subsequent
Program Control Instruction acting on Flag
9 fails, the flag is set low. This feature
eliminates having to enter another
instruction to specifically reset Flag 9 before
proceeding to another group of test
conditions.
3.7.3 USER FLAGS
Flags 1-8 are not dedicated to a specific
purpose and are available to the user for
general programming needs. The user flags
can be manually toggled from the keyboard in
the *6 Mode (Section 1.3) or from a computer
using TERM's monitor feature. By inserting flag
tests (Instruction 91) at appropriate points in the
program, the user can manually set flags to
direct program execution.
3.8 PROGRAM CONTROL LOGICAL
CONSTRUCTIONS
Most of the Program Control Instructions have a
command code parameter which is used to
specify the action to be taken if the condition
tested in the instruction is true. Table 3.8-1 lists
these codes.
TABLE 3.7-2. Example of the Use of Flag 9
Inst. Param.
Loc. No.EntryDescription
XP89If wind speed < 4.5 m/s
114Wind speed location
24Comparison: <
34.5Minimum wind speed for
histogram
419Set Flag 9 high
X+1P75Histogram
X+2P86Do
129Set Flag 9 Low
TABLE 3.8-1. Command Codes
0 -Go to end of program table
1-9, 79-99 -Call Subroutine 1-9, 79-99
10-19 -Set Flag 0-9 high
20-29 -Set Flag 0-9 low
30 -Then Do
31 -Exit loop if true
32 -Exit loop if false
41-48 -Set port 1 - 8 high*
51-58 -Set port 1 - 8 low*
61-68 -Toggle port 1 - 8*
71-78 -Pulse port 1 - 8* 100 ms
* Port commands default to Excitation Card 1;
Instruction 20 is used to change to another
card.
3.8.1 IF THEN/ELSE COMPARISONS
When Command 30, THEN DO, is used with
one of the IF Instructions, 88-92, the instruction
is followed immediately by instructions to
3-4
SECTION 3. INSTRUCTION SET BASICS
execute if the comparison is true. The Else
Instruction, 94, is optional and is followed by the
instructions to execute if the comparison is
false. The End Instruction, 95, marks the end
of the branching started by the IF Instruction.
Subsequent instructions are executed
regardless of the outcome of the comparison
(Figure 3.8-1).
FIGURE 3.8-1. If Then/Else Execution
Sequence
If Then/Else comparisons may be nested to
form logical AND or OR branching. Figure 3.82 illustrates an AND construction. If conditions A
and B are true, the instructions included
between IF B and the first End Instruction will
be executed. If either of the conditions is false,
execution will jump to the corresponding End
Instruction, skipping the instructions between.
Call subroutine X (86, command=X)
END B (95)
END A (95)
FIGURE 3.8-3. Logical OR Construction
A logical OR can also be constructed by setting
a flag if a comparison is true. (The flag is
cleared before making the comparisons.) After
all comparisons have been made, execute the
desired instructions if the flag is set.
The Begin Case Instruction 93 and If Case
Instruction 83 allow a series of tests on the
value in an input location. The case test is
started with Instruction 93 which specifies the
location to test. A series of Instructions 83 are
then used to compare the value in the location
with fixed values. When the value in the input
location is less than the fixed value specified in
Instruction 83 the command in that Instruction
83 is executed; when the next Instruction 83 is
encountered, execution branches to the END
Instruction 95 which closes the case test (see
Instruction 93).
3.8.2 END, INSTRUCTION 95
END, Instruction 95, is required to mark the end
of:
1. A Subroutine (starts with Instruction 85)
2. A Loop (starts with Instruction 87)
3. An IF ... THEN DO sequence (starts with
one of Instructions 89-93 with the THEN DO
command 30).
4. A case statement (starts with Instruction 93)
FIGURE 3.8-2. Logical AND Construction
Figure 3.8-3 illustrates the instruction sequence
that will result in subroutine X being executed if
either A or B is true.
IF A (88-92 with command 30)
Call subroutine X (86, command=X)
ELSE (94)
IF B (88-92 with command 30)
The IF instructions 89-93 require Instruction 95
only when the THEN DO command 30 is used.
If one of the above instructions is used without
the corresponding END, the CR7 will display
error 22 when compiling the program. Error 21
is displayed if END is used without being
preceded by one of these instructions (Section
3.10).
An END instruction is always paired with the
most recent instruction that requires an END
and does not already have one. A way of
visualizing this is to draw lines between each
instruction requiring an END and the END
paired with it (as in Figure 3.8-2). The lines
must not cross. To debug logic or find a
missing or extra END error, list the program and
draw the lines.
3-5
SECTION 3. INSTRUCTION SET BASICS
Subroutines can be called from other
subroutines; they cannot be embedded within
other subroutines. A subroutine must end
before another subroutine begins (Error 20).
Any loops or IF...THEN DO sequences started
within a subroutine must end before the
subroutine.
3.8.3 NESTING
A branching or loop instruction which occurs
before a previous branch or loop has been
closed with the END instruction is nested. The
maximum nesting level is 9 deep. Error 30 is
displayed when attempting to compile a
program which is nested too deep.
The Loop Instruction, 87, counts as 1 level.
Instructions 86, 88, 89, 91, and 92 each count
as one level when used with the THEN DO
command 30. Use of Else, Instruction 94, also
counts as one nesting level each time it is used.
For example, the AND construction above is
nested 2 deep while the OR construction is
nested 3 deep. Branching and loop nesting
starts at zero within each subroutine and then
returns to the previous level after returning from
the subroutine.
Subroutine calls do not count as nesting with the
above instructions. They have a separate nesting
limit of seven (Instruction 85, Section 12).
Any number of groups of nested instructions
may be used in any of the three Programming
Tables. The number of groups is only restricted
by the program memory available.
3.9 INSTRUCTION MEMORY AND
EXECUTION TIME
The standard CR7 has 1744 bytes of program
memory available for the programs entered in
the *1, *2, and *3 program tables. Each
instruction also makes use of varying numbers
of Input, Intermediate, and Final Storage
locations. The following tables list the memory
used by each instruction and the approximate
time required to execute the instruction.
TABLE 3.9-1. Input/Output Instruction Memory
R = No. of Reps.
D = Delay
INSTRUCTIONMEMORYEXECUTION TIME (ms)
INPUTPROG.Slow or NoFast
LOC.BYTESIntegrationIntegration
1 VOLT (SE)R1557.4 +22R16+2.9R
2 VOLT (DIFF)R1554+43.4R19+4.7R
3PULSER154 + 2R
4 EX-DEL-SER2056.8 + (22.6 + D)R23.4+ (3.3 + D)R
5 AC HALF BRR1857.7+44R21.1 +5.5R
6 FULL BRR1858+87.3R24.2+9.6R
7 3W HALF BRR1858.8 +88.7R24.3+ 11.7R
9 FULL BR-MEXR19104+ 175R31.5+ 20.4R
10 BATT. VOLT1422.6
11 TEMP (107)R1523+5.4R
12 RH (207)R1723.3+5.4R
13 TEMP-TC SER1859.8+21.9R25.2+6.1R
14 TEMP-TC DIFR1861+43.2R21.5 +7.85R
16 TEMP-RTDR150.4 +2.7R
17 TEMP-INTERNL14116.2
18 TIME171.4
19 SIGNATURE14607.2
20 PORT SET142.9
21 ANALOG OUT153.6
22 EXCIT-DEL11110.8 +D
23 SELECT I/O MODULE0.4
26 TIMER1 or 040.54 to reset, 0.25 to load into location
3-6
SECTION 3. INSTRUCTION SET BASICS
TABLE 3.9-2. Processing Instruction Memory and Execution Times
77 REAL TIME01 to 440.11.0
78 RESOLUTION0030.40.4
79 SMPL ON MMRR70.31.1
80 STORE AREA005
82 STD. DEV.1+3RR7
1
BYTES
R(3.3+2.8*bins)
1
Output values may be sent to either Final Storage or Input Storage with Instruction 80.
TABLE 3.9-4. Program Control Instruction Memory and Execution Times
INSTRUCTIONMEMORYEXECUTION TIME (ms)
INTER.PROG.
LOC.BYTES
83 IF CASE <F090.5
85 LABEL SUBR030.0
86 DO050.1
87 LOOP190.2
88 IF X<=>Y0100.6
89 IF X<=>F0120.4
90 LOOP INDEX030.5
91 IF FLAG060.2
92 IF TIME1110.3
93 BEGIN CASE180.2
94 ELSE040.2
95 END040.2
96 SERIAL OUT03
98 SEND CHAR.04
3-8
SECTION 3. INSTRUCTION SET BASICS
3.10 ERROR CODES
There are four types of errors flagged by the
CR7: Compile, Run Time, Editor, and *D Mode.
When an error is detected, an E is displayed
followed by the 2 digit error code.
Compile errors are errors in programming
which are detected once the program is keyed
in and compiled for the first time (*0, *6, or *B
Mode entered).
Run Time errors are detected while the
program is running. Error 31 is the result of a
programming error. Error 8 is the result of a
hardware and software "watchdog" that checks
the processor state, software timers, and
program related counters. The watchdog will
attempt to reset the processor and program
execution if it finds that the processor has
bombed or is neglecting standard system
updates, or if the counters are out of allowable
limits. Error code 08 is flagged when the
watchdog performs this reset.
Error 8 is occasionally caused by voltage surges
or transients. Frequent repetitions of E08 are
indicative of a hardware problem or a software
bug and should be reported to Campbell
Scientific. The CR7 keeps track of the number
of times (up to 99) that E08 has occurred. The
number can be displayed and reset with the
Telecommunications A command (Section 5.1).
Editor errors are detected as soon as an
incorrect value is entered and are displayed
immediately.
*D Mode errors indicate problems with saving
or loading a program. Only the error code is
displayed.
TABLE 3.10-1. Error Codes
CodeTypeDescription
01Run TimeI/O Module does not respond
03EditorProgram table full
04CompileIntermediate Storage full
08Run TimeCR7 reset by watchdog timer
09Run TimeData sent to unallocated Input Storage
11EditorAttempt to allocate more Input or Intermediate Storage than is available
20CompileSUBROUTINE encountered before END of previous subroutine
21CompileEND without IF, LOOP or SUBROUTINE
22CompileMissing END, nonexistent SUBROUTINE
24CompileELSE in SUBROUTINE without IF
25CompileELSE wi thout IF
26CompileEXIT LOOP without LOOP
30CompileIF and/or LOOP nested too deep
31Run TimeSUBROUTINES nested too deep
40CompileTable 2 Execution interval too short
40EditorInstruction not in PROM
60CompileInadequate Input Storage for FFT
61CompileBurst Mode Scan Rate too short
97*D MODETape data not received within 30 seconds
98*D MODEUncorrectable errors detected
99*D MODEWrong file type, editor error or program not received
3-9
SECTION 3. INSTRUCTION SET BASICS
This is a blank page.
3-10
SECTION 4. EXTERNAL STORAGE PERIPHERALS
External data storage devices are used to provide a data transfer medium that the user can carry from
the test site to the lab and to supplement the internal storage capacity of the CR7, allowing longer
periods between visits to the site. The standard data storage peripherals for the CR7 are the Storage
Modules (Section 4.4). Output to a printer or related device is also possible (Section 4.5). These
peripherals are connected to the CR7 through the 9 pin serial connector.
Data output to a peripheral device can take place ON-LINE (automatically, as part of the CR7's routine
operation) or it can be MANUALLY INITIATED. On-line data transfer is accomplished with Instruction 96
or with the *4 Mode (Section 4.1). Manual initiation is done in the *8 or *9 Modes (Section 4.2).
Regardless of the method, the source of any data transferred is Final Storage.
A modem is another type of peripheral that can be connected to the CR7. Communication via a modem
(Telecommunications) is discussed in Section 5.
The CR7 can output data to multiple peripherals (i.e., a modem and Storage Module could be connected
at the same time). However, only one modem may be connected to the CR7 at any one time. It is
possible to connect two Storage Modules, although it is seldom necessary.
The CR7 can tell whether or not a SM192 or SM716 Storage Module is present. When Instruction 96 or
*9 is used to send data to one of these Storage Modules, the CR7 will not send data if the Storage
Module is not connected (Section 4.4.2).
4.1 ON-LINE DATA TRANSFER INSTRUCTION 96, *4 MODE
On-line data transfer is accomplished with
Instruction 96 entered in the datalogger
program. The *4 Mode is retained from earlier
software to maintain compatibility with existing
programs. Use only one method to enable
output. If using Instruction 96, do not enable
output in the *4 Mode.
4.1.1 INSTRUCTION 96
Instruction 96 enables output to external
storage peripherals under program control.
This instruction must be included in the
datalogger program for on-line data transfer to
take place. Instruction 96 needs to be included
only once in the program tables and should
follow the Output Processing Instructions. The
suggested programming sequence is:
1. Set the Output Flag.
2. If you wish to set the output array ID, enter
Instruction 80 (Section 11).
3. Enter the appropriate Output Processing
Instructions.
4. Enter Instruction 96 to enable the on-line
transfer of Final Storage data to the
specified device. If outputting to both tape
and a Storage Module or printer option,
Instruction 96 must be entered twice.
Instruction 96 has a single parameter which
specifies the peripheral to enable. Table 4.1-1
lists the output device codes.
Only one of the options 1x, 2x, or 30 may be
used in a program. If using a SM64 Storage
Module, output code 21 should be used. Use of
the SM192/716 is discussed further in Section
4.4, print output formats are discussed in
Section 4.5.
4.1.2 *4 MODE
The *4 Mode may be used in place of
Instruction 96 to enable or disable printer output
and to set the printer baud rate. The first
parameter is a two digit number determining the
printer status. The second is the baud rate
code. To enter a different status, key in the
appropriate code from Table 4.1-2, followed by
"A". Printer data is sent in the printableASCII format only (Section 4.5). If printer
status is changed during execution of the
program tables, execution stops until the
programs are recompiled. Instruction 96 should
be used to send data to the SM192/716 Storage
Modules. Do not use *4 if Instruction 96 is used
in the program.
Data may be transferred to tape using the *8
Mode and to printer or Storage Module using
the *9 Mode. These Modes allow the user to
retrieve a specific block of data, on demand,
regardless of whether or not the CR7 is
programmed for on-line data output.
If external storage peripherals are not left online, the maximum allowable time between
visiting the site to retrieve data must be
calculated to insure that data placed in Final
Storage are not written over before they are
collected. In order to make this calculation,
users must determine: (1) the size of Final
Storage, (2) the number of output arrays being
generated, (3) the number of low and/or high
resolution data points included in each output
array, and (4) the rate at which output arrays
are stored in Final Storage. When calculating
the number of data points per output array,
remember to add 1 overhead data point (2
bytes) per array for the output array ID.
For example, assume that 19,296 locations are
assigned to Final Storage (*A Mode), and that 1
output array, containing the Array ID (1 memory
location), 9 low resolution data points (9
memory locations) and 5 high resolution data
points (10 memory locations) is stored each
hour. In addition, an output array with the Array
ID and 5 high resolution data points (11 memory
locations) is stored daily. This is a total of 491
memory locations per day ((20 x 24) + 11).
19,296 divided by 491 = 39.3 days. Therefore,
the CR7 would have to be visited every 39 days
to retrieve data, because write-over would begin
in the 40th day.
CodeBaud Rate
00300
011200
029600
0376,800
4-2
4.2.1 MANUAL STORAGE MODULE OR
PRINTER DUMP - *9 MODE
Using the *9 Mode, data in Final Storage can be
transmitted as ASCII or binary data out the
serial port by manually initiating a dump. If online printing is enabled with Instruction 96 or the
*4 Mode, entering *9 will stop it. On-line printing
will be re-enabled if no keyboard entries are
made for 3.4 minutes. Return to the *0 Mode
when the dump is completed.
When on-line Storage Module or printer transfer is
not enabled and the *9 Mode is used to dump new
data, the start of dump pointer (PPTR) will remain
where it was when the dump was completed or
SECTION 4. EXTERNAL STORAGE PERIPHERALS
aborted until the next time the *9 Mode is entered.
If the End of Dump location (window 2) is changed
while in the *9 Mode, the TPTR will be set to its
previous value when the *9 Mode is exited.
Changing the program and compiling moves the
PPTR to the current DSP location.
NOTE: A printer dump is aborted by
keying #.
TABLE 4.2-2. *9 Mode Entries
Display
KeyID:DATADescription
*909:00Output Code
1X Printable ASCII
2X Final Storage Format
30 SM192/716 Storage
Module
31 Send File Mark to
SM192/716 than
send data
x = Baud Rate Code
0300
11200
29600
376800
A01:XXXXXStart of Dump location,
initially the PPTR
location, a different
location may be keyed in
if desired. To dump all
data in Final Storage,
enter into window #1 a
number 1 greater than
the End of Dump
location.
A02:XXXXXEnd of Dump location,
initially the DSP location,
a different location may
be keyed in if desired.
A03:00Ready to Dump, to
initiate dump, key any
number then A. While
dumping, "09:" will be
displayed in the ID field
and the location number
in the Data field. The
location number will stop
incrementing when the
dump is complete.
4.3 STORAGE MODULE
The Storage Module stores data in battery
backed RAM. Backup is provided by an internal
lithium battery. The RAM is internal on the
SM192/716 and on a PCMCIA card on the
CSM1. Operating power is supplied by the CR7
over pin 1 of the CS I/O connector. When
power is applied to the Storage Module, a File
Mark is placed in the data (if a File Mark is not
the last data point already in storage).
The File Mark separates data. For example, if
you retrieve data from one CR7, disconnect the
Storage Module and connect it to a second
CR7; a File Mark is placed in the data. This
mark follows the data from the first CR7, but
precedes the data from the second.
The SM192 has 192K bytes of RAM storage;
the SM716 has 716K bytes. Both can be
configured as either ring or fill and stop
memory. The size of memory in the CSM1
depends on the PC card used. The CSM1 is
always fill and stop.
4.3.1 USE OF TWO STORAGE MODULES
It is possible to connect two Storage Modules to
the CR7 for on-line storage. One module must
be configured as fill and stop and the other as
ring memory (see Storage Module operator's
manual for configuring information). Data is
written to both modules simultaneously. The
module configured as fill and stop quits
accepting data once it is full while that with the
ring memory continues to store new data over
old. The Storage Modules must be retrieved
before the module configured as ring memory
wraps around memory a second time.
4.3.2 STORAGE MODULE USE WITH
INSTRUCTION 96
When output to the Storage Module is enabled
with Instruction 96, the Storage Module(s) may
be either left with the CR7 for on-line data
transfer and periodically exchanged, or brought
to the site for data transfer.
USE OF STORAGE MODULE TO PICK UP
DATA
The CR7 can tell when the Storage Module is
connected. Each time Instruction 96 is
executed and there is data to output, the CR7
checks for the presence of the Storage Module.
4-3
SECTION 4. EXTERNAL STORAGE PERIPHERALS
If a Storage Module is not connected no data
are sent and the Printer Pointer (PPTR, Section
2.1) is not advanced.
When a Storage Module is connected, two
things happen:
1. Immediately upon connection, a File Mark is
placed in the Storage Module Memory
following the last data stored.
2. During the next execution of Instruction 96,
the CR7 detects the Storage Module and
outputs all data between the PPTR and the
DSP location.
The File Mark allows the operator to distinguish
blocks of data from different dataloggers or
from different visits to the field.
If the SM is just brought to the site to pick-up
data, the SC90 Serial Line Monitor can be used
to visually confirm that data were transferred.
The SC90 contains an LED which lights during
data transmission. When the light goes OFF,
data transfer is complete and the SM can be
disconnected from the CR7.
2. Enter the appropriate commands as listed
in Table 4.2-2.
4.4 PRINTER OUTPUT FORMATS
Printer output can be sent in the binary Final
Storage Format (Appendix C.2) or Printable
ASCII. If using the *4 Mode to enable on-line
output, Printable ASCII is the only format
available.
In the Printable ASCII format, each data point is
preceded by a two digit data point ID and a + or
- sign. The ID and fixed spacing of the data
points make particular points easy to find on a
printed output. This format requires 10 bytes
per data point to store on disk.
Figure 4.5-1 shows both high and low resolution
data points in a 12 data point output array. The
example data contains Day, Hour-Minute, and
Seconds in the 2nd - 4th data points. The
output array ID and time values (year, day,
hour-minute, and seconds) are always four
character numbers, even when high resolution
output is specified.
4.3.3 *9 DUMP TO STORAGE MODULE
In addition to the on-line data output procedures
described above, output from CR7 Final
Storage to the SM192 and SM716 can be
manually initiated in the *9 Mode. The
procedure for setting up and transferring data is
as follows:
1. Connect the Storage Module to the CR7
using the SC12 cable.
Each full line of data contains eight data points
(79 characters including spaces), plus a
carriage return (CR) and line feed (LF). If the
last data point in a full line is high resolution, it is
followed immediately with a CR and LF. If it is
low resolution, the line is terminated with a
space, CR and LF. Lines of data containing
less than eight data points are terminated
similarly after the last data point.
4-4
SECTION 4. EXTERNAL STORAGE PERIPHERALS
FIGURE 4.4-1. Example of CR7 Printable ASCII Output Format
4-5
SECTION 4. EXTERNAL STORAGE PERIPHERALS
This is a blank page.
4-6
SECTION 5. TELECOMMUNICATIONS
Telecommunications allows a computer to retrieve data directly from Final Storage and may be used to
program the CR7 and monitor sensor readings in real time. Any user communication with the CR7 that
makes use of a computer or terminal instead of the CR7 keyboard is through Telecommunications.
Telecommunications can take place over a variety of links including:
• telephone
• radio frequency
• short haul modem
• SC32A and ribbon cable
• multi-drop interface and coax cable
This section does not cover the technical interface details for any of these links. Those details are
covered in Section 6 and in the individual manuals for the devices.
Data retrieval can take place in either ASCII or BINARY. The BINARY format is five times more
compact than ASCII. The shorter transmission times for binary result in lower long distance telephone
charges and more reliable data transfer. On "noisy" links shorter blocks of data are more likely to get
through without interruption.
In addition to more efficient data transfer, binary data retrieval makes use of a signature for error
detection. The signature algorithm assures a 99.998% probability that if either the data or its sequence
changes, the signature changes.
The PC208 Datalogger Support Software for PCs and compatibles contains the programs which
automate data retrieval, program transfer, and real time monitoring. The PC208 package has been
designed to meet the most common needs in datalogger support and telecommunications. This section
in not intended to furnish sufficient detail to write Telecommunications software. Appendix C contains
some details of binary data transfer and Campbell Scientific's binary data format.
This section emphasizes the commands that a person would use when manually (i.e., entered by hand)
interrogating or programming the CR7 via a computer/terminal. These commands and the responses to
them are sent in the American Standard Code for Information Interchange (ASCII). The Remote
Keyboard State (Section 5.2) allows the user with a computer/terminal to use the same commands as
the CR7 keyboard.
5.1 TELECOMMUNICATIONS
COMMANDS
When the CR7 is rung by a modem, it answers
(enables the modem) almost immediately.
Several carriage returns (CR) must be sent
from the computer to allow the CR7 to set its
baud rate to that of the modem/terminal (300,
1200, 9600, or 76,800). Once the baud rate is
set, the CR7 sends the prompt, *, signaling that
it is ready to receive a command.
GENERAL RULES governing the
telecommunications commands are:
1. * from datalogger means "ready for
command".
2. All commands are of the form: [no.]letter,
where the number may or may not be
optional.
3. Valid characters are the numbers 0-9, the
capital letters A-L, the colon (:), and the
carriage return (CR).
4. An illegal character increments a counter
and zeros the command buffer, returning *.
5. CR to datalogger means "execute".
5-1
SECTION 5. TELECOMMUNICATIONS
6. CRLF from datalogger means "executing
command".
7. ANY character besides a CR sent to the
datalogger with a legal command in its
buffer causes the datalogger to abort the
command sequence with CRLF* and to
zero the command buffer.
8. All commands return a response code,
usually at least a checksum.
9. The checksum includes all characters sent
by the datalogger since the last *, including
the echoed command sequence, excluding
only the checksum itself. The checksum is
formed by summing the ASCII values,
without parity, of the transmitted characters.
The largest possible checksum value is
8191. Each time 8191 is exceeded, the
CR7 starts the count over; e.g., if the sum
of the ASCII values is 8192, the checksum
is 0.
10. Commands that return Campbell Scientific
binary format data (F and K commands)
return a signature (Appendix C).
The CR7 sends ASCII data with eight data bits,
no parity, plus one start bit and one stop bit.
After answering a ring, or completing a
command, the CR7 waits about 40 seconds
(147 seconds in the Remote Keyboard State)
for a valid character to arrive. If a valid
character is not received, the CR7 "hangs up".
Some modems are quite noisy when not on line;
it is possible for valid characters to appear in
the noise pattern. To insure that this situation
does not keep the CR7 in telecommunications,
the CR7 counts all the invalid characters it
receives from the time it answers a ring, and
terminates communication after receiving 150
invalid characters.
The CR7 continues to execute its measurement
and processing tasks while servicing the
telecommunication requests. If the processing
overhead is large (short execution interval), the
processing tasks will slow the
telecommunication functions. In a worst case
situation, the CR7 interrupts the processing
tasks to transmit a data point every 0.1 second.
The best way to become familiar with the
Telecommunication Commands is to try them
from a terminal connected to the CR7 via the
SC32A or other modem interface (Section 6.5).
Telecommunications Commands are described
in the following Table. The Data Storage
Pointer (DSP) and Telecommunications Modem
Pointer (MPTR) referred to in the table are
described in Section 2.1.
5-2
TABLE 5.1-1. Telecommunications Commands
CommandDescription
ASTATUS - Datalogger returns Reference, the DSP location; the number of
filled Final Storage locations; Version of datalogger; Errors #1 and #2 where
#1 is the number of E08 and #2 is the number of overrun that have
occurred (cleared by entering 8888A); Memory status, the decimal number
(in ASCII characters) that is the equivalent of the 8 bit binary number shown
as the result of the memory check on power-up; Location of MPTR; and
Checksum. All in the following format:
R+xxxxx F+xxxxx Vx Exx xx Mxxxx L+xxxxx Cxxxx
If data are stored while in telecommunications, the A command must be
issued to update the Reference to the new DSP.
[no. of arrays]BBACK-UP - MPTR is backed-up the specified number of output arrays (no
number defaults to 1) and advanced to the nearest start of array. CR7
sends the MPTR Location and Checksum: L+xxxxx Cxxxx
SECTION 5. TELECOMMUNICATIONS
[YR:DAY:HR:MM:SS]CRESET/SEND TIME - If time is entered the time is reset. If only 2 colons
are in the time string, HR:MM:SS is assumed; 3 colons means
DAY:HR:MM:SS. If only the C is entered, time is unaltered. CR7 returns
year, Julian day, hr:min:sec, and Checksum: Y:xx Dxxxx Txx:xx:xx Cxxxx
[no. of arrays]DASCII DUMP - If necessary, the MPTR is advanced to the next start of
array. CR7 sends the number of arrays specified (no number defaults to 1)
or the number of arrays between MPTR and Reference, whichever is
smaller, CRLF, Location, Checksum.
EEnd call. Datalogger sends CRLF only.
[no. of loc.]FBINARY DUMP - Used in TELCOM (PC208). See Appendix C.
[F.S. loc. no.]GMOVE MPTR - MPTR is moved to specified Final Storage location. The
location number must be entered. CR7 sends Location and Checksum:
L+xxxxx Cxxxx
2718HREMOTE KEYBOARD - CR7 sends the prompt ">" and is ready to execute
standard keyboard commands (Section 5.2).
[loc. no.]IDisplay/change value at Input Storage location. CR7 sends the value
stored at the location. A new value and CR may then be sent. CR7 sends
checksum. If no new value is sent (CR only) the location value will remain
the same.
3142JTOGGLE FLAGS AND SET UP FOR K COMMAND - Used in the Monitor
Mode and with the Heads Up Display. See Appendix C for details.
KCURRENT INFORMATION - In response to the K command, the CR7
sends datalogger time, user flag status, the data at the input locations
requested in the J command, and Final Storage Data if requested by the J
command. Used in the Monitor Mode and with Heads Up Display. See
Appendix C.
[Password]LUnlocks security (if enabled) to the level determined by the password
entered (See *C Mode, Section 1.7). CR7 sends security level (0-3) and
checksum: Sxx Cxxxx
5.2 REMOTE PROGRAMMING OF THE
CR7
The CR7 can be programmed via
telecommunications using the PC208 software
or manually through the Remote Keyboard
State.
The PC208 Datalogger Support Software was
developed for use with IBM or compatible PCs.
The CR7 is placed in the Remote Keyboard
State by sending "2718H" and a carriage return
(CR). The CR7 responds by sending a CR, line
feed (LF), and the prompt ">". The CR7 is then
ready to receive the standard keyboard
commands (Section OV3); it recognizes all the
standard CR7 keyboard characters plus the
decimal point. While in the Remote Keyboard
State, the CR7 sends the ASCII character
control Q (17 decimal) after each user entry.
Entering *0 returns the CR7 to the
telecommunications command state.
It is important to remember that the Remote
Keyboard State is still within
Telecommunications. Entering *0 exits the
Remote Keyboard and returns the datalogger to
the Telecommunications Command State,
awaiting another command. So, the user can
step back and forth between the
5-3
SECTION 5. TELECOMMUNICATIONS
Telecommunications Command State and the
Remote Keyboard State.
Keying *0 will compile and run the CR7 program
if program changes have been made. To
compile and run the program without leaving the
TelecommunicationsRemote
Command*0Keyboard
StateState
Remote Keyboard State, use *6 (Section 1.1.4).
The CR7 display will show "LOG" when *0 is
executed via telecommunications. It will not
indicate active tables (enter *0 via the keyboard
and the display will show the tables).
2718H
5-4
SECTION 6. CS I/O 9 PIN SERIAL INPUT/OUTPUT
6.1 PIN DESCRIPTION
All external communication peripherals connect
to the CR7 through the 9-pin CS I/O connector
(Figure 6.1-1). Table 6.1-1 gives a brief
description of each pin's function.
FIGURE 6.1-1. CS I/O 9 Pin Connection
CS I/O
TABLE 6.1-1. Pin Description
ABR =Abbreviation for the function name.
PIN=Pin number.
O=Signal Out of the CR7 to a peripheral.
I=Signal Into the CR7 from a peripheral.
PINABRI/ODescription
15VO5V: Sources 5V DC, used
to power some peripherals.
2GGround: Provides a power
return for pin 1 (5V), and is
used as a reference for
voltage levels.
3RINGIRing: When raised by a
peripheral the CR7 enters
telecommunications.
4RXDIReceive Data: Serial data
transmitted by a peripheral
are received on pin 4.
5MEOModem Enable: Raised by
the CR7 after the ring line
has been raised.
PINABRI/ODescription
6PEOPrinter Enable: Raised to
enable Storage Module or
other print device.
7GI/OGround, common with pin 2.
812 VO12 volt power for
peripherals.
9TXDOTransmit Data: Serial data
are transmitted from the
CR7 to peripherals on pin
9; logic low marking (0V)
logic high spacing (5V)
standard asynchronous
ASCII, 8 data bits, no
parity, 1 start bit, 1 stop bit,
300, 1200, 9600, 76,800
baud (user selectable).
6-1
SECTION 6. 9 PIN SERIAL INPUT/OUTPUT
6.2 ENABLING PERIPHERALS
Several peripherals may be connected in
parallel to the CS I/O 9-pin port. The CR7
directs data to a particular peripheral by raising
the voltage on a specific pin dedicated to the
peripheral; the peripheral is enabled when the
pin goes high. Two pins are dedicated to
specific devices Modem Enable pin 5 and Print
Enable pin 6.
Modem Enable (ME), pin 5, is raised to enable
a modem that has raised the ring line. Only onemodem/terminal may be connected to the CR7.
Print Enable (PE), pin 6, is raised to enable a
Storage Module or other print peripheral. Print
peripherals are defined as peripherals which
have an asynchronous serial communications
port used to RECEIVE data transferred by the
CR7. In most cases the peripheral is a printer,
but could also be an on-line computer or other
device. It is possible to have more than one
print peripheral connected to the CR7 at one
time, as long as they don't load down the TXD
line (e.g., two Storage Modules, Section 4.4.1);
all connected receive the same data.
6.3 INTERRUPTING DATA TRANSFER
TO STORAGE PERIPHERALS
Instruction 96 is used for on-line data transfer to
peripherals (Section 4.1). Data transfer is
aborted when a modem raises the Ring line and
the CR7 then enters Telecommunications
(Section 5, 6.4). After the CR7 exits
Telecommunications, data transfer to the
peripheral is resumed the next time Instruction
96 is executed, or, if activated by the *4 Mode,
at the completion of the next active table.
The *8 and *9 Modes are used to position the
Memory Pointers, and to manually initiate data
transfer from Final Storage to a peripheral. If
the # key is pressed during data transfer, the
transfer is stopped and the display shows the
Final Storage location where the pointer
stopped.
6.4 TELECOMMUNICATIONS - MODEM
PERIPHERALS
Any serial communication device which raises
the Ring line and holds it high until the ME line
is raised is a modem. The CSI field modem
(DC112, COM200, COM100, or DC1765), RF95
RF modem, MD9 Multi-Drop Interface, and the
SC32A RS232 interface used with computers or
terminals are modems.
When a modem raises the Ring line, the CR7
responds by raising the ME line. The CR7 must
be sent carriage returns until it sets the baud
rate. When the baud rate is set, the CR7 sends
a carriage return, line feed, *.
The ME line is held high until the CR7 receives
an E to exit telecommunications or until a time
limit expires without receiving a character. The
colon in CR7 display is not shown while the
CR7 is in telecommunications.
Some modems are quite noisy when not on line;
it is possible for valid characters to appear in
the noise pattern. For this reason, the CR7
counts all the invalid characters it receives from
the time it answers a ring and terminates
communication (lowers the ME line and returns
to the *0 Mode) after receiving 150 invalid
characters.
6.5 INTERFACING WITH COMPUTERS,
TERMINALS, AND PRINTERS
This section deals with some of the basics of
serial communication between the CR7 and
common computer equipment. If you have an
IBM compatible PC, the PC208(W) Datalogger
Support Software takes care of the software
protocol required in communicating with the
CR7. This section does not discuss modem
interfaces other than the SC32A. Please refer
to the PC208 software and modem operator's
manuals for interfacing details on other
modems.
Data transfer can be stopped as follows:
1. Printable ASCII - after every output array.
2. Binary - after every Final Storage location.
6-2
SECTION 6. 9 PIN SERIAL INPUT/OUTPUT
6.5.1 SC32A INTERFACE
Most computers, terminals, and printers require
the SC32A Optically Isolated RS232 Interface
for a "direct" connection to the CR7. The
SC32A raises the CR7's ring line when it
receives characters from the computer or
terminal, and converts the CR7's logic levels
(0V logic low, 5V logic high) to RS232 logic
levels.
The SC32A 25 pin port is configured as Data
Communications Equipment (DCE) which
allows direct connection to Data Terminal
Equipment (DTE), which includes most PCs
and printers. For connection to DCE devices
such as modems and some computers, use
SC932 interface in place of SC32A.
When the SC32A receives a character from the
computer or terminal (pin 2), 5V is applied to
the datalogger Ring line (pin 3) for one second
or until the Modem Enable line (ME) goes high.
The CR7 waits approximately 40 seconds to
receive carriage returns, which it uses to
establish baud rate. After the baud rate is set
the CR7 transmits a carriage return, line feed, *,
and enters the Telecommunications Command
State (Section 5). If the carriage returns are not
received within the 40 seconds, the CR7 "hangs
up".
NOTE: The SC32A has a jumper. With the
jumper in place, the SC32A blocks printer
data and passes data only when the CR7 is
in Telecommunications.
6.5.2 COMPUTER/TERMINAL REQUIREMENTS
Computers, terminals and printers are usually
configured as Data Terminal Equipment (DTE).
Pins 4 and 20 are used as handshake lines,
which are set high when the serial port is
enabled. Power for the SC32A is taken from
these pins. For equipment configured as DTE,
a direct ribbon cable connects the
modem/terminal to the SC32A. Clear to Send
(CTS) pin 5, Data Set Ready (DSR) pin 6, and
Received Line Signal Detect (RLSD) pin 8 are
held high by the SC32A (when the RS232
section is powered) which should satisfy
hardware handshake requirements of the
modem/terminal.
TABLE 6.5-1. DTE Pin Configuration
PIN = 25-pin connector number
ABR = Abbreviation for the function name
O = Signal Out of the terminal to another device
I = Signal Into the terminal from another device
PINABRI/OFUNCTION
2TDOTransmitted Data: Data is
transmitted from the
terminal on this line.
3RDIReceived Data: Data is
received by the terminal on
this line.
4RTSORequest to Send: The
terminal raises this line to
ask a receiving device if the
terminal can transmit data.
5CTSIClear to Send: The
receiving device raises this
line to let the terminal know
that the receiving device is
ready to accept data.
20DTROData Terminal Ready: The
terminal raises this line to
tell the modem to connect
itself to the telephone line.
6DSRIData Set Ready: The
modem raises this line to
tell the terminal that the
modem is connected to the
phone line.
8DCDIData Carrier Detect: The
modem raises this line to
tell the terminal that the
modem is receiving a valid
carrier signal from the
phone line.
22RIIRing Indicator: The
modem raises this line to
tell the terminal that the
phone is ringing.
7SGSignal Ground: Voltages
are measured relative to
this point.
Table 6.5-1 lists the most common RS232
configuration for Data Terminal Equipment.
6-3
SECTION 6. 9 PIN SERIAL INPUT/OUTPUT
FIGURE 6.5-1. Transmitting the ASCII Character 1
6.5.3 COMMUNICATION PROTOCOL/TROUBLE
SHOOTING
The ASCII standard defines an alphabet
consisting of 128 different characters where
each character corresponds to a number, letter,
symbol, or control code.
An ASCII character is a binary digital code
composed of a combination of seven "bits",
each bit having a binary state of 1 or more. For
example, the binary equivalent for the ASCII
character "1" is 0110001 (decimal 49).
ASCII characters are transmitted one bit at a
time, starting with the first (least significant) bit.
During data transmission the marking condition
is used to denote the binary state 1, and the
spacing condition for the binary state 0. The
signal is considered marking when the voltage
is more negative than minus three volts with
respect to ground, and spacing when the
voltage is more positive than plus three volts.
Most computers use 8-bits (1 byte) for data
communications. The eighth bit is sometimes
used for a type of error checking called parity
checking. Even parity binary numbers have an
even number of 1's, odd-parity characters have
an odd number of 1's. When parity checking is
used, the eighth bit is set to either a 1 or a 0 to
make the parity of the character correct. The
CR7 ignores the eighth bit of a character that is
receives, and transmits the eighth bit as a
binary 0. This method is generally described as
"no parity".
Figure 6.5-1 shows how the ASCII character "1"
is transmitted. The SC32A interface transmits
spacing and marking voltages which are
positive and negative, as shown. Signal
voltages at the CR7 I/O port are 5 volts in the
spacing condition, and 0 volts in the marking
condition.
BAUD RATE
BAUD RATE is the number of bits transmitted
per second. The CR7 can communicate at 300,
1200, 9600, and 76,800 baud. In the
Telecommunications State, the CR7 will set its
baud rate to match the baud rate of the modem.
The baud rate of the modem or computer is
usually set with dip switches or programmed
from the keyboard. The instrument's instruction
manual should explain how to set it.
DUPLEX
Full duplex means that two devices can
communicate in both directions simultaneously.
Half duplex means that the two devices must
send and receive alternately. Full duplex should
always be specified when communicating with
Campbell Scientific peripherals and modems.
However, communication between some
Campbell Scientific modems (such as the RF95
RF modem) is carried out in a half duplex
fashion. This can affect the way commands
should be sent to and received from such a
modem, especially when implemented by
computer software.
To separate ASCII characters, a Start bit is sent
before the first data bit, and a Stop bit is sent
after the eighth data bit. The start bit is always
a space, and the stop bit is always a mark.
Between characters, the signal is in the marking
condition.
6-4
To overcome the limitations of half duplex,
some communications links expect a terminal
sending data to also write the data to the
screen. This saves the remote device having to
echo that data back. If, when communicating
with a Campbell Scientific device, characters
are displayed twice (in pairs), it is likely that the
SECTION 6. 9 PIN SERIAL INPUT/OUTPUT
terminal is set to half duplex rather than the
correct setting of full duplex.
IF NOTHING HAPPENS
If the CR7 is connected via the SC32A interface
to a terminal or computer and * is not received
after sending carriage returns:
1. Verify that the CR7 has power and that the
cables connecting the devices are securely
connected.
2. Verify that the port of the computer or
terminal is an asynchronous serial
communications port configured as DTE
(see Table 6.5-1). The most common
problems occur when the user tries to use a
parallel port, or doesn't know the port
address (i.e. COM1 or COM2). IBM, and
most compatibles come with a Diagnostic
disk which can be used to identify ports,
and their addresses. If the serial port is
standard equipment, then the operators
manual should give you this information.
Some serial ports such as the Super Serial
Card for Apple computers, can be
configured as DTE or DCE with a jumper
block. Pin functions must match with Table
6.5-1.
If you are using a computer without the PC208
software, then a program or communication
software must be used to enable the serial port
and to make the computer function as a
terminal. The port should be enabled for 300,
1200, or 9600 baud, 8 data bits, 1 stop bit, and
no parity.
If you are not sure that your computer or
terminal is sending or receiving characters,
there is a simple way to verify it. Set the duplex
to full. Next, take a paper clip and connect one
end to pin 2, and the other end to pin 3 of the
serial port. Each character typed on the
keyboard will be displayed only if transmitted
from the terminal on pin 2, and received on pin
3 (with half duplex the character will be
displayed once if it is not transmitted, or twice if
it is transmitted).
IF GARBAGE APPEARS
If garbage characters appear on the
modem/terminal, check that the
modem/terminal's baud rate is supported by the
CR7. If the baud rate is correct, verify that the
modem/terminal is set for 8 Data bits, and no
Parity. Garbage will appear if 7 Data bits and
no Parity are used. If the modem/terminal is set
to 8 Data bits and even or odd Parity,
communication cannot be established.
6-5
SECTION 6. 9 PIN SERIAL INPUT/OUTPUT
This is a blank page.
6-6
SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES
This section gives some examples of Input Programming for common sensors used with the CR7. These
examples detail only the connections, Input, Program Control and Processing Instructions necessary to
perform measurements and store the data in engineering units in Input Storage. Output Processing
Instructions are omitted, it is left for the user to program the necessary instructions to obtain the final
data in the form desired. NO OUTPUT TO FINAL STORAGE WILL TAKE PLACE WITHOUT
ADDITIONAL PROGRAMMING.
The examples given in this section would likely be only fragments of larger program tables. In general,
the examples are written with the measurements made by the first channels on the first cards in the I/O
Module, the instructions at the beginning of a program table, and low number Input Storage locations
used to Store the data. Because it is unlikely that an application and CR7 configuration exactly
duplicates that assumed in an example, THESE EXAMPLES ARE NOT MEANT TO BE USED
VERBATIM; CARDS AND CHANNELS REFERENCED, SENSOR CALIBRATION AND INPUT
LOCATIONS SELECTED MUST BE ADJUSTED FOR THE ACTUAL CIRCUMSTANCES. UNLESS
OTHERWISE NOTED, ALL EXCITATION CHANNELS ARE SWITCHED ANALOG OUTPUT.
7.1 SINGLE ENDED VOLTAGE - LI200S
SILICON PYRANOMETER
The silicon pyranometer puts out a current
which is dependent upon the solar radiation
incident upon the sensor. The current is
measured as the voltage drop across a fixed
resistor. The Campbell Scientific LI200S uses a
100 ohm resistor. The calibration supplied by
LI-COR, the manufacturers of the pyranometer,
is given in uA/kW/m2. The calibration in terms
of volts is determined by multiplying the µA
calibration by the resistance of the fixed
resistor.
The calibration of the pyranometer used in this
example is assumed to be 76.9 µA/kW/m2,
which when multiplied by 100 ohms equals 7.69
mV/kW/m2. The multiplier used to convert the
voltage reading to kW/m2 is 1 / 7.69 mV/kW/m
= 0.13004.
Most LI-COR calibrations run between 60 and
90 µA/kW/m2, which correspond to calibrations
of 6.0 to 9.0 mV/kW/m2. The flux density
through a surface normal to the solar beam
above the earth's atmosphere is 1.36 kW/m2;
radiation on earth will be less than this. Thus,
the 15 mV scale provides an adequate range
(9.0 mV/kW/m2 x 1.36 kW/m2 < 15 mV).
CONNECTIONS
The pyranometer output is measured with a
single ended voltage measurement on channel
5. There are twice as many single ended
channels as differential channels and they are
numbered accordingly: single ended channel 5
is the high side of differential channel 3, and the
low side is single ended channel 6.
Some sensors either contain or require active
signal conditioning circuitry to provide an easily
measured analog voltage output. Generally, the
output is referenced to the sensor ground. The
associated current drain usually requires a
power source external to the CR7. A typical
connection scheme where AC power is not
available and both the CR7 and sensor are
powered by an external battery is shown in
7-1
SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES
Figure 7.2-1. Since a single ended
measurement is referenced to the CR7 ground,
any voltage difference between the sensor
ground and CR7 ground becomes a
measurement error. A differential
measurement avoids this error by measuring
the signal between the 2 leads without
reference to ground. This example analyzes
the potential error on a water pH measurement
using a Martek Mark V water quality analyzer.
FIGURE 7.2-1. Typical Connection for Active
Sensor with External Battery
The wire used to supply power from the external
battery is 18 AWG with an average resistance
of 6.5 ohms/1000 ft. The power runs to the
CR7 and pH meter are 2 ft. and 10 ft.,
respectively. Typical current drain for the pH
meter is 300 mA. When making
measurements, the CR7 draws about 100 mA.
Since voltage is equal to current times
resistance (V=IR), ground voltages at the pH
meter and the CR7 relative to battery ground
are:
pH meter ground =
0.3A x 10/1000 x 6.5 Ohms = +0.0195V
CR7 ground =
0.1A x 2/1000 x 6.5ohms = +0.0013V
Ground at the pH meter is 0.0182V higher than
ground at the CR7. The meter output is 0-1 volt
referenced to meter ground, for the full range of
14 pH units, or 0.0714V/pH. Thus, if the output
is measured with a single ended voltage
measurement, it is 0.0182V or 0.25 pH units too
high. If this offset remained constant, it could
be corrected in programming the CR7.
However, it is better to use a differential voltage
measurement which does not rely on the
current drain remaining constant. The Program
that follows illustrates the use of Instruction #2
to make the measurement. A multiplier of
0.014 is used to convert the millivolt output into
pH units.
7.3 THERMOCOUPLE TEMPERATURES
USING 723-T REFERENCE
The use of the 723-T Analog Input Card RTD to
measure the reference temperature is
described in the introductory programming
example (Section OV4).
7.4 THERMOCOUPLE TEMPERATURES
USING AN EXTERNAL REFERENCE
JUNCTION
When a number of thermocouple measurements
are made at some distance from the CR7, it is
often better to use a reference junction box
located at the site rather than using the panel
temperature of the CR7. This reduces the
required length of expensive thermocouple wire
as regular copper wire can be used between the
junction box (J-box) and CR7. In addition, if the
temperature gradient between the J-box and the
thermocouple measurement junction is smaller
than the gradient between the CR7 and the
measurement junction, thermocouple inaccuracy
is reduced. In the following example, an external
reference junction is used on ten thermocouple
measurements. A Campbell Scientific 107
Temperature Probe is used to measure the
reference temperature. The connection scheme
is shown in Figure 7.4-1.
FIGURE 7.4-1. Thermocouples with External
Reference Junction
7-2
SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES
The temperature of the 107 Probe is stored in
Input Location 1 and the thermocouple
temperatures in Locations 2-11.
01:10Reps
02:315 mV slow Range
03:1IN Card
04:1IN Chan
05:1Type T (Copper-Constantan)
06:1Ref Temp Loc Ref. Temp
07:2Loc [:TC temp#1]
08:1Mult
09:0Offset
7.5 THERMOCOUPLES FOR
DIFFERENTIAL TEMPERATURE
MEASUREMENT
When configured correctly, thermocouples are
capable of measuring small temperature
gradients very accurately (Section 13.4). In this
example, the CR7 is used to make five
differential temperature measurements with
chromel-constantan thermocouples. The
connections are shown in Figure 7.5-1 where
the voltage measured between the chromel
leads is proportional to the temperature
difference between junctions R and D.
When the temperatures are within the reference
junction compensation range (Table 13.4-3),
three instructions are required in the
measurement sequence:
1. A CR7 Panel Temperature Measurement
(#17) used as a reference temperature for
the measurement at R.
2. A single ended TC measurement (#13) of R
temperatures to be used as reference
temperatures for the measurement D.
3. A differential TC measurement of D
temperatures where the reference
temperature at R are subtracted from the
results as specified in Parameter 5.
The connection shown in Figure 7.4-1 yields the
conventional polarity (sign) for the temperature
difference, i.e., D>R=+T, D<R=-T. Using R as
the reference temperature maintains this
convention whereas using D reverses the sign
of the output.
Prefixing a 2 onto the TC type in Parameter 5 of
Instruction 13 causes the CR7 to skip every
other single ended channel. Keying C before
entering Parameter 6 in Instruction 14 causes
the reference temperature location to be
incremented each rep.
The ±5mV range used in Instruction 13 allows
measurement of temperatures at R within a
range of approximately ±80 oC of the I/O
Module temperature. The ±1.5mV range used in
Instruction 14 allows the temperature difference
between D and R to approach a range of ±24
o
C, for temperatures around 25 oC (output = 61
uV/oC). The resolution of the differential
temperature measurement is approximately
0.0008 oC (50 nV/61µV/oC).
FIGURE 7.5-1. Connection for
Thermocouple Differential Temperature
Measurement
The panel temperature is stored in Input
Location 1, the temperatures of the R junctions
in locations 2-6 and the temperature differences
(D-R) in locations 7-11. If it is not necessary to
retain the temperatures of the R junctions, the
temperature differences could be stored in
locations 2-6 by changing Parameter #7 in
Instruction 14 to 2.
7-3
SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES
PROGRAM
01:P17Panel Temperature
01:1IN Card
02:1Loc [:PANL TEMP]
02:P13Thermocouple Temp (SE)
01:5Reps
02:25000 uV slow Range
03:1IN Card
04:2IN Chan
05:22Type E (Skip every other chan)
06:1Ref Temp Loc PANL TEMP
07:2Loc [:S.E. T#1 ]
08:1Mult
09:0Offset
03:P14Thermocouple Temp (DIFF)
01:5Reps
02:11500 uV slow Range
03:1IN Card
04:1IN Chan
05:12Type E (Temp difference)
06:2--Ref Temp Loc S.E. T#1
07:7Loc [:DIFF T #1]
08:1Mult
09:0Offset
When the temperature of the R junction is
outside of the CR7 reference junction
compensation range (Table 13.4-3), the TCs
must be connected in the normal fashion, one
TC per input channel; both temperatures
measured and one subtracted from the other to
find the difference. This must be done because
any error in the reference junction
compensation becomes an error in the
temperature difference.
7.6 TEMPERATURE WITH CALIBRATED
THERMOCOUPLES
Thermocouple calibration (Section 13.4) results
in a slope correction. The correction must be
applied only to the thermocouple output. When
Instructions 13 and 14 are used to measure
temperature, the temperature is the sum of the
reference temperature and the temperature
difference calculated from the thermocouple
output. The correction must be applied to the
temperature difference before the reference
temperature is added.
Example A demonstrates the use of a scaling
array (Instruction 53) to correct the calibration of
four individually calibrated thermocouples.
Another means of applying a correction factor to
a number of thermocouples is to group together
those with a similar correction factor. In
example B, the slope correction factor for a
group of 5 thermocouples is entered as the
multiplier (Parameter 8) in the instruction to
read those thermocouples. The example only
shows one group of thermocouples. If there
were several groups with similar correction
factors, Instruction 14 would be used to read
and correct each group.
After the slope correction is made, a loop is
used to add the reference temperature to the
corrected temperature differences.
CONNECTIONS
The thermocouples are connected in the normal
manner: chromel to Hi and constantan to Low.
In both examples, the first thermocouple is
connected to Channel 1. Care must be taken
that the correction factors called for in the
programming match the channels that the
calibrated thermocouples are connected to.
PROGRAM A
01:P17Panel Temperature
01:1IN Card
02:1Loc [:REF TEMP ]
02:P14Thermocouple Temp (DIFF)
01:4Reps
02:315 mV slow Range
03:1IN Card
04:1IN Chan
05:12Type E (Temp difference)
06:1Ref Temp Loc REF TEMP
07:2Loc [:TC temp#1]
08:1Mult
09:0Offset
01:1X Loc REF TEMP
02:2--Y Loc TC temp#1
03:2--Z Loc [:TC temp#1]
06:P95End
PROGRAM B
01:P17Panel Temperature
01:1IN Card
02:1Loc [:REF TEMP ]
02:P14Thermocouple Temp (DIFF)
01:5Reps
02:315 mV slow Range
03:1IN Card
04:1IN Chan
05:12Type E (Temp difference)
06:1Ref Temp Loc REF TEMP
07:2Loc [:TC temp#1]
08:.99253 Mult
09:0Offset
If there were additional groups of
thermocouples, the Instructions to measure
them would be inserted here and Parameter 2
in Instruction 87 adjusted accordingly.
03:P87Beginning of Loop
01:0Delay
02:5Loop Count
04:P33Z=X+Y
01:1X Loc REF TEMP
02:2--Y Loc TC temp#1
03:2--Z Loc [:TC temp#1]
CONNECTIONS
The black leads from the probes go to excitation
channel 1, the white leads go to ground, and the
red leads go to single ended channels 1, 2, and
3 (high and low sides of differential channel 1
and high side of 2).
Instruction 12 excites and measures the RH
portion of the Campbell Scientific 207
temperature and relative humidity probe. This
instruction relies on a previously measured
temperature to compute the RH from the probe
resistance. Instruction 12 has the option of
using a single temperature to provide the
compensation reference for several RH probes.
In this example, three probes will be measured;
the temperature of each probe will be measured
and used to provide temperature compensation
for that probe. Instruction 11 is used to obtain
the temperatures of the three probes which are
stored in Input locations 1-3, the RH values are
stored in Input locations 4-6. The temperature
measurements are made on single ended input
channels 1-3, just as in example 7.7. The
program listed below is a continuation of the
program given in example 7.7.
05:P95End
7.7 107 TEMPERATURE PROBE
Instruction 11 is designed to excite and
measure the Campbell Scientific 107 thermistor
probe (or the thermistor portion of the 207
temperature and relative humidity probe) and
convert the measurement into temperature
(oC). In this example, the temperatures are
obtained from three 107 probes. The
measurements are made on single ended
channels 1-3, and the temperatures are stored
in Input locations 1-3.
CONNECTIONS
The black leads from the probes are connected
to excitation channel 1, the clear leads are
connected to ground. The red leads are from
the thermistor circuit and are connected to
single ended channels 1-3. The white leads are
from the RH circuit and are connected to single
ended channels 4-6. The correct order must be
maintained when connecting the red and white
leads, i.e., the red lead from the first probe is
connected to single ended channel 1 and the
white lead from that probe is connected to
single ended channel 4, etc.
An anemometer with a photochopper
transducer produces a pulsed output which is
monitored with the Pulse Count Instruction,
configured for High Frequency Pulses. The
Pulse Count Instruction counts the number of
pulses occurring in each execution interval. An
option in the instruction allows this to be
converted to frequency in Hertz (i.e.,
Pulses/Second). The anemometer used in this
example is the R. M. Young Model No. 12102D
Cup Anemometer, with a 10 window chopper
wheel. The photochopper circuitry is powered
from the CR7 12V supply; AC power or backup
batteries should be used to compensate for the
increased current drain.
Wind speed is desired in meters per second.
There is a pulse each time a window in the
chopper wheel, which revolves with the cups,
allows light to pass from the source to the
photoreceptor. Because there are 10 windows
in the chopper wheel, there are 10 pulses per
revolution. Thus, 1 rpm is equal to 10 pulses
per 60 seconds (1 minute) or 6 rpm = 1 pulse
per second. The manufacturer's calibration for
relating wind speed to rpm is:
The multiplier and offset to convert pulses per
second to meters per second are:
m/s =
0.01632 m/s/rpm x 6 rpm/(pulse/s)
+ 0.2 m/s = 0.0979 m/s/pulse x
pulses + 0.2 m/s
There are occasionally times when the CR7's
CPU is occupied and does not reset the pulse
counters at the exact time interval programmed.
If the artificially large wind speed that results
from a long interval is used, it causes a false
average or maximum value. To avoid this, the
CR7 is instructed to discard values resulting
from long intervals, and use the previous value
instead.
FIGURE 7.9-1. Wiring Diagram for
Anemometer
PROGRAM
(Execution interval 10 seconds)
01:P3Pulse
01:2Reps
02:2IN Card
03:2Pulse Input Chan
04:20High frequency; Output Hz.
05:10Loc [:WS m/s ]
06:.0979Mult
07:.2Offset
7.10 TIPPING BUCKET RAINGAGE
WITH LONG LEADS
7-6
Wind speed (m/s) =
0.01632 m/s/rpm x rpm +0.2 m/s
A tipping bucket raingage is measured with the
Pulse Count Instruction configured for Switch
Closure. Counts from long intervals will be
used, as the final output desired is total rainfall
(obtained with Instruction 72, Totalize). If
counts from long intervals were discarded, less
rainfall would be recorded than was actually
measured by the gage (assuming there were
counts in the long intervals). Output is desired
in millimeters of precipitation; the gage is
calibrated for a 0.01 inch tip so a multiplier of
0.254 is used.
SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES
FIGURE 7.10-1. Wiring Diagram for
Raingage with Long Leads
In a long cable, there is appreciable
capacitance between the lines which is
discharged across the switch when it closes. In
addition to shortening switch life, a transient
may be induced in other wires, packaged with
the rain gage leads, each time the switch
closes. The 100 ohm resistor protects the
switch from arcing and the associated transient
from occurring, and should be included any time
leads longer than 100 ft. are used with a switch
closure.
Figure 7.11-1 diagrams the circuit used to
measure the PRT. The 10 kohm resistor allows
the use of a high excitation voltage and low
voltage ranges on the measurements. This
insures that noise in the excitation does not
have an effect on signal noise. Because the
fixed resistor (Rf) and the PRT (Rs) have
approximately the same resistance, the
differential measurement of the voltage drop
across the PRT can be made on the same
range as the differential measurement of the
voltage drop across Rf. The use of the same
range eliminates any range translation error that
might arise from the 0.01% tolerance of the
range translation resistors in the CR7.
If the voltage drop across the PRT (V2) is kept
on the 50 mV range, self heating of the PRT
should be less than 0.001 oC in still air. The
resolution of the measurement is increased as
the excitation voltage (Vx) is increased. The
voltage drop across the PRT is equal to V
multiplied by the ratio of Rs to the total
resistance, and is greatest when Rs is greatest
(Rs=115.54 ohms at 40 oC). To find the
maximum excitation voltage that can be used,
we assume V2 equal to 50 mV and use Ohm's
Law to solve for the resulting current, I.
I = 50mV/Rs = 50mV/115. 54 Ohms = 0.433mA
Next solve for Vx:
x
7.11 100 OHM PRT IN 4 WIRE HALF
BRIDGE
Instruction 9 is the best choice for accuracy
where the Platinum Resistance Thermometer
(PRT) is separated from other bridge
completion resistors by a lead length having
more than a few thousandths of an ohm
resistance. In this example, it is desired to
measure a temperature in the range of -10 to
40 oC. The length of the cable from the CR7 to
the PRT is 500 feet.
FIGURE 7.11-1. Wiring Diagram for PRT in 4
Wire Half-Bridge
Vx = I(R1+Rs+Rf) = 4.42V
If the actual resistances were the nominal
values, the CR7 would not overrange with Vx =
4.4 V. To allow for the tolerances in the actual
resistances it is decided to set Vx equal to 4.2
volts (e.g., if the 10 kohms resistor is 5% low,
Rs/(R1+Rs+Rf)=115.54/9715.54 and Vx must
be 4.204V to keep Vs less than 50 mV).
The result of Instruction 9 when the first
differential measurement (V1) is not made on
the 5V range is equivalent to Rs/Rf. Instruction
16 computes the temperature (oC) for a DIN
43760 standard PRT from the ratio of the PRT
resistance to its resistance at 0 oC (Rs/R0).
Thus, a multiplier of Rf/R0 is used in Instruction
9 to obtain the desired intermediate, Rs/R0 (=
Rs/Rf x Rf/R0). If Rs and R0 were each exactly
100 ohms the multiplier would be 1. However,
neither resistance is likely to be exact. The
correct multiplier is found by connecting the
PRT to the CR7 and entering Instruction 9 with
7-7
SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES
a multiplier of 1. The PRT is then placed in an
ice bath (0 oC; Rs=R0), and the result of the
bridge measurement is read using the *6 Mode.
The reading is Rs/Rf, which is equal to R0/R
since Rs = R0, the correct value of the
multiplier, Rf/R0, is the reciprocal of this
reading. The initial reading assumed for this
example was 0.9890, the correct multiplier is:
Rf/R0 = 1/0.9890 = 1.0111.
The fixed 100 ohm resistor must be thermally
stable. Its precision is not important because
the exact resistance is incorporated, along with
that of the PRT, into the calibrated multiplier.
The 10 ppm/oC temperature coefficient of the
fixed resistor will limit the error due to its change
in resistance with temperature to less than 0.15
o
C over the specified temperature range.
Because the measurement is ratiometric
(Rs/Rf), the properties of the 10 kohm resistor
do not affect the result.
f
Figure 7.12-1. 3 Wire Half-Bridge Used to
As in the example in section 7.11, the excitation
voltage is calculated to be the maximum
possible yet allow the ±50 mV measurement
range. The 10 kohm resistor has a tolerance of
±1%, thus, the lowest resistance to expect from
it is 9.9 kohms. We calculate the maximum
excitation voltage (Vx) to keep the voltage drop
across the PRT less than 50 mV:
0.050V > Vx 115.54/(9900+115.54); Vx < 4.33V
Measure 100 ohm PRT
PROGRAM
01:P9Full BR w/Compensation
01:1Rep
02:450 mV slow EX Range
03:450 mV slow BR Range
04:1IN Card
05:1IN Chan
06:1EX Card
07:1EX Chan
08:1Meas/EX
09: 4200mV Excitation
10:1Loc [:Rs/Ro ]
11:1.0111Mult
12:0Offset
02:P16Temperature RTD
01:1Rep
02:1R/Ro Loc Rs/Ro
03:2Loc [:TEMP degC]
04:1Mult
05:0Offset
7.12 100 OHM PRT IN 3 WIRE HALF
BRIDGE
The temperature measurement requirements in
this example are the same as in section 7.11.
In this case a three wire half bridge, Instruction
7, is used to measure the resistance of the
PRT. The diagram of the PRT circuit is shown
in Figure 7.12-1.
The excitation voltage used is 4.3V.
The multiplier used in Instruction 7 is
determined in the same manner as in section
7.11. In this example the multiplier (Rf/R0) is
assumed to be 100.93.
The 3 wire half bridge compensates for lead
wire resistance by assuming that the resistance
of wire A is the same as the resistance of wire
B. The maximum difference expected in wire
resistance is 2%, but is more likely to be on the
order of 1%. The resistance of Rs calculated
with Instruction 7, is actually Rs plus the
difference in resistance of wires A and B. The
average resistance of 22 AWG wire is 16.5
ohms per 1000 feet, which would give each 500
foot lead wire a nominal resistance of 8.3 ohms.
Two percent of 8.3 ohms is 0.17 ohms.
Assuming that the greater resistance is in wire
B, the resistance measured for the PRT (R0 =
100 ohms) in the ice bath would be 100.17
ohms, and the resistance at 40 oC would be
115.71. The measured ratio Rs/R0 is 1.1551,
the actual ratio is 115.54/100 = 1.1554. The
temperature computed by Instruction 17 from
the measured ratio would be about 0.1 oC lower
than the actual temperature of the PRT. This
source of error does not exist in the example in
section 7.11, where the 4 wire half bridge is
used to measure PRT resistance.
7-8
SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES
The advantages of the 3 wire half bridge are
that it only requires 3 lead wires going to the
sensor, and takes 2 single ended input
channels whereas the 4 wire half bridge
requires 2 differential input channels.
01:1Rep
02:1R/Ro Loc Rs/Ro
03:2Loc [:TEMP degC]
04:1Mult
05:0Offset
7.13 100 OHM PRT IN 4 WIRE FULL
BRIDGE
This example describes obtaining the
temperature from a 100 ohm PRT in a 4 wire
full bridge (Instruction 6). The temperature
being measured is in a constant temperature
bath and is to be used as the input for a control
algorithm. The PRT in this case does not
adhere to the DIN standard (alpha = 0.00385)
used in the temperature calculating Instruction
16. Alpha is defined as (R
R
and R0 are the resistances of the PRT at
100
100 oC and 0 oC, respectively. In this PRT
alpha is equal to 0.00392.
100/R0
-1)/100 where
The result given by Instruction 6 (X) is 1000
Vs/Vx (where Vs is the measured bridge output
voltage and Vx is the excitation voltage) which
is:
X = 1000 (Rs/(Rs+R1)-R3/(R2+R3))
The resistance of the PRT (Rs) is calculated
with the Bridge Transform Instruction 59:
Rs = R1 X'/(1-X')
Where
X' = X/1000 + R3/(R2+R3)
Thus, to obtain the value Rs/R0, (R0 = Rs @
0oC) for the temperature calculating Instruction
16, the multiplier and offset used in Instruction 6
are 0.001 and R3/(R2+R3), respectively. The
multiplier used in Instruction 59 to obtain Rs/R
is R1/R0 (5000/100 = 50).
It is desired to control the temperature bath at
50oC with as little variation as possible. High
resolution is desired so the control algorithm will
be able to respond to minute changes in
temperature. The highest resolution is obtained
when the temperature range results in an output
voltage (Vs) range which fills the measurement
range selected in Instruction 6. The full bridge
configuration allows the bridge to be balanced
(Vs = 0V) at or near the control temperature.
Thus, the output voltage can go both positive
and negative as the bath temperature changes,
allowing the full use of the measurement range.
The resistance of the PRT is approximately
119.6 ohms at 50 oC. The 120 ohm fixed
resistor balances the bridge at approximately 51
o
C. The output voltage is:
Vs = Vx [Rs/(Rs+R1) - R3/(R2+R3)]
0
FIGURE 7.13-1. Full Bridge Schematic For
100 Ohm PRT
= Vx [Rs/(Rs+5000) - 0.023438]
The temperature range to be covered is 50
+5oC. At 45 oC Rs is approximately 117.6
ohms, or:
Vs = -458.448x10-6 V
Vs can be measured on the ±1500 µV scale.
Setting Vs equal to -1500 µV and solving for V
results in Vx = 3.272 V. Vx is entered as 3270
mV in Parameter 8 of Instruction 6.
x
x
7-9
SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES
The 5 ppm/oC temperature coefficient of the
fixed resistors was chosen so that their 0.01%
accuracy tolerance would hold over the desired
temperature range.
There is a change of approximately 1500 µV
from the output at 45 oC to the output at 51 oC,
or 250 µV/oC. With a resolution of 50 nV on the
1500 µV range, this means that the temperature
resolution is 0.0002 oC.
The relationship between temperature and PRT
resistance is a slightly nonlinear one.
Instruction 16 computes this relationship for a
DIN standard PRT where the nominal
temperature coefficient is 0.00385/oC. The
change in nonlinearity of a PRT with the
temperature coefficient of 0.00392/oC is minute
compared with the slope change. Entering a
slope correction factor of 0.00385/0.00392 =
0.98214 as the multiplier in Instruction 16
results in a calculated temperature which is well
within the accuracy specifications of the PRT.
This example describes a measurement made
with a Druck PDCR 10/D depth measurement
pressure transducer. The pressure transducer
was ordered for use with 5 volt positive or
negative excitation (passive temperature
compensation) and has a range of 5 psi or
about 3.5 meters of water. The transducer is
used to measure the depth of water in a stilling
well.
Instruction 6, 4 wire full bridge, is used to
measure the pressure transducer. The high
output of the semiconductor strain gage
necessitates the use of the 50mV input range.
The sensor is calibrated by connecting it to the
CR7 and using Instruction 6 with a multiplier of
1 and an offset of 0, noting the readings (*6
Mode) with 10 cm of water above the sensor
and with 334.6 cm of water above the sensor.
The output of Instruction 6 is 1000 Vs/Vx or
millivolts per volt excitation. At 10 cm the
reading is 0.19963 mV/V and at 334.6 cm the
reading is 6.6485 mV/V. The multiplier to yield
output in cm is:
(334.6 - 10)/(6.6485-.19963) = 50.334 cm/mV/V
The offset is determined after the pressure
transducer is installed in the stilling well. The
sensor is installed 65 cm below the water level
at the time of installation. The depth of water at
this time is determined to be 72.6 cm relative to
the desired reference. When programmed with
the multiplier determined above and an offset of
0, a reading of 65.12 is obtained. The offset for
the actual measurements is thus determined to
be 72.6 - 65.12 = 7.48 cm.
The lead length is approximately 10 feet, so
there is no appreciable error due to lead wire
resistance.
03:P16Temperature RTD
01:1Rep
02:11R/Ro Loc Rs/Ro
03:12Loc :
04:.98214 Mult
05:0Offset
When a long cable is required between a load
cell and the CR7, the resistance of the wire can
create a substantial error in the measurement if
the 4 wire full bridge (Instruction 6) is used to
excite and measure the load cell. This error
arises because the excitation voltage is lower at
the load cell than at the CR7 due to voltage
drop in the cable. The 6 wire full bridge
(Instruction 9) avoids this problem by measuring
the excitation voltage at the load cell. This
example shows the errors one would encounter
if the actual excitation voltage was not
measured and shows the use of a 6 wire full
bridge to measure a load cell on a weighing
lysimeter (a container buried in the ground, filled
with plants and soil, used for measuring
evapotranspiration).
FIGURE 7.15-1. Diagrammatic
Representation of Lysimeter Weighing
Mechanism
There is 1000 feet of 22 AWG cable between
the CR7 and the load cell. The output of the
load cell is directly proportional to the excitation
voltage. When Instruction 6 (4 wire 1/2 bridge)
is used, the assumption is that the voltage drop
in the connecting cable is negligible. The
average resistance of 22 AWG wire is 16.5
ohms per 1000 feet. Thus, the resistance in the
excitation lead going out to the load cell added
to that in the lead coming back to ground is 33
ohms. The resistance of the bridge in the load
cell is 350 ohms. The voltage drop across the
load cell is equal to the voltage at the CR7
multiplied by the ratio of the load cell resistance
Rs, to the total resistance, RT, of the circuit. If
Instruction 6 were used to measure the load
cell, the excitation voltage actually applied to the
load cell, V1 would be:
The lysimeter is 2 meters in diameter and 1.5
meters deep. The total weight of the lysimeter
with its container is approximately 8000 kg. The
lysimeter has a mechanically adjustable
counterbalance, and changes in weight are
measured with a 250 pound (113.6 kg) capacity
Sensotec Model 41 tension/compression load
cell. The load cell has a 4:1 mechanical
advantage on the lysimeter (ie., a change of 4
kg in the mass of the lysimeter will change the
force on the load cell by 1 kg-force or 980 N).
The surface area of the lysimeter is 3.1416 m
or 31,416 cm2, so 1 cm of rainfall or
evaporation results in a 31.416 kg change in
mass. The load cell can measure ±113.6 kg, a
227 kg range. This represents a maximum
change of 909 kg, or 28 cm of water in the
lysimeter before the counterbalance would have
to be readjusted.
2
V1 = Vx Rs/RT = Vx 350/(350+33) = 0.91 V
Where Vx is the voltage applied at the
excitation card. This means that the voltage
output by the load cell would only be 91% of that
expected. If recording of the lysimeter data was
initiated with the load cell output at 0 volts, and
100 mm of evapotranspiration had occurred,
calculation of the change with Instruction 6
would indicate that only 91 mm of water had
been lost. Because the error is a fixed
percentage of the output, the actual magnitude
of the error increases with the force applied to
the load cell. If the resistance of the wire was
constant, one could correct for the voltage drop
with a fixed multiplier. However, the resistance
of copper changes 0.4% per oC change in
temperature. Assume that the cable between
the load cell and the CR7 lays on the soil
surface and undergoes a 25 oC diurnal
temperature fluctuation. If the resistance is 33
x
7-11
SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES
ohms at the maximum temperature, then, at the
minimum temperature, the resistance is:
(1-25x0.004)33 ohms = 29.7 ohms
The actual excitation voltage at the load cell is:
V1 = 350/(350+29.7) Vx = .92 V
The excitation voltage has increased by 1%,
relative to the voltage applied at the CR7. In the
case where we were recording a 91 mm change
in water content, there would be a 1 mm diurnal
change in the recorded water content that would
actually be due to the change in temperature.
Instruction 9 solves this problem by actually
measuring the voltage drop across the load cell
bridge. The drawbacks to using Instruction 9
are that it requires an extra differential channel
and the added expense of a 6 wire cable. In
this case the benefits are worth the expense.
The load cell has a nominal full scale output of
3 millivolts per volt excitation. If the excitation is
5 volts, the full scale output is 15 millivolts; thus
the ±15 millivolt range is selected. The
calibrated output of the load cell is 3.106 mV/V
at a load of 250 pounds. Output is desired in
millimeters of water, with respect to a fixed
point. The calibration in mV/V1/mm is :
x
started at the beginning of what is expected to
be a period during which evapotranspiration
exceeds precipitation. Instruction 9 is
programmed with the correct multiplier and no
offset. After hooking everything up, the
counterbalance is adjusted so that the load cell
is near the top of its range, this will allow a
longer period before readjustment is necessary.
The result of Instruction 9 (monitored with the *6
Mode) is 109. The offset needed to give the
desired initial value of 375mm is 266. However,
it is decided to add this offset in a separate
program so that the result of Instruction 9 can
be used as a ready reminder of the strain on the
load cell (range = ±140mm). When the strain
on the load cell nears its rated limits, the
counterbalance is readjusted and the offset
recalculated to provide a continuous record of
the water budget.
The program table has an execution interval of
10 seconds. The average value in millimeters
is output to Final Storage (not shown in Table)
every hour. The average is used, instead of a
sample, in order to cancel out the effects of
wind loading on the lysimeter.
1
3.106mV/V1/250lb x 2.2lb/kg x
3.1416kg/mm/4 =
0.02147mV/V1/mm
The reciprocal of this gives the multiplier to
convert mV/V1 into millimeters (the result of
Instruction 9 is the ratio of the output voltage to
the actual excitation voltage multiplied by 1000,
which is mV/V1):
1/0.02147mV/V1/mm = 46.583 mm/mV/V
The output from the load cell is connected so
that the voltage increases as the mass of the
lysimeter increases (if the actual mechanical
linkage was as diagrammed in Figure 7.15-1,
the output voltage would be positive when the
load cell was under tension).
When the experiment is started, the water
content of the soil in the lysimeter is
approximately 25% on a volume basis. It is
decided to use this as the reference, (i.e., 0.25
x 1500mm = 375 mm). The experiment is
1
FIGURE 7.15-2. 6 Wire Full Bridge
Connection for Load Cell
PROGRAM
01:P9Full BR w/Compensation
01:1Rep
02:85000 mV slow EX Range
03:315 mV slow BR Range
04:1IN Card
05:1IN Chan
06:1EX Card
07:1EX Chan
08:1Meas/EX
09: 5000mV Excitation
10:1Loc [:mm RAW ]
11:46.583Mult
12:0Offset
7-12
02:P34Z=X+F
01:1X Loc mm RAW
02:266F
03:2Z Loc [:mm CORECT]
7.16 227 GYPSUM SOIL MOISTURE
BLOCK
Soil moisture is measured with a gypsum block
by relating the change in moisture to the change
in resistance of the block. An AC Half Bridge
(Instruction 5) is used to determine the
resistance of the gypsum block. Rapid reversal
of the excitation voltage inhibits polarization of
the sensor. Polarization creates an error in the
output so the fast integration time is used. The
output of Instruction 5 is the ratio of the midbridge voltage to the excitation voltage, this
output is converted to gypsum block resistance
with Instruction 59, Bridge Transform.
The Campbell Scientific 227 Soil Moisture Block
uses a Delmhorst gypsum block with a 1 kohm
bridge completion resistor. Using data supplied
by Delmhorst, Campbell Scientific has
computed coefficients for a 5th order polynomial
to convert block resistance to water potential in
bars. There are two polynomials, one to
optimize the range from -0.1 to -2 bars and one
to cover the range from -0.1 to -15 bars (the
minus sign is omitted in the output). The -0.1 to
-2 bar polynomial requires a multiplier of 1 in the
Bridge Transform Instruction (result in Kohms)
and the -0.1 to -15 bar polynomial requires a
multiplier of 0.1 (result in 10,000s of ohms).
The multiplier is a scaling factor to maintain the
maximum number of significant digits in the
coefficients of the polynomial.
In this example, we wish to make
measurements on 12 gypsum blocks and output
the final data in bars. The soil where the
moisture measurements are to be made is quite
wet at the time the data logging is initiated, but
is expected to dry beyond the -2 bar limit of the
wet range polynomial. The dry range
polynomial is used, so a multiplier of 0.1 is
entered in the bridge transform instruction.
When the water potential is computed it is
written over the resistance value. The
potentials are stored in Input locations 1-12
where they may be accessed for output to Final
Storage. If it was desired to retain the
resistance values the potential measurements
could be stored in locations 13-24 by changing
parameter 3 in Instruction 55 to 13.
SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES
FIGURE 7.16-1. 12 Gypsum Blocks
Connected to the CR7
The first 6 blocks are excited by excitation
channel 1 and the last 6 by channel 2. Thus, 6
is entered for the number of measurements per
excitation channel in Parameter 7 of Instruction
01:12Reps
02:1X Loc POTEN #1
03:1F(X) Loc [:POTEN #1 ]
04:.15836 C0
05:6.1445C1
06:-8.4139C2
07:9.2493C3
08:-3.1685C4
09:.33392 C5
7-13
SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES
7.17 NONLINEAR THERMISTOR IN
HALF BRIDGE (CAMPBELL
SCIENTIFIC MODEL 101)
Instruction 11, 107 Thermistor Probe,
automatically linearizes the output of the
nonlinear thermistor in the 107 Probe by
transforming the millivolt reading with a 5th
order polynomial. Instruction 55, Polynomial,
can be used to linearize the output of any
nonlinear thermistor, provided the correlation
between temperature and probe output is
known, and an appropriate polynomial fit has
been determined. In this example, the CR7 is
used to measure the temperature of 5 Campbell
Scientific 101 Probes (used with the CR21).
Instruction 4, Excite, Delay and Measure, is
used because the high source resistance of the
probe requires a long input settling time (See
Section 13.3.1). The excitation voltage is 2000
mV, the same as used in the CR21. The signal
voltage is then transformed to temperature
using the Polynomial Instruction.
The manual for the 101 Probe gives the
coefficients of the 5th order polynomial used to
convert the output in millivolts to temperature (E
denotes the power of 10 by which the mantissa
is multiplied):
The CR7 will only allow 5 significant digits to the
right or left of the decimal point to be entered
from the key board. The polynomial can not be
applied exactly as given in the 101 manual. The
initial millivolt reading must be scaled if the
coefficients of the higher order terms are to be
entered with the maximum number of significant
digits. If 0.001 is used as a multiplier on the
millivolt output, the coefficients are divided by
0.001 raised to the appropriate power, (i.e.,
C0=C0, C1=C1/0.001, C2=C2/.000001 etc.).
With this adjustment, the coefficients entered in
Parameters 4-9 of Instruction 55 become:
SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES
The following examples are intended to illustrate the use of Processing and Program Control
Instructions, flags, and the capability to direct the results of Output Processing Instructions to Input
Storage.
The specific examples may not be as important as some of the techniques employed, for example:
Directing Output Processing to Input Storage is used in the Running Average and Rainfall Intensity
examples (8.1 and 8.2).
Flags tests are used in the Running Average, Interrupt Subroutine, and Converting Wind Direction
examples (8.1, 8.4, and 8.6)
These examples are not complete programs to be taken verbatim. They need to be altered to fit specific
needs.
8.1 COMPUTATION OF RUNNING
AVERAGE
It is sometimes necessary to compute a running
average (i.e., the average includes a fixed
number of samples and is continuously updated
as new samples are taken). Because the
output interval is shorter than the averaging
period, Instruction 71 cannot be used; the
algorithm for computing this average must be
programmed by the user. The following
example demonstrates a program for
computing a running average.
In this example, each time a new measurement
is made (in this case a thermocouple
temperature) an average is computed for the 10
most recent samples. This is done by saving all
10 temperatures in contiguous input locations
and using the Spatial Average Instruction (51)
to compute the average. The temperatures are
stored in locations 11 through 20. Each time
the table is executed, the new measurement is
stored in location 20 and the average is stored
in location 2. The Block Move Instruction (54) is
then used to move the temperatures from
locations 12 through 20 down by one location;
the oldest measurement (in location 11) is lost
when the temperature from location 12 is
written over it.
Where i is current reading,
i-1 is previous reading, etc.
*1Table 1 Programs
01:1Sec. Execution Interval
01:P17Panel Temperature
01:1IN Card
02:1Loc [:Panl Temp]
02:P14Thermocouple Temp (DIFF)
01:1Rep
02:11500 uV slow Range
03:1IN Card
04:1IN Chan
05:1Type T (Copper-Constantan)
06:1Ref Temp Loc Panl Temp
07:20Loc [:Temp i ]
08:1Mult
09:0.0000Offset
03:P51Spatial Average
01:10Swath
02:11First Loc Temp i-9
03:2Avg Loc [:10smpl av]
8-1
SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES
04:P54Block Move
01:9No. of Values
02:12First Source Loc Temp i-8
03:1Source Step
04:11First Destin. Loc [:Temp i-9 ]
05:1Destination Step
05:P86Do
01:10Set high Flag 0 (output)
06:P70Sample
01:1Rep
02:2Loc 10smpl av
07:PEnd Table 1
In the above example, all samples for the
average are stored in input locations. This is
necessary when an average must be output
with each new sample. In most cases,
averages are desired less frequently than
sampling. For example, it may be necessary to
sample some parameter every five seconds and
output every hour an average of the previous
three hours' readings. If all samples were
saved, this would require 2160 input locations.
The same value can be obtained by computing
an hourly average and averaging the hourly
averages for the past three hours. To do this
requires that hourly averages be stored in input
locations.
Instruction 80 is used to send the one hour
average to Input Storage and again to send the
three hour average to Final Storage.
Input Location Labels:
1:AVG i-2
2:AVG i-1
3:AVG i
4:3 HR AVG
5:XX mg/M3
02:P92If time is
01:0minutes into a
02:60minute interval
03:10Set high Flag 0 (output)
03:P80Set Active Storage Area
01:3Input Storage Area
02:3Array ID or location
04:P71Average
01:1Rep
02:5Loc
05:P51Spatial Average
01:3Swath
02:1First Loc AVG i-2
03:4Avg Loc [:3 HR AVG ]
06:P80Set Active Storage Area
01:1Final Storage Area
02:25Array ID or location
07:P77Real Time
01:220Day,Hour-Minute
08:P70Sample
01:1Rep
02:4Loc 3 HR AVG
09:P91If Flag
01:100 (output) is set
02:30Then Do
10:P54Block Move
01:2No. of Values
02:2First Source Loc
03:1Source Step
04:1First Destination Loc [:AVG i-2 ]
In this example, the total rain for the last 15
minutes is output only if any rain has occurred.
The program makes use of the capability to
direct the output of Output Processing
Instructions to Input Storage.
SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES
Every 15 minutes, the total rain is sent to Input
Storage. If the total is greater than 0, output is
redirected to Final Storage, the time is output,
and the total is sampled.
01:0minutes into a
02:15minute interval
03:10Set high Flag 0 (output)
03:P80Set Active Storage Area
01:3Input Storage Area
02:2Array ID or location
04:P72Totalize
01:1Rep
02:1Loc Rain (mm)
05:P89If X<=>F
01:2X Loc
02:3>=
03:0F
04:30Then Do
06:P80Set Active Storage Area
01:1Final Storage Area
02:25Array ID or location
07:P77Real Time
01:220Day,Hour-Minute
08:P70Sample
01:1Rep
02:2Loc
09:P95End
8.3 SUB 1 MINUTE OUTPUT INTERVAL
SYNCHED TO REAL TIME
Instruction 92 has one minute resolution. If
processed output is required on an interval less
than one minute, Instructions 18 and 89 can be
used to set the Output Flag on a shorter
interval.
Instruction 18 takes time (tenths of seconds into
minute, minutes into day, or hours into year),
performs a modulo divide by a user specified
value and loads it into an input location.
When the modulo divisor divides evenly into the
interval, one gets a counter in an input location
that goes to 0 on a periodic interval. In this
example, tenths of seconds into the minute is
modulo divided by 300. The counter counts up
to 295 then goes to 0 (i.e., every 30 seconds;
tenths of seconds into minute has a resolution
of 0.1 seconds).
Instruction 89 is used to set the Output Flag
when the tenths of seconds counter is less than
5 (the execution interval, 0.5 seconds). With
this short program, the Output Flag could be set
when the seconds counter equaled 0.
However, if Instruction 18 followed a series of
instructions that took longer than 0.1 seconds to
execute or was in Table 2, executed at the
same interval as an extensive Table 1, the time
at which Instruction 18 was executed might be
0.1 seconds or more beyond the modulo divisor.
The value output would not equal 0. Setting the
Output Flag when the seconds counter is less
than the execution interval avoids this problem.
Using Instruction 18 keeps the output interval
synchronized with real time. If a counter
incremented within the program was used to
determine when to set the Output Flag, output
would depend on the number of times the table
was executed. The actual time of output would
depend on when the program was actually
compiled and started running. If the table
overran its execution interval (Section 1.1.1),
the output interval would not be the count
multiplied by the execution interval, but some
longer interval.
In this example a temperature (type E
thermocouple) is measured every 0.5 seconds
and the average output every 30 seconds.
8-3
SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES
Input Location Assignments:
1:TEMP DEG C
10:30 SEC 0
*1Table 1 Programs
01:.5Sec. Execution Interval
01:P18Time
01:0Tenths of seconds into minute
(maximum 600)
02:300Mod/by
03:10Loc [:30 SEC 0 ]
02:P17Panel Temperature
01:1IN Card
02:1Loc [:REF TEMP ]
03:P14Thermocouple Temp (DIFF)
01:1Rep
02:1315 mV fast Range
03:1IN Card
04:2IN Chan
05:2Type E (Chromel-Constantan)
06:1Ref Temp Loc REF TEMP
07:2Loc [:TC TEMP ]
08:1Mult
09:0Offset
04:P89 If X<=>F
01:10X Loc 30 SEC 0
02:4<
03:.5F
04:10Set high Flag 0 (output)
outputs for strip charts. The output values in
this example are wind speed and wind direction.
The following program measures the sensors
every five seconds. The readings are moved to
another two locations and scaled to a 0 to 1000
millivolt output for the strip chart. Wind direction
is changed from a 0-360 degree input to output
representing 0 to 540 degrees. This conversion
is done in a subroutine which is described in the
next example.
The example also includes instructions to
output wind vector every hour.
This example illustrates the use of the Analog
Output Instruction 21 to output 2 analog
voltages to strip chart.
While of questionable value because of power
requirements and strip chart reliability, some
archaic regulations require strip chart backup
on weather data. Instruction 21 may be used
with the CR7 to provide two continuous analog
SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES
04:P37Z=X*F
01:1X Loc WS
02:10F
03:4Z Loc [:WS output]
05:P37Z=X*F
01:3X Loc 0-540 WD
02:1.8519F
03:5Z Loc [:WD output]
06:P21Analog Out
01:1EX Card
02:1CAO Chan
03:4mv Loc WS output
07:P21Analog Out
01:1EX Card
02:2CAO Chan
03:5mv Loc WD output
08:P92If time is
01:0minutes into a
02:60minute interval
03:10Set high Flag 0 (output)
09:P69Wind Vector
01:1Rep
02:180Samples per sub-interval
03:00Polar Sensor/(S, D1, SD1)
04:1Wind Speed/East Loc WS
05:2Wind Dir./North Loc 0-360 WD
10:PEnd Table 1
8.5 CONVERTING 0-360 WIND
DIRECTION OUTPUT TO 0-540 FOR
STRIP CHART
If 0-360 degree wind direction is output to a strip
chart, the discontinuity at 0/360 will cause the
pen to jump back and forth full scale when the
winds are varying from the north. In the days of
strip charts this was solved with a 0-540 degree
pot on the wind vane (direction changes from
540 to 180 and from 0 to 360 so the pen only
jumps once when the wind is out of the north or
south).
When faced with the necessity of strip chart
output (see previous example), the following
algorithm can be used to change a 0-360
degree input to 0-540. (If you have a 0-540 pot,
it can be used with the 21X since the Wind
Vector Instruction, 69, will work with this output.)
To change 0-360 degrees to the 0-540 degrees,
360 degrees must sometimes be added to the
reading when it is in the range of 0 to 180. The
following algorithm does this by assuming that if
the previous reading was less than 270, the
vane has shifted through 180 degrees and does
not need to be altered. If the previous 0-540
reading was greater than 270, 360 degrees is
added.
This example is written as a subroutine which is
used by the previous example to output an
analog voltage to a strip chart.
Input Location Labels:
1:WS
2:0-360 WD
3:0-540 WD
4:WS output
5:WD output
*3Table 3 Subroutines
01:P85Beginning of Subroutine
01:1Subroutine Number
02:P89If X<=>F
01:3X Loc 0-540 WD
02:3>=
03:270F
04:30Then Do
03:P86Do
01:11Set high Flag 1
04:P94Else
05:P86Do
01:21Set low Flag 1
06:P95End
07:P31Z=X
01:2X Loc 0-360 WD
02:3Z Loc [:0-540 WD ]
08:P89If X<=>F
01:3X Loc 0-540 WD
02:4<
03:180F
04:30Then Do
8-5
SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES
The example is a two level meteorological tower
with five sensors at each level. The three
components of the wind are measured using
prop anemometers. Two thermocouples (TC)
are used to measure ambient and wet-bulb
temperatures and calculate water vapor
pressure on-line. All sensors are scanned once
per second (1 Hz) and a five minute averaging
period with a 30 minute Output Interval is
specified. The example optimizes the input
measurement sequence for speed and shows
the instructions necessary to provide calibrated
inputs, properly ordered to produce the desired
outputs from the Covariance Correlation
(CV/CR) Instruction. Table 8.7-1 groups the
sensors according to measurement type and
gives the CR7 multiplier and offset.
The props can all be measured as single-ended
voltages, but the vertical wind prop calibration
differs from the U and V prop calibration. The
fastest input sequence is to measure both
levels (6 props) with a single instruction using
the U and V calibration and correct the W
measurements with the Fixed Multiply,
Instruction 37.
The type E thermocouples are measured on the
most sensitive input range, 5mV,
o
accommodating a ±80
C range between the
measurement and CR7 reference junction. The
o
resolution is (.33µV/(60µV/
o
C. Measuring absolute temperature with TCs
C) or about 0.006
requires a reference junction temperature
measurement. This is measured with
Instruction 17.
The specified outputs determine the input order
required by the CV/CR Instruction. Table 8.6-2
lists the desired outputs from the two levels
along with the Input Storage locations for the
processed results.
TABLE 8.6-1. Example Sensor Description and CR7 Multiplier and Offset
Table 8.6-3 lists the input channel configuration
and Input Storage allocation for the measured
values. After reading the new input samples,
the Level 2 measurements are relocated using
the Block Move Instruction 54, then Ta1 is
relocated through a separate move and e1 is
positioned by specifying the destination location
in the Wet/Dry-Bulb Instruction. The CV/CR
Instruction must be entered twice, once for each
level.
In addition to ordering Level 1 and Level 2 in
locations 1-5 and 11-15 respectively, two more
COVARIANCES LOCCORRELATIONS LOC
COVARIANCES LOC
CV(U2,Ta2)51
CV(U2,e2)52
CV(V2,Ta2)53
CV(V2,e2)54
locations are required. Converting the wet-/drybulb measurements to vapor pressure using
Instruction 57 requires atmospheric pressure.
We'll use the standard atmosphere for the site
elevation and key the value into Location 17
using the C command in the *6 Mode. The
reference junction temperature obtained by
Instruction 17 is stored in Location 16.
This example requires that 54 locations be
allotted to Input Storage and 79 to Intermediate
Storage (35 for the 1st CV/CR Instruction, 43
for the second, and 1 for Instruction 92).
TABLE 8.6-3. Example Input Channel and Location Assignments
01:4Reps
02:15150 mV fast Range
03:1IN Card
04:7IN Chan
05:2Type E (Chromel-Constantan)
06:16Ref Temp Loc PANL TEMP
07:7Loc [:Ta2 ]
08:1Mult
09:0Offset
04:P37Z=X*F
01:1X Loc W1
02:1.22F
03:1Z Loc [:W1 ]
05:P37Z=X*F
01:4X Loc W2
02:1.22F
03:4Z Loc [:W2 ]
06:P54Block Move
01:5No. of Values
02:4First Source Loc W2
03:1Source Step
04:11First Destination Loc [:W2 ]
05:1Destination Step
07:P31Z=X
01:9X Loc
02:4Z Loc [:W2 ]
09:P57Wet/Dry Bulb Temp to VP
01:17Pressure Loc
02:14Dry Bulb Temp Loc
03:15Wet Bulb Temp Loc Tw2
04:15Loc [:Tw2 ]
10:P92If time is
01:0minutes into a
02:30minute interval
03:10Set high Flag 0 (output)
11:P62CV/CR
01:5No. of Input Values
02:5No. of Means
03:5No. of Variances
04:0No. of Std. Dev.
05:4No. of Covariances
06:2No. of Correlations
07:300Samples per Average
08:1First Sample Loc W1
09:20Loc [:MEAN (W1)]
12:P62CV/CR
01:5No. of Input Values
02:5No. of Means
03:5No. of Variances
04:0No. of Std. Dev.
05:4No. of Covariances
06:2No. of Correlations
07:300Samples per Average
08:11First Sample Loc W2
09:36Loc [:MEAN (W2)]
13:P77Real Time
01:110Day,Hour-Minute
14:P70Sample
01:35Reps
02:20Loc MEAN (W1)
15:PEnd Table 1
*AMode 10 Memory Allocation
01:54Input Locations
02:79Intermediate Locations
08:P57Wet/Dry Bulb Temp to VP
01:17Pressure Loc
02:9Dry Bulb Temp Loc
03:10Wet Bulb Temp Loc
04:5Loc [:U2 ]
*Differential measurement, resolution for single-ended measurement is twice value shown.
When measuring voltages with the 723
Analog Input Card, the ±1500 µV and
±5000 µV ranges read out in microvolts, the
rest of the ranges have the decimal point
placed to display millivolts. The 726 50V
Analog Input Card divides the input voltages
by 10 before making the measurements,
thus, to shift the decimal point so as to
display millivolts a factor of ten must be
used in the multiplier. Repetitions cannot
be used to advance from one 726 card to
the next.
When a voltage input exceeds the range
programmed, the value which is stored is
set to the maximum negative number
displayed as -99999 in high resolution or 6999 in low resolution.
*** 1 SINGLE ENDED VOLTS ***
FUNCTION
This instruction is used to measure voltage at a
single ended input with respect to ground.
PAR.DATA
NO.TYPEDESCRIPTION
01:2Repetitions
02:2Range code (Table 9-1)
03:2Card number for first
measurement
04:2Single-ended channel
number for first
measurement
05:4Input location number for first
measurement
06:FPMultiplier
07:FPOffset
Input locations altered: 1 per repetition
*** 2 DIFFERENTIAL VOLTS ***
FUNCTION
This Instruction reads the voltage difference
between the HI and LO inputs of a differential
channel in the selected range from the selected
card and channel(s) and places it in an input
location(s). Table 9-1 lists the range codes.
Both the high and low inputs must be within ±5V
of the datalogger's ground (Common Mode
Range Section 13.2). Pyranometers and
thermopile sensors require a jumper between
LO and Ground to keep them in Common Mode
Range.
9-1
SECTION 9. INPUT/OUTPUT INSTRUCTIONS
PAR.DATA
NO.TYPEDESCRIPTION
01:2Repetitions
02:2Range code (Table 9-1)
03:2Card number for first
measurement
04:2Differential channel number
for first measurement
05:4Input location number for first
measurement
06:FPMultiplier
07:FPOffset
Input locations altered: 1 per repetition
*** 3 PULSE COUNT ***
INPUT RANGE - - - 32767 Counts per input
interval
There are three input configurations which may
be measured with the Pulse Count Instruction.
HIGH FREQUENCY PULSE
In this configuration the minimum pulse width is
2 microseconds. The maximum input
frequency is 250 kilohertz. The count is
incremented when the input voltage changes
from below 1.5 volts to above 3.5 volts. The
maximum input voltage is ±20 volts.
LOW LEVEL AC
This configuration is used for counting the
frequency of AC signals from magnetic pulse
flow transducers or other low voltage, sine wave
inputs. The minimum input voltage is 6 mV
RMS. Input hysteresis is 11 mV. The maximum
AC input voltage is 20 volts RMS. The
maximum input frequency ranges from 100Hz
at 6mV RMS to 10,000Hz at 50mV or greater.
Consult the factory if higher frequencies are
desired.
SWITCH CLOSURE
In this configuration the minimum switch closed
time is 1 millisecond. The minimum switch
open time is 4 milliseconds. The maximum
bounce time is 1.4 milliseconds open without
being counted.
All pulse counters in one I/O Module are reset
at the same time. The reset time interval is
equal to the execution interval of the program
table in which the Pulse Count Instruction(s)
occur. When programs are compiled, the CR7
will set the reset time interval to the execution
interval of the first program table in which a
Pulse Count Instruction occurs. The execution
intervals of subsequent program tables
containing Pulse Count Instructions will have no
effect on the reset time interval. (The maximum
input frequency is 250KHz. The maximum
number that can be stored in an accumulation
register is 65,535.)
When datalogger time is changed, whether
through the keyboard or with a
telecommunications program, a partial
recompile is automatically done to
resynchronize program execution with real time.
The resynchronization process resets the pulse
accumulation interval resulting in an interval
whose length can be anywhere between one
second too short to almost twice as long.
Pulses are not lost during resynchronization so
totalized values are correct but pulse rate
information such as wind speed can be up to
almost twice the correct value.
The options of discarding counts from long
intervals and pulse input type are selected by
the code entered for the 4th parameter (Table
9-2).
All Pulse count instructions for the same I/O
module and output instructions for the pulse
count data should be kept in the same program
table, preferably Table 1. If the pulse count
instruction is contained in a subroutine, that
subroutine must be called from Table 2.
When the system is interrupted for a task of
sufficient priority to allow the pulse counters to
exceed the programmed reset time interval, the
resulting larger count can either be discarded
leaving the value in the input location
unchanged from the previous value or it can be
used. If pulse counts are being totalized, a
missing count could be significant; the value
from the erroneously long interval should be
used. If the pulse count is being processed a
way in which the resultant value is dependent
upon the sampling interval, such as sample,
average, maximum, or minimum, it should be
discarded. The option of discarding counts
from long intervals and the input configuration
are determined by the 4th parameter according
to the following table.
9-2
SECTION 9. INPUT/OUTPUT INSTRUCTIONS
TABLE 9-2. Pulse Count Configuration
Codes
CodeConfiguration
00High frequency pulse, all pulses
counted
01Low level AC, all pulses counted
02Switch closure, all pulses counted
1XLong interval data discarded, where X
is configuration code
2XLong interval data discarded, frequency
(Hz) output
PAR.DATA
NO.TYPEDESCRIPTION
01:2Repetitions
02:2Card number for first
measurement
03:2Pulse channel number for
first measurement
04:2Configuration code (Table 9-2)
05:4Input location number for first
measurement
06:FPMultiplier
07:FPOffset
Input locations altered: 1 per repetition
*** 4 EXCITE, DELAY AND MEASURE **
09:FPExcitation voltage (millivolts)
10:4Input location number for first
measurement
11:FPMultiplier
12:FPOffset
Input locations altered: 1 per repetition
*** 5 AC HALF BRIDGE ***
FUNCTION
This Instruction is used to apply an excitation
voltage to a half bridge (Figure 13.5-1), make a
single ended voltage measurement of the
bridge output, reverse the excitation voltage,
then repeat the measurement. The difference
between the two measurements is used to
calculate the resulting value which is the ratio of
the measurement to the excitation voltage.
When the 1500 or 5000 µV input range is
selected, the value is returned as 1000 times
the ratio. For all other input ranges the value is
just the ratio.
The excitation "on time" for each polarity is
exactly the same to ensure that ionic sensors do
not polarize with repetitive measurements. The
range should be selected to be a fast
measurement (range 11-18) limiting the excitation
on time to 800 microseconds at each polarity. A
slow integration time should not be used with
ionic sensors because of polarization error.
FUNCTION
This Instruction is used to apply an excitation
voltage, delay a specified time and then make a
single ended voltage measurement.
PAR.DATA
NO.TYPEDESCRIPTION
01:2Repetitions
02:2Range code (Table 9-1)
03:2Analog card number for first
measurement
04:2Single-ended channel
number for first
measurement
05:2Excitation card for first
measurement
06:2Excitation channel number
for first measurement
07:2Number of measurements
per excitation channel
08:4Delay (0.01 sec)
PAR.DATA
NO.TYPEDESCRIPTION
01:2Repetitions
02:2Range code (Table 9-1)
03:2Analog card number for first
measurement
04:2Single-ended channel
number for first
measurement
05:2Excitation card for first
measurement
06:2Excitation channel number
for first measurement
07:2Number of measurements
per excitation channel
08:4Excitation voltage (millivolts)
09:4Input location number for first
measurement
10:FPMultiplier
11:FPOffset
Input locations altered: 1 per repetition
9-3
SECTION 9. INPUT/OUTPUT INSTRUCTIONS
*** 6 FULL BRIDGE WITH SINGLE ***
DIFFERENTIAL MEASUREMENT
FUNCTION
This Instruction is used to apply an excitation
voltage to a full bridge (Figure 13.5-1), make a
differential voltage measurement of the bridge
output, reverse the excitation voltage, then
repeat the measurement. The resulting value is
1000 times the ratio of the measurement to the
excitation voltage.
PAR.DATA
NO.TYPEDESCRIPTION
01:2Repetitions (95 max)
02:2Range code (Table 9-1)
03:2Analog card number for first
measurement
04:2Differential channel number
for first measurement
05:2Excitation card for first
measurement
06:2Excitation channel number
for first measurement
07:2Number of measurements
per excitation channel
08:4Excitation voltage (millivolts)
09:4Input location number for first
measurement
10:FPMultiplier
11:FPOffset
Input locations altered: 1 per repetition
*** 7 THREE WIRE HALF BRIDGE ***
FUNCTION
This Instruction is used to determine the ratio of
the sensor resistance to a known resistance
using a separate voltage sensing wire from the
sensor to compensate for lead wire resistance.
The measurement sequence is to apply an
excitation voltage, make two voltage
measurements on two adjacent single ended
channels, the first on the reference resistor and
the second on the voltage sensing wire from the
sensor (Figure 13.5-1), then reverse the
excitation voltage and repeat the
measurements. The two measurements are
used to calculate the resulting value which is
the ratio of the voltage across the sensor to the
voltage across the reference resistor.
PAR.DATA
NO.TYPEDESCRIPTION
01:2Repetitions (95 max)
02:2Range code for both
measurements (Table 9-1)
03:2Analog card number for first
measurement
04:2Single-ended channel number
for first measurement
05:2Excitation card for first
measurement
06:2Excitation channel number
for first measurement
07:2Number of measurements
per excitation channel
08:4Excitation voltage (millivolts)
09:4Input location number for first
measurement
10:FPMultiplier
11:FPOffset
Input locations altered: 1 per repetition
*** 9 FULL BRIDGE WITH EXCITATION ***
COMPENSATION
FUNCTION
This Instruction is used to apply an excitation
voltage and make two differential voltage
measurements, then reverse the polarity of the
excitation and repeat the measurements. The
measurements are made on sequential
channels. The result is the voltage measured
on the second channel (V2) divided by the
voltage measured on the first (V1). If V1 is
measured on the 5V range (code 8 or 18 in
Parameter 2), then the result is 1000 times
V2/V1. A 1 before the excitation channel
number (1X) causes the excitation channel to
be incremented with each repetition.
When used as a 6 wire full bridge (Figure 13.5-
1), the connections are made so that V1 is the
measurement of the voltage drop across the full
bridge, and V2 is the measurement of the
bridge output. Because the excitation voltage
for a full bridge measurement is usually in the
5V range, the output is usually 1000 V2/V1 or
millivolts output per volt excitation. When used
to measure a 4 wire half bridge, the connections
are made so that V1 is the voltage drop across
the fixed resistor (Rf), and V2 is the drop across
the sensor (Rs). As long as V1 is not measured
on the 5V range, the result is V2/V1 which
equals Rs/Rf.
9-4
SECTION 9. INPUT/OUTPUT INSTRUCTIONS
PAR.DATA
NO.TYPEDESCRIPTION
01:2Repetitions (47 max)
02:2Excitation range code (Table
9-1)
03:2Bridge range code for (Table
9-1)
04:2Analog card number for first
measurement
05:2Differential channel number
for first measurement
06:2Excitation card for first
measurement
07:2Excitation channel number
for first measurement
08:2Number of measurements
per excitation channel
09:4Excitation voltage (millivolts)
10:4Input location number for first
measurement
11:FPMultiplier
12:FPOffset
Input locations altered: 1 per repetition
*** 10 BATTERY VOLTAGE ***
FUNCTION
This instruction reads the battery voltage from
the currently active I/O module and writes it to
an input location. The units for battery voltage
are volts.
PAR.DATA
NO.TYPEDESCRIPTION
Curve Fit Error --
o
Range (oC)Error (
-40 to +55±1.0
-35 to +48±0.1
This instruction uses a single excitation channel
since several hundred probes can be driven by
a single excitation output. For this reason,
Instruction 11 does not require a
"measurement/excitation" parameter.
A multiplier of 1 and an offset of 0 yields
temperature in degrees C.
PAR.DATA
NO.TYPEDESCRIPTION
01:2Repetitions
02:2Analog card number for first
03:2Single-ended channel
04:2Excitation card number for
05:2Excitation channel number
06:4Input location of first
07:FPMultiplier
08:FPOffset
Input locations altered: 1 per repetition
*** 12 207 RELATIVE HUMIDITY PROBE ***
C)
measurement
number for first
measurement
first measurement
for first measurement
measurement
01:4Input location number
Input locations altered: 1
*** 11 107 THERMISTOR PROBE ***
FUNCTION
This instruction applies a 4 VAC excitation
voltage to Campbell Scientific's Model 107
Thermistor Probe, makes a fast, single ended
voltage measurement on the 15 mV range
across a resistor in series with the thermistor
and calculates the temperature in oC with a
polynomial. The maximum polynomial error
from -40 oC to +55 oC is given below:
FUNCTION
This instruction applies a 3 VAC excitation
across Campbell Scientific's Model 207
Temperature and RH Probe, makes a fast
single ended measurement across a series
resistor on the 150 mV range, linearizes the
result with a 5th order polynomial and performs
the required temperature compensation before
outputting the result in % RH.
When measuring several probes, all the RH
elements should be connected sequentially.
Any temperature elements used for
compensating the respective RH value should
also be sequentially connected to make use of
the REP feature in Instruction 11.
9-5
SECTION 9. INPUT/OUTPUT INSTRUCTIONS
The temperature value used in
compensating the RH value (Parameter 7)
must be obtained (see Instruction 11) prior
to executing Instruction 12.
The RH results are placed sequentially into the
input locations beginning with the first RH value.
In some situations the RH sensors might be
deployed such that only small temperature
variations exist within a given set of probes. In
these cases a single temperature may be used
to compensate the subset of RH measurements
instead of making a temperature measurement
for each RH probe. If the complete set of
temperature values are not needed, this
approach uses less input channels. Parameter
6 is used to specify how many consecutive RH
values get compensated per temperature
measurement.
In the 207 probe, the RH and temperature
elements use a common excitation line. Since
a single excitation channel can drive several
hundred probes, there is no
"measurements/excitation" parameter in
Instruction 12. NEVER EXCITE THE 207
PROBE WITH DC EXCITATION as the RH chip
will be damaged.
The maximum RH polynomial error is given
below:
Curve Fit Error --
07:4Input location for first
compensating temperature
measurement
08:4Input location for first
measurement
09:FPMultiplier
10:FPOffset
Input locations altered: 1 per repetition
*** 13 THERMOCOUPLE ***
TEMPERATURE, SINGLE ENDED
FUNCTION
This Instruction uses the selected thermocouple
calibration to calculate the thermocouple output
voltage at the reference temperature, then it
makes a SINGLE ENDED VOLTAGE
MEASUREMENT (Section 13.2) on the
thermocouple and adds the measured voltage
to the calculated reference voltage, then
converts the voltage to temperature in oC
(Section 13.4).
Table 9-3 gives the thermocouple type codes.
The reference temperature location will be
incremented by one each repetition if C is keyed
before entering Parameter 6. When this option
is exercised, two minus signs (--) will appear as
the right most characters of the display.
A multiplier of 1 and an offset of 0 yields
temperature in degrees C.
Range (%RH)Error (%RH)
10 - 100±4
15 - 94±1
PAR.DATA
NO.TYPEDESCRIPTION
01:2Repetitions
02:2Analog card number for first
measurement
03:2Single-ended channel for first
measurement
04:2Excitation card number for
first measurement
05:2Excitation channel number
for first measurement
06:2Number of R.H.
measurements per
compensating temperature
measurement
Reference and Thermocouple
2XSkip every other single ended channel
8XTC input from A5B40 Isolation Amplifier
(use 5 V range)
SECTION 9. INPUT/OUTPUT INSTRUCTIONS
PAR.DATA
NO.TYPEDESCRIPTION
01:2Repetitions
02:2Range code (Table 9-1)
03:2Analog card number
04:2Single-ended channel number
for first measurement
05:2TC type code (Table 9-3)
06:4Reference temperature
location. (When indexed (--)
this is incremented with each
rep.)
07:4Input location number
08:FPMultiplier
09:FPOffset
Input locations altered: 1 per repetition
*** 14 THERMOCOUPLE ***
TEMPERATURE, DIFFERENTIAL
MEASUREMENT
FUNCTION
This instruction calculates the thermocouple
temperature for the thermocouple type selected.
The instruction specifies a DIFFERENTIAL
VOLTAGE MEASUREMENT (Section 13.2) on
the thermocouple, adds the measured voltage
to the voltage calculated for the reference
temperature relative to 0 oC, and converts the
combined voltage to temperature in oC. The
differential inputs are briefly shorted to ground
prior to making the voltage measurement to
insure that they are within the common mode
range. (Section 13.4)
Table 9-3 gives the thermocouple type codes
for Parameter 5, the option of skipping every
other channel applies only to Instruction 13.
The reference temperature location will be
incremented by one each repetition if C is keyed
before entering Parameter 6. When this option
is exercised, two minus signs (--) will appear as
the right most characters of the display.
A multiplier of 1 and an offset of 0 yields
temperature in degrees C.
PAR.DATA
NO.TYPEDESCRIPTION
01:2Repetitions
02:2Range code (Table 9-1)
03:2Card number
04:2Beginning channel
05:2TC type code (Table 9-3)
06:4Reference temperature
location. (When indexed (--)
this is incremented with each
rep.)
07:4Input location number
08:FPMultiplier
09:FPOffset
Input locations altered: 1 per repetition
*** 16 TEMPERATURE FROM ***
PLATINUM R.T.D.
FUNCTION
This instruction uses the result of a previous
RTD bridge measurement to calculate the
temperature according to the DIN 43760
specification adjusted (1980) to the pending
International Electrotechnical Commission
standard. The range of linearization is -200 oC
to 850 oC. The error in the linearization is less
than 0.001 oC between -200 and +300 oC, and
is less than 0.003 oC between -180 and
+830 oC. The error (T calculated - T standard)
is +0.006o at -200o and -0.006 at +850 oC.
The input must be the ratio R/R0, where R is
the RTD resistance and R0 the resistance of
the RTD at 0 oC.
A multiplier of 1 and an offset of 0 yields
temperature in degrees C.
PAR.DATA
NO.TYPEDESCRIPTION
01:2Repetitions
02:4Input location number of
(R/Ro)
03:4Input location number of
result
04:FPMultiplier
05:FPOffset
Input locations altered: 1 per repetition
*** 17 TEMPERATURE OF INPUT PANEL ***
FUNCTION
This instruction measures the temperature in
o
C of the specified analog input card with RTD
(Model 723-T).
PAR.DATA
NO.TYPEDESCRIPTION
01:2Analog card number
02:4Input location number
Input locations altered: 1
9-7
SECTION 9. INPUT/OUTPUT INSTRUCTIONS
*** 18 MOVE TIME TO INPUT LOCATION ***
FUNCTION
This instruction takes the current time in tenths
of seconds into the minute, minutes into the
day, or hours into the year and does a modulo
divide (see Instruction 46) on the time value
with the number specified in the second
parameter. The result is stored in the specified
input location. Entering 0 or a number which is
greater than the maximum value of the time for
the modulo divide will result in the actual time
value being stored.
PARAMETER 1 OPTION CODES
CODE TIME UNITS
0Tenths of seconds into minute
(maximum 600)
1Minutes into current day (maximum
1440)
2Hours into current year (maximum
8784)
PAR.DATA
NO.TYPEDESCRIPTION
01:2Option Code (see above)
02:4Number to modulo divide by
03:4Input location number
Input locations altered: 1
*** 19 MOVE SIGNATURE INTO ***
INPUT LOCATION
FUNCTION
This instruction stores the signature of the Read
Only Memory (ROM) and user program memory
(RAM) into an input location. This signature is
not the same as the signatures given in the *B
mode. Recording the signature allows detection
of any program change or ROM failure.
PAR.DATA
NO.TYPEDESCRIPTION
*** 20 PORT SET ***
FUNCTION
This instruction sets a specified Digital Control
output port or is used to set the active excitation
card for port commands with Program Control
Instructions or manual toggling (Section 1.3.3).
Ports may be set as specified by a flag or
unconditionally.
PARAMETER 1 OPTION CODES
CodeFunction
00Set port low
01Set port high
1XSet port according to flag X
2XSet opposite to flag X
30Set active port card
PAR.DATA
NO.TYPEDESCRIPTION
01:2Option code (see above)
02:2Excitation card number
03:2Port number (1-8)
Input locations altered: 0
*** 21 ANALOG OUTPUT ***
FUNCTION
This instruction sets the continuous Analog
Output (CAO) to a voltage level specified in an
input location. The analog output degrades
approximately 0.17mV every seven seconds
requiring the instruction to be periodically
repeated to maintain a given output accuracy.
PAR.DATA
NO.TYPEDESCRIPTION
01:2Excitation card number
02:2CAO channel number
03:4Input location number
containing analog output
magnitude in millivolts
01:4Input location number
Input locations altered: 1
FUNCTION
This instruction is used in conjunction with
others for measuring a response to a timed
excitation using the switched analog outputs. It
sets the selected excitation output to a specific
value, waits for a specified time, turns off the
excitation and waits an additional specified time
before continuing execution of the following
instruction. The excitation on time can be set to
zero and the off time delay can be used if the
only requirement is the delay of Program
execution.
This instruction cannot be interrupted by
Program Table 1 in order to make a
measurement. This means that if it resides
in Table 2 or Table 3 then Table 1 may be
delayed.
PAR.DATA
NO.TYPEDESCRIPTION
01:2Excitation card number
02:2Excitation channel number
03:4Delay that excitation is on
(0.01 sec)
04:4Delay time after excitation is
turned off (0.01 sec)
05:FPExcitation voltage (millivolts)
*** 26 TIMER ***
FUNCTION
This instruction will reset a timer or store the
elapsed time registered by the timer in an Input
Storage location. Instruction 26 can be used
with Program Control Instructions to measure
the elapsed time between specific input
conditions. There is only one timer and it is
common to all tables (e.g., if the timer is reset in
Table 1 and later in Table 2, a subsequent
instruction in Table 1 to read the timer will store
the elapsed time since the timer was reset in
Table 2).
Elapsed time is tracked in 0.1 second
increments but displayed as an integer. For
example, a 20 second elapsed time is displayed
as "200".
The timer is also reset in response to certain
keyboard entries:
1. When tables are changed and compiled
with the *0 Mode, the timer is reset
automatically.
2. When tables are changed and then
compiled in the *B Mode, the timer is
automatically reset and Tables 1 and 2 are
disabled. Entering "*0" at this point enables
both tables and resets the timer.
Input locations altered: 0
*** 23 SELECT I/O MODULE ***
FUNCTION
This instruction is used when more than one I/O
Module is under control and is used to specify
which I/O Module subsequent instructions refer
to. The I/O Module to which Instructions are
addressed defaults to #1 at the start of each
program table.
PAR.DATA
NO.TYPEDESCRIPTION
01:2Module number (1,2,3 or 4)
Input locations altered: 0
3. Entering "*6" after changing the tables
compiles the programs, but does NOT reset
the timer.
PAR.DATA
NO.TYPEDESCRIPTION
01:4Input location number (enter
0 to reset)
Input locations altered: 1 (0 if timer is being
reset)
*** 101 SDM-INT8 ***
The 8 channel Interval Timer (INT8) is a
measurement module which provides processed
timing information to the datalogger. Each of
the 8 input channels may be independently
configured to detect either rising or falling edges
of either high level or a low level signal. Each
channel may be independently programmed.
See the SDM-INT8 manual for detailed
9-9
SECTION 9. INPUT/OUTPUT INSTRUCTIONS
instructions and examples. This instruction is
not in all PROM options.
0 = no value returned
1 = period in ms
2 = frequency in kHz
3 = time since previous channel's edge
in ms
4 = time since channel 1 in ms
5 = counts on channel 2 since channel
1, linear interpolation
6 = frequency in kHz (low resolution)
7 = counts
8 = counts on Channel 2 since Channel
1, no interpolation
*** 102 SDM-SW8A ***
The 8 channel SDM-SW8A Switch Closure Input
Module is a peripheral for measuring up to 8
channels of switch closure or voltage pulse
inputs. Each channel may be configured to read
single-pole double-throw (SPDT) switch closure,
or single-pole single-throw (SPST) switch
closure, or voltage pulse. Output options
include counts, duty cycle, and state. This
instruction is not in all PROM options.
The SW8A is addressed by the datalogger,
allowing multiple SW8A's to be connected to one
datalogger. 16 addresses are available.
If more channels are requested than exist in one
module, the datalogger automatically increments
the address and continues to the next SW8A.
The address settings for multiple SW8A's must
sequentially increase. For example, assume 2
SW8A's addressed as 22 and 23 are connected,
and 12 Reps are requested. 8 channels from
the first SW8A and the first 4 channels from the
next will be read.
Only one Function Option (Parameter 3) may be
specified per Instruction 102. If all 4 functions are
desired, the instruction must be entered 4 times.
Function Option 0 provides the state of the
signal at the time P102 is executed. A 1 or
0 corresponds to high or low states,
respectively.
Function Option 1 provides signal duty
cycle. The result is the percentage of time
the signal is high during the sample interval.
*** Output option:
0Average over execution interval
0--Continuous averaging
XXXXAveraging interval in msec,
XXXX>0
XXXX-- Capture all events until
XXXX edges of channel 1
(0<XXXX,9999)
9999--Test memory
Input locations altered: 1 per function
9-10
Function Option 2 provides a count of the
number of positive transitions of the signal.
Function Option 3 provides the signature of
the SW8A PROM. A positive number
(signature) indicates the PROM and RAM
are good, a zero (0) indicates bad PROM,
and a negative number indicates bad RAM.
Function Option 3 is not used routinely, but
is helpful in "debugging". Only one Rep is
required for Option 3.
Parameter 4 specifies the first SW8A channel to
be read (1..8). One or more sequential channels
are read depending on the Reps. To optimize
program efficiency, the sensors should be wired
sequentially.
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.