184
CR7 MEASUREMENT AND CONTROL SYSTEM INSTRUCTION MANUAL REVISION: 7/97 COPYRIGHT (c) 1991-1997 CAMPBELL SCIENTIFIC, INC.

CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

  • Upload
    haliem

  • View
    217

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEMINSTRUCTION MANUAL

REVISION: 7/97

COPYRIGHT (c) 1991-1997 CAMPBELL SCIENTIFIC, INC.

Page 2: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

WARRANTY AND ASSISTANCE The CR7 MEASUREMENT AND CONTROL SYSTEM is warranted by CAMPBELL SCIENTIFIC (CANADA) CORP. (“CSC”) 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 are not warranted. ***** CSC's obligation under this warranty is limited to repairing or replacing (at CSC's option) defective products. The customer shall assume all costs of removing, reinstalling, and shipping defective products to CSC. CSC will return such products by surface carrier prepaid. This warranty shall not apply to any CSC 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. CSC is not liable for special, indirect, incidental, or consequential damages. Products may not be returned without prior authorization. To obtain a Return Merchandise Authorization (RMA), contact CAMPBELL SCIENTIFIC (CANADA) CORP., at (780) 454-2505. An RMA number will be issued in order to facilitate Repair Personnel in identifying an instrument upon arrival. Please write this number clearly on the outside of the shipping container. Include description of symptoms and all pertinent details. CAMPBELL SCIENTIFIC (CANADA) CORP. does not accept collect calls. Non-warranty products returned for repair should be accompanied by a purchase order to cover repair costs.

Page 3: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

i

CR7 OPERATOR'S MANUALTABLE OF CONTENTS

PAGEWARRANTY AND ASSISTANCE

SELECTED OPERATING DETAILS.............................................................................................. v

CAUTIONARY NOTES...................................................................................................................... vi

OVERVIEWOV1. PHYSICAL DESCRIPTIONOV1.1 700X Control Module .......................................................................................................... OV-1OV1.2 720 I/O Module.................................................................................................................... OV-2OV1.3 Enclosures and Connector Options .................................................................................... OV-2

OV2. MEMORY AND PROGRAMMING CONCEPTSOV2.1 Internal Memory .................................................................................................................. OV-3OV2.2 CR7 Instruction Types......................................................................................................... OV-6OV2.3 Program Tables and the Execution and Output Intervals ................................................... OV-6

OV3. PROGRAMMING THE CR7OV3.1 Functional Modes................................................................................................................ OV-8OV3.2 Key Definition ...................................................................................................................... OV-8OV3.3 Programming Sequence ..................................................................................................... OV-8OV3.4 Instruction Format ............................................................................................................... OV-9OV3.5 Entering a Program ............................................................................................................. OV-9

OV4. PROGRAMMING EXAMPLEOV4.1 Measurement .................................................................................................................... OV-10OV4.2 Output ............................................................................................................................... OV-12OV4.3 Editing an Existing Program.............................................................................................. OV-14OV4.4 EDLOG Program Listing ................................................................................................... OV-14

OV5. DATA RETRIEVAL OPTIONS ................................................................................ OV-15

OV6. SPECIFICATIONS ...................................................................................................... OV-17

Page 4: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

TABLE OF CONTENTS

ii

PROGRAMMING1. FUNCTIONAL MODES1.1 Program Tables - *1, *2, and *3 Modes ................................................................................. 1-11.2 Setting and Displaying the Clock - *5 Mode ........................................................................... 1-21.3 Displaying and Altering Input Memory or Flags - *6 Mode ..................................................... 1-21.4 Compiling and Logging Data - *0 Mode ................................................................................. 1-31.5 Memory Allocation - *A........................................................................................................... 1-41.6 Memory Testing and System Status - *B Mode ..................................................................... 1-51.7 *C Mode - Security ................................................................................................................. 1-61.8 *D Mode - Save or Load Program.......................................................................................... 1-7

2. INTERNAL DATA STORAGE2.1 Final Storage Areas, Output Arrays, and Memory Pointers ................................................... 2-12.2 Data Output Format and Range Limits .................................................................................. 2-22.3 Displaying Stored Data on Keyboard/Display - *7 Mode ........................................................ 2-3

3. INSTRUCTION SET BASICS3.1 Parameter Data Types ........................................................................................................... 3-13.2 Repetitions/Card Number....................................................................................................... 3-13.3 Entering Negative Numbers ................................................................................................... 3-13.4 Indexing Input Locations ........................................................................................................ 3-23.5 Voltage Range and Overrange Detection .............................................................................. 3-23.6 Output Processing.................................................................................................................. 3-23.7 Use of Flags: Output and Program Control........................................................................... 3-33.8 Program Control Logical Constructions ................................................................................. 3-43.9 Instruction Memory and Execution Time................................................................................ 3-63.10 Error Codes............................................................................................................................ 3-9

DATA RETRIEVAL/COMMUNICATION4. EXTERNAL STORAGE PERIPHERALS4.1 On-Line Data Transfer - Instruction 96, *4 Mode ................................................................... 4-14.2 Manually Initiated Data Output - *9 Modes............................................................................. 4-24.3 Storage Module ...................................................................................................................... 4-34.4 Printer Output Formats........................................................................................................... 4-4

5. TELECOMMUNICATIONS5.1 Telecommunications Commands .......................................................................................... 5-15.2 Remote Programming of the CR7.......................................................................................... 5-3

6. 9 PIN SERIAL INPUT/OUTPUT6.1 Pin Description ....................................................................................................................... 6-16.2 Enabling Peripherals .............................................................................................................. 6-26.3 Interrupting Data Transfer to Storage Peripherals ................................................................. 6-26.4 Telecommunications - Modem Peripherals............................................................................ 6-26.5 Interfacing with Computers, Terminals, and Printers ............................................................. 6-2

Page 5: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

TABLE OF CONTENTS

iii

PROGRAMMING EXAMPLES7. MEASUREMENT PROGRAMMING EXAMPLES7.1 Single Ended Voltage-LI200S Silicon Pyranometer ................................................................7-17.2 Differential Voltage Measurement...........................................................................................7-17.3 Thermocouple Temperatures Using 723-T Reference ...........................................................7-27.4 Thermocouple Temperatures Using an External Reference Junction ....................................7-27.5 Thermocouples for Differential Temperature Measurement...................................................7-37.6 Temperature with Calibrated Thermocouples.........................................................................7-47.7 107 Temperature Probe..........................................................................................................7-57.8 207 Temperature and RH Probe.............................................................................................7-57.9 Anemometer with Photochopper Output .................................................................................7-67.10 Tipping Bucket Raingage with Long Leads.............................................................................7-67.11 100 ohm PRT in 4 Wire Half-Bridge........................................................................................7-77.12 100 ohm PRT in 3 Wire Half-Bridge........................................................................................7-87.13 100 ohm PRT in 4 Wire Full-Bridge ........................................................................................7-97.14 Pressure Transducer-4 Wire Full-Bridge ..............................................................................7-107.15 Lysimeter-6 Wire Load Cell...................................................................................................7-117.16 227 Gypsum Soil Moisture Block ..........................................................................................7-137.17 Nonlinear Thermistor in Half Bridge (CSI Model 101)...........................................................7-14

8. PROCESSING AND PROGRAM CONTROL EXAMPLES8.1 Computation of Running Average ...........................................................................................8-18.2 Rainfall Intensity......................................................................................................................8-28.3 SUB 1 Minute Output Interval Synched to Real Time .............................................................8-38.4 Analog Output to Strip Chart ...................................................................................................8-48.5 Converting 0-360 Wind Direction Output to 0-540 for Strip Chart...........................................8-58.6 Covariance Correlation Programming Example......................................................................8-6

INSTRUCTIONS9. INPUT/OUTPUT INSTRUCTIONS .....................................................................................9-1

10. PROCESSING INSTRUCTIONS ......................................................................................10-1

11. OUTPUT PROCESSING INSTRUCTIONS ...................................................................11-1

12. PROGRAM CONTROL INSTRUCTIONS......................................................................12-1

MEASUREMENTS13. CR7 MEASUREMENTS13.1 Fast and Slow Measurement Sequence ...............................................................................13-113.2 Single-Ended and Differential Voltage Measurements .........................................................13-113.3 The Effect of Sensor Lead Length on the Signal Settling Time ............................................13-313.4 Thermocouple Measurements ............................................................................................13-1113.5 Bridge Resistance Measurements ......................................................................................13-1513.6 Resistance Measurements Requiring AC Excitation ..........................................................13-1913.7 Pulse Count Measurements................................................................................................13-20

Page 6: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

TABLE OF CONTENTS

iv

INSTALLATION14. INSTALLATION14.1 Environmental Enclosure, Connectors and Junction Boxes ................................................ 14-114.2 System Power Requirements and Options .......................................................................... 14-214.3 Humidity Effects and Control................................................................................................ 14-514.4 Recommended Grounding Practices ................................................................................... 14-514.5 Use of Digital Control Ports for Switching Relays ................................................................ 14-6

15. I/O CARD ADDRESSING AND MULTIPLE I/0 MODULES15.1 I/O Card Identification Number Decoding ............................................................................ 15-115.2 Use of Multiple I/O Modules ................................................................................................. 15-4

APPENDICESA. GLOSSARY.............................................................................................................................. A-1

B. CR7 PROM SIGNATURES FOR SYSTEMS EQUIPPED WITHSTANDARD SOFTWARE.................................................................................................... B-1

C. BINARY TELECOMMUNICATIONSC.1 Telecommunications Command With Binary Responses......................................................C-1C.2 Final Storage Format .............................................................................................................C-3C.3 Generation of Signature .........................................................................................................C-4

D. CALIBRATION PROCEDURESD.1 Voltage Reference Calibration Procedure..............................................................................D-1D.2 Clock Calibration Procedure ..................................................................................................D-2

LIST OF TABLES .......................................................................................................................... LT-1

LIST OF FIGURES ........................................................................................................................ LF-1

INDEX ................................................................................................................................................... I-1

Page 7: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

v

SELECTED OPERATING DETAILS

The channel numbering on the Analog InputCard refers to differential measurements. Singleended measurements assume the HI and LOside of each differential channel are twoindependent single ended channels, e.g., the HIand LO side of differential channel 2 are singleended channels 3 and 4 respectively.

When multiple measurements are specified inone measurement instruction (through use ofthe "Repetitions Parameter") the CR7 I/OModule is capable of sequencing through 500fast, single-ended measurements per second.This specification is the MEASUREMENTSPEED and should not be confused withthroughput which is the rate at whichmeasurements are made, converted toengineering units and stored in Final memory.With the 700X Control Module (6303 CPUboard), the maximum throughput rate for fast,single-ended measurements is approximately310 measurements per second (1 secondexecution: Instruction 1 entered 4 times, 3 timeswith 99 repetitions, once with 11 repetitions).

Data is stored in Final Memory only by OutputProcessing Instructions and only when theOutput Flag is set.

The default case for data stored in FinalMemory is low resolution (4 characters). Highresolution values (5 characters) must bespecified through use of Instruction 78. All datacontained in Input Memory is displayed (*6) asHIGH RESOLUTION (5 characters) but thedefault case for all data stored in Final Memoryis LOW RESOLUTION unless high resolution isspecified through use of Instruction 78.

Floating Point Format - The computationsperformed in the CR7 use floating pointarithmetic. CSI's 4 byte floating point numberscontain a 23 bit binary mantissa and a 6 bitbinary exponent. The largest and smallestnumbers that can be stored and processed are9 x 1018 and 1 x 10-19, respectively.

The computations performed in the CR7 aredone in floating point arithmetic. Internally, thenumber is stored and processed as a binarynumber with a 23 bit binary mantissa and a 6 bitbinary exponent. The largest and smallestnumbers that can be stored and processed are9 x 1018 and 1 x 10-19 respectively. The sizeof the mantissa limits the resolution of thearithmetic to 1 part in 223 binary (1.3 x 109decimal).

Time is stored with data in Final Memory only ifspecifically requested through use of the RealTime Instruction 77.

Data in Final Storage can be erased withoutaltering the program by using the *A Mode torepartition memory. The simplest method is tore-enter the current allocation for Input Storage(32 locations is the default allocation). Allmemory can be erased and the CR7 completelyreset by entering 1744 for the number of bytesleft in Program Memory.

On-line (as opposed to a manually initiateddump) data transfer to peripherals (printer,storage module, etc.) occurs only if enabledthrough use of the *4 Mode or Instruction 96.

Data transfer to cassette tape is no longersupported.

Page 8: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

vi

CAUTIONARY NOTES

The typical current drain for the CR7 isapproximately 100 mA while executing and 8-10mA quiescent. Do not allow the lead-acidbatteries (2.5 Ahr) to drop below 11.76 V asirreversible battery damage may result.

An external battery connected to the I/O Module+12V and ground terminals continues to powerthe CR7 system even though the CR7 powerswitch is off. Reverse polarity protection is NOTprovided on this connection so exerciseextreme care if connecting external powersupplies.

Damage will occur to the analog input channelcircuitry if voltages in excess of +16V areapplied for a sustained period.

A POTENTIALLY DANGEROUS situation canresult due to hydrogen gas build up if the CR7 ishoused in a gas tight enclosure and the internallead acid batteries are shorted or overcharged.Hydrogen concentration levels may occur whichare capable of causing injury or equipmentdamage if ignited.

Page 9: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

OV-1

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

The CR7 Measurement and Control System combines precision measurement with processing andcontrol capability in a battery operated system.

Campbell Scientific, Inc. provides three documents to aid in understanding and operating the CR7:

1. This Overview2. The CR7 Operator's Manual3. The CR7 Prompt Sheet

This Overview introduces the concepts required to take advantage of the CR7's capabilities. Hands-onprogramming examples start in Section OV4. Working with a CR7 will help the learning process, sodon't just read the examples, turn on the CR7 and do them. If you want to start this minute, go aheadand 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 theCR7 operation are the Programming Sections 1-3, the portions of the data retrieval Sections 4 and 5appropriate to the method(s) you are using (see OV5), and Section 14 which covers installation andmaintenance.

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 intodetail on the CR7 measurement procedures.

The Prompt Sheet is an abbreviated description of the programming instructions. Once familiar with theCR7, it is possible to program it using only the Prompt Sheet as a reference, consulting the manual iffurther detail is needed.

Read the Selected Operating Details and Cautionary Notes at the front of the Manual before using theCR7.

OV1. PHYSICAL DESCRIPTIONThe CR7 features a modular, multipleprocessor design that provides precisionmeasurement and control capability in a rugged,battery operated system. Control Modulefunctions include real-time task initiation,measurement processing, data storage,telecommunications, and keyboard/displayinteraction. The I/O Module performs all analogand pulse signal measurement functions as wellas the analog and digital control outputfunctions. The I/O Module contains its ownprocessor card, a precision analog interfacecard, and seven card slots which canaccommodate any combination of I/O Cards.Sensor leads are connected to the I/O cards viascrew terminals.

A maximum of four I/O modules, separated byup to 1,000 feet, may be connected to a single

Control Module in applications that requiredistributed measurement capability.

OV1.1 700X CONTROL MODULE

Contains the CPU card, with 24K of systemPROM and 40K of RAM; the serial interfacecard for peripheral communication andconnection of up to four I/O Modules; and thekeyboard display card. Two slots are presentfor optional RAM expansion. The system's 2.5Ahr lead-acid batteries and AC chargingcircuitry are also contained in this module.

The CS I/O 9-pin port provides connection todata storage peripherals, such as theSM192/716 Storage Module, and providesserial communication to computer or modemdevices for data transfer or remoteprogramming (Section 6). This 9 pin port doesNOT have the same pin configuration as the

Page 10: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-2

RS232 9 pin serial ports used on manycomputers.

The SDM terminals adjacent to the serial portallow connection to Synchronous Device forMeasurement (SDM) peripherals. Theseperipherals include the SDM-INT8 IntervalTimer, the SDM-SW8A Switch Closure Module,the SDM-CD16AC AC/DC Controller, and theSDM-OBDII Engine Controller Interface.

709 512K MEMORY CARD: This cardprovides RAM storage for an additional 262,126Final Data values. Only one 709 card may beinstalled.

OV1.2 720 I/O MODULE

The processor card provides regulated powerfor analog and digital functions from theunregulated 12 volt supply. The analoginterface card contains a 16-bit A/D-D/Aconverter, and a precision voltage reference.The standard I/O Module contains slots for 7 I/OCards; the expanded Model 720XL contains 14slots. All input and output connections to theI/O module are transient protected with sparkgaps.

The +12 volt and ground terminals provide adirect connection to the CR7 power supply.

723 ANALOG INPUT CARD: Contains 14differential or 28 single ended inputs. Inputground terminals connect to a heavy copperbar, which reduces single ended measurementoffsets to less than 5µV.

723-T ANALOG INPUT CARD WITH RTD:Identical to the 723 Card except that a platinumresistance thermometer is mounted in thecenter of the terminal strip. The PRT provides areference junction temperature forthermocouple measurement. The PRTmeasurement is accurate to ±0.1oC over arange of -40oC to +60oC.

The numbering on the terminals refers to thedifferential channels; i.e., the voltage on the HIinput is measured with respect to the voltage onthe Low input. When making single-endedmeasurements either the HI or the Low channelmay be used independently to measure the

voltage with respect to the CR7 ground. Single-ended channels are numbered sequentially,e.g., the HI and LOW sides of differentialchannels 2 are single-ended channels 3 and 4,respectively (Section 13.2).

724 PULSE COUNTER CARD: Provides 4pulse counting channels for switch closures, lowlevel AC cycles, or high frequency pulse signals.

725 EXCITATION CARD: There are 8switched analog excitation channels. Thesesupply programmable excitation voltages forresistive bridge measurements. The excitationchannels are only switched on during themeasurement. 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. Thesecontrol ports have a very limited current output(5mA) and are used to switch solid statedevices which in turn provide power to relaycoils (Section 14.4).

726 50 VOLT ANALOG INPUT CARD:Provides 8 differential or 16 single ended inputsfor full scale DC ranges of ±50 V and ±15V.Resolution is 1.66 millivolts on the ±50 V and0.5 millivolts on the ±15 V range. The commonmode range is ±50 volts.

OV1.3 ENCLOSURES AND CONNECTOROPTIONS

ENC-7L ALUMINUM FRAME FORLABORATORY ENVIRONMENTS: 17" x 12" x6"; provides a housing for benchtop use or aframe for attachment to a wall or a NEMA typeenclosure.

ENC-7F ENVIRONMENTALLY SEALEDFIBERGLASS ENCLOSURE: 20" x 13" x 10";housing for harsh environments. Sensor leadsenter via two ports fitted with 0.75" conduitbushings, and plugged with removablestoppers. The 1.040" hole size accommodates#14 shell size circular connectors.

Page 11: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-3

CR7

RELIEF VALVE

CAUTION

PRESS BUTTON

BEFORE

UNLOCKING CASE

FIGURE OV1-1. CR7 Measurement and Control System

OV2. MEMORY AND PROGRAMMINGCONCEPTSThe CR7 must be programmed before it willmake any measurements. A program consistsof a group of instructions entered into a programtable. The program table is given an executioninterval which determines how frequently thattable is executed. When the table is executed,the instructions are executed in sequence frombeginning to end. After executing the table, theCR7 waits the remainder of the executioninterval and then executes the table againstarting at the beginning.

The interval at which the table is executed willgenerally determine the interval at which thesensors are measured. The interval at whichdata are stored is separate and may range fromsamples every execution interval to processedsummaries output hourly, daily, or on longer orirregular intervals.

Figure OV2-1 represents the measurement,processing, and data storage sequence in theCR7 and shows the types of instructions usedto accomplish these tasks.

OV2.1 INTERNAL MEMORY

The CR7 has 40,960 bytes of Random AccessMemory (RAM), divided into five areas. Thefive areas of RAM are:

1. Input Storage - Input Storage holds theresults of measurements or calculations.The *6 Mode is used to view Input Storagelocations to check current sensor readingsor calculated values. Input Storage defaultsto 28 locations. Additional locations can beassigned using the *A Mode.

2. Intermediate Storage - Certain ProcessingInstructions and most of the OutputProcessing Instructions maintainintermediate results in IntermediateStorage. Intermediate storage isautomatically accessed by the Instructionsand cannot be accessed by the user. Thedefault allocation is 64 locations. Thenumber of locations can be changed usingthe *A Mode.

Page 12: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-4

1

2

RTD 3

4

MADE IN USA

+12

720 I/O MODULE

ANALOG INTERFACE

H H H H1 2 3 4

724 PULSE COUNTER

H L H L H L H L H L H L H L H L H L H L H L H L H L H L1 2 3 4 5 6 7 8 9 10 11 12 13 14

1 2 3 4 5 6 7 8 1 2SWITCHED ANALOG OUT CONTINUOUS ANALOG OUT

1 2 3 4 5 6 7 8DIGITAL CONTROL OUT

725EXCITATION

H72650 VOLT INPUT

L1

H L2

H L3

H L4

H L5

H L6

H L7

H L8

I. D. DATA

1 2 3 A

4 5 6 B

7 8 9 C

* 0 # D

ON

OFF

AUX.POWER

MADE IN USA

CR7 MEASUREMENT & CONTROL SYSTEM

700X CONTROL MODULE

CAMPBELLSCIENTIFICINC. LOGAN, UTAH

SERIAL I/O

+12 C3 C2 C1

SDM

FIGURE OV1-2. CR7 Wiring Panel and Associated Programming Instructions

ANALOG IPUTSInput/Output Instructions

1. Volt (SE)2. Volt (DIFF)4. Ex-Del-Se5. AC Half Br6. Full Br7. 3W Half Br9. Full Br-Mex11. Temp (107)12. RH-(07)13. Temp-TC SE14. Temp-TC DIFF17. Temp-Panel

SDM PORTS101 SDM-INT8102 SDM-SW8103 SDM-AO4104 SDM-CD16113 SDM-SIO4115 Set SDM Clock118 SDM-OBDII

CS I/O PORTTelecommunications

Program Control Instructions96 (Storage Module, Printer)97 Initiate Telecommunications98 Print Character

PULSE INPUTSInput/Output Instructions

3. Pulse

EXCITATION OUTPUTSInput/Output Instructions

4. Ex-Del-Se5. AC Half Br6. Full Br7. 3W Half Br9. Full Br-Mex11. Temp (107)12. RH (207)22. Excit-Del

CAO21ANALOG OUT

CONTROL PORTSInput/Output Instructions

20 Set PortProgram Control Instructions

83 If Case < F86 Do88 If x < = > y89 If x < = > f91 If flag, port92 If TimeCommand Codes:

4x Set port x high5x Set port x low6x Toggle port x7x Pulse port x

Page 13: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-5

INPUT/OUTPUTINSTRUCTIONS

Specify the conversion of a sensor signalto a data value and store it in InputStorage. 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 analogoutputs and digital control ports.

INPUT STORAGE

Holds the results of measurements orcalculations in user specified locations.The value in a location is written overeach time a new measurement orcalculation stores data to the locations.

OUTPUT PROCESSINGINSTRUCTIONS

Perform calculations over time on thevalues updated in Input Storage.Summaries for Final Storage aregenerated when a Program ControlInstruction sets the Output Flag inresponse to time or events. Resultsmay be redirected to Input Storage forfurther processing. Examples includesums, averages, max/min, standarddeviation, histograms, etc.

Output Flag set high

FINAL STORAGE

Final results from OUTPUTPROCESSING INSTRUCTIONS arestored here for on-line or interrogatedtransfer to external devices (FigureOV5.1-1). When memory is full, newdata overwrites the oldest data.

PROCESSING INSTRUCTIONS

Perform calculations with values in InputStorage. Results are returned to InputStorage. Arithmetic, transcendental andpolynomial functions are included.

INTERMEDIATE STORAGE

Provides temporary storage forintermediate calculations required by theOUTPUT PROCESSING INSTRUCTIONS;for example, sums, cross products,comparative values, etc.

FIGURE OV2-1. Instruction Types and Storage Areas

Page 14: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-6

3. Final Storage - Final, processed values arestored here for transfer to printer, solid stateStorage Module or for retrieval viatelecommunication links. Values are storedin Final Storage only by the OutputProcessing Instructions and only when theOutput Flag is set in the users program.The 18,336 locations allocated to FinalStorage at power up is reduced if Input orIntermediate Storage is increased.

4. System Memory - used for overhead taskssuch as compiling programs, transferringdata, etc. The user cannot access thismemory.

5. Program Memory - available for userprograms entered in Program Tables 1 and2, and Subroutine Table 3. (Sections OV3,1.1)

The use of the Input, Intermediate, and FinalStorage in the measurement and dataprocessing sequence is shown in Figure OV2-1.While the total size of these three areasremains constant, memory may be reallocatedbetween the areas to accommodate differentmeasurement and processing needs (*A Mode,Section 1.5). The size of system and programmemory are fixed.

OV2.2 CR7 INSTRUCTION TYPES

Figure OV2.1 illustrates the use of the threedifferent instruction types which act on data.The fourth type, Program Control, is used tocontrol output times and vary programexecution. Instructions are identified bynumbers.

1. INPUT/OUTPUT INSTRUCTIONS (1-26,101-104, Section 9) control the terminalstrip inputs and outputs (the sensor is thesource, Figure OV1-2), storing the results inInput Storage (destination). Multiplier andoffset parameters allow conversion of linearsignals into engineering units. The ControlPorts and Continuous Analog Outputs arealso addressed with I/O Instructions.

2. PROCESSING INSTRUCTIONS (30-66,Section 10) perform numerical operationson values located in Input Storage (source)and store the results back in Input Storage(destination). These instructions can beused to develop high level algorithms toprocess measurements prior to OutputProcessing (Section 10).

3. OUTPUT PROCESSING INSTRUCTIONS(69-82, Section 11) are the onlyinstructions which store data in FinalStorage (destination). Input Storage(source) values are processed over time toobtain averages, maxima, minima, etc.There are two types of processing done byOutput Instructions: Intermediate and Final.

Intermediate processing normally takesplace each time the instruction is executed.For example, when the Average Instructionis executed, it adds the values from theinput locations being averaged to runningtotals in Intermediate Storage. It also keepstrack of the number of samples.

Final processing occurs only when theOutput Flag is high. The Output ProcessingInstructions check the Output Flag. If theflag is high, final values are calculated andoutput. With the Average, accumulatedtotals are divided by the number of samplesand the resulting averages sent to FinalStorage. Intermediate locations are zeroedand the process starts over. The OutputFlag, Flag 0, is set high by a ProgramControl Instruction which must precede theOutput Processing Instructions in the userentered program.

4. PROGRAM CONTROL INSTRUCTIONS(85-98, Section 12) are used for logicdecisions and conditional statements. Theycan set flags, compare values or times,execute loops, call subroutines,conditionally execute portions of theprogram, etc.

OV2.3 PROGRAM TABLES AND THEEXECUTION AND OUTPUT INTERVALS

Programs are entered in Tables 1 and 2.Subroutines, called from Tables 1 and 2, areentered in Subroutine Table 3. The size of eachtable is flexible, limited only by the total amountof program memory. If Table 1 is the only tableprogrammed, the entire program memory isavailable for Table 1.

Table 1 and Table 2 have independentexecution intervals, entered in units of secondswith an allowable range of 0.0125 to 6553seconds. Intervals shorter than 0.1 seconds areallowed only in Table 1. Subroutine Table 3 hasno execution interval; subroutines are onlyexecuted when called from Table 1 or 2.

Page 15: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-7

Table 1.Execute every x sec.0.0125 < x < 6553

Instructions are executedsequentially in the order theyare entered in the table. Onecomplete pass through the tableis made each execution intervalunless program controlinstructions are used to loop orbranch execution.

Normal Order:MEASUREPROCESSCHECK OUTPUT COND.OUTPUT PROCESSING

Table 2.Execute every y sec.0.1 < y < 6553

Table 2 is used if there is aneed to measure and processdata on a separate interval fromthat in Table 1.

Table 3.Subroutines

A subroutine is executed onlywhen called from Table 1 or 2.

Subroutine LabelInstructionsEnd

Subroutine LabelInstructionsEnd

Subroutine LabelInstructionsEnd

FIGURE OV2-2. Program and Subroutine Tables

OV2.3.1 THE EXECUTION INTERVAL

The execution interval specifies how often theprogram in the table is executed, which isusually determined by how often the sensorsare to be measured. Unless two differentmeasurement rates are needed, use only onetable. A program table is executed sequentiallystarting with the first instruction in the table andproceeding to the end of the table.

Each instruction in the table requires a finitetime to execute. If the execution interval is lessthan the time required to process the table, theCR7 overruns the execution interval, finishesprocessing the table and waits for the nextexecution interval before initiating the table.When an overrun occurs, decimal points areshown on either side of the G on the display inthe LOG mode (*0). Overruns and table priorityare discussed in Section 1.1.

OV2.3.2 THE OUTPUT INTERVAL

The interval at which output occurs isindependent from the execution interval, otherthan the fact that it must occur when the table isexecuted (i.e., a table cannot have a 10 minuteexecution interval and output every 15 minutes).

A single program table can have many differentoutput intervals and conditions, each with a uniquedata set (output array). Program ControlInstructions are used to set the Output Flag whichdetermines when output occurs. The OutputProcessing Instructions which follow the instructionsetting the Output Flag determine the data outputand its sequence. Each additional output array iscreated by another Program Control Instructionsetting the Output Flag high in response to anoutput condition, followed by Output ProcessingInstructions defining the data set to output.

OV3. PROGRAMMING THE CR7A program is created by keying it directly intothe datalogger or on a PC using the PC208 orPC208W Datalogger Support Software programEDLOG. This manual describes directinteraction with the CR7. Work through thedirect programming examples in this overviewbefore using EDLOG and you will have thebasics of CR7 operation as well as anappreciation for the help provided by thesoftware. Section OV3.5 describes options forloading the program into the CR7.

Page 16: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-8

OV3.1 FUNCTIONAL MODES

User interaction with the CR7 is broken intodifferent functional MODES, (e.g., programmingthe measurements and output, setting time,manually initiating a block data transfer toStorage Module, etc.). The modes are referredto as Star (*) Modes since they are accessed byfirst keying *, then the mode number or letter.Table OV3.1 lists the CR7 Modes.

TABLE OV3-1. * Mode Summary

Key Mode

*0 LOG data and indicate active Tables*1 Program Table 1*2 Program Table 2*3 Program Table 3, subroutines only*4 Enable/disable printer output*5 Display/set real time clock*6 Display/alter Input Storage data, toggle

flags*7 Display Final Storage data*8 Final Storage data transfer to cassette

tape*9 Final Storage data transfer to printer*A Memory allocation/reset*B Signature test/PROM version*C Security*D Save/load Program

OV3.2 KEY DEFINITION

Keys and key sequences have specificfunctions when using the CR7 keyboard or aterminal/computer in the remote keyboard state(Section 5). Table OV3.2 lists these functions.In some cases, the exact action of a keydepends on the mode the CR7 is in and isdescribed with the mode in the manual.

TABLE OV3-2. Key Description/EditingFunctions

Key Action

0-9 Key numeric entries into display* Enter Mode (followed by Mode Number)A Enter/AdvanceB Back upC Change the sign of a number or index

an input location to loop counterD Enter the decimal point# Clear the rightmost digit keyed into the

display#A Advance to next instruction in program

table (*1, *2, *3) or to next output arrayin Final Storage (*7)

#B Back up to previous instruction inprogram table or to previous outputarray in Final Storage

#D Delete entire instruction

OV3.3 PROGRAMMING SEQUENCE

In routine applications, sensor signals aremeasured, processed over some time interval,and the results are stored in Final Storage. Ageneralized programming sequence is:

1. Enter the execution interval, determined bythe desired sensor scan rate.

2. Enter the Input/Output Instructions requiredto measure the sensors.

3. Enter any Processing Instructions requiredto get the data ready for Output Processing.

4. Enter a Program Control Instruction to testthe output condition and Set the OutputFlag when the condition is met. Forexample, use Instruction 92 to output basedon time, 86 to output each time the table isexecuted, and 88 or 89 to compare inputvalues. This instruction must precede theOutput Processing Instructions.

5. Enter the Output Processing Instructions tostore processed data in Final Storage. Theorder in which the data are stored isdetermined by the order of the OutputProcessing Instructions in the table.

6. Repeat steps 4 and 5 for output on differentintervals or conditions.

Page 17: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-9

OV3.4 INSTRUCTION FORMAT

Instructions are identified by an instructionnumber. Each instruction has a number ofparameters that give the CR7 the information itneeds to execute the instruction.

The CR7 Prompt Sheet has the instructionnumbers in red, with the parameters brieflylisted in columns following the description.Some parameters are footnoted with furtherdescription under the "Instruction Option Codes"heading.

For example, Instruction 73 stores themaximum value that occurred in an InputStorage Location over the output interval. Theinstruction has three parameters (1)REPetitionS, the number of sequential InputStorage locations on which to find maxima, (2)TIME, an option of storing the time ofoccurrence with the maximum value, and (3)LOC the first Input Storage Location operatedon by the Maximum Instruction. The codes forthe TIME parameter are listed in the "InstructionOption Codes".

The repetitions parameter specifies how manytimes an instruction's function is to be repeated.For example, four 107 thermistor probes, wiredto single-ended channels 1 through 4, aremeasured using a single Instruction 11, Temp-107, with four repetitions. Parameter 2specifies the input channel of the first thermistor(channel 1) and parameter 4 specifies the InputStorage Location in which to storemeasurements from the first thermistor. IfLocation 5 were used, the temperature of thethermistor on channel 1 would be stored in InputLocation 5, the temperature from channel 2 inInput Location 6, etc.

Detailed descriptions of the instructions aregiven in Sections 9-12.

OV3.5 ENTERING A PROGRAM

Programs are entered into the CR7 in one offour ways:

1. Keyed in using the CR7 keyboard.

2. Loaded from a pre-recorded listing usingthe *D Mode. There are two types ofstorage/input:

a. Stored on disk/sent from computer(PC208 software).

b. Stored/loaded from SM192/716 StorageModule

3. Loaded from Storage Module or internalPROM (special software) upon power-up.

A program is created by keying it directly intothe datalogger as described in the followingSection, or on a PC using the PC208Datalogger Support Software.

PC208 Software programs are used to developand send programs to the CR7. Program filesdeveloped can be downloaded directly to theCR7 via direct wire, telephone, or RadioFrequency (RF).

Programs on disk can be copied to a StorageModule. Using the *D Mode to save or load aprogram from a Storage Module is described inSection 1.8.

If the SM192/716 Storage Module is connectedwhen the CR7 is powered-up, the CR7 willautomatically load program number 8, providedthat a program 8 is loaded in the StorageModule (Section 1.8).

It is also possible (with special software) tocreate a PROM (Programmable Read OnlyMemory) that contains a datalogger program.With this PROM installed in the datalogger, theprogram will automatically be loaded and runwhen the datalogger is powered-up, requiringonly that the clock be set.

OV4. PROGRAMMING EXAMPLEThe best way to become acquainted with theCR7 is to program it and make somemeasurements. If your CR7 contains either a723 or 723-T Analog Input card, a shortcopper-constantan thermocouple (TC) shouldbe connected to channel 5. In this example, youwill program the CR7 to sample thethermocouple temperature. If you have notpurchased the 723-T with a ResistiveTemperature Device (RTD) to measure the TCreference junction temperature, a "dummy"reference temperature will be used.

Page 18: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-10

Tables OV3-1 and OV3-2 summarize theKeyboard Commands and Control Modes usedto program the CR7, monitor Input and FinalStorage and control data output to peripherals.The instructions, and their associatedparameters, are the CR7's programming stepsand are used to build the CR7's program. It isnot necessary to understand all the commandsto proceed with this programming exercise. It ishelpful to find the example's instructions on theCR7 Prompt Sheet provided with this manual.As you become familiar with programming theCR7, you will find that the Prompt Sheet or thePC208 program EDLOG has all the informationyou need to write your program. By followingalong on the Prompt Sheet as you proceed withthis exercise, you will learn how to use it to writeyour own programs.

OV4.1 MEASUREMENT

To make a thermocouple temperaturemeasurement, the CR7 must know thetemperature of the reference junction. The CR7takes the reference temperature, converts it tothe equivalent TC voltage, adds the measuredTC voltage and converts the sum totemperature through a polynomial fit to the TCoutput curve. In this example, the referencejunction is at the Analog Input Card. Itstemperature is measured with Instruction 17,Panel Temperature. If you have an AnalogInput Card with RTD, check to see whichnumber is assigned to it. A tag labeled RTD ison the left hand side and the card number is onthe right hand side of the Analog Input Card. Ifthe RTD card is not card 1, you must enter thecorrect card number as Parameter 1 ofInstruction 17. If you do not have an AnalogInput Card with RTD, you will omit Instruction 17from the Program and enter a "dummy"reference temperature after the Program iscompiled.

The thermocouple temperature measurement ismade using Instruction 14 (differential voltagemeasurement of TC) on differential channel 5.When using a copper-constantanthermocouple, the copper lead is connected tothe high input of a differential channel and theconstantan lead is connected to the low side.The channel numbering printed on the AnalogInput Cards refers only to differential channels.

Either the high or low side of a differentialchannel may be used for single endedmeasurements. (Each side is counted whenassigning single ended channel numbers; e.g.,the high side of differential channel 8 is singleended channel 15 and the low side is singleended channel 16).

The first parameter in Instruction 14 is thenumber of times to repeat the measurement: 1is entered because only one thermocouple ismeasured. If more thermocouplemeasurements were desired, the copper leadswould be connected to the high sides ofconsecutive differential channels, theconstantan leads to the low sides and thenumber of repetitions entered in Parameter 1would equal the number of thermocouples.

Parameter 2 is the voltage range to use whenmaking the measurement. The output of acopper-constantan thermocouple isapproximately 40 microvolts per oC differencein 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 aslong as the measuring junction is within 125 oCof the panel temperature). The resolution of the+5000 uV range is 166 nV or 0.004 oC.

Parameter 3 is the Input Card number andParameter 4 is the channel on which to makethe first measurement. If more than onethermocouple is measured, the CR7 willautomatically advance through the channelsand on to the next card if necessary. Similarly,Parameter 7 is the Input Storage Location inwhich to store the first measurement; e.g., ifthere are five repetitions and the firstmeasurement is stored in location 3, the finalmeasurement will be stored in location 7.

Parameter 6 is the Input Storage location inwhich the reference temperature is stored, andParameters 8 and 9 are the multiplier and offsetto apply to the temperature value. A multiplier of1 and an offset of 0 give the result in oC, amultiplier of 1.8 and an offset of 32 give theresult in oF.

Now that you have some idea of what you aretelling the CR7 by entering the parameters, wewill proceed with programming the CR7.

Page 19: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-11

TABLE OV4-1. Thermocouple Measurement Programming Example

TURN ON THE POWER SWITCH AND PROCEED AS FOLLOWS:

DisplayID:Data Key

DisplayID:Data Key Description

HELLO 01

00:00

01:0.0000

1

2

:0064

01:00

01:2

*

A

A

The number after "HELLO" will count up as memoryis checked. If you have a 512K Memory Card, thiscan take a long time; key # to abort the test. Theresult of the CPU board memory check is thendisplayed (Sect. 1.5)Enter Program Table 1, advance to ExecutionIntervalEnter 2 second Execution Interval advance to firstinstruction

-------Users without RTD omit next Instruction------

01:P0001:00

02:0000

171

1

01:P1701:1

02:1

AA

A

Measure Panel Temp., advance to first ParameterRTD in input card #1, if RTD card other than #1,enter correct card #Store temp in location 1

-------Users without RTD continue here-------Instruction Location Number will be 1 less (i.e., 01:P00)

02:P0001:0002:0003:0004:0005:0006:000007:000008: 0.000009: 0.0000

03:P00

00:00

1412151121

0

02:P1401:102:203:104:505:106:107:208:109:0.0000

:LOG 1

AAAAAAAAAA

*

TC temp., differential meas.1 repetitionRange code (5000uV, slow)Input card #1Input channel of 1st TCTC type (copper-constantan)Reference temp. is in location 1Store TC temp. in location 2Multiplier of 1No offset entered (offset=0), advance to nextinstructionExit Table 1

Enter *0 Mode, compile table

The CR7 is now programmed to measure the thermocouple temperature and to store the result in InputStorage 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 thevalue 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 dummyreference temperature.

Page 20: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-12

TABLE OV4-2. Using *6 Mode to Observe Example TC Measurements(User with Model 723-T RTD Card)

DisplayID:Data Key

DisplayID:Data Key Description

:LOG 1

00:00

*6

0

06:000001:21.23402:22.43301:21.199:LOG 1

AAB*

Enter *6 Mode, advance to first locationPanel temp is 21.234 oC, advance to location 2TC temp is 22.433 oC, backup to location 1Panel temp is now 21.199 oCReturn to *0 Mode

TABLE OV4-3. Using *6 Mode to Observe Example TC Measurements(User with Model 723 Card, No RTD)

DisplayID:Data Key

DisplayID:Data Key Description

:LOG 1

:0.0000

00:00

*6

20

0

06:000001:0.000002:2.953301:0.0000:2001:20.00002:22.866

:LOG 1

AABCAA*

Enter *6 Mode, advance to first locationReference temp is 0.0oC, advance to location 2TC "temp" is 2.9533 C, backup to location 1Setup to change stored valueStore 20 in location 1Advance to location 2The TC temp in location 2 using a referencetemperature of 20oReturn to *0 Mode

You can advance through Input Storage bykeying in the advance command, A, or backupby keying in the backup command, B. The InputLocation you are observing is shown on the leftin the display ID field. The temperature datastored in the Input locations are updated every 2seconds, each time Table 1 is executed. Verifythis by changing the temperature of thethermocouple (hold it in your fingers) whilemonitoring the proper Input Location.

It is possible to go directly to a specific InputStorage location by entering the *6 Mode andkeying in the desired location before keying A.A similar utility is available in other Modes.

OV4.2 OUTPUT

In the following example instructions areappended to Table 1 to output the time and theaverage temperatures to Final Storage every 5minutes.

Page 21: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-13

TABLE OV4-4. Example Programming to Obtain Five Minute Averages

DisplayID:Data Key

DisplayID:Data Key Description

00:0001:00

03:P0001:000002:000003:00

04:P0001:000005:P0001:0002:0000

06:P00

00:0005:0005:0000

05:00:21

13:24:01

: LOG 1

13

9205

10

77107121

58511

1324

: LOG 101:0001:3

03:P9201:002:503:10

04:P77:1005:P7101:202:1

:00:21:3205:8505:11

05:13:24

*

A

AAAA

AAAAA

*

AAA

A

*0

Program Table 1Advance to 3rd Instruction location (Key in 2 ifInstruction 17 was not entered, Instruction LocationNumber will be 1 less than shown in table)

Enter If Time InstructionEnter 0 minutes into intervalEnter 5 minute time intervalSet output Flag 0

Enter Output Time InstructionCode for HR:MINEnter Average Instruction2 repetitionsLocation of 1st input data to be averaged

Exit Table 1

Enter *5 Mode to set clock (the clock will be running)Enter YearEnter Julian day (January 11 assumed in thisexample)Enter Hours:Minutes (24 hour time, 1:24 PMassumed in this example)Exit *5 Mode, compile Table 1, commence loggingdata

The CR7 is now programmed to sample the panel and thermocouple temperatures every 2 seconds andto output the time and the average temperatures to Final Storage every 5 minutes. Each Output Arraysent to Final Storage will consist of 4 data values. The first value will be an output identifier which givesthe number of the Table which caused the output, and the instruction location number of the instructionwhich set the output flag. The second value will be the time, and the third and fourth values will be theaverage temperatures of the I/O Module and the thermocouple. Values stored in Final Storage can beviewed using the *7 Mode. Table 1.2-5 shows an example of the use of the *7 Mode, it is assumed thatthe CR7 has been logging data for 8 minutes since the time was set in the previous example.

Page 22: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-14

TABLE OV4-5. Using *7 Mode to View Values in Final Storage

DisplayID:Data Key

DisplayID:Data Key Description

:LOG 1

00:00

01:0103.

02:1325.03:22.5704:23.4301:0103.02:1330.03:22.6100:00

7

0

07:9.0000

:LOG 1

*

A

A

AAAAA*

Enter *7 Mode. The DSP is at Final Storage location 9,advance to first data valueOutput identifier: users who did not enter Instruction 17 willsee 01: 0102 because the output flag is set by the secondinstruction in Table 1TimeAverage panel temp for readings between 1:24 and 1:25 P.M.Average thermocouple temp.Output identifierTimeAverage panel temp for readings between 1:25 and 1:30 P.M.Enter *0 Mode

OV4.3 EDITING AN EXISTING PROGRAM

When editing an existing program in the CR7,entering a new instruction inserts theinstruction; entering a new value for aninstruction parameter replaces the previousvalue.

To insert an instruction, enter the program tableand advance to the position where theinstruction is to be inserted (i.e., P in the dataportion of the display), key in the instructionnumber, and then key A. The new instructionwill be inserted at that point in the table,advance through and enter the parameters.The Instruction that was at that point and allinstructions following it will be pushed down tofollow the inserted instruction.

An instruction is deleted by advancing to theinstruction 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 correctvalue then key A. Note that the new value is notentered until A is keyed.

OV4.4 EDLOG PROGRAM LISTING

The examples in the rest of this manual useprogram listings generated by EDLOG, thedatalogger Program Editor for the PC(PC208(W) Software). The EDLOG listing doesnot show the CR7 display or the "A" keystrokesused to enter data. The EDLOG listing for theprevious example is given in Table OV4-6.

TABLE OV4-6. EDLOG Listing of ExampleProgram

* 1 Table 1 Programs01: 2 Sec. Execution Interval

01: P17 Panel Temperature01: 1 IN Card02: 1 Loc :

02: P14 Thermocouple Temp (DIFF)01: 1 Rep02: 2 5000 uV slow Range03: 1 IN Card04: 5 IN Chan05: 1 Type T (Copper-Constantan)06: 1 Ref Temp Loc07: 2 Loc [:TC Temp ]08: 1 Mult09: 0 Offset

03: P92 If time is01: 0 minutes into a02: 5 minute interval03: 10 Set high Flag 0 (output)

04: P77 Real Time01: 10 Hour-Minute

05: P71 Average01: 2 Reps02: 1 Loc

Page 23: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-15

OV5. DATA RETRIEVAL OPTIONSThere are several options for data storage andretrieval. These options are covered in detail inSections 2, 4, and 5. Figure OV5-1summarizes the various possible methods.

Regardless of the method used, there are threegeneral approaches to retrieving data from adatalogger.

1. On-line output of Final Storage data to aperipheral storage device. On a regularschedule, that storage device is broughtback to the office/lab where the data istransferred to the computer. Anotherstorage device is usually taken into the fieldand exchanged for the one which isretrieved so that data collection cancontinue uninterrupted.

2. Bring a storage device to the dataloggerand transfer all the data that hasaccumulated in Final Storage since the lastvisit.

3. Retrieve the data over some form oftelecommunications link, that is, RadioFrequency (RF), telephone, short haulmodem, multi-drop interface, or satellite.The PC208 software automates thisprocess.

Regardless of which method is used, theretrieval of data from the datalogger does NOTerase those data from Final Storage. The dataremain 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 turnedoff.

Table OV5-1 lists the instructions used with thevarious methods of data retrieval.

TABLE OV5-1. Data Retrieval Methods and Related Instructions

Storage Printer, other TelecommunicationsModule Serial Device (RF, Phone, Short Haul, SC32A)

Inst. 96, Inst. 96, 98 Inst. 97*4 *4*9 *9 (Telecommunications Commands)*D *D

TABLE OV5-2. Data Retrieval Sections in Manual

Topic Section in Manual

Instr. 96 4.1, 12Instr. 97 12*4 4.1*8 4.2*9 4.2*D 1.8Storage Module 4.3Telecommunications 5

Page 24: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-16

Display StorageModule

Card StorageModule

MultidropModem

ShorthaulModem

RF Modem PhoneModem

SatelliteInterface

Transceiver

MultidropModem

StorageModule

Card StorageModule

DirectRS-232Interface

ShorthaulModem

PhoneModem

SatelliteGroundStation

RS-232Interface

RS-232Interface

RS-232Interface

Transceiver

RF BaseStation

1

2

RTD 3

4

MADE IN USA

+12

720 I/O MODULE

ANALOG INTERFACE

I. D. DATA

1 2 3 A

4 5 6 B

7 8 9 C

* 0 # D

ON

OFF

AUX.POWER

MADE IN USA

CR7 MEASUREMENT & CONTROL SYSTEM

700X CONTROL MODULE

SERIAL I/O

CAMPBELLSCIENTIFICINC. LOGAN, UTAH

H H H H1 2 3 4

724 PULSE COUNTER

H L H L H L H L H L H L H L H L H L H L H L H L H L H L1 2 3 4 5 6 7 8 9 10 11 12 13 14

1 2 3 4 5 6 7 8 1 2SWITCHED ANALOG OUT CONTINUOUS ANALOG OUT

1 2 3 4 5 6 7 8DIGITAL CONTROL OUT

725EXCITATION

H72650 VOLT INPUT

L1

H L2

H L3

H L4

H L5

H L6

H L7

H L8

SOLARTEMP CRH %

1:2:3:

Scale = Auto

Logger Time 00:03:54FlagsPorts

H=Help

G R +-

= Graph enter/exit= Re-scale= Incr. auto exponent= Decr. auto exponent

V = View save to fileF1. . F8 = Toggle flagsP1. . P6 = Toggle portsC = Collect data

100

200

300

400

500

600

700

800

900

1000

1100

1200

1300

1400

1500

1600

1700

1800

1900

2000

2100

2200

2300

FIGURE OV5-1. Data Retrieval Hardware Options

Page 25: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-17

OV6. SPECIFICATIONSElectrical specifications are valid for over a -25° to +50°C range unless otherwise specified.

Analog Inputs(723T or 723 Card specifications below;

726 ±50 V Card specifications discussed inSystem Description)

Voltage Measurement Types: Single-ended ordifferential.

Range and Resolution: Ranges are softwareselectable on any input channel.Full Scale Resolution

Input Range (mV) Differential Single-ended±5000 166 µV 333 µV±1500 50 µV 100 µV±500 16.6 µV 33.3 µV±150 5 µV 10 µV±50 1.66 µV 3.33 µV±15 500 nV 1000 nV±5 166 nV 333 nV±1.5 50 nV 100 nV

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 µVNegative single-ended: ±0.03% FSR

(±0.015%, 0-40°C) ±5 µV

Input Sample Rates: Fast A/D conversions areintegrated over 250 µs. Slow A/D conversionsare integrated over 16.67 ms for 60 Hz ACrejection or optionally, 20.0 ms for 50 Hz ACrejection. Differential measurements includetwo conversions, one with reversed input polar-ity, to reduce thermal offset and common modeerrors. The following intervals do not includethe self-calibration measurement which occursonce per instruction.

Input sample Typical inputrates noise

ms/channel nV/RMSFast Single-ended 2.9 350Fast Differential 4.7 250Slow Single-ended 22.0 43Slow Differential 43.0 30Fast Differential (TC) 7.9 250

Common Mode Range: ±5 V

Common Mode Rejection: > 140 dB (DC to 100 Hz)

Normal Mode Rejection: 70 dB (60 Hz withslow 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

Pulse Counters(724 Card)

Pulse Counters per Card: 4

Maximum Counts per Interval: 32,767 (withoverrange detection)

Modes: Programmable modes are switchclosure, high frequency pulse, and low level AC.

Switch Closure ModeMinimum Switch Closed Time: 1 msMinimum Switch Open Time: 4 msMaximum Bounce Time: 1.4 ms open without

being counted.

High Frequency Pulse ModeMinimum Pulse Width: 2 µs

Maximum Input Frequency: 250 kHz

Voltage Thresholds: The count is incrementedwhen the input voltage changes from below 1.5 V to above 3.5 V.

Maximum Input Voltage: ±20 V

Low Level AC ModeThis 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)15 1 to 10025 1 to 1,00050 1 to 3,000

160 1 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 VLow: < 0.1 V

Output Resistance: 400 Ω

Analog Outputs(725 Card)

Each card contains 8 switched and 2 continuousanalog outputs.

Switched: Provides a precision voltage forresistance measurement, then switches off(high impedance). Only one switched outputcan be active at a time.

Continuous: A preset voltage is held untilupdated. Voltage degrades 0.17 mV every 7seconds. All continuous analog outputs (anddigital control ports) can be active simultane-ously.

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 ConductivityMeasurements(Combination of 723 and 725 Cards)

Accuracy: ±0.01% of full scale bridge outputprovided the matching bridge resistors are notthe limiting factor.

Measurement Types: 6-wire and 4-wire fullbridge, 4-wire, 3-wire, and 2-wire half bridges.High accuracy, low impedance bridgemeasurements are made ratiometrically withdual polarity measurements of excitation andoutput to eliminate thermal emfs. AC resis-tance and conductivity measurements use a750 µs excitation pulse with the signal integra-tion occurring over the last 250 µs. An equalduration pulse of opposite polarity is appliedfor ionic depolarization.

Transient ProtectionAll input and output connections to the I/OModule are protected using spark gaps thatare rated to 10,000 A. The spark gaps areconnected directly to a heavy copper bar oneach input card with no more than 2 inches of20 AWG copper wire.

Control ModuleProcessor: Hitachi 6303

Memory: 24K ROM; 40K RAM, 709 Cardprovides an additional 512K RAM.

Data Storage: 18.8K values, standard; 280Kvalues, expanded.

Display: 8 digit LCD (0.5” digits).

Peripheral Interface: 9-pin, D-type connectoron the Control Module panel for connection tostorage module, card storage module,multidrop interface, modem, printer, or RS-232adapter. Baud rates selectable at 300, 1200,9600, and 76,800.

I/O Module Interface: Optically isolated currentloops allow connection of up to 4 I/O Modules.I/O Modules can be separated from the ControlModule by up to 1,000 feet.

Clock Accuracy: ±1 minute per month.

Maximum Program Execution Rate: Systemtasks can be initiated in sync with real-time upto 80 Hz.

System Power RequirementsVoltage: 9.6 to 15 VDC

Typical Current Drain: 3.5 - 6 mA (minimumsystem) quiescent, 16 mA during processing,100 mA during analog measurement.

Internal Batteries: Sealed rechargeable with2.5 Ahr capacity per charge.

Charging Circuit: Requires DC or rectified ACvoltage from 15 to 25 V. Thermal compensa-tion is included to optimize charging voltageaccording to ambient temperature.

External Batteries: Any 12 V external batterycan be a primary power source; internal batter-ies provide a backup while the externalbatteries are changed.

Operation from AC Sources: An AC operatedbattery charger is included with the enclosureto maintain full charge on the batteries whereAC power is available. In the event of powerfailure, the internal batteries will keep thesystem operational for up to 5 days in mostapplications.

Physical SpecificationsSize: ENC 7L 17” x 12” x 6”

ENC 7F 20” x 13” x 10”ENC 7XL 19” x 19” x 10”

Weight: ~40 lbs (ENC 7F with 700X, 720, &seven I/O cards).

WarrantyThree years against defects in materials andworkmanship.

Page 26: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 MEASUREMENT AND CONTROL SYSTEM OVERVIEW

OV-18

This is a blank page.

Page 27: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

1-1

SECTION 1. FUNCTIONAL MODES

1.1 PROGRAM TABLES - *1, *2, AND *3MODESData acquisition and processing functions arecontrolled by instructions contained in programtables. Programming can be separated into twotables, each having its own programmableexecution interval. A third table is available forprogramming subroutines which may be calledby instructions in Tables 1 or 2 or by a specialinterrupt. The *1 and *2 Modes are used toaccess Tables 1 and 2. The *3 Mode is used toaccess Subroutine Table 3.

When a program table is first entered, thedisplay shows the table number in the ID Fieldand 00 in the Data Field. Press A and the CR7will advance to the execution interval. If there isan existing program in the table, enter aninstruction location number prior to A and theCR7 will advance directly to the instruction (e.g.,5 will advance to the fifth instruction in thetable).

1.1.1 EXECUTION INTERVAL

The execution interval is entered in units ofseconds 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 inTable 1 only. Execution of the table is repeatedat the rate determined by this entry. The tablewill not be executed if 0 is entered. Values lessthan 0.1 are rounded to the nearest evenmultiple of 0.0125. If the Interval is 0.1 orgreater, the CR7 will not allow entry of digitsbeyond 0.1.

The rate at which the CR7 can execute a giventable must not be confused with the samplerates for the measurements contained withinthe table. When a table is executed and ameasurement is made, the Control Moduleinstructs the I/O Module which measurement tomake and how many times to repeat it onsuccessive channels. The I/O module thenrepeats the measurement as fast as possibleand stores the data until the Control Module isready for it. The Control Module takes the rawdata and scales it as required by the instructioninitiating the measurement. The next instruction

in the table is not executed until the scaling iscompleted. The maximum sample rate for ameasurement is the rate at which the I/OModule can make a number of measurementsspecified by a single input instruction. Becausethe sample rate does not include the processingtime required to scale the measurements intoengineer units, the execution time of aninstruction will be greater than the sample ratefor the measurement specified by theinstruction. The execution times for theinstructions are given in Section 3.9.

The throughput rate is the rate at which ameasurement can be made and the resultingvalue stored in Final Storage. The maximumthroughput rate for fast single endedmeasurements is approximately 310measurements per second.

If the specified execution interval for a table isless than the time required to process thattable, the CR7 overruns the execution interval,finishes processing the table and waits for thenext occurrence of the execution interval beforeagain initiating the table (i.e., when theexecution interval is up and the table is stillexecuting, that execution is skipped). Since noadvantage is gained in the rate of executionwith this situation, it should be avoided byspecifying an execution interval adequate forthe table processing time.

NOTE: Whenever an overrun occurs,decimal points are displayed on both sidesof the sixth digit of the CR7 display (e.g., LO.G. in the *0 Mode).

When the Output Flag is set high, extra time isconsumed by final output processing. It maybe acceptable if the execution interval isexceeded at this time. For example, suppose itis desired to measure every 0.1 seconds andoutput processed data every ten minutes. Thetable requires less than 0.1 seconds to processexcept when output occurs (every 10 minutes).With final output processing the time required isone second. With the execution interval set at0.1 seconds, and a one second lag betweensamples once every 10 minutes, 10measurements out of 6000 (.17%) are missed:an acceptable statistical error for mostpopulations.

Page 28: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 1. FUNCTIONAL MODES

1-2

1.1.2 SUBROUTINES

Table 3 is used to enter subroutines which maybe called with Program Control Instructions inTables 1 and 2 or other subroutines. The groupof instructions which form a subroutine startswith Instruction 85, Label Subroutine, and endswith Instruction 95, End. (Section 12)

1.1.3 TABLE PRIORITY/INTERRUPTS

Table 1 execution has priority over Table 2. IfTable 2 is being executed when it is time toexecute Table 1, Table 2 will be interrupted.After Table 1 is completed, Table 2 resumes atthe point of interruption. If the execution intervalof Table 2 coincides with Table 1, Table 1 willbe executed first, followed by Table 2.

Interrupts by Table 1 are not allowed in themiddle of a measurement or while output toFinal Storage is in process (the Output Flag,flag 0, is set high). The interrupt occurs assoon as the measurement is completed or flag0 is set low.

1.1.4 COMPILING A PROGRAM

When a program is entered, or any changes aremade in the *1, *2, *3, *4, *A, or *C Modes, theprogram must be compiled before it startsrunning. The compile function checks forprogramming errors and optimizes programinformation for execution. If errors aredetected, the appropriate error codes areindicated on the Display (Section 3.10).Compiling occurs when the *0 , *6, or *B Modesare entered and prior to saving a program listingin the *D Mode. Compiling only occurs after aprogram change has been made; subsequentuse of any of these Modes does not causecompiling.

Compiling with the *0, *B, or *D Mode setsall output ports and flags low and resets thetimer (Instruction 26) and all data in Inputand Intermediate Storage to ZERO.

When the *6 Mode is used to compile datain Input Storage, the state of flags, controlports, and the timer are UNALTERED.Compiling always zeros IntermediateStorage.

1.2 SETTING AND DISPLAYING THECLOCK - *5 MODEThe *5 Mode is used to display time or changethe year, day of year, or time. When *5 ispressed, the current time is displayed. The timeparameters displayed in the *5 Mode are givenin Table 1.2-1.

The CR7 powers-up with hours and minutes setto 0 and the day and year set for the date thatthe PROMs were first released by CampbellScientific. To set the year, day, or time, enterthe *5 Mode and advance to display theappropriate value. Key in the desired numberand enter the value by pressing A. When a newvalue for hours and minutes is entered, theseconds are set to zero and current time isagain displayed. To exit the *5 Mode, press *.When the time is changed, a partial recompileis done automatically to resynchronize programexecution with real time. The resynchronizationprocess can change the interval of a pulse ratemeasurements for one execution interval asexplained in the PULSE COUNT Instruction 3 inSection 9.

TABLE 1.2-1. Sequence of Time Parametersin *5 Mode

DisplayKey ID:DATA Description

*5 :HH:MM:SS Display current timeA 05:XX Display/enter yearA 05:XXXX Display/enter day of yearA 05:HH:MM: Display/enter

hours:minutes

1.3 DISPLAYING AND ALTERING INPUTMEMORY OR FLAGS - *6 MODEThe *6 Mode is used to display or change InputStorage values and to toggle and display userflags. If the *6 Mode is entered immediatelyfollowing any changes in program tables or the*4 Mode, the programs will be compiled andexecution will begin.

When the *6 Mode is used to compile datavalues contained in Input Storage, the state offlags, control ports, and the timer areUNALTERED. Compiling always zerosIntermediate Storage.

Page 29: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 1. FUNCTIONAL MODES

1-3

TABLE 1.3-1. *6 Mode Commands

Key Action

A Advance to next location or enter newvalue

B Back-up to previous locationC Change value in displayed location(Key

C, then value, then A)D Display/alter user flags# Display current location and allow a

location no. to be keyed in, followed byA to jump to that location

* Exit *6 Mode

1.3.1 DISPLAYING AND ALTERING INPUTSTORAGE

When *6 is keyed, the display will read"06:0000". One can advance to view the valuestored in Input Storage location 1 by pressing A.To go directly to a specific location, key in thelocation number before keying A. For example,to view the value contained in Input Storagelocation 20, key in *6 20 A. The ID portion ofthe display shows the last two digits of thelocation number. If the value stored in thelocation being monitored is the result of aprogram instruction, the value will be updatedeach time the instruction is executed.

Values may be entered into input locationsusing the change command, C. While viewingthe contents of the input location in which thevalue is to be entered, key C; the locationnumber in the ID field will disappear. Key in thedesired value and then enter it by pressing A.

If an algorithm requires parameters to bemanually modified during execution of theprogram WITHOUT INTERRUPTION of theTable execution process, the parameters canbe loaded in Input Storage locations and the *6Mode can be used to change the values. Ifvalues must be in place before programexecution commences, use Instruction 91 at thebeginning of the program table to preventexecution until a flag is set high (see nextsection). The initial values can be entered intoinput locations using the *6 Mode aftercompiling the table. The flag can then be sethigh to enable the table(s).

If any program tables *1, *2, *3, or *4 outputoptions are altered and complied in the *0Mode, 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 USERFLAGS

If D is keyed while the CR7 is displaying alocation value, the current status of the user flagswill be displayed in the following format:"00:01:00:10". The characters represent theflags, the left-most digit represents Flag 1 andright most Flag 8. A "0" indicates the flag is lowand a "1" indicates the flag is high. In the aboveexample, Flags 4 and 7 are set high. To toggle aflag, simply key the corresponding number. Toreturn to displaying the input location, press A.

Entering appropriate flag tests into the programallows manual control of program execution.For example: It is desired to be able tomanually start the execution of Table 2.Instruction 91 is the first instruction entered inTable 2:

01: P91 If Flag01: 25 5 is set low02: 0 Go to end of program table

If Flag 5 is low, all subsequent instructions inTable 2 will be skipped. Flag 5 can be toggledfrom the *6 Mode, effectively starting andstopping the execution of Table 2.

1.3.3 DISPLAYING AND TOGGLING PORTS

The current status of the Digital Control ports onthe active 725 excitation card can be displayedby hitting "0" while looking at an input location(e.g., *6A0). Ports are displayed left to right asC8, C7, ..., C1 (exactly opposite to the flags). Aport can be toggled by pressing its number onthe keypad while in the port display mode.

The active excitation card defaults to address 1.The active card may only be changed withInstruction 20 in the CR7 Program (Section 9).

1.4 COMPILING AND LOGGING DATA -*0 MODEWhen the *0 Mode is entered afterprogramming the CR7, the program is compiled(Section 1.1.4) and the display shows "LOG"and the numbers of the program tables thatwere enabled at compilation. The display is notupdated after entering *0.

Page 30: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 1. FUNCTIONAL MODES

1-4

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 andIntermediate Storage are RESET TO ZERO.

The CR7 should normally be left in the *0 Modewhen logging data. This Mode requires slightlyless power than Modes which frequently updatethe display.

1.5 MEMORY ALLOCATION - *A1.5.1 INTERNAL MEMORY

There are eight sockets on the CR7 CPU boardwhich are used for Read Only Memory (ROM)or Random Access Memory (RAM). The basicCR7 is provided with 64K of memory: three 8KProgrammable Read Only Memory (PROM)chips for a total of 24K ROM and five 8K RAMchips. Appendix E describes how to changeRAM and ROM chips.

When powered up, the CR7 displays HELLOwhile performing a memory check. As thecheck is performed, a number on the right ofthe display is incremented as each 8 K block ofmemory is checked. With standard memory thecount will stop at 8. If additional memorycard(s) are present, the count will proceedaccordingly. The Power-up memory check isquite extensive and can take considerable timeif the 709 512K Memory Card is installed. Toabort the extensive test (a shorter version is stillperformed), press the # key. When the memorytest is completed, the number of K bytes ofRAM plus ROM is displayed.

The size of RAM, including any additionalmemory cards which may be present, can bedetermined with the *A Mode (Section 2.4.2)

There are 1744 bytes allotted to programmemory. This memory may be used for oneprogram table or shared among all programtables. Tables 3.9-1 to 3.9-4 list the amount ofmemory used by each program instruction.

Input Storage is used to store the results ofInput/Output and Processing Instructions. Thevalues stored in input locations may bedisplayed using the *6 Mode (Section 1.3).

Intermediate Storage is used by OutputProcessing Instructions to store the results ofintermediate calculations necessary foraverages, standard deviations, histograms, etc.

Final Storage holds output data, the results ofOutput Processing Instructions which are storedwhen the Output Flag is set high (Section 3.7).The data in Final Storage can be displayedusing the *7 Mode (Section 2.3).

Figure OV2-1 illustrates the use of Input,Intermediate, and Final Storage.

Each Input or Intermediate Storage locationrequires four bytes of memory. Each FinalStorage location requires 2 bytes of memory.Low resolution data points require 1 FinalStorage location and high resolution data pointsrequire 2. Section 2 describes Final Storageand data retrieval in detail.

Table 1.5-1 lists the basic memory areas andthe amount of memory allotted to them in thestandard CR7.

TABLE 1.5-1. Memory Allocation in Standard CR7

Program System Input Intermediate Final Storage*PROM Memory Memory Storage* Storage* Storage* Standard w/709

Memory Card

Avail. bytes 24K 1744 2160 128 256 36,672 590,960

Avail. Loc. - - - 32 64 18,336 280,480

*Default allocation on power-up

Page 31: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 1. FUNCTIONAL MODES

1-5

TABLE 1.5-2. Description of *A Mode Data

Key DisplayEntry ID: Data Description of Data

*A 01: XXXX The number of memory locations currently allocated to Input Storage. Thisvalue can be changed by keying in the desired number (minimum of 32,maximum limited by available memory).

A 02: XXXX The number of memory locations currently allocated to Intermediate Storage.This value can be changed by keying in the desired number (limited by availablememory).

A 03: XXXXX The number of memory locations currently allocated to Final Storage. Thisnumber is automatically altered when the number of memory locations in Inputand/or Intermediate Storage is changed. A minimum of 768 locations arealways retained in Final Storage.

A 04:XXXX The number of bytes remaining in Program memory (1744 bytes total).Entering 1744 will ERASE ALL MEMORY and put the CR7 through the initialpower-up routine.

1.5.2 *A MODE

The *A Mode is used to 1) determine thenumber of locations allocated to Input,Intermediate, and Final Storage; 2) repartitionthis memory; 3) check the number of bytesremaining in program memory; 4) erase FinalStorage; and 5) to completely reset thedatalogger. When *A is keyed, the first valuedisplayed is the number of memory locationsallocated to Input Storage. Press A to advancethrough the memory values. Table 1.5-2describes what the values seen in the *A Moderepresent.

The numbers of memory locations allocated toInput, Intermediate and Final Storage default atpower-up to the values in Table 1.5-1.

The sizes of Input and Intermediate Storagemay be altered by keying in the desired valueand entering it by keying A. The size of FinalStorage will be adjusted automatically.

One input or Intermediate Storage location canbe exchanged for two Final Storage locationsand vice-versa. Input and Intermediate Storagemust reside in the CPU board RAM. Ifadditional memory boards are present, it ispossible to use all of the CPU board RAM forInput and Intermediate Storage. A minimum 32Input and 768 Final Storage locations willALWAYS be retained. If no IntermediateStorage is required, its size may be reduced to0.

All data in Intermediate and Final Storage areerased when memory is repartitioned. Thisfeature may be used to clear memory withoutaltering programming. The number of locationsdoes not actually need to be changed; the samevalue can be keyed in and entered. Afterrepartitioning memory, the Tables must berecompiled. Recompiling with *0 erases InputStorage; recompiling with *6 leaves InputStorage unaltered.

If Intermediate Storage size is too small toaccommodate the programs or instructionsentered, the program will not compile and the"E:04" ERROR CODE will be displayed; the sizeof Intermediate Storage must be increasedbefore the program will compile. Final Storagesize can be maximized by limiting IntermediateStorage size to the minimum number ofmemory locations necessary to accommodatethe programs entered. The number of FinalStorage locations and the rate at which data arestored determines how long it will take for FinalStorage to fill, at which point new data will writeover old.

1.6 MEMORY TESTING AND SYSTEMSTATUS - *BThe *B Mode is used to 1) read the signature ofthe 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 overrunoccurrences (Section 1.1.1), and 5) displayPROM version and revision number. Table 1.6-

Page 32: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 1. FUNCTIONAL MODES

1-6

1 describes what the values seen in the *BMode represent. The correct signatures of theCR7 PROMs are listed in Appendix B.

A signature is a number which is a function ofthe data and the sequence of data in memory.It is derived using an algorithm which assures a99.998% probability that if either the data or itssequence changes, the signature changes.The signature of the program memory is usedto determine if the program tables have beenaltered. During the self check on power-up, thesignature computed for a PROM is comparedwith a signature stored in the PROM todetermine if a failure has occurred. Thealgorithm used to calculate the signature isdescribed in Appendix C.

The contents of windows 8 and 9, PROMversion and version revision, are helpful indetermining what PROM is in the datalogger.Over the years, several different PROMversions have been released, each withoperational differences. When calling CampbellScientific for datalogger assistance, pleasehave these two numbers available.

TABLE 1.6-1. Description of *B Mode Data

Key DisplayEntry ID: Data Description of Data

*B 01: XXXXX Program memorySignature. The value isdependent upon theprogramming enteredand memory allotment. Ifthe Tables have not beenpreviously compiled, theywill be compiled and run.

A 02: XXXXX First PROM Signature

03: XXXXX Second PROM Signature

04: XXXXX Third PROM Signature

A 05: XXXXX Memory status, No. KRAM and ROM

A 06: XXXXX No. of E08 occurrences(Key in 88 to reset)

A 07: XXXXX No. of overrunoccurrences (Key in 88 toreset)

A 08: X.XXXX PROM version number

A 09: XXXX. Version revision number

A 01:00 Enter I/O Module No. totest (usually 1)

1A 01:XXXXX I/O Module 1 RAMSignature

01:XXXXX I/O Module 1 PROMSignature

1.7 *C MODE -- SECURITYThe *C Mode is used to secure the user'sprogram information. If security is activated,then the CR7 will block keyboard access to the*1, *2, *3, *4, and *A Modes. Activated securitywill also block Telecommunications access tothe *1, *2, *3, *4, *5, and *D Modes and theTelecommunications C command. A four digitpassword allows entry to the *C Mode andbecomes part of the program memory, affectingthe program signature. If security is enabledwhen *C is keyed, the password must be keyedin before one can advance to window 1. Ifsecurity is disabled, keying *C brings up window1 immediately. In window 1 a command can beentered to either enter a new password (1), ortemporarily disable security (00) in order tocheck or alter the programming. The passwordon power-up is 0000 (unless *D was used tocreate a custom PROM with the password builtin), which disables security. When security istemporarily disabled, it is possible to enter allmodes and to alter programming. Keying *0 or*6 will automatically re-enable security, unlessthe password is 0000.

Entering the four digit password as an indexedvalue (i.e. xxxx--, entered by keying C afterentering the four digits) blocks access to the *1,*2, *3, *4, and *A Modes, but allows the user toview and change the password.

Page 33: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 1. FUNCTIONAL MODES

1-7

TABLE 1.7-1. *C Mode Entries and Codes

Key DisplayEntry ID: Data Description

*C 12:0000 Enter current password.If correct, then advance,else exit *C Mode. 12:00indicates *C Mode is notin PROMs. If security isdisabled, *C advancesdirectly to window 1.

A 01:00 Window 1, entercommand:00 = disable security and

advance to window2; subsequent *0 or*6 enables security.

01 = security remainsenabled, but itadvances to window2 and allows entry ofa new password.

A 02:XXXX Set new password(XXXX is currentpassword).

A Returns to window 1.Entering 0000 disablessecurity (window 1 mustbe set to 0).

1.8 *D MODE -- SAVE OR LOADPROGRAMThe *D Mode allows the user's programinformation in the *1, *2, *3, *4, *A, *C (if OSX-0), and *B Modes to be output to or loaded fromprinter/computer (ASCII) or SM192/716 StorageModule. Table execution and on-line printeroutputs are suspended while in the *D Mode.When *D is keyed, the CR7 will display "13:00".

TABLE 1.8-1. *D Mode Commands

Command Description

1 Save ASCII Program2 Load ASCII Program

71 Save/Load/Clear Programfrom Storage Module

A command is entered by keying the commandnumber and A. When Command 1, 2, or 71 isentered, the command number is displayed inthe ID field. The user must then key in a baudrate code for command 1 or 2 or the commandcode for the Storage Module (Table 1.8-2).After the code is keyed in, key A to execute thecommand. After a command is executed,"13:0000" is displayed; *D must be enteredagain before another command can be given.

If the CR7 program has not been compiledwhen a command to save the program isentered, it will be compiled before the commandis executed.

TABLE 1.8-2. *D Mode Baud Rate andStorage Module Codes

BAUD RATE STORAGE MODULECODES COMMAND CODES

0 - 300 baud 1X Save Program X to1 - 1200 Storage Module2 - 9600 (X=1-8)3 - 76,800 2X Load Program X from

Storage Module(X=1-8)

3X Erase Program X from Storage Module(X=1-8)

Page 34: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 1. FUNCTIONAL MODES

1-8

All data in Input, Intermediate and FinalStorage are erased when a command to loada program is executed or when a program iswritten to tape.

If nothing is received within 30-40 seconds aftergiving the command to load a program, thecommand will be aborted and an error codedisplayed (E99 for Storage Module or ASCII).Commands 1, 2, and 71 are the onlycommands that can be executed viatelecommunications (Section 5). Forcommands 1 and 2, the CR7 will use the baudrate already established in telecommunicationsand will be ready to receive or send the file assoon as the command is received.

TABLE 1.8-3. Program Load Error Codes

E 98 Uncorrectable errors detectedE 99 Wrong 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 Softwareautomatically uses these commands foruploading and downloading programs.

SENDING ASCII PROGRAM INFORMATION

Command 1 is to send the program listing inASCII. At the end of the listing, the CR7 sendscontrol E (5 hex or decimal) twice. Except whenin telecommunications, the baud rate code mustbe entered after command 1.

Table 1.8-4 is an example of the program listingsent in response to command 1 (the actuallisting is in one column but is printed in twocolumns to save space). Note that the listinguses numbers for each mode: The numbers for*A, *B, and *C modes are 10, 11, and 12,respectively.

TABLE 1.8-4. Example Program ListingFrom *D Command 1

MODE 1SCAN RATE 21:P171:11:P0

2:P141:12:13:54:15:16:27:18:0

3:P921:02:53:10

MODE 1SCAN RATE 2

4:P711:22:1

5:P0

MODE 2SCAN RATE 0

MODE 3

MODE 41:02:0

MODE 101:282:643:193284:934

MODE 121:02:0

MODE 2SCAN RATE 0

Page 35: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 1. FUNCTIONAL MODES

1-9

LOAD PROGRAM FROM ASCII FILE

Command 2 sets up the CR7 to load a serialASCII program. The format is the same as sentin response to command 1 (Table 1.8.4).Except when in telecommunications, the baudrate code must be entered after command 2.

A download file need not follow exactly thesame format that is used when listing a program(i.e., some of the characters sent in the listingare not really used when a program is loaded).Some rules which must be followed are:

1. "M" must be the first character other than acarriage return (CR) or line feed (LF). The"M" serves the same function as "*" doesfrom the keyboard. The order that theModes are sent in does not matter (i.e., theinformation for Mode 4 could be sent beforethat for Mode 1).

2. "S" is necessary prior to the executioninterval (Scan rate).

3. The colons (:) are used to mark the start ofactual data.

4. A semicolon (;) tells the CR7 to ignore therest of the line and can be used after anentry so that a comment can be added.

There are 4 two-character control codes whichmay be used to verify that the CR7 receives afile correctly:

^B ^B (2hex, 2hex) Discard current bufferand reset signature

^C ^C (3hex, 3hex) Send signature forcurrent buffer

^D ^D (4hex, 4hex) Load current buffer andreset signature

^E ^E (5hex, 5hex) Exit and compile program

As a download file is received, the CR7 buffersthe data in memory; the data is not loaded intothe editor or compiled until the CR7 receives acommand to do so. The minimum file thatcould 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. Ifthis signature does not match that calculated bythe sending device, ^B^B can be sent todiscard the current buffer and reset thesignature. If the signature is correct, ^D^D canbe sent to tell the CR7 to load the buffer into theeditor and reset the signature. Once thecomplete file has been sent and verified, send^E^E to compile the program and exit the loadcommand.

1.8.2 PROGRAM TRANSFER WITH STORAGEMODULE

The SM192/716 Storage Module must beconnected to the CR7. Key *D, then entercommand 71. The command to save, load, orclear a program and the program number(Table 1.8-2) is entered. After the operation isfinished, "13:0000" is displayed.

The datalogger can be programmed on power-up using a Storage Module. Storage Modulescan store up to eight separate programs. If aprogram is stored as program number 8, and ifthe Storage Module is connected to thedatalogger serial port at power-up, programnumber 8 is downloaded to the datalogger andcompiled.

Page 36: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 1. FUNCTIONAL MODES

1-10

This is a blank page.

Page 37: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

2-1

SECTION 2. INTERNAL DATA STORAGE

2.1 FINAL STORAGE AREAS, OUTPUTARRAYS, AND MEMORY POINTERSFinal Storage is that portion of memory wherefinal, processed data are stored. Data must besent to Final Storage before they can betransferred to a computer or external storageperipheral.

The size of Final Storage is expressed in termsof memory locations or bytes. A low resolutiondata point (4 decimal characters) occupies onememory location (2 bytes), whereas a highresolution data point (5 decimal characters)requires two memory locations (4 bytes). Table1.5-1 shows the default allocation of memorylocations to Input, Intermediate, and FinalStorage. The *A Mode is used to reallocatememory or erase Final Storage (Section 1.5). Aminimum of 768 memory locations willALWAYS be retained in Final Storage.

Final Storage can be represented as ringmemory (Figure 2.1-1) on which the newestdata are written over the oldest data.

FIGURE 2.1-1. Ring Memory Representationof Final Data Storage

Output Processing Instructions store data intoFinal Storage only when the Output Flag is sethigh. The string of data stored each time theOutput Flag is set high is called an outputarray. The first data point in the output array isa 4 digit Output Array ID. This ID number isset in one of two ways:

1) In the default condition, the ID consists ofthe program table number and theInstruction Location Number of theinstruction which set the Output Flag for

that output array. For example, the ID of118 in Figure 2.1-2 indicates that the 18thinstruction in Table 1 set the Output Flaghigh.

FIGURE 2.1-2. Output Array ID

2) The output array ID can be set by the userwith the second parameter of Instruction 80(Section 11). The ID can be set to anypositive integer up to 511. Instruction 80must follow the instruction which set theOutput Flag high. This option allows theuser to make the output array IDindependent of the programming. Theprogram can be changed (instructionsadded or deleted) without changing theoutput array ID. This avoids confusionduring data reduction, especially on longterm projects where program changes orupdates are likely.

NOTE: If Instruction 80 is used todesignate Final Storage and parameter 2 is0, the output array ID is determined by theposition of Instruction 80 or by the positionof the instruction setting the Output Flag,whichever occurs last.

Data are stored in Final Storage before beingtransmitted to an external device. There arefour pointers which are used to keep track ofdata transmission. These pointers are:

1. Data Storage Pointer (DSP)2. Display Pointer (DPTR)3. Printer Pointer (PPTR)4. Telecommunications (Modem) Pointer (MPTR)

Page 38: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 2. INTERNAL DATA STORAGE

2-2

The Data Storage Pointer (DSP) is used todetermine where to store each new data point inthe Final Storage area. The DSP advances tothe next available memory location after eachnew data point is stored.

The DPTR is used to recall data to the LCDdisplay. The positioning of this pointer and datarecall are controlled from the keyboard (*7Mode).

The PPTR is used to control data transmissionto a printer, Storage Module, or other serialdevice. Whenever on-line printer transfer isactivated (*4 Mode or Instruction 96), databetween the PPTR and DSP are transmitted.

When on-line transfer to a SM192/716 StorageModule is activated by Instruction 96 with outputcode 30, data is transmitted each time anoutput array is stored in Final Storage IF THESTORAGE MODULE IS CONNECTED TO THECR7. If the Storage Module is not connected,the CR7 does not transmit the data nor does itadvance the PPTR to the new DSP location. Itsaves the data until the Storage Module isconnected. Then, during the next execution ofInstruction 96, the CR7 outputs all of the databetween the PPTR and the DSP and updatesthe PPTR to the DSP location (Section 4.1)

The MPTR is used in transmitting data over atelecommunications interface. WhenTelecommunications is first entered, the MPTRis set to the same location as the DSP.Positioning of the MPTR is then controlled bycommands from the external calling device(Section 5.1).

NOTE: All memory pointers are set to theDSP location when the datalogger compilesa program. For this reason, ALWAYSRETRIEVE UNCOLLECTED DATABEFORE MAKING PROGRAM CHANGES.

2.2 DATA OUTPUT FORMAT ANDRANGE LIMITSData are stored internally in CampbellScientific's Final Storage Format (AppendixC.2). Data may be sent to Final Storage ineither LOW RESOLUTION or HIGHRESOLUTION format. Low resolution is thedefault. To change the resolution, Instruction78 (Section 11) must precede the OutputInstructions in the program table.

2.2.1 RESOLUTION AND RANGE LIMITS

Low resolution data is a 2 byte format with 3 or4 significant digits and a maximum magnitudeof ±6999. High resolution is a 4 byte formatwith 5 significant digits and a maximum possibleoutput value of ±99999 (see Table 2.2-1 below).

TABLE 2.2-1. Resolution Range Limits ofCR7 Data

Minimum MaximumResolution Zero Magnitude Magnitude

Low 0.000 ±0.001 ±6999.High 0.0000 ±.00001 ±99999.

The resolution of the low resolution format isreduced to 3 significant digits when the first (leftmost) digit is 7 or greater (Table 2.2-2). Thus, itmay be necessary to use high resolution outputor an offset to maintain the desired resolution ofa measurement. For example, if water level isto be measured and output to the nearest 0.01foot, the level must be less than 70 feet for lowresolution output to display the 0.01 footincrement. If the water level is expected torange from 50 to 80 feet the data could eitherbe output in high resolution or could be offset by20 feet (transforming the range to 30 to 60 feet).

Page 39: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 2. INTERNAL DATA STORAGE

2-3

TABLE 2.2-2. Decimal Location in LowResolution Format

Absolute Value Decimal Location

0 - 6.999 X.XXX7 - 69.99 XX.XX

70 - 699.9 XXX.X700 - 6999. XXXX.

While output data have the limits describedabove, the computations performed in the CR7are done in floating point arithmetic. Values arerounded when converting to Final StorageFormat.

2.2.2 INPUT AND INTERMEDIATE STORAGEDATA FORMAT

In Input and Intermediate Storage, numbers arestored and processed in a binary format with a23 bit binary mantissa and a 6 bit binaryexponent. The largest and smallest numbersthat can be stored and processed are 9 x 1018and 1 x 10-19, respectively. The size of thenumber determines the resolution of thearithmetic. A rough approximation of theresolution is that it is better than 1 in theseventh digit. For example, the resolution of97,386,924 is better than 10. The resolution of0.0086731924 is better than 0.000000001.

A precise calculation of the resolution of anumber may be determined by representing thenumber as a mantissa between .5 and 1multiplied by 2 raised to some integer power.The resolution is the product of that power of 2and 2-24. For example, representing 478 as.9336 * 29, the resolution is 29 * 2-24 = 2-15 =0.0000305. A description of CampbellScientific's floating point format may be found inthe description of the J and Ktelecommunications commands in Appendix C.

2.3 DISPLAYING STORED DATA ONKEYBOARD/DISPLAY - *7 MODEThe *7 Mode is used to display Final Storagedata. Enter the Mode by keying *7. The displaywill show "07:XXXXX", where XXXXX is theFinal Storage location (DSP) where the nextdata will be stored. Two options are available:

1. Press A to advance and display theoutput array ID of the oldest array inFinal Storage.

2. Enter a Final Storage location number.When A is pressed, the DPTR will jumpto the location entered and, if it is not atthe start of an array, advance to the firststart of array. The display will show theArray ID.

Repeated use of the A key advances throughthe output array, while use of the B key backsthe DPTR through memory.

The Final Storage location of the data pointbeing viewed may be displayed by keying #. Atthis point, another location may be enteredfollowed by A to jump to the start of the outputarray equal to or just ahead of the locationentered. Whenever a location number isdisplayed by keying #, the corresponding datapoint can be displayed by keying C. Toadvance 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

Key Action

A Advance to next data pointB Back-up to previous data point# Display location number of currently

displayed data point valueC Display value of current location#A Advance to start of next output array#B Back-up to previous output array

Page 40: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 2. INTERNAL DATA STORAGE

2-4

This is a blank page.

Page 41: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

3-1

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 storethe readings in input locations or to initiate analog or digital port output. Processing Instructions performnumerical operations using data from Input Storage locations and place the results back into specifiedInput Storage locations. Output Processing Instructions provide a method for generating time or eventdependent data summaries from processed sensor readings residing in specified Input Storagelocations. Program Control Instructions are used to direct program execution based on time and/orconditional 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 theCR7 the information it needs to execute the instruction.

The set of instructions available in the CR7 is determined by the Programmable Read Only Memorychips (PROMS) that are installed. Appendix B lists the software options available.

3.1 PARAMETER DATA TYPESThere are three different data types used forInstruction parameters: Floating Point (FP), 4digit integers (4), and 2 digit integers (2). In thelistings of the instruction parameters (Sections9-12), the parameter data type is identified by itsabbreviation. Different data types are used toallow the CR7 to make the most efficient use ofits memory.

Floating Point parameters are used to enternumeric constants for calibrations or arithmeticoperations. While it is only possible to enter fivedigits (magnitude ±.00001 to ±99999.), theinternal format has a much greater range(1x10-19 to 9x1018, Section 2.2.1).

3.2 REPETITIONS/CARD NUMBERThe repetitions parameter on many of the I/O,Processing, and Output Processing Instructionsis used to repeat the instruction on a number ofsequential Input Channels or Input Storagelocations. Separate parameters are used tospecify the card and input channel on which tomake the first measurement. For example, ifyou have four differential voltagemeasurements to make on the same voltagerange, wire the inputs to sequential channelsand instead of entering the Differential VoltageMeasurement Instruction 4 times, enter it oncewith four repetitions. The instruction will makefour measurements starting on the specifiedchannel number and continuing through thethree succeeding differential channels, with theresults being stored in the specified inputlocation and the three succeeding input

locations. Averages for all four measurementscan be calculated by entering the AverageInstruction with four repetitions.

The CR7 will automatically continue repetitionsfrom the last channel of one card to the firstchannel of the next sequentially numbered723(-T) Analog Input Card or 725 Pulse CounterCard. Measurements on the 726 50 volt AnalogInput Card will not advance correctly from onecard to the next; enter separate measurementinstructions for each card.

When several of the same type ofmeasurements are to be made but thecalibrations of the sensors are different, itrequires less time to use a single measurementinstruction with repetitions and then apply thecalibrations with Instruction 53 than it does toenter the instruction several times in order touse different multipliers and offsets. This is dueto the set up and calibration time for eachmeasurement instruction. However, if time isnot a constraint, separate instructions maymake the program easier to follow.

3.3 ENTERING NEGATIVE NUMBERSAfter keying in a number, press C or "-" tochange the number's sign. On floating pointnumbers, a minus sign (-) will appear to the leftof the number.

Excitation voltages in millivolts for I/OInstructions are 4 digit integers; when C ispressed, minus signs (-) will appear to the rightof the number indicating a negative excitation.

Page 42: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 3. INSTRUCTION SET BASICS

3-2

Even though this display is the same as thatindicating an indexed input location, (Section3.4) there is no indexing effect on excitationvoltage.

3.4 INDEXING INPUT LOCATIONSWhen used within a Loop, the parameters forinput locations can be Indexed to the loopcounter. The loop counter is added to theindexed value to determine the actual inputlocation the instruction acts on. Normally, theloop counter is incremented by one after eachpass through the loop. Instruction 90, StepLoop Index, allows the increment step to bechanged. See Instructions 87 and 90, Section12, for more details.

To index an input location (4 digit integer), keyC after keying the value but before entering theparameter. Two minus signs (-) will bedisplayed to the right of the parameter.

3.5 VOLTAGE RANGE ANDOVERRANGE DETECTIONThe RANGE code parameter on Input/OutputInstructions is used to specify the full scalevoltage range of the measurement and theintegration period for the measurement (Table3.5-1).

Select the smallest full scale range that isgreater than or equal to the full scale output ofthe sensor being measured. Using the smallestpossible range will result in the best resolutionfor the measurement.

Two different integration sequences arepossible. The slow integration, 16.67milliseconds, is one 60 Hz cycle and rejectsnoise from 60 Hz AC line power as well ashaving better rejection of random noise than thefast integration. A PROM with 50Hz rejection isavailable for countries whose electric utilitiesoperate at 50 Hz (Appendix B).

When a voltage input exceeds the rangeprogrammed, the value stored is the maximumnegative number, displayed in the *6 Mode as-99999. In output data from Final Storage, thisbecomes -6999 in low resolution or -99999. inhigh resolution.

An input voltage greater than +8 volts on one ofthe analog inputs will result in errors andpossible overranging on the other analog inputs.Voltages greater than 16 volts may permanentlydamage the CR7.

TABLE 3.5-1. Input Voltage Ranges and Codes

Range Code Full Scale Range Resolution*Slow Fast16.67ms 250µsInteg. Integ.

1 11 ±1500 microvolts 50 nanovolts2 12 ±5000 microvolts 166 nanovolts3 13 ±15 millivolts 500 nanovolts4 14 ±50 millivolts 1.66 microvolts5 15 ±150 millivolts 5 microvolts6 16 ±500 millivolts 16.6 microvolts7 17 ±1500 millivolts 50 microvolts8 18 ±5000 millivolts 166 microvolts

*Differential measurement, resolution for single-ended measurement is twice value shown.

3.6 OUTPUT PROCESSINGMost Output Processing Instructions requireboth an intermediate processing operation anda final processing operation. For example,when the Average Instruction, 71, is executed,

the intermediate processing operationincrements a sample count and adds each newInput Storage value to a cumulative totalresiding in Intermediate Storage. When theOutput Flag is set, the final processingoperation divides the total by the number of

Page 43: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 3. INSTRUCTION SET BASICS

3-3

sample counts, stores the resulting average inFinal Storage and zeros the value inIntermediate Storage so that the process startsover with the next execution.

Final Storage is the default destination of dataoutput by Output Processing Instructions(Sections OV2, 1.5, 2.1). Instruction 80 may beused to direct output to Input Storage or to FinalStorage.

Output Processing Instructions requiringintermediate processing sample the specifiedinput location(s) each time the OutputInstruction is executed, NOT necessarily eachtime the location value is updated by an I/OInstruction. For example: Suppose atemperature measurement is initiated by Table1 which has an execution interval of onesecond. The instructions to output the averagetemperature every 10 minutes are in Table 2which has an execution interval of 10 seconds.The temperature will be measured 600 times inthe 10 minute period, but the average will be theresult of only 60 of those measurementsbecause the instruction to average is executedonly one tenth as often as the instruction tomake the measurement.

Final processing occurs only when the OutputFlag is set (Section 3.7.1). The Output Flag,Flag 0, is set at desired intervals or in responseto specified conditions by using an appropriateProgram Control Instruction (Section 11).

3.7 USE OF FLAGS: OUTPUT ANDPROGRAM CONTROLThere are 10 flags which may be used in CR7programs. Two of the flags have functions withOutput Processing Instructions: Flag 0 controlsfinal processing and data storage, and Flag 9can disable intermediate processing. Flags 1-8may be used as desired in programming theCR7. Flags 0 and 9 are automatically set low atthe beginning of the program table. Flags 1-8remain unchanged until acted on by a ProgramControl Instruction or until manually toggledfrom the *6 Mode.

TABLE 3.7-1. Flag Description

Flag 0 - Output FlagFlag 1 to 8 - User FlagsFlag 9 - Intermediate Processing Disable

Flag

Flags are set with Program Control Instructions.The Output Flag, Flag 0, and the intermediateprocessing disable flag, Flag 9, will always beset low if the set high condition is not met. Thestatus of flags 1-8 are not changed if aconditional test is false.

3.7.1 THE OUTPUT FLAG

A set of processed data values is placed inFinal Storage by Output Processing Instructionswhen the Output Flag, Flag 0, is set high. Thisset of data is called an output array. TheOutput Flag is set according to time or eventdependent intervals using Program ControlInstructions specified by the user. The OutputFlag is set low at the beginning of each table.

Each group of Output Processing Instructionscreating an output array must be preceded by aProgram Control Instruction that sets the OutputFlag.

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 minutesinto a Y minute interval. If the time condition ismet, a command is executed. Output at thebeginning of the interval by making Parameter1, time into the interval, 0. Parameter 2, thetime interval in minutes, is how often output willoccur; i.e., the Output Interval. Enter 10 forparameter 3, the command code, to set Flag 0high. Instruction 92 is followed in the programtable by the Output Instructions which define theoutput array desired.

The time interval is synchronized to 24 hourtime; output will occur on each integer multipleof the Output Interval starting from midnight (0minutes). If the Output Interval is not an evendivisor of 1440 minutes (24 hours), the lastoutput interval of the day will be less than thespecified time interval. Output will occur atmidnight and will resume synchronized to thenew day.

Page 44: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 3. INSTRUCTION SET BASICS

3-4

NOTE: If the Output Flag is already sethigh and the test condition of a subsequentProgram Control Instruction acting on theflag fails, the flag is set low. This featureeliminates having to enter anotherinstruction to specifically reset the OutputFlag at the end of an output array beforeproceeding to another group of OutputInstructions with a different output interval(see example in OV4.3).

3.7.2 THE INTERMEDIATE PROCESSINGDISABLE FLAG

The Intermediate Processing Disable Flag, Flag9, suspends intermediate processing when it isset high. This flag is used to restrict samplingfor averages, totals, maxima, minima, etc., totimes when certain criteria are met. The flag isautomatically set low at the beginning of theprogram table.

As an example, suppose it is desired to obtain awind speed rose incorporating only wind speedsgreater than or equal to 4.5 m/s. The windspeed rose is computed using the HistogramInstruction 75, and wind speed is stored in Inputlocation 14, in m/s. Instruction 89 is placed justbefore Instruction 75 and is used to set Flag 9high if the wind speed is less than 4.5 m/s:

TABLE 3.7-2. Example of the Use of Flag 9

Inst. Param.Loc. No. Entry Description

X P 89 If wind speed < 4.5 m/s1 14 Wind speed location2 4 Comparison: <3 4.5 Minimum wind speed for

histogram4 19 Set Flag 9 high

X+1 P 75 HistogramX+2 P 86 Do

1 29 Set Flag 9 Low

NOTE: Flag 9 is automatically reset thesame as Flag 0. If the intermediateprocessing disable flag is already set highand the test condition of a subsequentProgram Control Instruction acting on Flag9 fails, the flag is set low. This featureeliminates having to enter anotherinstruction to specifically reset Flag 9 beforeproceeding to another group of testconditions.

3.7.3 USER FLAGS

Flags 1-8 are not dedicated to a specificpurpose and are available to the user forgeneral programming needs. The user flagscan be manually toggled from the keyboard inthe *6 Mode (Section 1.3) or from a computerusing TERM's monitor feature. By inserting flagtests (Instruction 91) at appropriate points in theprogram, the user can manually set flags todirect program execution.

3.8 PROGRAM CONTROL LOGICALCONSTRUCTIONSMost of the Program Control Instructions have acommand code parameter which is used tospecify the action to be taken if the conditiontested in the instruction is true. Table 3.8-1 liststhese codes.

TABLE 3.8-1. Command Codes

0 - Go to end of program table1-9, 79-99 - Call Subroutine 1-9, 79-99

10-19 - Set Flag 0-9 high20-29 - Set Flag 0-9 low

30 - Then Do31 - Exit loop if true32 - 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 anothercard.

3.8.1 IF THEN/ELSE COMPARISONS

When Command 30, THEN DO, is used withone of the IF Instructions, 88-92, the instructionis followed immediately by instructions to

Page 45: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 3. INSTRUCTION SET BASICS

3-5

execute if the comparison is true. The ElseInstruction, 94, is optional and is followed by theinstructions to execute if the comparison isfalse. The End Instruction, 95, marks the endof the branching started by the IF Instruction.Subsequent instructions are executedregardless of the outcome of the comparison(Figure 3.8-1).

FIGURE 3.8-1. If Then/Else ExecutionSequence

If Then/Else comparisons may be nested toform logical AND or OR branching. Figure 3.8-2 illustrates an AND construction. If conditions Aand B are true, the instructions includedbetween IF B and the first End Instruction willbe executed. If either of the conditions is false,execution will jump to the corresponding EndInstruction, skipping the instructions between.

FIGURE 3.8-2. Logical AND Construction

Figure 3.8-3 illustrates the instruction sequencethat will result in subroutine X being executed ifeither 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)

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 settinga flag if a comparison is true. (The flag iscleared before making the comparisons.) Afterall comparisons have been made, execute thedesired instructions if the flag is set.

The Begin Case Instruction 93 and If CaseInstruction 83 allow a series of tests on thevalue in an input location. The case test isstarted with Instruction 93 which specifies thelocation to test. A series of Instructions 83 arethen used to compare the value in the locationwith fixed values. When the value in the inputlocation is less than the fixed value specified inInstruction 83 the command in that Instruction83 is executed; when the next Instruction 83 isencountered, execution branches to the ENDInstruction 95 which closes the case test (seeInstruction 93).

3.8.2 END, INSTRUCTION 95

END, Instruction 95, is required to mark the endof:

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 DOcommand 30).

4. A case statement (starts with Instruction 93)

The IF instructions 89-93 require Instruction 95only when the THEN DO command 30 is used.

If one of the above instructions is used withoutthe corresponding END, the CR7 will displayerror 22 when compiling the program. Error 21is displayed if END is used without beingpreceded by one of these instructions (Section3.10).

An END instruction is always paired with themost recent instruction that requires an ENDand does not already have one. A way ofvisualizing this is to draw lines between eachinstruction requiring an END and the ENDpaired with it (as in Figure 3.8-2). The linesmust not cross. To debug logic or find amissing or extra END error, list the program anddraw the lines.

Page 46: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 3. INSTRUCTION SET BASICS

3-6

Subroutines can be called from othersubroutines; they cannot be embedded withinother subroutines. A subroutine must endbefore another subroutine begins (Error 20).Any loops or IF...THEN DO sequences startedwithin a subroutine must end before thesubroutine.

3.8.3 NESTING

A branching or loop instruction which occursbefore a previous branch or loop has beenclosed with the END instruction is nested. Themaximum nesting level is 9 deep. Error 30 isdisplayed when attempting to compile aprogram which is nested too deep.

The Loop Instruction, 87, counts as 1 level.Instructions 86, 88, 89, 91, and 92 each countas one level when used with the THEN DOcommand 30. Use of Else, Instruction 94, alsocounts as one nesting level each time it is used.For example, the AND construction above isnested 2 deep while the OR construction isnested 3 deep. Branching and loop nesting

starts at zero within each subroutine and thenreturns to the previous level after returning fromthe subroutine.

Subroutine calls do not count as nesting with theabove instructions. They have a separate nestinglimit of seven (Instruction 85, Section 12).

Any number of groups of nested instructionsmay be used in any of the three ProgrammingTables. The number of groups is only restrictedby the program memory available.

3.9 INSTRUCTION MEMORY ANDEXECUTION TIMEThe standard CR7 has 1744 bytes of programmemory available for the programs entered inthe *1, *2, and *3 program tables. Eachinstruction also makes use of varying numbersof Input, Intermediate, and Final Storagelocations. The following tables list the memoryused by each instruction and the approximatetime required to execute the instruction.

TABLE 3.9-1. Input/Output Instruction Memory

R = No. of Reps.D = Delay

INSTRUCTION MEMORY EXECUTION TIME (ms)INPUT PROG. Slow or No FastLOC. BYTES Integration Integration

1 VOLT (SE) R 15 57.4 + 22R 16 + 2.9R2 VOLT (DIFF) R 15 54 + 43.4R 19 + 4.7R3 PULSE R 15 4 + 2R4 EX-DEL-SE R 20 56.8 + (22.6 + D)R 23.4 + (3.3 + D)R5 AC HALF BR R 18 57.7 + 44R 21.1 + 5.5R6 FULL BR R 18 58 + 87.3R 24.2 + 9.6R7 3W HALF BR R 18 58.8 + 88.7R 24.3 + 11.7R9 FULL BR-MEX R 19 104 + 175R 31.5 + 20.4R

10 BATT. VOLT 1 4 22.611 TEMP (107) R 15 23 + 5.4R12 RH (207) R 17 23.3 + 5.4R13 TEMP-TC SE R 18 59.8 + 21.9R 25.2 + 6.1R14 TEMP-TC DIF R 18 61 + 43.2R 21.5 + 7.85R16 TEMP-RTD R 15 0.4 + 2.7R17 TEMP-INTERNL 1 4 116.218 TIME 1 7 1.419 SIGNATURE 1 4 607.220 PORT SET 1 4 2.921 ANALOG OUT 1 5 3.622 EXCIT-DEL 1 11 10.8 + D23 SELECT I/O MODULE 0.426 TIMER 1 or 0 4 0.54 to reset, 0.25 to load into location

Page 47: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 3. INSTRUCTION SET BASICS

3-7

TABLE 3.9-2. Processing Instruction Memory and Execution TimesR = No. of Reps.

MEMORYINPUT INTER. PROG.

INSTRUCTION LOC. LOC. BYTES EXECUTION TIME (ms)

30 Z=F 1 0 8 0.331 Z=X 1 0 6 0.532 Z=Z+1 1 0 4 0.633 Z=X+Y 1 0 8 1.134 Z=X+F 1 0 10 0.935 Z=X-Y 1 0 8 1.136 Z=X*Y 1 0 8 1.237 Z=X*F 1 0 10 0.938 Z=X/Y 1 0 8 2.739 Z=SQRT(X) 1 0 6 12.040 Z=LN(X) 1 0 6 7.441 Z=EXP(X) 1 0 6 5.942 Z=1/X 1 0 6 2.643 Z=ABS(X) 1 0 6 0.744 Z=FRAC(X) 1 0 6 0.345 Z=INT(X) 1 0 6 1.046 Z=X MOD F 1 0 10 3.247 Z=XY 1 0 8 13.348 Z=SIN(X) 1 0 6 6.549 SPA MAX 1 or 2 0 7 1.5 + 0.9 (swath-1)50 SPA MIN 1 or 2 0 7 1.7 + 0.9 (swath-1)51 SPA AVG 1 0 7 3.3 + 0.6 (swath-1)53 A*X+B 4 0 36 2.5 + 0.4 scaling pair54 BLOCK MOVE R 0 10 0.18 + 0.17R55 POLYNOMIAL R 0 31 1.2 + R(2.0 + 0.4 * order)56 SAT VP 1 0 6 4.257 WDT-VP 1 0 10 8.158 LP FILTER R R + 1 13 0.5 + 2.2R59 X/(1-X) 1 0 9 0.4 + 3.0R61 INDIR MOVE 1 0 6 0.35 neither indexed

0.54 one location indexed0.73 both locations indexed

66 ARC TAN 1 0 8 6.7

Page 48: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 3. INSTRUCTION SET BASICS

3-8

TABLE 3.9-3. Output Instruction Memory and Execution TimesR = No. of Reps.

INSTRUCTION MEMORY EXECUTION TIME (ms)INTER. FINAL PROG. FLAG 0 LOW FLAG 0 HIGHLOC. VALUES1 BYTES

69 WIND VECTOR 2+9R (2, 3, or 4)R 12Options 00, 01, 02 3.5 + 17.5R 3.5 + 75ROptions 10, 11, 12 3.5 + 16R 3.5 + 30R

70 SAMPLE 0 R 5 0.1 0.4+ 0.6R71 AVERAGE 1+R R 7 0.9+ 0.5R 2.1+ 3.0R72 TOTALIZE R R 7 0.6+ 0.5R 1.1+ 1.0R73 MAXIMIZE (1 or 2)R (1,2,or3)R 8 0.9+ 1.7R 1.3+ 2.8R74 MINIMIZE (1 or 2)R (1,2,or3)R 8 0.9+ 1.7R 1.3+ 2.8R75 HISTOGRAM 1+bins*R bins*R 24 0.4+ 3.1R 0.9+

R(3.3+2.8*bins)77 REAL TIME 0 1 to 4 4 0.1 1.078 RESOLUTION 0 0 3 0.4 0.479 SMPL ON MM R R 7 0.3 1.180 STORE AREA 0 0 582 STD. DEV. 1+3R R 7

1Output 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

INSTRUCTION MEMORY EXECUTION TIME (ms)INTER. PROG.LOC. BYTES

83 IF CASE <F 0 9 0.585 LABEL SUBR 0 3 0.086 DO 0 5 0.187 LOOP 1 9 0.288 IF X<=>Y 0 10 0.689 IF X<=>F 0 12 0.490 LOOP INDEX 0 3 0.591 IF FLAG 0 6 0.292 IF TIME 1 11 0.393 BEGIN CASE 1 8 0.294 ELSE 0 4 0.295 END 0 4 0.296 SERIAL OUT 0 398 SEND CHAR. 0 4

Page 49: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 3. INSTRUCTION SET BASICS

3-9

3.10 ERROR CODESThere are four types of errors flagged by theCR7: Compile, Run Time, Editor, and *D Mode.When an error is detected, an E is displayedfollowed by the 2 digit error code.

Compile errors are errors in programmingwhich are detected once the program is keyedin and compiled for the first time (*0, *6, or *BMode entered).

Run Time errors are detected while theprogram is running. Error 31 is the result of aprogramming error. Error 8 is the result of ahardware and software "watchdog" that checksthe processor state, software timers, andprogram related counters. The watchdog willattempt to reset the processor and programexecution if it finds that the processor hasbombed or is neglecting standard system

updates, or if the counters are out of allowablelimits. Error code 08 is flagged when thewatchdog performs this reset.

Error 8 is occasionally caused by voltage surgesor transients. Frequent repetitions of E08 areindicative of a hardware problem or a softwarebug and should be reported to CampbellScientific. The CR7 keeps track of the numberof times (up to 99) that E08 has occurred. Thenumber can be displayed and reset with theTelecommunications A command (Section 5.1).

Editor errors are detected as soon as anincorrect value is entered and are displayedimmediately.

*D Mode errors indicate problems with savingor loading a program. Only the error code isdisplayed.

TABLE 3.10-1. Error Codes

Code Type Description

01 Run Time I/O Module does not respond03 Editor Program table full04 Compile Intermediate Storage full08 Run Time CR7 reset by watchdog timer09 Run Time Data sent to unallocated Input Storage11 Editor Attempt to allocate more Input or Intermediate Storage than is available20 Compile SUBROUTINE encountered before END of previous subroutine21 Compile END without IF, LOOP or SUBROUTINE22 Compile Missing END, nonexistent SUBROUTINE24 Compile ELSE in SUBROUTINE without IF25 Compile ELSE without IF26 Compile EXIT LOOP without LOOP30 Compile IF and/or LOOP nested too deep31 Run Time SUBROUTINES nested too deep40 Compile Table 2 Execution interval too short40 Editor Instruction not in PROM60 Compile Inadequate Input Storage for FFT61 Compile Burst Mode Scan Rate too short97 *D MODE Tape data not received within 30 seconds98 *D MODE Uncorrectable errors detected99 *D MODE Wrong file type, editor error or program not received

Page 50: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 3. INSTRUCTION SET BASICS

3-10

This is a blank page.

Page 51: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

4-1

SECTION 4. EXTERNAL STORAGE PERIPHERALS

External data storage devices are used to provide a data transfer medium that the user can carry fromthe test site to the lab and to supplement the internal storage capacity of the CR7, allowing longerperiods between visits to the site. The standard data storage peripherals for the CR7 are the StorageModules (Section 4.4). Output to a printer or related device is also possible (Section 4.5). Theseperipherals 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 routineoperation) or it can be MANUALLY INITIATED. On-line data transfer is accomplished with Instruction 96or 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 connectedat the same time). However, only one modem may be connected to the CR7 at any one time. It ispossible 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 StorageModule is not connected (Section 4.4.2).

4.1 ON-LINE DATA TRANSFER -INSTRUCTION 96, *4 MODEOn-line data transfer is accomplished withInstruction 96 entered in the dataloggerprogram. The *4 Mode is retained from earliersoftware to maintain compatibility with existingprograms. Use only one method to enableoutput. If using Instruction 96, do not enableoutput in the *4 Mode.

4.1.1 INSTRUCTION 96

Instruction 96 enables output to externalstorage peripherals under program control.This instruction must be included in thedatalogger program for on-line data transfer totake place. Instruction 96 needs to be includedonly once in the program tables and shouldfollow the Output Processing Instructions. Thesuggested 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-linetransfer of Final Storage data to thespecified device. If outputting to both tapeand a Storage Module or printer option,Instruction 96 must be entered twice.

Instruction 96 has a single parameter whichspecifies the peripheral to enable. Table 4.1-1lists the output device codes.

TABLE 4.1-1. Output Device Codes forInstruction 96

CODE DEVICE

1x Printer, Printable ASCII2x Printer, Binary30 SM192/716 Storage Module31 Send filemark to SM192/716

x = BAUD RATE CODE0 3001 12002 96003 76,800

Page 52: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 4. EXTERNAL STORAGE PERIPHERALS

4-2

Only one of the options 1x, 2x, or 30 may beused in a program. If using a SM64 StorageModule, output code 21 should be used. Use ofthe SM192/716 is discussed further in Section4.4, print output formats are discussed inSection 4.5.

4.1.2 *4 MODE

The *4 Mode may be used in place ofInstruction 96 to enable or disable printer outputand to set the printer baud rate. The firstparameter is a two digit number determining theprinter status. The second is the baud ratecode. To enter a different status, key in theappropriate code from Table 4.1-2, followed by"A". Printer data is sent in the printableASCII format only (Section 4.5). If printerstatus is changed during execution of theprogram tables, execution stops until theprograms are recompiled. Instruction 96 shouldbe used to send data to the SM192/716 StorageModules. Do not use *4 if Instruction 96 is usedin the program.

TABLE 4.1-2. *4 Mode Parameters and Codes

Keyboard DisplayEntry ID: Data Description of Data

*4 04:00A 01:XX Output Enable CodeA 02:XX Baud Rate Code

Output Enable Codes

Code Description00 printer disabled01 printer enabled, ASCII

Baud Rate Codes

Code Baud Rate

00 30001 120002 960003 76,800

4.2 MANUALLY INITIATED DATAOUTPUT - *9 MODEData may be transferred to tape using the *8Mode and to printer or Storage Module usingthe *9 Mode. These Modes allow the user toretrieve a specific block of data, on demand,regardless of whether or not the CR7 isprogrammed for on-line data output.

If external storage peripherals are not left on-line, the maximum allowable time betweenvisiting the site to retrieve data must becalculated to insure that data placed in FinalStorage are not written over before they arecollected. In order to make this calculation,users must determine: (1) the size of FinalStorage, (2) the number of output arrays beinggenerated, (3) the number of low and/or highresolution data points included in each outputarray, and (4) the rate at which output arraysare stored in Final Storage. When calculatingthe number of data points per output array,remember to add 1 overhead data point (2bytes) per array for the output array ID.

For example, assume that 19,296 locations areassigned to Final Storage (*A Mode), and that 1output array, containing the Array ID (1 memorylocation), 9 low resolution data points (9memory locations) and 5 high resolution datapoints (10 memory locations) is stored eachhour. In addition, an output array with the ArrayID and 5 high resolution data points (11 memorylocations) is stored daily. This is a total of 491memory 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 daysto retrieve data, because write-over would beginin the 40th day.

4.2.1 MANUAL STORAGE MODULE ORPRINTER DUMP - *9 MODE

Using the *9 Mode, data in Final Storage can betransmitted as ASCII or binary data out theserial port by manually initiating a dump. If on-line printing is enabled with Instruction 96 or the*4 Mode, entering *9 will stop it. On-line printingwill be re-enabled if no keyboard entries aremade for 3.4 minutes. Return to the *0 Modewhen the dump is completed.

When on-line Storage Module or printer transfer isnot enabled and the *9 Mode is used to dump newdata, the start of dump pointer (PPTR) will remainwhere it was when the dump was completed or

Page 53: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 4. EXTERNAL STORAGE PERIPHERALS

4-3

aborted until the next time the *9 Mode is entered.If the End of Dump location (window 2) is changedwhile in the *9 Mode, the TPTR will be set to itsprevious value when the *9 Mode is exited.Changing the program and compiling moves thePPTR to the current DSP location.

NOTE: A printer dump is aborted bykeying #.

TABLE 4.2-2. *9 Mode Entries

DisplayKey ID:DATA Description

*9 09:00 Output Code1X Printable ASCII2X Final Storage Format30 SM192/716 Storage

Module31 Send File Mark to

SM192/716 than send data

x = Baud Rate Code0 3001 12002 96003 76800

A 01:XXXXX Start of Dump location,initially the PPTRlocation, a differentlocation may be keyed inif desired. To dump alldata in Final Storage,enter into window #1 anumber 1 greater thanthe End of Dumplocation.

A 02:XXXXX End of Dump location,initially the DSP location,a different location maybe keyed in if desired.

A 03:00 Ready to Dump, toinitiate dump, key anynumber then A. Whiledumping, "09:" will bedisplayed in the ID fieldand the location numberin the Data field. Thelocation number will stopincrementing when thedump is complete.

4.3 STORAGE MODULEThe Storage Module stores data in batterybacked RAM. Backup is provided by an internallithium battery. The RAM is internal on theSM192/716 and on a PCMCIA card on theCSM1. Operating power is supplied by the CR7over pin 1 of the CS I/O connector. Whenpower is applied to the Storage Module, a FileMark is placed in the data (if a File Mark is notthe last data point already in storage).

The File Mark separates data. For example, ifyou retrieve data from one CR7, disconnect theStorage Module and connect it to a secondCR7; a File Mark is placed in the data. Thismark follows the data from the first CR7, butprecedes the data from the second.

The SM192 has 192K bytes of RAM storage;the SM716 has 716K bytes. Both can beconfigured as either ring or fill and stopmemory. The size of memory in the CSM1depends on the PC card used. The CSM1 isalways fill and stop.

4.3.1 USE OF TWO STORAGE MODULES

It is possible to connect two Storage Modules tothe CR7 for on-line storage. One module mustbe configured as fill and stop and the other asring memory (see Storage Module operator'smanual for configuring information). Data iswritten to both modules simultaneously. Themodule configured as fill and stop quitsaccepting data once it is full while that with thering memory continues to store new data overold. The Storage Modules must be retrievedbefore the module configured as ring memorywraps around memory a second time.

4.3.2 STORAGE MODULE USE WITHINSTRUCTION 96

When output to the Storage Module is enabledwith Instruction 96, the Storage Module(s) maybe either left with the CR7 for on-line datatransfer and periodically exchanged, or broughtto the site for data transfer.

USE OF STORAGE MODULE TO PICK UPDATA

The CR7 can tell when the Storage Module isconnected. Each time Instruction 96 isexecuted and there is data to output, the CR7checks for the presence of the Storage Module.

Page 54: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 4. EXTERNAL STORAGE PERIPHERALS

4-4

If a Storage Module is not connected no dataare sent and the Printer Pointer (PPTR, Section2.1) is not advanced.

When a Storage Module is connected, twothings happen:

1. Immediately upon connection, a File Mark isplaced in the Storage Module Memoryfollowing the last data stored.

2. During the next execution of Instruction 96,the CR7 detects the Storage Module andoutputs all data between the PPTR and theDSP location.

The File Mark allows the operator to distinguishblocks of data from different dataloggers orfrom different visits to the field.

If the SM is just brought to the site to pick-updata, the SC90 Serial Line Monitor can be usedto visually confirm that data were transferred.The SC90 contains an LED which lights duringdata transmission. When the light goes OFF,data transfer is complete and the SM can bedisconnected from the CR7.

4.3.3 *9 DUMP TO STORAGE MODULE

In addition to the on-line data output proceduresdescribed above, output from CR7 FinalStorage to the SM192 and SM716 can bemanually initiated in the *9 Mode. Theprocedure for setting up and transferring data isas follows:

1. Connect the Storage Module to the CR7using the SC12 cable.

2. Enter the appropriate commands as listedin Table 4.2-2.

4.4 PRINTER OUTPUT FORMATSPrinter output can be sent in the binary FinalStorage Format (Appendix C.2) or PrintableASCII. If using the *4 Mode to enable on-lineoutput, Printable ASCII is the only formatavailable.

In the Printable ASCII format, each data point ispreceded by a two digit data point ID and a + or- sign. The ID and fixed spacing of the datapoints make particular points easy to find on aprinted output. This format requires 10 bytesper data point to store on disk.

Figure 4.5-1 shows both high and low resolutiondata points in a 12 data point output array. Theexample data contains Day, Hour-Minute, andSeconds in the 2nd - 4th data points. Theoutput array ID and time values (year, day,hour-minute, and seconds) are always fourcharacter numbers, even when high resolutionoutput is specified.

Each full line of data contains eight data points(79 characters including spaces), plus acarriage return (CR) and line feed (LF). If thelast data point in a full line is high resolution, it isfollowed immediately with a CR and LF. If it islow resolution, the line is terminated with aspace, CR and LF. Lines of data containingless than eight data points are terminatedsimilarly after the last data point.

Page 55: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 4. EXTERNAL STORAGE PERIPHERALS

4-5

FIGURE 4.4-1. Example of CR7 Printable ASCII Output Format

Page 56: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 4. EXTERNAL STORAGE PERIPHERALS

4-6

This is a blank page.

Page 57: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

5-1

SECTION 5. TELECOMMUNICATIONS

Telecommunications allows a computer to retrieve data directly from Final Storage and may be used toprogram the CR7 and monitor sensor readings in real time. Any user communication with the CR7 thatmakes 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 arecovered 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 morecompact than ASCII. The shorter transmission times for binary result in lower long distance telephonecharges and more reliable data transfer. On "noisy" links shorter blocks of data are more likely to getthrough without interruption.

In addition to more efficient data transfer, binary data retrieval makes use of a signature for errordetection. The signature algorithm assures a 99.998% probability that if either the data or its sequencechanges, the signature changes.

The PC208 Datalogger Support Software for PCs and compatibles contains the programs whichautomate data retrieval, program transfer, and real time monitoring. The PC208 package has beendesigned to meet the most common needs in datalogger support and telecommunications. This sectionin not intended to furnish sufficient detail to write Telecommunications software. Appendix C containssome 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 tothem are sent in the American Standard Code for Information Interchange (ASCII). The RemoteKeyboard State (Section 5.2) allows the user with a computer/terminal to use the same commands asthe CR7 keyboard.

5.1 TELECOMMUNICATIONSCOMMANDSWhen the CR7 is rung by a modem, it answers(enables the modem) almost immediately.Several carriage returns (CR) must be sentfrom the computer to allow the CR7 to set itsbaud rate to that of the modem/terminal (300,1200, 9600, or 76,800). Once the baud rate isset, the CR7 sends the prompt, *, signaling thatit is ready to receive a command.

GENERAL RULES governing thetelecommunications commands are:

1. * from datalogger means "ready forcommand".

2. All commands are of the form: [no.]letter,where the number may or may not beoptional.

3. Valid characters are the numbers 0-9, thecapital letters A-L, the colon (:), and thecarriage return (CR).

4. An illegal character increments a counterand zeros the command buffer, returning *.

5. CR to datalogger means "execute".

Page 58: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 5. TELECOMMUNICATIONS

5-2

6. CRLF from datalogger means "executingcommand".

7. ANY character besides a CR sent to thedatalogger with a legal command in itsbuffer causes the datalogger to abort thecommand sequence with CRLF* and tozero the command buffer.

8. All commands return a response code,usually at least a checksum.

9. The checksum includes all characters sentby the datalogger since the last *, includingthe echoed command sequence, excludingonly the checksum itself. The checksum isformed by summing the ASCII values,without parity, of the transmitted characters.The largest possible checksum value is8191. Each time 8191 is exceeded, theCR7 starts the count over; e.g., if the sumof the ASCII values is 8192, the checksumis 0.

10. Commands that return Campbell Scientificbinary 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 acommand, the CR7 waits about 40 seconds

(147 seconds in the Remote Keyboard State)for a valid character to arrive. If a validcharacter is not received, the CR7 "hangs up".Some modems are quite noisy when not on line;it is possible for valid characters to appear inthe noise pattern. To insure that this situationdoes not keep the CR7 in telecommunications,the CR7 counts all the invalid characters itreceives from the time it answers a ring, andterminates communication after receiving 150invalid characters.

The CR7 continues to execute its measurementand processing tasks while servicing thetelecommunication requests. If the processingoverhead is large (short execution interval), theprocessing tasks will slow thetelecommunication functions. In a worst casesituation, the CR7 interrupts the processingtasks to transmit a data point every 0.1 second.

The best way to become familiar with theTelecommunication Commands is to try themfrom a terminal connected to the CR7 via theSC32A or other modem interface (Section 6.5).Telecommunications Commands are describedin the following Table. The Data StoragePointer (DSP) and Telecommunications ModemPointer (MPTR) referred to in the table aredescribed in Section 2.1.

TABLE 5.1-1. Telecommunications Commands

Command Description

A STATUS - Datalogger returns Reference, the DSP location; the number offilled 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 haveoccurred (cleared by entering 8888A); Memory status, the decimal number(in ASCII characters) that is the equivalent of the 8 bit binary number shownas the result of the memory check on power-up; Location of MPTR; andChecksum. 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 beissued to update the Reference to the new DSP.

[no. of arrays]B BACK-UP - MPTR is backed-up the specified number of output arrays (nonumber defaults to 1) and advanced to the nearest start of array. CR7sends the MPTR Location and Checksum: L+xxxxx Cxxxx

Page 59: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 5. TELECOMMUNICATIONS

5-3

[YR:DAY:HR:MM:SS]C RESET/SEND TIME - If time is entered the time is reset. If only 2 colonsare in the time string, HR:MM:SS is assumed; 3 colons meansDAY:HR:MM:SS. If only the C is entered, time is unaltered. CR7 returnsyear, Julian day, hr:min:sec, and Checksum: Y:xx Dxxxx Txx:xx:xx Cxxxx

[no. of arrays]D ASCII DUMP - If necessary, the MPTR is advanced to the next start ofarray. CR7 sends the number of arrays specified (no number defaults to 1)or the number of arrays between MPTR and Reference, whichever issmaller, CRLF, Location, Checksum.

E End call. Datalogger sends CRLF only.

[no. of loc.]F BINARY DUMP - Used in TELCOM (PC208). See Appendix C.

[F.S. loc. no.]G MOVE MPTR - MPTR is moved to specified Final Storage location. Thelocation number must be entered. CR7 sends Location and Checksum:L+xxxxx Cxxxx

2718H REMOTE KEYBOARD - CR7 sends the prompt ">" and is ready to executestandard keyboard commands (Section 5.2).

[loc. no.]I Display/change value at Input Storage location. CR7 sends the valuestored at the location. A new value and CR may then be sent. CR7 sendschecksum. If no new value is sent (CR only) the location value will remainthe same.

3142J TOGGLE FLAGS AND SET UP FOR K COMMAND - Used in the MonitorMode and with the Heads Up Display. See Appendix C for details.

K CURRENT INFORMATION - In response to the K command, the CR7sends datalogger time, user flag status, the data at the input locationsrequested in the J command, and Final Storage Data if requested by the Jcommand. Used in the Monitor Mode and with Heads Up Display. SeeAppendix C.

[Password]L Unlocks security (if enabled) to the level determined by the passwordentered (See *C Mode, Section 1.7). CR7 sends security level (0-3) andchecksum: Sxx Cxxxx

5.2 REMOTE PROGRAMMING OF THECR7The CR7 can be programmed viatelecommunications using the PC208 softwareor manually through the Remote KeyboardState.

The PC208 Datalogger Support Software wasdeveloped for use with IBM or compatible PCs.

The CR7 is placed in the Remote KeyboardState by sending "2718H" and a carriage return(CR). The CR7 responds by sending a CR, linefeed (LF), and the prompt ">". The CR7 is thenready to receive the standard keyboard

commands (Section OV3); it recognizes all thestandard CR7 keyboard characters plus thedecimal point. While in the Remote KeyboardState, the CR7 sends the ASCII charactercontrol Q (17 decimal) after each user entry.Entering *0 returns the CR7 to thetelecommunications command state.

It is important to remember that the RemoteKeyboard State is still withinTelecommunications. Entering *0 exits theRemote Keyboard and returns the datalogger tothe Telecommunications Command State,awaiting another command. So, the user canstep back and forth between the

Page 60: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 5. TELECOMMUNICATIONS

5-4

Telecommunications Command State and theRemote Keyboard State.

Keying *0 will compile and run the CR7 programif program changes have been made. Tocompile and run the program without leaving the

Remote Keyboard State, use *6 (Section 1.1.4).The CR7 display will show "LOG" when *0 isexecuted via telecommunications. It will notindicate active tables (enter *0 via the keyboardand the display will show the tables).

2718HTelecommunications Remote

Command *0 KeyboardState State

Page 61: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

6-1

SECTION 6. CS I/O 9 PIN SERIAL INPUT/OUTPUT

6.1 PIN DESCRIPTIONAll external communication peripherals connectto the CR7 through the 9-pin CS I/O connector(Figure 6.1-1). Table 6.1-1 gives a briefdescription of each pin's function.

CS I/O

FIGURE 6.1-1. CS I/O 9 Pin Connection

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.

PIN ABR I/O Description

1 5V O 5V: Sources 5V DC, usedto power some peripherals.

2 G Ground: Provides a powerreturn for pin 1 (5V), and isused as a reference forvoltage levels.

3 RING I Ring: When raised by aperipheral the CR7 enterstelecommunications.

4 RXD I Receive Data: Serial datatransmitted by a peripheralare received on pin 4.

5 ME O Modem Enable: Raised bythe CR7 after the ring linehas been raised.

PIN ABR I/O Description

6 PE O Printer Enable: Raised toenable Storage Module orother print device.

7 G I/O Ground, common with pin 2.

8 12 V O 12 volt power forperipherals.

9 TXD O Transmit Data: Serial dataare transmitted from theCR7 to peripherals on pin9; logic low marking (0V)logic high spacing (5V)standard asynchronousASCII, 8 data bits, noparity, 1 start bit, 1 stop bit,300, 1200, 9600, 76,800baud (user selectable).

Page 62: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 6. 9 PIN SERIAL INPUT/OUTPUT

6-2

6.2 ENABLING PERIPHERALSSeveral peripherals may be connected inparallel to the CS I/O 9-pin port. The CR7directs data to a particular peripheral by raisingthe voltage on a specific pin dedicated to theperipheral; the peripheral is enabled when thepin goes high. Two pins are dedicated tospecific devices Modem Enable pin 5 and PrintEnable pin 6.

Modem Enable (ME), pin 5, is raised to enablea 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 aStorage Module or other print peripheral. Printperipherals are defined as peripherals whichhave an asynchronous serial communicationsport used to RECEIVE data transferred by theCR7. In most cases the peripheral is a printer,but could also be an on-line computer or otherdevice. It is possible to have more than oneprint peripheral connected to the CR7 at onetime, as long as they don't load down the TXDline (e.g., two Storage Modules, Section 4.4.1);all connected receive the same data.

6.3 INTERRUPTING DATA TRANSFERTO STORAGE PERIPHERALSInstruction 96 is used for on-line data transfer toperipherals (Section 4.1). Data transfer isaborted when a modem raises the Ring line andthe CR7 then enters Telecommunications(Section 5, 6.4). After the CR7 exitsTelecommunications, data transfer to theperipheral is resumed the next time Instruction96 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 theMemory Pointers, and to manually initiate datatransfer from Final Storage to a peripheral. Ifthe # key is pressed during data transfer, thetransfer is stopped and the display shows theFinal Storage location where the pointerstopped.

Data transfer can be stopped as follows:

1. Printable ASCII - after every output array.

2. Binary - after every Final Storage location.

6.4 TELECOMMUNICATIONS - MODEMPERIPHERALSAny serial communication device which raisesthe Ring line and holds it high until the ME lineis raised is a modem. The CSI field modem(DC112, COM200, COM100, or DC1765), RF95RF modem, MD9 Multi-Drop Interface, and theSC32A RS232 interface used with computers orterminals are modems.

When a modem raises the Ring line, the CR7responds by raising the ME line. The CR7 mustbe sent carriage returns until it sets the baudrate. When the baud rate is set, the CR7 sendsa carriage return, line feed, *.

The ME line is held high until the CR7 receivesan E to exit telecommunications or until a timelimit expires without receiving a character. Thecolon in CR7 display is not shown while theCR7 is in telecommunications.

Some modems are quite noisy when not on line;it is possible for valid characters to appear inthe noise pattern. For this reason, the CR7counts all the invalid characters it receives fromthe time it answers a ring and terminatescommunication (lowers the ME line and returnsto the *0 Mode) after receiving 150 invalidcharacters.

6.5 INTERFACING WITH COMPUTERS,TERMINALS, AND PRINTERSThis section deals with some of the basics ofserial communication between the CR7 andcommon computer equipment. If you have anIBM compatible PC, the PC208(W) DataloggerSupport Software takes care of the softwareprotocol required in communicating with theCR7. This section does not discuss modeminterfaces other than the SC32A. Please referto the PC208 software and modem operator'smanuals for interfacing details on othermodems.

Page 63: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 6. 9 PIN SERIAL INPUT/OUTPUT

6-3

6.5.1 SC32A INTERFACE

Most computers, terminals, and printers requirethe SC32A Optically Isolated RS232 Interfacefor a "direct" connection to the CR7. TheSC32A raises the CR7's ring line when itreceives characters from the computer orterminal, and converts the CR7's logic levels(0V logic low, 5V logic high) to RS232 logiclevels.

The SC32A 25 pin port is configured as DataCommunications Equipment (DCE) whichallows direct connection to Data TerminalEquipment (DTE), which includes most PCsand printers. For connection to DCE devicessuch as modems and some computers, useSC932 interface in place of SC32A.

When the SC32A receives a character from thecomputer or terminal (pin 2), 5V is applied tothe datalogger Ring line (pin 3) for one secondor until the Modem Enable line (ME) goes high.The CR7 waits approximately 40 seconds toreceive carriage returns, which it uses toestablish baud rate. After the baud rate is setthe CR7 transmits a carriage return, line feed, *,and enters the Telecommunications CommandState (Section 5). If the carriage returns are notreceived within the 40 seconds, the CR7 "hangsup".

NOTE: The SC32A has a jumper. With thejumper in place, the SC32A blocks printerdata and passes data only when the CR7 isin Telecommunications.

6.5.2 COMPUTER/TERMINAL REQUIREMENTS

Computers, terminals and printers are usuallyconfigured as Data Terminal Equipment (DTE).Pins 4 and 20 are used as handshake lines,which are set high when the serial port isenabled. Power for the SC32A is taken fromthese pins. For equipment configured as DTE,a direct ribbon cable connects themodem/terminal to the SC32A. Clear to Send(CTS) pin 5, Data Set Ready (DSR) pin 6, andReceived Line Signal Detect (RLSD) pin 8 areheld high by the SC32A (when the RS232section is powered) which should satisfyhardware handshake requirements of themodem/terminal.

Table 6.5-1 lists the most common RS232configuration for Data Terminal Equipment.

TABLE 6.5-1. DTE Pin Configuration

PIN = 25-pin connector numberABR = Abbreviation for the function nameO = Signal Out of the terminal to another deviceI = Signal Into the terminal from another device

PIN ABR I/O FUNCTION

2 TD O Transmitted Data: Data istransmitted from theterminal on this line.

3 RD I Received Data: Data isreceived by the terminal onthis line.

4 RTS O Request to Send: Theterminal raises this line toask a receiving device if theterminal can transmit data.

5 CTS I Clear to Send: Thereceiving device raises thisline to let the terminal knowthat the receiving device isready to accept data.

20 DTR O Data Terminal Ready: Theterminal raises this line totell the modem to connectitself to the telephone line.

6 DSR I Data Set Ready: Themodem raises this line totell the terminal that themodem is connected to thephone line.

8 DCD I Data Carrier Detect: Themodem raises this line totell the terminal that themodem is receiving a validcarrier signal from thephone line.

22 RI I Ring Indicator: Themodem raises this line totell the terminal that thephone is ringing.

7 SG Signal Ground: Voltagesare measured relative tothis point.

Page 64: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 6. 9 PIN SERIAL INPUT/OUTPUT

6-4

FIGURE 6.5-1. Transmitting the ASCII Character 1

6.5.3 COMMUNICATION PROTOCOL/TROUBLESHOOTING

The ASCII standard defines an alphabetconsisting of 128 different characters whereeach character corresponds to a number, letter,symbol, or control code.

An ASCII character is a binary digital codecomposed of a combination of seven "bits",each bit having a binary state of 1 or more. Forexample, the binary equivalent for the ASCIIcharacter "1" is 0110001 (decimal 49).

ASCII characters are transmitted one bit at atime, starting with the first (least significant) bit.During data transmission the marking conditionis used to denote the binary state 1, and thespacing condition for the binary state 0. Thesignal is considered marking when the voltageis more negative than minus three volts withrespect to ground, and spacing when thevoltage is more positive than plus three volts.

Most computers use 8-bits (1 byte) for datacommunications. The eighth bit is sometimesused for a type of error checking called paritychecking. Even parity binary numbers have aneven number of 1's, odd-parity characters havean odd number of 1's. When parity checking isused, the eighth bit is set to either a 1 or a 0 tomake the parity of the character correct. TheCR7 ignores the eighth bit of a character that isreceives, and transmits the eighth bit as abinary 0. This method is generally described as"no parity".

To separate ASCII characters, a Start bit is sentbefore the first data bit, and a Stop bit is sentafter the eighth data bit. The start bit is alwaysa space, and the stop bit is always a mark.Between characters, the signal is in the markingcondition.

Figure 6.5-1 shows how the ASCII character "1"is transmitted. The SC32A interface transmitsspacing and marking voltages which arepositive and negative, as shown. Signalvoltages at the CR7 I/O port are 5 volts in thespacing condition, and 0 volts in the markingcondition.

BAUD RATE

BAUD RATE is the number of bits transmittedper second. The CR7 can communicate at 300,1200, 9600, and 76,800 baud. In theTelecommunications State, the CR7 will set itsbaud rate to match the baud rate of the modem.

The baud rate of the modem or computer isusually set with dip switches or programmedfrom the keyboard. The instrument's instructionmanual should explain how to set it.

DUPLEX

Full duplex means that two devices cancommunicate in both directions simultaneously.Half duplex means that the two devices mustsend and receive alternately. Full duplex shouldalways be specified when communicating withCampbell Scientific peripherals and modems.However, communication between someCampbell Scientific modems (such as the RF95RF modem) is carried out in a half duplexfashion. This can affect the way commandsshould be sent to and received from such amodem, especially when implemented bycomputer software.

To overcome the limitations of half duplex,some communications links expect a terminalsending data to also write the data to thescreen. This saves the remote device having toecho that data back. If, when communicatingwith a Campbell Scientific device, charactersare displayed twice (in pairs), it is likely that the

Page 65: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 6. 9 PIN SERIAL INPUT/OUTPUT

6-5

terminal is set to half duplex rather than thecorrect setting of full duplex.

IF NOTHING HAPPENS

If the CR7 is connected via the SC32A interfaceto a terminal or computer and * is not receivedafter sending carriage returns:

1. Verify that the CR7 has power and that thecables connecting the devices are securelyconnected.

2. Verify that the port of the computer orterminal is an asynchronous serialcommunications port configured as DTE(see Table 6.5-1). The most commonproblems occur when the user tries to use aparallel port, or doesn't know the portaddress (i.e. COM1 or COM2). IBM, andmost compatibles come with a Diagnosticdisk which can be used to identify ports,and their addresses. If the serial port isstandard equipment, then the operatorsmanual should give you this information.Some serial ports such as the Super SerialCard for Apple computers, can beconfigured as DTE or DCE with a jumperblock. Pin functions must match with Table6.5-1.

If you are using a computer without the PC208software, then a program or communicationsoftware must be used to enable the serial portand to make the computer function as aterminal. The port should be enabled for 300,1200, or 9600 baud, 8 data bits, 1 stop bit, andno parity.

If you are not sure that your computer orterminal is sending or receiving characters,there is a simple way to verify it. Set the duplexto full. Next, take a paper clip and connect oneend to pin 2, and the other end to pin 3 of theserial port. Each character typed on thekeyboard will be displayed only if transmittedfrom the terminal on pin 2, and received on pin3 (with half duplex the character will bedisplayed once if it is not transmitted, or twice ifit is transmitted).

IF GARBAGE APPEARS

If garbage characters appear on themodem/terminal, check that themodem/terminal's baud rate is supported by theCR7. If the baud rate is correct, verify that themodem/terminal is set for 8 Data bits, and noParity. Garbage will appear if 7 Data bits andno Parity are used. If the modem/terminal is setto 8 Data bits and even or odd Parity,communication cannot be established.

Page 66: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 6. 9 PIN SERIAL INPUT/OUTPUT

6-6

This is a blank page.

Page 67: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

7-1

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

This section gives some examples of Input Programming for common sensors used with the CR7. Theseexamples detail only the connections, Input, Program Control and Processing Instructions necessary toperform measurements and store the data in engineering units in Input Storage. Output ProcessingInstructions are omitted, it is left for the user to program the necessary instructions to obtain the finaldata in the form desired. NO OUTPUT TO FINAL STORAGE WILL TAKE PLACE WITHOUTADDITIONAL 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/OModule, the instructions at the beginning of a program table, and low number Input Storage locationsused to Store the data. Because it is unlikely that an application and CR7 configuration exactlyduplicates that assumed in an example, THESE EXAMPLES ARE NOT MEANT TO BE USEDVERBATIM; CARDS AND CHANNELS REFERENCED, SENSOR CALIBRATION AND INPUTLOCATIONS SELECTED MUST BE ADJUSTED FOR THE ACTUAL CIRCUMSTANCES. UNLESSOTHERWISE NOTED, ALL EXCITATION CHANNELS ARE SWITCHED ANALOG OUTPUT.

7.1 SINGLE ENDED VOLTAGE - LI200SSILICON PYRANOMETERThe silicon pyranometer puts out a currentwhich is dependent upon the solar radiationincident upon the sensor. The current ismeasured as the voltage drop across a fixedresistor. The Campbell Scientific LI200S uses a100 ohm resistor. The calibration supplied byLI-COR, the manufacturers of the pyranometer,is given in uA/kW/m2. The calibration in termsof volts is determined by multiplying the µAcalibration by the resistance of the fixedresistor.

The calibration of the pyranometer used in thisexample is assumed to be 76.9 µA/kW/m2,which when multiplied by 100 ohms equals 7.69mV/kW/m2. The multiplier used to convert thevoltage reading to kW/m2 is 1 / 7.69 mV/kW/m2= 0.13004.

Most LI-COR calibrations run between 60 and90 µA/kW/m2, which correspond to calibrationsof 6.0 to 9.0 mV/kW/m2. The flux densitythrough a surface normal to the solar beamabove 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 asingle ended voltage measurement on channel5. There are twice as many single ended

channels as differential channels and they arenumbered accordingly: single ended channel 5is the high side of differential channel 3, and thelow side is single ended channel 6.

FIGURE 7.1-1. Wiring Diagram for LI200S

PROGRAM

01: P1 Volt (SE)01: 1 Rep02: 3 15 mV slow Range03: 1 IN Card04: 5 IN Chan05: 1 Loc [:R kW/m^2 ]06: .13004 Mult07: 0 Offset

7.2 DIFFERENTIAL VOLTAGEMEASUREMENTSome sensors either contain or require activesignal conditioning circuitry to provide an easilymeasured analog voltage output. Generally, theoutput is referenced to the sensor ground. Theassociated current drain usually requires apower source external to the CR7. A typicalconnection scheme where AC power is notavailable and both the CR7 and sensor arepowered by an external battery is shown in

Page 68: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

7-2

Figure 7.2-1. Since a single endedmeasurement is referenced to the CR7 ground,any voltage difference between the sensorground and CR7 ground becomes ameasurement error. A differentialmeasurement avoids this error by measuringthe signal between the 2 leads withoutreference to ground. This example analyzesthe potential error on a water pH measurementusing a Martek Mark V water quality analyzer.

FIGURE 7.2-1. Typical Connection for ActiveSensor with External Battery

The wire used to supply power from the externalbattery is 18 AWG with an average resistanceof 6.5 ohms/1000 ft. The power runs to theCR7 and pH meter are 2 ft. and 10 ft.,respectively. Typical current drain for the pHmeter is 300 mA. When makingmeasurements, the CR7 draws about 100 mA.Since voltage is equal to current timesresistance (V=IR), ground voltages at the pHmeter and the CR7 relative to battery groundare:

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 thanground at the CR7. The meter output is 0-1 voltreferenced to meter ground, for the full range of14 pH units, or 0.0714V/pH. Thus, if the outputis measured with a single ended voltagemeasurement, it is 0.0182V or 0.25 pH units toohigh. If this offset remained constant, it couldbe corrected in programming the CR7.However, it is better to use a differential voltagemeasurement which does not rely on thecurrent drain remaining constant. The Programthat follows illustrates the use of Instruction #2to make the measurement. A multiplier of0.014 is used to convert the millivolt output intopH units.

PROGRAM

01: P2 Volt (DIFF)01: 1 Rep02: 7 1500 mV slow Range03: 1 IN Card04: 1 IN Chan05: 1 Loc [:pH ]06: 0.014 Mult07: 0 Offset

7.3 THERMOCOUPLE TEMPERATURESUSING 723-T REFERENCEThe use of the 723-T Analog Input Card RTD tomeasure the reference temperature isdescribed in the introductory programmingexample (Section OV4).

7.4 THERMOCOUPLE TEMPERATURESUSING AN EXTERNAL REFERENCEJUNCTIONWhen a number of thermocouple measurementsare made at some distance from the CR7, it isoften better to use a reference junction boxlocated at the site rather than using the paneltemperature of the CR7. This reduces therequired length of expensive thermocouple wireas regular copper wire can be used between thejunction box (J-box) and CR7. In addition, if thetemperature gradient between the J-box and thethermocouple measurement junction is smallerthan the gradient between the CR7 and themeasurement junction, thermocouple inaccuracyis reduced. In the following example, an externalreference junction is used on ten thermocouplemeasurements. A Campbell Scientific 107Temperature Probe is used to measure thereference temperature. The connection schemeis shown in Figure 7.4-1.

FIGURE 7.4-1. Thermocouples with ExternalReference Junction

Page 69: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

7-3

The temperature of the 107 Probe is stored inInput Location 1 and the thermocoupletemperatures in Locations 2-11.

PROGRAM

01: P11 Temp 107 Probe01: 1 Rep02: 1 IN Card03: 21 IN Chan04: 1 EX Card05: 1 EX Chan06: 1 Loc [:Ref. Temp]07: 1 Mult08: 0 Offset

02: P14 Thermocouple Temp (DIFF)01: 10 Reps02: 3 15 mV slow Range03: 1 IN Card04: 1 IN Chan05: 1 Type T (Copper-Constantan)06: 1 Ref Temp Loc Ref. Temp07: 2 Loc [:TC temp#1]08: 1 Mult09: 0 Offset

7.5 THERMOCOUPLES FORDIFFERENTIAL TEMPERATUREMEASUREMENTWhen configured correctly, thermocouples arecapable of measuring small temperaturegradients very accurately (Section 13.4). In thisexample, the CR7 is used to make fivedifferential temperature measurements withchromel-constantan thermocouples. Theconnections are shown in Figure 7.5-1 wherethe voltage measured between the chromelleads is proportional to the temperaturedifference between junctions R and D.

FIGURE 7.5-1. Connection forThermocouple Differential Temperature

Measurement

When the temperatures are within the referencejunction compensation range (Table 13.4-3),three instructions are required in themeasurement sequence:

1. A CR7 Panel Temperature Measurement(#17) used as a reference temperature forthe measurement at R.

2. A single ended TC measurement (#13) of Rtemperatures to be used as referencetemperatures for the measurement D.

3. A differential TC measurement of Dtemperatures where the referencetemperature at R are subtracted from theresults as specified in Parameter 5.

The connection shown in Figure 7.4-1 yields theconventional polarity (sign) for the temperaturedifference, i.e., D>R=+T, D<R=-T. Using R asthe reference temperature maintains thisconvention whereas using D reverses the signof the output.

Prefixing a 2 onto the TC type in Parameter 5 ofInstruction 13 causes the CR7 to skip everyother single ended channel. Keying C beforeentering Parameter 6 in Instruction 14 causesthe reference temperature location to beincremented each rep.

The ±5mV range used in Instruction 13 allowsmeasurement of temperatures at R within arange of approximately ±80 oC of the I/OModule temperature. The ±1.5mV range used inInstruction 14 allows the temperature differencebetween D and R to approach a range of ±24oC, for temperatures around 25 oC (output = 61uV/oC). The resolution of the differentialtemperature measurement is approximately0.0008 oC (50 nV/61µV/oC).

The panel temperature is stored in InputLocation 1, the temperatures of the R junctionsin locations 2-6 and the temperature differences(D-R) in locations 7-11. If it is not necessary toretain the temperatures of the R junctions, thetemperature differences could be stored inlocations 2-6 by changing Parameter #7 inInstruction 14 to 2.

Page 70: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

7-4

PROGRAM

01: P17 Panel Temperature01: 1 IN Card02: 1 Loc [:PANL TEMP]

02: P13 Thermocouple Temp (SE)01: 5 Reps02: 2 5000 uV slow Range03: 1 IN Card04: 2 IN Chan05: 22 Type E (Skip every other chan)06: 1 Ref Temp Loc PANL TEMP07: 2 Loc [:S.E. T#1 ]08: 1 Mult09: 0 Offset

03: P14 Thermocouple Temp (DIFF)01: 5 Reps02: 1 1500 uV slow Range03: 1 IN Card04: 1 IN Chan05: 12 Type E (Temp difference)06: 2-- Ref Temp Loc S.E. T#107: 7 Loc [:DIFF T #1]08: 1 Mult09: 0 Offset

When the temperature of the R junction isoutside of the CR7 reference junctioncompensation range (Table 13.4-3), the TCsmust be connected in the normal fashion, oneTC per input channel; both temperaturesmeasured and one subtracted from the other tofind the difference. This must be done becauseany error in the reference junctioncompensation becomes an error in thetemperature difference.

7.6 TEMPERATURE WITH CALIBRATEDTHERMOCOUPLESThermocouple calibration (Section 13.4) resultsin a slope correction. The correction must beapplied only to the thermocouple output. WhenInstructions 13 and 14 are used to measuretemperature, the temperature is the sum of thereference temperature and the temperaturedifference calculated from the thermocoupleoutput. The correction must be applied to thetemperature difference before the referencetemperature is added.

Example A demonstrates the use of a scalingarray (Instruction 53) to correct the calibration offour individually calibrated thermocouples.

Another means of applying a correction factor toa number of thermocouples is to group togetherthose with a similar correction factor. Inexample B, the slope correction factor for agroup of 5 thermocouples is entered as themultiplier (Parameter 8) in the instruction toread those thermocouples. The example onlyshows one group of thermocouples. If therewere several groups with similar correctionfactors, Instruction 14 would be used to readand correct each group.

After the slope correction is made, a loop isused to add the reference temperature to thecorrected temperature differences.

CONNECTIONS

The thermocouples are connected in the normalmanner: chromel to Hi and constantan to Low.In both examples, the first thermocouple isconnected to Channel 1. Care must be takenthat the correction factors called for in theprogramming match the channels that thecalibrated thermocouples are connected to.

PROGRAM A

01: P17 Panel Temperature01: 1 IN Card02: 1 Loc [:REF TEMP ]

02: P14 Thermocouple Temp (DIFF)01: 4 Reps02: 3 15 mV slow Range03: 1 IN Card04: 1 IN Chan05: 12 Type E (Temp difference)06: 1 Ref Temp Loc REF TEMP07: 2 Loc [:TC temp#1]08: 1 Mult09: 0 Offset

03: P53 Scaling Array (A*loc +B)01: 2 Start Loc [:TC temp#1]02: .99255 A103: 0 B104: .99703 A205: 0 B206: 1.0045 A307: 0 B308: 1.0075 A409: 0 B4

Page 71: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

7-5

04: P87 Beginning of Loop01: 0 Delay02: 4 Loop Count

05: P33 Z=X+Y01: 1 X Loc REF TEMP02: 2-- Y Loc TC temp#103: 2-- Z Loc [:TC temp#1]

06: P95 End

PROGRAM B

01: P17 Panel Temperature01: 1 IN Card02: 1 Loc [:REF TEMP ]

02: P14 Thermocouple Temp (DIFF)01: 5 Reps02: 3 15 mV slow Range03: 1 IN Card04: 1 IN Chan05: 12 Type E (Temp difference)06: 1 Ref Temp Loc REF TEMP07: 2 Loc [:TC temp#1]08: .99253 Mult09: 0 Offset

If there were additional groups ofthermocouples, the Instructions to measurethem would be inserted here and Parameter 2in Instruction 87 adjusted accordingly.

03: P87 Beginning of Loop01: 0 Delay02: 5 Loop Count

04: P33 Z=X+Y01: 1 X Loc REF TEMP02: 2-- Y Loc TC temp#103: 2-- Z Loc [:TC temp#1]

05: P95 End

7.7 107 TEMPERATURE PROBEInstruction 11 is designed to excite andmeasure the Campbell Scientific 107 thermistorprobe (or the thermistor portion of the 207temperature and relative humidity probe) andconvert the measurement into temperature(oC). In this example, the temperatures areobtained from three 107 probes. Themeasurements are made on single endedchannels 1-3, and the temperatures are storedin Input locations 1-3.

CONNECTIONS

The black leads from the probes go to excitationchannel 1, the white leads go to ground, and thered leads go to single ended channels 1, 2, and3 (high and low sides of differential channel 1and high side of 2).

PROGRAM

01: P11 Temp 107 Probe01: 3 Reps02: 1 IN Card03: 1 IN Chan04: 1 EX Card05: 1 EX Chan06: 1 Loc [:107 T #1 ]07: 1 Mult08: 0 Offset

7.8 207 TEMPERATURE AND RH PROBEInstruction 12 excites and measures the RHportion of the Campbell Scientific 207temperature and relative humidity probe. Thisinstruction relies on a previously measuredtemperature to compute the RH from the proberesistance. Instruction 12 has the option ofusing a single temperature to provide thecompensation reference for several RH probes.In this example, three probes will be measured;the temperature of each probe will be measuredand used to provide temperature compensationfor that probe. Instruction 11 is used to obtainthe temperatures of the three probes which arestored in Input locations 1-3, the RH values arestored in Input locations 4-6. The temperaturemeasurements are made on single ended inputchannels 1-3, just as in example 7.7. Theprogram listed below is a continuation of theprogram given in example 7.7.

CONNECTIONS

The black leads from the probes are connectedto excitation channel 1, the clear leads areconnected to ground. The red leads are fromthe thermistor circuit and are connected tosingle ended channels 1-3. The white leads arefrom the RH circuit and are connected to singleended channels 4-6. The correct order must bemaintained when connecting the red and whiteleads, i.e., the red lead from the first probe isconnected to single ended channel 1 and thewhite lead from that probe is connected tosingle ended channel 4, etc.

Page 72: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

7-6

PROGRAM

02: P12 RH 207 Probe01: 3 Reps02: 1 IN Card03: 4 IN Chan04: 1 EX Card05: 1 EX Chan06: 1 Meas/Temp07: 1 Temperature Loc 207 T#108: 4 Loc [:RH #1 ]09: 1 Mult10: 0 Offset

7.9 ANEMOMETER WITHPHOTOCHOPPER OUTPUTAn anemometer with a photochoppertransducer produces a pulsed output which ismonitored with the Pulse Count Instruction,configured for High Frequency Pulses. ThePulse Count Instruction counts the number ofpulses occurring in each execution interval. Anoption in the instruction allows this to beconverted to frequency in Hertz (i.e.,Pulses/Second). The anemometer used in thisexample is the R. M. Young Model No. 12102DCup Anemometer, with a 10 window chopperwheel. The photochopper circuitry is poweredfrom the CR7 12V supply; AC power or backupbatteries should be used to compensate for theincreased current drain.

Wind speed is desired in meters per second.There is a pulse each time a window in thechopper wheel, which revolves with the cups,allows light to pass from the source to thephotoreceptor. Because there are 10 windowsin the chopper wheel, there are 10 pulses perrevolution. Thus, 1 rpm is equal to 10 pulsesper 60 seconds (1 minute) or 6 rpm = 1 pulseper second. The manufacturer's calibration forrelating wind speed to rpm is:

Wind speed (m/s) =0.01632 m/s/rpm x rpm +0.2 m/s

The multiplier and offset to convert pulses persecond 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 xpulses + 0.2 m/s

There are occasionally times when the CR7'sCPU is occupied and does not reset the pulsecounters at the exact time interval programmed.If the artificially large wind speed that resultsfrom a long interval is used, it causes a falseaverage or maximum value. To avoid this, theCR7 is instructed to discard values resultingfrom long intervals, and use the previous valueinstead.

FIGURE 7.9-1. Wiring Diagram forAnemometer

PROGRAM(Execution interval 10 seconds)

01: P3 Pulse01: 2 Reps02: 2 IN Card03: 2 Pulse Input Chan04: 20 High frequency; Output Hz.05: 10 Loc [:WS m/s ]06: .0979 Mult07: .2 Offset

7.10 TIPPING BUCKET RAINGAGEWITH LONG LEADSA tipping bucket raingage is measured with thePulse Count Instruction configured for SwitchClosure. Counts from long intervals will beused, as the final output desired is total rainfall(obtained with Instruction 72, Totalize). Ifcounts from long intervals were discarded, lessrainfall would be recorded than was actuallymeasured by the gage (assuming there werecounts in the long intervals). Output is desiredin millimeters of precipitation; the gage iscalibrated for a 0.01 inch tip so a multiplier of0.254 is used.

Page 73: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

7-7

FIGURE 7.10-1. Wiring Diagram forRaingage with Long Leads

In a long cable, there is appreciablecapacitance between the lines which isdischarged across the switch when it closes. Inaddition to shortening switch life, a transientmay be induced in other wires, packaged withthe rain gage leads, each time the switchcloses. The 100 ohm resistor protects theswitch from arcing and the associated transientfrom occurring, and should be included any timeleads longer than 100 ft. are used with a switchclosure.

PROGRAM

01: P3 Pulse01: 1 Rep02: 2 IN Card03: 1 Pulse Input Chan04: 2 Switch closure05: 11 Loc [:RAIN mm ]06: 0.254 Mult07: 0 Offset

7.11 100 OHM PRT IN 4 WIRE HALFBRIDGEInstruction 9 is the best choice for accuracywhere the Platinum Resistance Thermometer(PRT) is separated from other bridgecompletion resistors by a lead length havingmore than a few thousandths of an ohmresistance. In this example, it is desired tomeasure a temperature in the range of -10 to40 oC. The length of the cable from the CR7 tothe PRT is 500 feet.

FIGURE 7.11-1. Wiring Diagram for PRT in 4Wire Half-Bridge

Figure 7.11-1 diagrams the circuit used tomeasure the PRT. The 10 kohm resistor allowsthe use of a high excitation voltage and lowvoltage ranges on the measurements. Thisinsures that noise in the excitation does nothave an effect on signal noise. Because thefixed resistor (Rf) and the PRT (Rs) haveapproximately the same resistance, thedifferential measurement of the voltage dropacross the PRT can be made on the samerange as the differential measurement of thevoltage drop across Rf. The use of the samerange eliminates any range translation error thatmight arise from the 0.01% tolerance of therange translation resistors in the CR7.

If the voltage drop across the PRT (V2) is kepton the 50 mV range, self heating of the PRTshould be less than 0.001 oC in still air. Theresolution of the measurement is increased asthe excitation voltage (Vx) is increased. Thevoltage drop across the PRT is equal to Vxmultiplied by the ratio of Rs to the totalresistance, and is greatest when Rs is greatest(Rs=115.54 ohms at 40 oC). To find themaximum excitation voltage that can be used,we assume V2 equal to 50 mV and use Ohm'sLaw to solve for the resulting current, I.

I = 50mV/Rs = 50mV/115. 54 Ohms = 0.433mA

Next solve for Vx:

Vx = I(R1+Rs+Rf) = 4.42V

If the actual resistances were the nominalvalues, the CR7 would not overrange with Vx =4.4 V. To allow for the tolerances in the actualresistances it is decided to set Vx equal to 4.2volts (e.g., if the 10 kohms resistor is 5% low,Rs/(R1+Rs+Rf)=115.54/9715.54 and Vx mustbe 4.204V to keep Vs less than 50 mV).

The result of Instruction 9 when the firstdifferential measurement (V1) is not made onthe 5V range is equivalent to Rs/Rf. Instruction16 computes the temperature (oC) for a DIN43760 standard PRT from the ratio of the PRTresistance to its resistance at 0 oC (Rs/R0).Thus, a multiplier of Rf/R0 is used in Instruction9 to obtain the desired intermediate, Rs/R0 (=Rs/Rf x Rf/R0). If Rs and R0 were each exactly100 ohms the multiplier would be 1. However,neither resistance is likely to be exact. Thecorrect multiplier is found by connecting thePRT to the CR7 and entering Instruction 9 with

Page 74: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

7-8

a multiplier of 1. The PRT is then placed in anice bath (0 oC; Rs=R0), and the result of thebridge measurement is read using the *6 Mode.The reading is Rs/Rf, which is equal to R0/Rfsince Rs = R0, the correct value of themultiplier, Rf/R0, is the reciprocal of thisreading. The initial reading assumed for thisexample was 0.9890, the correct multiplier is:Rf/R0 = 1/0.9890 = 1.0111.

The fixed 100 ohm resistor must be thermallystable. Its precision is not important becausethe exact resistance is incorporated, along withthat of the PRT, into the calibrated multiplier.The 10 ppm/oC temperature coefficient of thefixed resistor will limit the error due to its changein resistance with temperature to less than 0.15oC over the specified temperature range.Because the measurement is ratiometric(Rs/Rf), the properties of the 10 kohm resistordo not affect the result.

PROGRAM

01: P9 Full BR w/Compensation01: 1 Rep02: 4 50 mV slow EX Range03: 4 50 mV slow BR Range04: 1 IN Card05: 1 IN Chan06: 1 EX Card07: 1 EX Chan08: 1 Meas/EX09: 4200 mV Excitation10: 1 Loc [:Rs/Ro ]11: 1.0111 Mult12: 0 Offset

02: P16 Temperature RTD01: 1 Rep02: 1 R/Ro Loc Rs/Ro03: 2 Loc [:TEMP degC]04: 1 Mult05: 0 Offset

7.12 100 OHM PRT IN 3 WIRE HALFBRIDGEThe temperature measurement requirements inthis example are the same as in section 7.11.In this case a three wire half bridge, Instruction7, is used to measure the resistance of thePRT. The diagram of the PRT circuit is shownin Figure 7.12-1.

Figure 7.12-1. 3 Wire Half-Bridge Used toMeasure 100 ohm PRT

As in the example in section 7.11, the excitationvoltage is calculated to be the maximumpossible yet allow the ±50 mV measurementrange. The 10 kohm resistor has a tolerance of±1%, thus, the lowest resistance to expect fromit is 9.9 kohms. We calculate the maximumexcitation voltage (Vx) to keep the voltage dropacross the PRT less than 50 mV:

0.050V > Vx 115.54/(9900+115.54); Vx < 4.33V

The excitation voltage used is 4.3V.

The multiplier used in Instruction 7 isdetermined in the same manner as in section7.11. In this example the multiplier (Rf/R0) isassumed to be 100.93.

The 3 wire half bridge compensates for leadwire resistance by assuming that the resistanceof wire A is the same as the resistance of wireB. The maximum difference expected in wireresistance is 2%, but is more likely to be on theorder of 1%. The resistance of Rs calculatedwith Instruction 7, is actually Rs plus thedifference in resistance of wires A and B. Theaverage resistance of 22 AWG wire is 16.5ohms per 1000 feet, which would give each 500foot 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 wireB, the resistance measured for the PRT (R0 =100 ohms) in the ice bath would be 100.17ohms, and the resistance at 40 oC would be115.71. The measured ratio Rs/R0 is 1.1551,the actual ratio is 115.54/100 = 1.1554. Thetemperature computed by Instruction 17 fromthe measured ratio would be about 0.1 oC lowerthan the actual temperature of the PRT. Thissource of error does not exist in the example insection 7.11, where the 4 wire half bridge isused to measure PRT resistance.

Page 75: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

7-9

The advantages of the 3 wire half bridge arethat it only requires 3 lead wires going to thesensor, and takes 2 single ended inputchannels whereas the 4 wire half bridgerequires 2 differential input channels.

PROGRAM

01: P 7 3 Wire Half Bridge01: 1 Rep02: 4 50 mV slow Range03: 1 IN Card04: 1 IN Chan05: 1 EX Card06: 1 EX Chan07: 1 Meas/EX08: 4300 mV Excitation09: 1 Loc [:Rs/Ro ]10: 100.93 Mult11: 0 Offset

02: P 16 Temperature RTD01: 1 Rep02: 1 R/Ro Loc Rs/Ro03: 2 Loc [:TEMP degC]04: 1 Mult05: 0 Offset

7.13 100 OHM PRT IN 4 WIRE FULLBRIDGEThis example describes obtaining thetemperature from a 100 ohm PRT in a 4 wirefull bridge (Instruction 6). The temperaturebeing measured is in a constant temperaturebath and is to be used as the input for a controlalgorithm. The PRT in this case does notadhere to the DIN standard (alpha = 0.00385)used in the temperature calculating Instruction16. Alpha is defined as (R100/R0-1)/100 whereR100 and R0 are the resistances of the PRT at100 oC and 0 oC, respectively. In this PRTalpha is equal to 0.00392.

FIGURE 7.13-1. Full Bridge Schematic For100 Ohm PRT

The result given by Instruction 6 (X) is 1000Vs/Vx (where Vs is the measured bridge outputvoltage and Vx is the excitation voltage) whichis:

X = 1000 (Rs/(Rs+R1)-R3/(R2+R3))

The resistance of the PRT (Rs) is calculatedwith 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 Instruction16, the multiplier and offset used in Instruction 6are 0.001 and R3/(R2+R3), respectively. Themultiplier used in Instruction 59 to obtain Rs/R0is R1/R0 (5000/100 = 50).

It is desired to control the temperature bath at50oC with as little variation as possible. Highresolution is desired so the control algorithm willbe able to respond to minute changes intemperature. The highest resolution is obtainedwhen the temperature range results in an outputvoltage (Vs) range which fills the measurementrange selected in Instruction 6. The full bridgeconfiguration allows the bridge to be balanced(Vs = 0V) at or near the control temperature.Thus, the output voltage can go both positiveand negative as the bath temperature changes,allowing the full use of the measurement range.

The resistance of the PRT is approximately119.6 ohms at 50 oC. The 120 ohm fixedresistor balances the bridge at approximately 51oC. The output voltage is:

Vs = Vx [Rs/(Rs+R1) - R3/(R2+R3)]

= Vx [Rs/(Rs+5000) - 0.023438]

The temperature range to be covered is 50+5oC. At 45 oC Rs is approximately 117.6ohms, or:

Vs = -458.448x10-6 Vx

Vs can be measured on the ±1500 µV scale.Setting Vs equal to -1500 µV and solving for Vxresults in Vx = 3.272 V. Vx is entered as 3270mV in Parameter 8 of Instruction 6.

Page 76: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

7-10

The 5 ppm/oC temperature coefficient of thefixed resistors was chosen so that their 0.01%accuracy tolerance would hold over the desiredtemperature range.

There is a change of approximately 1500 µVfrom the output at 45 oC to the output at 51 oC,or 250 µV/oC. With a resolution of 50 nV on the1500 µV range, this means that the temperatureresolution is 0.0002 oC.

The relationship between temperature and PRTresistance is a slightly nonlinear one.Instruction 16 computes this relationship for aDIN standard PRT where the nominaltemperature coefficient is 0.00385/oC. Thechange in nonlinearity of a PRT with thetemperature coefficient of 0.00392/oC is minutecompared with the slope change. Entering aslope correction factor of 0.00385/0.00392 =0.98214 as the multiplier in Instruction 16results in a calculated temperature which is wellwithin the accuracy specifications of the PRT.

PROGRAM

01: P6 Full Bridge01: 1 Rep02: 1 1500 uV slow Range03: 1 IN Card04: 3 IN Chan05: 1 EX Card06: 1 EX Chan07: 1 Meas/EX08: 3270 mV Excitation09: 11 Loc [:Rs/Ro ]10: .001 Mult11: .02344 Offset

02: P59 BR Transform Rf[X/(1-X)]01: 1 Rep02: 11 Loc [:Rs/Ro ]03: 50 Multiplier (Rf)

03: P16 Temperature RTD01: 1 Rep02: 11 R/Ro Loc Rs/Ro03: 12 Loc :04: .98214 Mult05: 0 Offset

7.14 PRESSURE TRANSDUCER - 4WIRE FULL BRIDGEThis example describes a measurement madewith a Druck PDCR 10/D depth measurementpressure transducer. The pressure transducerwas ordered for use with 5 volt positive ornegative excitation (passive temperaturecompensation) and has a range of 5 psi orabout 3.5 meters of water. The transducer isused to measure the depth of water in a stillingwell.

Instruction 6, 4 wire full bridge, is used tomeasure the pressure transducer. The highoutput of the semiconductor strain gagenecessitates the use of the 50mV input range.The sensor is calibrated by connecting it to theCR7 and using Instruction 6 with a multiplier of1 and an offset of 0, noting the readings (*6Mode) with 10 cm of water above the sensorand with 334.6 cm of water above the sensor.The output of Instruction 6 is 1000 Vs/Vx ormillivolts per volt excitation. At 10 cm thereading is 0.19963 mV/V and at 334.6 cm thereading is 6.6485 mV/V. The multiplier to yieldoutput in cm is:

(334.6 - 10)/(6.6485-.19963) = 50.334 cm/mV/V

The offset is determined after the pressuretransducer is installed in the stilling well. Thesensor is installed 65 cm below the water levelat the time of installation. The depth of water atthis time is determined to be 72.6 cm relative tothe desired reference. When programmed withthe multiplier determined above and an offset of0, a reading of 65.12 is obtained. The offset forthe actual measurements is thus determined tobe 72.6 - 65.12 = 7.48 cm.

The lead length is approximately 10 feet, sothere is no appreciable error due to lead wireresistance.

FIGURE 7.14-1. Wiring Diagram for FullBridge Pressure Transducer

Page 77: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

7-11

PROGRAM

01: P6 Full Bridge01: 1 Rep02: 4 50 mV slow Range03: 1 IN Card04: 1 IN Chan05: 1 EX Card06: 1 EX Chan07: 1 Meas/EX08: 5000 mV Excitation09: 13 Loc [:HEIGHT cm]10: 50.334 Mult11: 7.48 Offset

7.15 LYSIMETER - 6 WIRE LOAD CELLWhen a long cable is required between a loadcell and the CR7, the resistance of the wire cancreate a substantial error in the measurement ifthe 4 wire full bridge (Instruction 6) is used toexcite and measure the load cell. This errorarises because the excitation voltage is lower atthe load cell than at the CR7 due to voltagedrop in the cable. The 6 wire full bridge(Instruction 9) avoids this problem by measuringthe excitation voltage at the load cell. Thisexample shows the errors one would encounterif the actual excitation voltage was notmeasured and shows the use of a 6 wire fullbridge to measure a load cell on a weighinglysimeter (a container buried in the ground, filledwith plants and soil, used for measuringevapotranspiration).

The lysimeter is 2 meters in diameter and 1.5meters deep. The total weight of the lysimeterwith its container is approximately 8000 kg. Thelysimeter has a mechanically adjustablecounterbalance, and changes in weight aremeasured with a 250 pound (113.6 kg) capacitySensotec Model 41 tension/compression loadcell. The load cell has a 4:1 mechanicaladvantage on the lysimeter (ie., a change of 4kg in the mass of the lysimeter will change theforce on the load cell by 1 kg-force or 980 N).

The surface area of the lysimeter is 3.1416 m2or 31,416 cm2, so 1 cm of rainfall orevaporation results in a 31.416 kg change inmass. The load cell can measure ±113.6 kg, a227 kg range. This represents a maximumchange of 909 kg, or 28 cm of water in thelysimeter before the counterbalance would haveto be readjusted.

FIGURE 7.15-1. DiagrammaticRepresentation of Lysimeter Weighing

Mechanism

There is 1000 feet of 22 AWG cable betweenthe CR7 and the load cell. The output of theload cell is directly proportional to the excitationvoltage. When Instruction 6 (4 wire 1/2 bridge)is used, the assumption is that the voltage dropin the connecting cable is negligible. Theaverage resistance of 22 AWG wire is 16.5ohms per 1000 feet. Thus, the resistance in theexcitation lead going out to the load cell addedto that in the lead coming back to ground is 33ohms. The resistance of the bridge in the loadcell is 350 ohms. The voltage drop across theload cell is equal to the voltage at the CR7multiplied by the ratio of the load cell resistanceRs, to the total resistance, RT, of the circuit. IfInstruction 6 were used to measure the loadcell, the excitation voltage actually applied to theload cell, V1 would be:

V1 = Vx Rs/RT = Vx 350/(350+33) = 0.91 Vx

Where Vx is the voltage applied at theexcitation card. This means that the voltageoutput by the load cell would only be 91% of thatexpected. If recording of the lysimeter data wasinitiated with the load cell output at 0 volts, and100 mm of evapotranspiration had occurred,calculation of the change with Instruction 6would indicate that only 91 mm of water hadbeen lost. Because the error is a fixedpercentage of the output, the actual magnitudeof the error increases with the force applied tothe load cell. If the resistance of the wire wasconstant, one could correct for the voltage dropwith a fixed multiplier. However, the resistanceof copper changes 0.4% per oC change intemperature. Assume that the cable betweenthe load cell and the CR7 lays on the soilsurface and undergoes a 25 oC diurnaltemperature fluctuation. If the resistance is 33

Page 78: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

7-12

ohms at the maximum temperature, then, at theminimum 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 Vx

The excitation voltage has increased by 1%,relative to the voltage applied at the CR7. In thecase where we were recording a 91 mm changein water content, there would be a 1 mm diurnalchange in the recorded water content that wouldactually be due to the change in temperature.Instruction 9 solves this problem by actuallymeasuring the voltage drop across the load cellbridge. The drawbacks to using Instruction 9are that it requires an extra differential channeland the added expense of a 6 wire cable. Inthis case the benefits are worth the expense.

The load cell has a nominal full scale output of3 millivolts per volt excitation. If the excitation is5 volts, the full scale output is 15 millivolts; thusthe ±15 millivolt range is selected. Thecalibrated output of the load cell is 3.106 mV/V1at a load of 250 pounds. Output is desired inmillimeters of water, with respect to a fixedpoint. The calibration in mV/V1/mm is:

3.106mV/V1/250lb x 2.2lb/kg x3.1416kg/mm/4 =

0.02147mV/V1/mm

The reciprocal of this gives the multiplier toconvert mV/V1 into millimeters (the result ofInstruction 9 is the ratio of the output voltage tothe actual excitation voltage multiplied by 1000,which is mV/V1):

1/0.02147mV/V1/mm = 46.583 mm/mV/V1

The output from the load cell is connected sothat the voltage increases as the mass of thelysimeter increases (if the actual mechanicallinkage was as diagrammed in Figure 7.15-1,the output voltage would be positive when theload cell was under tension).

When the experiment is started, the watercontent of the soil in the lysimeter isapproximately 25% on a volume basis. It isdecided to use this as the reference, (i.e., 0.25x 1500mm = 375 mm). The experiment is

started at the beginning of what is expected tobe a period during which evapotranspirationexceeds precipitation. Instruction 9 isprogrammed with the correct multiplier and nooffset. After hooking everything up, thecounterbalance is adjusted so that the load cellis near the top of its range, this will allow alonger period before readjustment is necessary.The result of Instruction 9 (monitored with the *6Mode) is 109. The offset needed to give thedesired initial value of 375mm is 266. However,it is decided to add this offset in a separateprogram so that the result of Instruction 9 canbe used as a ready reminder of the strain on theload cell (range = ±140mm). When the strainon the load cell nears its rated limits, thecounterbalance is readjusted and the offsetrecalculated to provide a continuous record ofthe water budget.

The program table has an execution interval of10 seconds. The average value in millimetersis output to Final Storage (not shown in Table)every hour. The average is used, instead of asample, in order to cancel out the effects ofwind loading on the lysimeter.

FIGURE 7.15-2. 6 Wire Full BridgeConnection for Load Cell

PROGRAM

01: P9 Full BR w/Compensation01: 1 Rep02: 8 5000 mV slow EX Range03: 3 15 mV slow BR Range04: 1 IN Card05: 1 IN Chan06: 1 EX Card07: 1 EX Chan08: 1 Meas/EX09: 5000 mV Excitation10: 1 Loc [:mm RAW ]11: 46.583 Mult12: 0 Offset

Page 79: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

7-13

02: P34 Z=X+F01: 1 X Loc mm RAW02: 266 F03: 2 Z Loc [:mm CORECT]

7.16 227 GYPSUM SOIL MOISTUREBLOCKSoil moisture is measured with a gypsum blockby relating the change in moisture to the changein resistance of the block. An AC Half Bridge(Instruction 5) is used to determine theresistance of the gypsum block. Rapid reversalof the excitation voltage inhibits polarization ofthe sensor. Polarization creates an error in theoutput so the fast integration time is used. Theoutput of Instruction 5 is the ratio of the mid-bridge voltage to the excitation voltage, thisoutput is converted to gypsum block resistancewith Instruction 59, Bridge Transform.

The Campbell Scientific 227 Soil Moisture Blockuses a Delmhorst gypsum block with a 1 kohmbridge completion resistor. Using data suppliedby Delmhorst, Campbell Scientific hascomputed coefficients for a 5th order polynomialto convert block resistance to water potential inbars. There are two polynomials, one tooptimize the range from -0.1 to -2 bars and oneto cover the range from -0.1 to -15 bars (theminus sign is omitted in the output). The -0.1 to-2 bar polynomial requires a multiplier of 1 in theBridge Transform Instruction (result in Kohms)and the -0.1 to -15 bar polynomial requires amultiplier of 0.1 (result in 10,000s of ohms).The multiplier is a scaling factor to maintain themaximum number of significant digits in thecoefficients of the polynomial.

In this example, we wish to makemeasurements on 12 gypsum blocks and outputthe final data in bars. The soil where themoisture measurements are to be made is quitewet at the time the data logging is initiated, butis expected to dry beyond the -2 bar limit of thewet range polynomial. The dry rangepolynomial is used, so a multiplier of 0.1 isentered in the bridge transform instruction.

When the water potential is computed it iswritten over the resistance value. Thepotentials are stored in Input locations 1-12where they may be accessed for output to FinalStorage. If it was desired to retain theresistance values the potential measurementscould be stored in locations 13-24 by changingparameter 3 in Instruction 55 to 13.

FIGURE 7.16-1. 12 Gypsum BlocksConnected to the CR7

The first 6 blocks are excited by excitationchannel 1 and the last 6 by channel 2. Thus, 6is entered for the number of measurements perexcitation channel in Parameter 7 of Instruction5.

PROGRAM

01: P5 AC Half Bridge01: 12 Reps02: 16 500 mV fast Range03: 1 IN Card04: 1 IN Chan05: 1 EX Card06: 6 EX Chan07: 6 Meas/EX08: 500 mV Excitation09: 1 Loc [:POTEN #1 ]10: 1 Mult11: 0 Offset

02: P59 BR Transform Rf[X/(1-X)]01: 12 Reps02: 1 Loc [:POTEN #1 ]03: .1 Multiplier (Rf)

03: P55 Polynomial01: 12 Reps02: 1 X Loc POTEN #103: 1 F(X) Loc [:POTEN #1 ]04: .15836 C005: 6.1445 C106: -8.4139 C207: 9.2493 C308: -3.1685 C409: .33392 C5

Page 80: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 7. MEASUREMENT PROGRAMMING EXAMPLES

7-14

7.17 NONLINEAR THERMISTOR INHALF BRIDGE (CAMPBELLSCIENTIFIC MODEL 101)Instruction 11, 107 Thermistor Probe,automatically linearizes the output of thenonlinear thermistor in the 107 Probe bytransforming the millivolt reading with a 5thorder polynomial. Instruction 55, Polynomial,can be used to linearize the output of anynonlinear thermistor, provided the correlationbetween temperature and probe output isknown, and an appropriate polynomial fit hasbeen determined. In this example, the CR7 isused to measure the temperature of 5 CampbellScientific 101 Probes (used with the CR21).Instruction 4, Excite, Delay and Measure, isused because the high source resistance of theprobe requires a long input settling time (SeeSection 13.3.1). The excitation voltage is 2000mV, the same as used in the CR21. The signalvoltage is then transformed to temperatureusing the Polynomial Instruction.

The manual for the 101 Probe gives thecoefficients of the 5th order polynomial used toconvert the output in millivolts to temperature (Edenotes the power of 10 by which the mantissais multiplied):

C0 -53.7842C1 0.147974C2 -2.18755E-4C3 2.19046E-7C4 -1.11341E-10C5 2.33651E-14

The CR7 will only allow 5 significant digits to theright or left of the decimal point to be enteredfrom the key board. The polynomial can not beapplied exactly as given in the 101 manual. Theinitial millivolt reading must be scaled if thecoefficients of the higher order terms are to beentered with the maximum number of significantdigits. If 0.001 is used as a multiplier on themillivolt output, the coefficients are divided by0.001 raised to the appropriate power, (i.e.,C0=C0, C1=C1/0.001, C2=C2/.000001 etc.).With this adjustment, the coefficients entered inParameters 4-9 of Instruction 55 become:

C0 -53.784C1 147.97C2 -218.76C3 219.05C4 -111.34C5 23.365

FIGURE 7.17-1. 101 Thermistor ProbesConnected to CR7

PROGRAM

01: P4 Excite,Delay,Volt(SE)01: 5 Reps02: 8 5000 mV slow Range03: 1 IN Card04: 1 IN Chan05: 1 EX Card06: 1 EX Chan07: 5 Meas/EX08: 10 Delay (units .01sec)09: 2000 mV Excitation10: 1 Loc [:101 T #1 ]11: 0.001 Mult12: 0 Offset

02: P55 Polynomial01: 5 Reps02: 1 X Loc 101 T #103: 1 F(X) Loc [:101 T #1 ]04: -53.784 C005: 147.97 C106: -218.76 C207: 219.05 C308: -111.34 C409: 23.365 C5

Page 81: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

8-1

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES

The following examples are intended to illustrate the use of Processing and Program ControlInstructions, flags, and the capability to direct the results of Output Processing Instructions to InputStorage.

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 Intensityexamples (8.1 and 8.2).

Flags tests are used in the Running Average, Interrupt Subroutine, and Converting Wind Directionexamples (8.1, 8.4, and 8.6)

These examples are not complete programs to be taken verbatim. They need to be altered to fit specificneeds.

8.1 COMPUTATION OF RUNNINGAVERAGEIt is sometimes necessary to compute a runningaverage (i.e., the average includes a fixednumber of samples and is continuously updatedas new samples are taken). Because theoutput interval is shorter than the averagingperiod, Instruction 71 cannot be used; thealgorithm for computing this average must beprogrammed by the user. The followingexample demonstrates a program forcomputing a running average.

In this example, each time a new measurementis made (in this case a thermocoupletemperature) an average is computed for the 10most recent samples. This is done by saving all10 temperatures in contiguous input locationsand using the Spatial Average Instruction (51)to compute the average. The temperatures arestored in locations 11 through 20. Each timethe table is executed, the new measurement isstored in location 20 and the average is storedin location 2. The Block Move Instruction (54) isthen used to move the temperatures fromlocations 12 through 20 down by one location;the oldest measurement (in location 11) is lostwhen the temperature from location 12 iswritten over it.

Input Location Labels:

1:Panl Temp 15:Temp i-52:10smpl av 16:Temp i-411:Temp i-9 17:Temp i-312:Temp i-8 18:Temp i-213:Temp i-7 19:Temp i-114:Temp i-6 20:Temp i

Where i is current reading,i-1 is previous reading, etc.

* 1 Table 1 Programs01: 1 Sec. Execution Interval

01: P17 Panel Temperature01: 1 IN Card02: 1 Loc [:Panl Temp]

02: P14 Thermocouple Temp (DIFF)01: 1 Rep02: 1 1500 uV slow Range03: 1 IN Card04: 1 IN Chan05: 1 Type T (Copper-Constantan)06: 1 Ref Temp Loc Panl Temp07: 20 Loc [:Temp i ]08: 1 Mult09: 0.0000 Offset

03: P51 Spatial Average01: 10 Swath02: 11 First Loc Temp i-903: 2 Avg Loc [:10smpl av]

Page 82: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES

8-2

04: P54 Block Move01: 9 No. of Values02: 12 First Source Loc Temp i-803: 1 Source Step04: 11 First Destin. Loc [:Temp i-9 ]05: 1 Destination Step

05: P86 Do01: 10 Set high Flag 0 (output)

06: P70 Sample01: 1 Rep02: 2 Loc 10smpl av

07: P End Table 1

In the above example, all samples for theaverage are stored in input locations. This isnecessary when an average must be outputwith each new sample. In most cases,averages are desired less frequently thansampling. For example, it may be necessary tosample some parameter every five seconds andoutput every hour an average of the previousthree hours' readings. If all samples weresaved, this would require 2160 input locations.The same value can be obtained by computingan hourly average and averaging the hourlyaverages for the past three hours. To do thisrequires that hourly averages be stored in inputlocations.

Instruction 80 is used to send the one houraverage to Input Storage and again to send thethree hour average to Final Storage.

Input Location Labels:

1:AVG i-22:AVG i-13:AVG i4:3 HR AVG5:XX mg/M3

* 1 Table 1 Programs01: 5 Sec. Execution Interval

01: P2 Volt (DIFF)01: 1 Rep02: 8 5000 mV slow Range03: 1 IN Card04: 3 IN Chan05: 3 Loc [:XX mg/m3 ]06: 10 Mult07: 0 Offset

02: P92 If time is01: 0 minutes into a02: 60 minute interval03: 10 Set high Flag 0 (output)

03: P80 Set Active Storage Area01: 3 Input Storage Area02: 3 Array ID or location

04: P71 Average01: 1 Rep02: 5 Loc

05: P51 Spatial Average01: 3 Swath02: 1 First Loc AVG i-203: 4 Avg Loc [:3 HR AVG ]

06: P80 Set Active Storage Area01: 1 Final Storage Area02: 25 Array ID or location

07: P77 Real Time01: 220 Day,Hour-Minute

08: P70 Sample01: 1 Rep02: 4 Loc 3 HR AVG

09: P91 If Flag01: 10 0 (output) is set02: 30 Then Do

10: P54 Block Move01: 2 No. of Values02: 2 First Source Loc03: 1 Source Step04: 1 First Destination Loc [:AVG i-2 ]05: 1 Destination Step

11: P95 End

12: P End Table 1

8.2 RAINFALL INTENSITYIn this example, the total rain for the last 15minutes is output only if any rain has occurred.The program makes use of the capability todirect the output of Output ProcessingInstructions to Input Storage.

Page 83: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES

8-3

Every 15 minutes, the total rain is sent to InputStorage. If the total is greater than 0, output isredirected to Final Storage, the time is output,and the total is sampled.

Input Location Labels:

1:Rain (mm)2:15min tot

* 1 Table 1 Programs01: 60 Sec. Execution Interval

01: P3 Pulse01: 1 Rep02: 3 IN Card03: 1 Pulse Input Chan04: 2 Switch closure05: 1 Loc [:Rain (mm)]06: .254 Mult07: 0 Offset

02: P92 If time is01: 0 minutes into a02: 15 minute interval03: 10 Set high Flag 0 (output)

03: P80 Set Active Storage Area01: 3 Input Storage Area02: 2 Array ID or location

04: P72 Totalize01: 1 Rep02: 1 Loc Rain (mm)

05: P89 If X<=>F01: 2 X Loc02: 3 >=03: 0 F04: 30 Then Do

06: P80 Set Active Storage Area01: 1 Final Storage Area02: 25 Array ID or location

07: P77 Real Time01: 220 Day,Hour-Minute

08: P70 Sample01: 1 Rep02: 2 Loc

09: P95 End

8.3 SUB 1 MINUTE OUTPUT INTERVALSYNCHED TO REAL TIMEInstruction 92 has one minute resolution. Ifprocessed output is required on an interval lessthan one minute, Instructions 18 and 89 can beused to set the Output Flag on a shorterinterval.

Instruction 18 takes time (tenths of seconds intominute, minutes into day, or hours into year),performs a modulo divide by a user specifiedvalue and loads it into an input location.

When the modulo divisor divides evenly into theinterval, one gets a counter in an input locationthat goes to 0 on a periodic interval. In thisexample, tenths of seconds into the minute ismodulo divided by 300. The counter counts upto 295 then goes to 0 (i.e., every 30 seconds;tenths of seconds into minute has a resolutionof 0.1 seconds).

Instruction 89 is used to set the Output Flagwhen the tenths of seconds counter is less than5 (the execution interval, 0.5 seconds). Withthis short program, the Output Flag could be setwhen the seconds counter equaled 0.However, if Instruction 18 followed a series ofinstructions that took longer than 0.1 seconds toexecute or was in Table 2, executed at thesame interval as an extensive Table 1, the timeat which Instruction 18 was executed might be0.1 seconds or more beyond the modulo divisor.The value output would not equal 0. Setting theOutput Flag when the seconds counter is lessthan the execution interval avoids this problem.

Using Instruction 18 keeps the output intervalsynchronized with real time. If a counterincremented within the program was used todetermine when to set the Output Flag, outputwould depend on the number of times the tablewas executed. The actual time of output woulddepend on when the program was actuallycompiled and started running. If the tableoverran its execution interval (Section 1.1.1),the output interval would not be the countmultiplied by the execution interval, but somelonger interval.

In this example a temperature (type Ethermocouple) is measured every 0.5 secondsand the average output every 30 seconds.

Page 84: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES

8-4

Input Location Assignments:

1:TEMP DEG C10:30 SEC 0

* 1 Table 1 Programs01: .5 Sec. Execution Interval

01: P18 Time01: 0 Tenths of seconds into minute

(maximum 600)02: 300 Mod/by03: 10 Loc [:30 SEC 0 ]

02: P17 Panel Temperature01: 1 IN Card02: 1 Loc [:REF TEMP ]

03: P14 Thermocouple Temp (DIFF)01: 1 Rep02: 13 15 mV fast Range03: 1 IN Card04: 2 IN Chan05: 2 Type E (Chromel-Constantan)06: 1 Ref Temp Loc REF TEMP07: 2 Loc [:TC TEMP ]08: 1 Mult09: 0 Offset

04: P 89 If X<=>F01: 10 X Loc 30 SEC 002: 4 <03: .5 F04: 10 Set high Flag 0 (output)

05: P 71 Average01: 1 Rep02: 2 Loc TC TEMP

06: P End Table 1

8.4 ANALOG OUTPUT TO STRIPCHARTThis example illustrates the use of the AnalogOutput Instruction 21 to output 2 analogvoltages to strip chart.

While of questionable value because of powerrequirements and strip chart reliability, somearchaic regulations require strip chart backupon weather data. Instruction 21 may be usedwith the CR7 to provide two continuous analog

outputs for strip charts. The output values inthis example are wind speed and wind direction.

The following program measures the sensorsevery five seconds. The readings are moved toanother two locations and scaled to a 0 to 1000millivolt output for the strip chart. Wind directionis changed from a 0-360 degree input to outputrepresenting 0 to 540 degrees. This conversionis done in a subroutine which is described in thenext example.

The example also includes instructions tooutput wind vector every hour.

Input Location Assignments:

01:WS02:0-360 WD03:0-540 WD04:WS output05:WD output

* 1 Table 1 Programs01: 3 Sec. Execution Interval

01: P3 Pulse01: 1 Rep02: 5 IN Card03: 1 Pulse Input Chan04: 22 Switch closure; Output Hz.05: 1 Loc [:WS ]06: 1.789 Mult07: 1 Offset

02: P4 Excite,Delay,Volt(SE)01: 1 Rep02: 16 500 mV fast Range03: 2 IN Card04: 1 IN Chan05: 1 EX Card06: 1 EX Chan07: 1 Meas/EX08: 2 Delay (units .01sec)09: 1000 mV Excitation10: 2 Loc [:0-360 WD ]11: .72 Mult12: 0 Offset

03: P86 Do01: 1 Call Subroutine 1

Page 85: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES

8-5

04: P37 Z=X*F01: 1 X Loc WS02: 10 F03: 4 Z Loc [:WS output]

05: P37 Z=X*F01: 3 X Loc 0-540 WD02: 1.8519 F03: 5 Z Loc [:WD output]

06: P21 Analog Out01: 1 EX Card02: 1 CAO Chan03: 4 mv Loc WS output

07: P21 Analog Out01: 1 EX Card02: 2 CAO Chan03: 5 mv Loc WD output

08: P92 If time is01: 0 minutes into a02: 60 minute interval03: 10 Set high Flag 0 (output)

09: P69 Wind Vector01: 1 Rep02: 180 Samples per sub-interval03: 00 Polar Sensor/(S, D1, SD1)04: 1 Wind Speed/East Loc WS05: 2 Wind Dir./North Loc 0-360 WD

10: P End Table 1

8.5 CONVERTING 0-360 WINDDIRECTION OUTPUT TO 0-540 FORSTRIP CHARTIf 0-360 degree wind direction is output to a stripchart, the discontinuity at 0/360 will cause thepen to jump back and forth full scale when thewinds are varying from the north. In the days ofstrip charts this was solved with a 0-540 degreepot on the wind vane (direction changes from540 to 180 and from 0 to 360 so the pen onlyjumps once when the wind is out of the north orsouth).

When faced with the necessity of strip chartoutput (see previous example), the followingalgorithm can be used to change a 0-360degree input to 0-540. (If you have a 0-540 pot,it can be used with the 21X since the WindVector Instruction, 69, will work with this output.)

To change 0-360 degrees to the 0-540 degrees,360 degrees must sometimes be added to thereading when it is in the range of 0 to 180. Thefollowing algorithm does this by assuming that ifthe previous reading was less than 270, thevane has shifted through 180 degrees and doesnot need to be altered. If the previous 0-540reading was greater than 270, 360 degrees isadded.

This example is written as a subroutine which isused by the previous example to output ananalog voltage to a strip chart.

Input Location Labels:

1:WS2:0-360 WD3:0-540 WD4:WS output5:WD output

* 3 Table 3 Subroutines

01: P85 Beginning of Subroutine01: 1 Subroutine Number

02: P89 If X<=>F01: 3 X Loc 0-540 WD02: 3 >=03: 270 F04: 30 Then Do

03: P86 Do01: 11 Set high Flag 1

04: P94 Else

05: P86 Do01: 21 Set low Flag 1

06: P95 End

07: P31 Z=X01: 2 X Loc 0-360 WD02: 3 Z Loc [:0-540 WD ]

08: P89 If X<=>F01: 3 X Loc 0-540 WD02: 4 <03: 180 F04: 30 Then Do

Page 86: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES

8-6

09: P91 If Flag01: 11 1 is set02: 30 Then Do

10: P34 Z=X+F01: 3 X Loc 0-540 WD02: 360 F03: 3 Z Loc [:0-540 WD ]

11: P95 End

12: P95 End

13: P95 End

14: P End Table 3

8.6 COVARIANCE CORRELATIONPROGRAMMING EXAMPLEThe example is a two level meteorological towerwith five sensors at each level. The threecomponents of the wind are measured usingprop anemometers. Two thermocouples (TC)are used to measure ambient and wet-bulbtemperatures and calculate water vaporpressure on-line. All sensors are scanned onceper second (1 Hz) and a five minute averagingperiod with a 30 minute Output Interval isspecified. The example optimizes the inputmeasurement sequence for speed and shows

the instructions necessary to provide calibratedinputs, properly ordered to produce the desiredoutputs from the Covariance Correlation(CV/CR) Instruction. Table 8.7-1 groups thesensors according to measurement type andgives the CR7 multiplier and offset.

The props can all be measured as single-endedvoltages, but the vertical wind prop calibrationdiffers from the U and V prop calibration. Thefastest input sequence is to measure bothlevels (6 props) with a single instruction usingthe U and V calibration and correct the Wmeasurements with the Fixed Multiply,Instruction 37.

The type E thermocouples are measured on themost sensitive input range, 5mV,accommodating a ±80 oC range between themeasurement and CR7 reference junction. Theresolution is (.33µV/(60µV/oC) or about 0.006oC. Measuring absolute temperature with TCsrequires a reference junction temperaturemeasurement. This is measured withInstruction 17.

The specified outputs determine the input orderrequired by the CV/CR Instruction. Table 8.6-2lists the desired outputs from the two levelsalong with the Input Storage locations for theprocessed results.

TABLE 8.6-1. Example Sensor Description and CR7 Multiplier and Offset

DESCRIPTION SYMBOL SENSOR CALIB MEAS TYPE MULT OFFSET

Horiz. Wind U prop 18m/s/V S.E.V. .018m/s/mV 0.0Horiz. Wind V prop 18m/s/V S.E.V. .018 0.0Vert. Wind W prop 22m/s/V S.E.V. .022 0.0Air Temp. Ta TC - TC DIFF. 1.0oC 0.0Wet-bulb Temp. Tw TC - TC DIFF. 1.0oC 0.0Vap. Pressure e derived - - - -

Page 87: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES

8-7

TABLE 8.6-2. Example Outputs and Input Storage Locations

LEVEL 1 OUTPUTS

MEANS LOC VARIANCES LOC COVARIANCES LOC CORRELATIONS LOC

M(W1) 20 V(W1) 25 CV(W1,U1) 30 CR(W1,U1) 34M(U1) 21 V(U1) 26 CV(W1,V1) 31 CR(W1,V1) 35M(V1) 22 V(V1) 27 CV(W1,Tal) 32M(Tal) 23 V(Tal) 28 CV(W1,e1) 33M(e1) 24 V(e1) 29

LEVEL 2 OUTPUTS

MEANS LOC VARIANCES LOC COVARIANCES LOC

M(W2) 36 V(W2) 41 CV(W2,U2) 46M(U2) 37 V(U2) 42 CV(W2,V2) 47M(V2) 38 V(V2) 43 CV(W2,Ta2) 48M(Ta2) 39 V(Ta2) 44 CV(W2,e2) 49M(e2) 40 V(e2) 45 CV(U2,V2) 50

CV(U2,Ta2) 51CV(U2,e2) 52CV(V2,Ta2) 53CV(V2,e2) 54

Table 8.6-3 lists the input channel configurationand Input Storage allocation for the measuredvalues. After reading the new input samples,the Level 2 measurements are relocated usingthe Block Move Instruction 54, then Ta1 isrelocated through a separate move and e1 ispositioned by specifying the destination locationin the Wet/Dry-Bulb Instruction. The CV/CRInstruction must be entered twice, once for eachlevel.

In addition to ordering Level 1 and Level 2 inlocations 1-5 and 11-15 respectively, two more

locations are required. Converting the wet-/dry-bulb measurements to vapor pressure usingInstruction 57 requires atmospheric pressure.We'll use the standard atmosphere for the siteelevation and key the value into Location 17using the C command in the *6 Mode. Thereference junction temperature obtained byInstruction 17 is stored in Location 16.

This example requires that 54 locations beallotted to Input Storage and 79 to IntermediateStorage (35 for the 1st CV/CR Instruction, 43for the second, and 1 for Instruction 92).

TABLE 8.6-3. Example Input Channel and Location Assignments

INPUT INPUT INPUT INPUTPARAM CHAN LOC PARAM LOC PARA LOC

W1 1 1 W1 1 W1 1U1 2 2 U1 2 U1 2V1 3 3 V1 3 V1 3W2 4 4 Ta1 9 ----------------------- Ta1 4U2 5 5 Tw1 10 Separate moves e1 5V2 6 6 W2 11 W2 11Ta2 7 7 ->Block-> U2 12 U2 12Tw2 8 8 move V2 13 V2 13Ta1 9 9 Ta2 14 Ta2 14Tw1 10 10 Tw2 15 e2 15

Page 88: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 8. PROCESSING AND PROGRAM CONTROL EXAMPLES

8-8

* 1 Table 1 Programs01: 1 Sec. Execution Interval

01: P17 Panel Temperature01: 1 IN Card02: 16 Loc [:PANL TEMP]

02: P1 Volt (SE)01: 6 Reps02: 8 5000 mV slow Range03: 1 IN Card04: 1 IN Chan05: 1 Loc [:W1 ]06: .018 Mult07: 0 Offset

03: P14 Thermocouple Temp (DIFF)01: 4 Reps02: 15 150 mV fast Range03: 1 IN Card04: 7 IN Chan05: 2 Type E (Chromel-Constantan)06: 16 Ref Temp Loc PANL TEMP07: 7 Loc [:Ta2 ]08: 1 Mult09: 0 Offset

04: P37 Z=X*F01: 1 X Loc W102: 1.22 F03: 1 Z Loc [:W1 ]

05: P37 Z=X*F01: 4 X Loc W202: 1.22 F03: 4 Z Loc [:W2 ]

06: P54 Block Move01: 5 No. of Values02: 4 First Source Loc W203: 1 Source Step04: 11 First Destination Loc [:W2 ]05: 1 Destination Step

07: P31 Z=X01: 9 X Loc02: 4 Z Loc [:W2 ]

08: P57 Wet/Dry Bulb Temp to VP01: 17 Pressure Loc02: 9 Dry Bulb Temp Loc03: 10 Wet Bulb Temp Loc04: 5 Loc [:U2 ]

09: P57 Wet/Dry Bulb Temp to VP01: 17 Pressure Loc02: 14 Dry Bulb Temp Loc03: 15 Wet Bulb Temp Loc Tw204: 15 Loc [:Tw2 ]

10: P92 If time is01: 0 minutes into a02: 30 minute interval03: 10 Set high Flag 0 (output)

11: P62 CV/CR01: 5 No. of Input Values02: 5 No. of Means03: 5 No. of Variances04: 0 No. of Std. Dev.05: 4 No. of Covariances06: 2 No. of Correlations07: 300 Samples per Average08: 1 First Sample Loc W109: 20 Loc [:MEAN (W1)]

12: P62 CV/CR01: 5 No. of Input Values02: 5 No. of Means03: 5 No. of Variances04: 0 No. of Std. Dev.05: 4 No. of Covariances06: 2 No. of Correlations07: 300 Samples per Average08: 11 First Sample Loc W209: 36 Loc [:MEAN (W2)]

13: P77 Real Time01: 110 Day,Hour-Minute

14: P70 Sample01: 35 Reps02: 20 Loc MEAN (W1)

15: P End Table 1

* A Mode 10 Memory Allocation01: 54 Input Locations02: 79 Intermediate Locations

Page 89: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

9-1

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

TABLE 9-1. Input Voltage Ranges and Codes

Range Code Full Scale Range Resolution*Slow Fast16.67ms 250µsInteg. Integ.1 11 ±1500 microvolts 50 nanovolts2 12 ±5000 microvolts 166 nanovolts3 13 ±15 millivolts 500 nanovolts4 14 ±50 millivolts 1.66 microvolts5 15 ±150 millivolts 5 microvolts6 16 ±500 millivolts 16.6 microvolts7 17 ±1500 millivolts 50 microvolts8 18 ±5000 millivolts 166 microvolts

*Differential measurement, resolution for single-ended measurement is twice value shown.

When measuring voltages with the 723Analog Input Card, the ±1500 µV and±5000 µV ranges read out in microvolts, therest of the ranges have the decimal pointplaced to display millivolts. The 726 50VAnalog Input Card divides the input voltagesby 10 before making the measurements,thus, to shift the decimal point so as todisplay millivolts a factor of ten must beused in the multiplier. Repetitions cannotbe used to advance from one 726 card tothe next.

When a voltage input exceeds the rangeprogrammed, the value which is stored isset to the maximum negative numberdisplayed as -99999 in high resolution or -6999 in low resolution.

*** 1 SINGLE ENDED VOLTS ***

FUNCTIONThis instruction is used to measure voltage at asingle ended input with respect to ground.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 2 Range code (Table 9-1)03: 2 Card number for first

measurement04: 2 Single-ended channel

number for firstmeasurement

05: 4 Input location number for firstmeasurement

06: FP Multiplier07: FP Offset

Input locations altered: 1 per repetition

*** 2 DIFFERENTIAL VOLTS ***

FUNCTIONThis Instruction reads the voltage differencebetween the HI and LO inputs of a differentialchannel in the selected range from the selectedcard and channel(s) and places it in an inputlocation(s). Table 9-1 lists the range codes.Both the high and low inputs must be within ±5Vof the datalogger's ground (Common ModeRange Section 13.2). Pyranometers andthermopile sensors require a jumper betweenLO and Ground to keep them in Common ModeRange.

Page 90: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

9-2

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 2 Range code (Table 9-1)03: 2 Card number for first

measurement04: 2 Differential channel number

for first measurement05: 4 Input location number for first

measurement06: FP Multiplier07: FP Offset

Input locations altered: 1 per repetition

*** 3 PULSE COUNT ***

INPUT RANGE - - - 32767 Counts per inputinterval

There are three input configurations which maybe measured with the Pulse Count Instruction.

HIGH FREQUENCY PULSEIn this configuration the minimum pulse width is2 microseconds. The maximum inputfrequency is 250 kilohertz. The count isincremented when the input voltage changesfrom below 1.5 volts to above 3.5 volts. Themaximum input voltage is ±20 volts.

LOW LEVEL ACThis configuration is used for counting thefrequency of AC signals from magnetic pulseflow transducers or other low voltage, sine waveinputs. The minimum input voltage is 6 mVRMS. Input hysteresis is 11 mV. The maximumAC input voltage is 20 volts RMS. Themaximum input frequency ranges from 100Hzat 6mV RMS to 10,000Hz at 50mV or greater.Consult the factory if higher frequencies aredesired.

SWITCH CLOSUREIn this configuration the minimum switch closedtime is 1 millisecond. The minimum switchopen time is 4 milliseconds. The maximumbounce time is 1.4 milliseconds open withoutbeing counted.

All pulse counters in one I/O Module are resetat the same time. The reset time interval isequal to the execution interval of the programtable in which the Pulse Count Instruction(s)occur. When programs are compiled, the CR7

will set the reset time interval to the executioninterval of the first program table in which aPulse Count Instruction occurs. The executionintervals of subsequent program tablescontaining Pulse Count Instructions will have noeffect on the reset time interval. (The maximuminput frequency is 250KHz. The maximumnumber that can be stored in an accumulationregister is 65,535.)

When datalogger time is changed, whetherthrough the keyboard or with atelecommunications program, a partialrecompile is automatically done toresynchronize program execution with real time.The resynchronization process resets the pulseaccumulation interval resulting in an intervalwhose length can be anywhere between onesecond too short to almost twice as long.Pulses are not lost during resynchronization sototalized values are correct but pulse rateinformation such as wind speed can be up toalmost twice the correct value.

The options of discarding counts from longintervals and pulse input type are selected bythe code entered for the 4th parameter (Table9-2).

All Pulse count instructions for the same I/Omodule and output instructions for the pulsecount data should be kept in the same programtable, preferably Table 1. If the pulse countinstruction is contained in a subroutine, thatsubroutine must be called from Table 2.

When the system is interrupted for a task ofsufficient priority to allow the pulse counters toexceed the programmed reset time interval, theresulting larger count can either be discardedleaving the value in the input locationunchanged from the previous value or it can beused. If pulse counts are being totalized, amissing count could be significant; the valuefrom the erroneously long interval should beused. If the pulse count is being processed away in which the resultant value is dependentupon the sampling interval, such as sample,average, maximum, or minimum, it should bediscarded. The option of discarding countsfrom long intervals and the input configurationare determined by the 4th parameter accordingto the following table.

Page 91: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

9-3

TABLE 9-2. Pulse Count ConfigurationCodes

Code Configuration

00 High frequency pulse, all pulsescounted

01 Low level AC, all pulses counted02 Switch closure, all pulses counted

1X Long interval data discarded, where Xis configuration code

2X Long interval data discarded, frequency(Hz) output

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 2 Card number for first

measurement03: 2 Pulse channel number for

first measurement04: 2 Configuration code (Table 9-2)05: 4 Input location number for first

measurement06: FP Multiplier07: FP Offset

Input locations altered: 1 per repetition

*** 4 EXCITE, DELAY AND MEASURE **

FUNCTIONThis Instruction is used to apply an excitationvoltage, delay a specified time and then make asingle ended voltage measurement.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 2 Range code (Table 9-1)03: 2 Analog card number for first

measurement04: 2 Single-ended channel

number for firstmeasurement

05: 2 Excitation card for firstmeasurement

06: 2 Excitation channel numberfor first measurement

07: 2 Number of measurementsper excitation channel

08: 4 Delay (0.01 sec)

09: FP Excitation voltage (millivolts)10: 4 Input location number for first

measurement11: FP Multiplier12: FP Offset

Input locations altered: 1 per repetition

*** 5 AC HALF BRIDGE ***

FUNCTIONThis Instruction is used to apply an excitationvoltage to a half bridge (Figure 13.5-1), make asingle ended voltage measurement of thebridge output, reverse the excitation voltage,then repeat the measurement. The differencebetween the two measurements is used tocalculate the resulting value which is the ratio ofthe measurement to the excitation voltage.When the 1500 or 5000 µV input range isselected, the value is returned as 1000 timesthe ratio. For all other input ranges the value isjust the ratio.

The excitation "on time" for each polarity isexactly the same to ensure that ionic sensors donot polarize with repetitive measurements. Therange should be selected to be a fastmeasurement (range 11-18) limiting the excitationon time to 800 microseconds at each polarity. Aslow integration time should not be used withionic sensors because of polarization error.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 2 Range code (Table 9-1)03: 2 Analog card number for first

measurement04: 2 Single-ended channel

number for firstmeasurement

05: 2 Excitation card for firstmeasurement

06: 2 Excitation channel numberfor first measurement

07: 2 Number of measurementsper excitation channel

08: 4 Excitation voltage (millivolts)09: 4 Input location number for first

measurement10: FP Multiplier11: FP Offset

Input locations altered: 1 per repetition

Page 92: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

9-4

*** 6 FULL BRIDGE WITH SINGLE ***DIFFERENTIAL MEASUREMENT

FUNCTIONThis Instruction is used to apply an excitationvoltage to a full bridge (Figure 13.5-1), make adifferential voltage measurement of the bridgeoutput, reverse the excitation voltage, thenrepeat the measurement. The resulting value is1000 times the ratio of the measurement to theexcitation voltage.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions (95 max)02: 2 Range code (Table 9-1)03: 2 Analog card number for first

measurement04: 2 Differential channel number

for first measurement05: 2 Excitation card for first

measurement06: 2 Excitation channel number

for first measurement07: 2 Number of measurements

per excitation channel08: 4 Excitation voltage (millivolts)09: 4 Input location number for first

measurement10: FP Multiplier11: FP Offset

Input locations altered: 1 per repetition

*** 7 THREE WIRE HALF BRIDGE ***

FUNCTIONThis Instruction is used to determine the ratio ofthe sensor resistance to a known resistanceusing a separate voltage sensing wire from thesensor to compensate for lead wire resistance.

The measurement sequence is to apply anexcitation voltage, make two voltagemeasurements on two adjacent single endedchannels, the first on the reference resistor andthe second on the voltage sensing wire from thesensor (Figure 13.5-1), then reverse theexcitation voltage and repeat themeasurements. The two measurements areused to calculate the resulting value which isthe ratio of the voltage across the sensor to thevoltage across the reference resistor.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions (95 max)02: 2 Range code for both

measurements (Table 9-1)03: 2 Analog card number for first

measurement04: 2 Single-ended channel number

for first measurement05: 2 Excitation card for first

measurement06: 2 Excitation channel number

for first measurement07: 2 Number of measurements

per excitation channel08: 4 Excitation voltage (millivolts)09: 4 Input location number for first

measurement10: FP Multiplier11: FP Offset

Input locations altered: 1 per repetition

*** 9 FULL BRIDGE WITH EXCITATION ***COMPENSATION

FUNCTIONThis Instruction is used to apply an excitationvoltage and make two differential voltagemeasurements, then reverse the polarity of theexcitation and repeat the measurements. Themeasurements are made on sequentialchannels. The result is the voltage measuredon the second channel (V2) divided by thevoltage measured on the first (V1). If V1 ismeasured on the 5V range (code 8 or 18 inParameter 2), then the result is 1000 timesV2/V1. A 1 before the excitation channelnumber (1X) causes the excitation channel tobe incremented with each repetition.

When used as a 6 wire full bridge (Figure 13.5-1), the connections are made so that V1 is themeasurement of the voltage drop across the fullbridge, and V2 is the measurement of thebridge output. Because the excitation voltagefor a full bridge measurement is usually in the5V range, the output is usually 1000 V2/V1 ormillivolts output per volt excitation. When usedto measure a 4 wire half bridge, the connectionsare made so that V1 is the voltage drop acrossthe fixed resistor (Rf), and V2 is the drop acrossthe sensor (Rs). As long as V1 is not measuredon the 5V range, the result is V2/V1 whichequals Rs/Rf.

Page 93: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

9-5

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions (47 max)02: 2 Excitation range code (Table

9-1)03: 2 Bridge range code for (Table

9-1)04: 2 Analog card number for first

measurement05: 2 Differential channel number

for first measurement06: 2 Excitation card for first

measurement07: 2 Excitation channel number

for first measurement08: 2 Number of measurements

per excitation channel09: 4 Excitation voltage (millivolts)10: 4 Input location number for first

measurement11: FP Multiplier12: FP Offset

Input locations altered: 1 per repetition

*** 10 BATTERY VOLTAGE ***

FUNCTIONThis instruction reads the battery voltage fromthe currently active I/O module and writes it toan input location. The units for battery voltageare volts.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location number

Input locations altered: 1

*** 11 107 THERMISTOR PROBE ***

FUNCTIONThis instruction applies a 4 VAC excitationvoltage to Campbell Scientific's Model 107Thermistor Probe, makes a fast, single endedvoltage measurement on the 15 mV rangeacross a resistor in series with the thermistorand calculates the temperature in oC with apolynomial. The maximum polynomial errorfrom -40 oC to +55 oC is given below:

Curve Fit Error --

Range (oC) Error (oC)-40 to +55 ±1.0-35 to +48 ±0.1

This instruction uses a single excitation channelsince several hundred probes can be driven bya single excitation output. For this reason,Instruction 11 does not require a"measurement/excitation" parameter.

A multiplier of 1 and an offset of 0 yieldstemperature in degrees C.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 2 Analog card number for first

measurement03: 2 Single-ended channel

number for firstmeasurement

04: 2 Excitation card number forfirst measurement

05: 2 Excitation channel numberfor first measurement

06: 4 Input location of firstmeasurement

07: FP Multiplier08: FP Offset

Input locations altered: 1 per repetition

*** 12 207 RELATIVE HUMIDITY PROBE ***

FUNCTIONThis instruction applies a 3 VAC excitationacross Campbell Scientific's Model 207Temperature and RH Probe, makes a fastsingle ended measurement across a seriesresistor on the 150 mV range, linearizes theresult with a 5th order polynomial and performsthe required temperature compensation beforeoutputting the result in % RH.

When measuring several probes, all the RHelements should be connected sequentially.Any temperature elements used forcompensating the respective RH value shouldalso be sequentially connected to make use ofthe REP feature in Instruction 11.

Page 94: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

9-6

The temperature value used incompensating the RH value (Parameter 7)must be obtained (see Instruction 11) priorto executing Instruction 12.

The RH results are placed sequentially into theinput locations beginning with the first RH value.In some situations the RH sensors might bedeployed such that only small temperaturevariations exist within a given set of probes. Inthese cases a single temperature may be usedto compensate the subset of RH measurementsinstead of making a temperature measurementfor each RH probe. If the complete set oftemperature values are not needed, thisapproach uses less input channels. Parameter6 is used to specify how many consecutive RHvalues get compensated per temperaturemeasurement.

In the 207 probe, the RH and temperatureelements use a common excitation line. Sincea single excitation channel can drive severalhundred probes, there is no"measurements/excitation" parameter inInstruction 12. NEVER EXCITE THE 207PROBE WITH DC EXCITATION as the RH chipwill be damaged.

The maximum RH polynomial error is givenbelow:

Curve Fit Error --

Range (%RH) Error (%RH)10 - 100 ±415 - 94 ±1

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 2 Analog card number for first

measurement03: 2 Single-ended channel for first

measurement04: 2 Excitation card number for

first measurement05: 2 Excitation channel number

for first measurement06: 2 Number of R.H.

measurements percompensating temperaturemeasurement

07: 4 Input location for firstcompensating temperaturemeasurement

08: 4 Input location for firstmeasurement

09: FP Multiplier10: FP Offset

Input locations altered: 1 per repetition

*** 13 THERMOCOUPLE ***TEMPERATURE, SINGLE ENDED

FUNCTIONThis Instruction uses the selected thermocouplecalibration to calculate the thermocouple outputvoltage at the reference temperature, then itmakes a SINGLE ENDED VOLTAGEMEASUREMENT (Section 13.2) on thethermocouple and adds the measured voltageto the calculated reference voltage, thenconverts the voltage to temperature in oC(Section 13.4).

Table 9-3 gives the thermocouple type codes.The reference temperature location will beincremented by one each repetition if C is keyedbefore entering Parameter 6. When this optionis exercised, two minus signs (--) will appear asthe right most characters of the display.

A multiplier of 1 and an offset of 0 yieldstemperature in degrees C.

TABLE 9-3. Thermocouple Type Codes

Code Thermocouple Type

1 T (copper - constantan)2 E (chromel - constantan)3 K (chromel - alumel)4 J (iron - constantan)5 B (platinum - rhodium)6 R (platinum - rhodium)7 S (platinum - rhodium)1X Output temperature difference between

Reference and Thermocouple2X Skip every other single ended channel8X TC input from A5B40 Isolation Amplifier

(use 5 V range)

Page 95: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

9-7

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 2 Range code (Table 9-1)03: 2 Analog card number04: 2 Single-ended channel number

for first measurement05: 2 TC type code (Table 9-3)06: 4 Reference temperature

location. (When indexed (--)this is incremented with eachrep.)

07: 4 Input location number08: FP Multiplier09: FP Offset

Input locations altered: 1 per repetition

*** 14 THERMOCOUPLE ***TEMPERATURE, DIFFERENTIAL

MEASUREMENT

FUNCTIONThis instruction calculates the thermocoupletemperature for the thermocouple type selected.The instruction specifies a DIFFERENTIALVOLTAGE MEASUREMENT (Section 13.2) onthe thermocouple, adds the measured voltageto the voltage calculated for the referencetemperature relative to 0 oC, and converts thecombined voltage to temperature in oC. Thedifferential inputs are briefly shorted to groundprior to making the voltage measurement toinsure that they are within the common moderange. (Section 13.4)

Table 9-3 gives the thermocouple type codesfor Parameter 5, the option of skipping everyother channel applies only to Instruction 13.The reference temperature location will beincremented by one each repetition if C is keyedbefore entering Parameter 6. When this optionis exercised, two minus signs (--) will appear asthe right most characters of the display.

A multiplier of 1 and an offset of 0 yieldstemperature in degrees C.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 2 Range code (Table 9-1)03: 2 Card number04: 2 Beginning channel05: 2 TC type code (Table 9-3)

06: 4 Reference temperaturelocation. (When indexed (--)this is incremented with eachrep.)

07: 4 Input location number08: FP Multiplier09: FP Offset

Input locations altered: 1 per repetition

*** 16 TEMPERATURE FROM ***PLATINUM R.T.D.

FUNCTIONThis instruction uses the result of a previousRTD bridge measurement to calculate thetemperature according to the DIN 43760specification adjusted (1980) to the pendingInternational Electrotechnical Commissionstandard. The range of linearization is -200 oCto 850 oC. The error in the linearization is lessthan 0.001 oC between -200 and +300 oC, andis 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 isthe RTD resistance and R0 the resistance ofthe RTD at 0 oC.

A multiplier of 1 and an offset of 0 yieldstemperature in degrees C.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 4 Input location number of

(R/Ro)03: 4 Input location number of

result04: FP Multiplier05: FP Offset

Input locations altered: 1 per repetition

*** 17 TEMPERATURE OF INPUT PANEL ***

FUNCTIONThis instruction measures the temperature inoC of the specified analog input card with RTD(Model 723-T).

PAR. DATANO. TYPE DESCRIPTION

01: 2 Analog card number02: 4 Input location number

Input locations altered: 1

Page 96: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

9-8

*** 18 MOVE TIME TO INPUT LOCATION ***

FUNCTIONThis instruction takes the current time in tenthsof seconds into the minute, minutes into theday, or hours into the year and does a modulodivide (see Instruction 46) on the time valuewith the number specified in the secondparameter. The result is stored in the specifiedinput location. Entering 0 or a number which isgreater than the maximum value of the time forthe modulo divide will result in the actual timevalue being stored.

PARAMETER 1 OPTION CODES

CODE TIME UNITS

0 Tenths of seconds into minute(maximum 600)

1 Minutes into current day (maximum1440)

2 Hours into current year (maximum8784)

PAR. DATANO. TYPE DESCRIPTION

01: 2 Option Code (see above)02: 4 Number to modulo divide by03: 4 Input location number

Input locations altered: 1

*** 19 MOVE SIGNATURE INTO ***INPUT LOCATION

FUNCTIONThis instruction stores the signature of the ReadOnly Memory (ROM) and user program memory(RAM) into an input location. This signature isnot the same as the signatures given in the *Bmode. Recording the signature allows detectionof any program change or ROM failure.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location number

Input locations altered: 1

*** 20 PORT SET ***

FUNCTIONThis instruction sets a specified Digital Controloutput port or is used to set the active excitationcard for port commands with Program ControlInstructions or manual toggling (Section 1.3.3).Ports may be set as specified by a flag orunconditionally.

PARAMETER 1 OPTION CODES

Code Function

00 Set port low01 Set port high1X Set port according to flag X2X Set opposite to flag X30 Set active port card

PAR. DATANO. TYPE DESCRIPTION

01: 2 Option code (see above)02: 2 Excitation card number03: 2 Port number (1-8)

Input locations altered: 0

*** 21 ANALOG OUTPUT ***

FUNCTIONThis instruction sets the continuous AnalogOutput (CAO) to a voltage level specified in aninput location. The analog output degradesapproximately 0.17mV every seven secondsrequiring the instruction to be periodicallyrepeated to maintain a given output accuracy.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Excitation card number02: 2 CAO channel number03: 4 Input location number

containing analog outputmagnitude in millivolts

Input locations altered: 0Input locations read: 1

Page 97: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

9-9

*** 22 EXCITATION WITH DELAY ***

FUNCTIONThis instruction is used in conjunction withothers for measuring a response to a timedexcitation using the switched analog outputs. Itsets the selected excitation output to a specificvalue, waits for a specified time, turns off theexcitation and waits an additional specified timebefore continuing execution of the followinginstruction. The excitation on time can be set tozero and the off time delay can be used if theonly requirement is the delay of Programexecution.

This instruction cannot be interrupted byProgram Table 1 in order to make ameasurement. This means that if it residesin Table 2 or Table 3 then Table 1 may bedelayed.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Excitation card number02: 2 Excitation channel number03: 4 Delay that excitation is on

(0.01 sec)04: 4 Delay time after excitation is

turned off (0.01 sec)05: FP Excitation voltage (millivolts)

Input locations altered: 0

*** 23 SELECT I/O MODULE ***

FUNCTIONThis instruction is used when more than one I/OModule is under control and is used to specifywhich I/O Module subsequent instructions referto. The I/O Module to which Instructions areaddressed defaults to #1 at the start of eachprogram table.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Module number (1,2,3 or 4)

Input locations altered: 0

*** 26 TIMER ***

FUNCTIONThis instruction will reset a timer or store theelapsed time registered by the timer in an InputStorage location. Instruction 26 can be usedwith Program Control Instructions to measurethe elapsed time between specific inputconditions. There is only one timer and it iscommon to all tables (e.g., if the timer is reset inTable 1 and later in Table 2, a subsequentinstruction in Table 1 to read the timer will storethe elapsed time since the timer was reset inTable 2).

Elapsed time is tracked in 0.1 secondincrements but displayed as an integer. Forexample, a 20 second elapsed time is displayedas "200".

The timer is also reset in response to certainkeyboard entries:

1. When tables are changed and compiledwith the *0 Mode, the timer is resetautomatically.

2. When tables are changed and thencompiled in the *B Mode, the timer isautomatically reset and Tables 1 and 2 aredisabled. Entering "*0" at this point enablesboth tables and resets the timer.

3. Entering "*6" after changing the tablescompiles the programs, but does NOT resetthe timer.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location number (enter0 to reset)

Input locations altered: 1 (0 if timer is beingreset)

*** 101 SDM-INT8 ***

The 8 channel Interval Timer (INT8) is ameasurement module which provides processedtiming information to the datalogger. Each ofthe 8 input channels may be independentlyconfigured to detect either rising or falling edgesof either high level or a low level signal. Eachchannel may be independently programmed.See the SDM-INT8 manual for detailed

Page 98: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

9-10

instructions and examples. This instruction isnot in all PROM options.

PARAM. DATANUMBER TYPE DESCRIPTION

01: 2 SDM address (base4:00..33)

02: 4 *Input configuration;channels 8,7,6,5

03: 4 *Input configuration;channels 4,3,2,1

04: 4 **Function; channels 8,7,6,505: 4 **Function; channels 4,3,2,106: 4 ***Output option07: 4 Starting input location

number08: FP Mult09: FP Offset

* Input configurations:0 = high level, rising edge1 = high level, falling edge2 = low level, rising edge3 = low level, falling edge

** Functions:0 = no value returned1 = period in ms2 = frequency in kHz3 = time since previous channel's edge

in ms4 = time since channel 1 in ms5 = counts on channel 2 since channel

1, linear interpolation6 = frequency in kHz (low resolution)7 = counts8 = counts on Channel 2 since Channel

1, no interpolation

*** Output option:0 Average over execution interval0-- Continuous averagingXXXX Averaging interval in msec,

XXXX>0XXXX-- Capture all events until

XXXX edges of channel 1(0<XXXX,9999)

9999-- Test memory

Input locations altered: 1 per function

*** 102 SDM-SW8A ***

The 8 channel SDM-SW8A Switch Closure InputModule is a peripheral for measuring up to 8channels of switch closure or voltage pulseinputs. Each channel may be configured to readsingle-pole double-throw (SPDT) switch closure,or single-pole single-throw (SPST) switchclosure, or voltage pulse. Output optionsinclude counts, duty cycle, and state. Thisinstruction is not in all PROM options.

The SW8A is addressed by the datalogger,allowing multiple SW8A's to be connected to onedatalogger. 16 addresses are available.

If more channels are requested than exist in onemodule, the datalogger automatically incrementsthe address and continues to the next SW8A.The address settings for multiple SW8A's mustsequentially increase. For example, assume 2SW8A's addressed as 22 and 23 are connected,and 12 Reps are requested. 8 channels fromthe first SW8A and the first 4 channels from thenext will be read.

Only one Function Option (Parameter 3) may bespecified per Instruction 102. If all 4 functions aredesired, the instruction must be entered 4 times.

Function Option 0 provides the state of thesignal at the time P102 is executed. A 1 or0 corresponds to high or low states,respectively.

Function Option 1 provides signal dutycycle. The result is the percentage of timethe signal is high during the sample interval.

Function Option 2 provides a count of thenumber of positive transitions of the signal.

Function Option 3 provides the signature ofthe SW8A PROM. A positive number(signature) indicates the PROM and RAMare good, a zero (0) indicates bad PROM,and a negative number indicates bad RAM.Function Option 3 is not used routinely, butis helpful in "debugging". Only one Rep isrequired for Option 3.

Parameter 4 specifies the first SW8A channel tobe read (1..8). One or more sequential channelsare read depending on the Reps. To optimizeprogram efficiency, the sensors should be wiredsequentially.

Page 99: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

9-11

Data are stored in sequential datalogger inputlocations, starting at the location specified inParameter 5. The number of input locationsconsumed is equal to the number of Reps.

The scaling multiplier and offset (Parameters 6and 7) are applied to all readings. If a multiplieris not entered, all readings are set to 0.

If the SW8A does not respond, -99999 will beloaded into input locations. Modules which donot respond when addressed by the dataloggermay be wired or addressed incorrectly. Verifythat the address specified in Parameter 2corresponds to the jumper setting and that allconnections are correct and secure. See theSDM-SW8A Manual for examples.

PARAM. DATANUMBER TYPE DESCRIPTION

01: 2 Repetitions (number ofchannels)

02: 2 SDM Address (base4:00..33)

03: 2 Function Option (0=State,1=Duty 2=Counts,3=Signature)

04: 2 SDM-SW8A StartingChannel (1..8)

05: 4 Starting input locationnumber

06: FP Mult07: FP Offset

Input locations altered: 1 per repetition

*** 103 SDM-AO4 ***

Instruction 103 is used to activate a SDM-AO4 4Channel Continuous Analog Output Moduleconnected to ports C1, C2, and C3. Thisinstruction is not in all PROM options.

There are 4 analog voltage outputs per SDM-AO4. The output voltages in millivolts must bestored in 4 adjacent input locations starting withthe location entered in parameter 4. Four repsare required for each SDM-A04. Every 4 repsanother device at the next higher address isselected.

PARAM. DATANUMBER TYPE DESCRIPTION

01 2 Repetitions (number ofoutputs)

02 2 SDM address (base4:00..33)

03 4 Starting input locationnumber

C1 is Data lineC2 is Clk/Hand Shake lineC3 is SDE (Enable) line

Input locations read: 1 per repetition

*** 104 SDM-CD16AC ***

The SDM-CD16AC Control Port ExpansionModule has 16 digital control ports with drivers.Each port can be controlled by a datalogger orcontrolled manually with an override toggleswitch. Each port can be thought of as a switchto ground; closed when active, open wheninactive. The primary function is to activate DCpowered external relays, solenoids, or resistiveloads under datalogger control. This instructionis not in all PROM options.

The SDM-CD16AC is a synchronouslyaddressed datalogger peripheral. Dataloggercontrol ports 1, 2 and 3 are used to address theSDM-CD16AC then clock out the desired stateof each of the 16 control ports. Up to 16 SDM-CD16AC 's may be addressed, making itpossible to control a maximum of 256 portsfrom the first three datalogger control ports.

For each Rep, the 16 ports of the addressedSDM-CD16AC are set according to 16 sequentialinput locations starting at the input locationspecified in parameter 3. Any non-zero valuestored in an input location activates (connects toground) the associated SDM-CD16AC port. Avalue of zero (0) deactivates the port (opencircuit). For example, assuming 2 Reps and astarting input location of 33, OUTPUT 1 through16 of the first SDM-CD16AC are set according toInput Locations 33 through 48, and OUTPUT 1through 16 of the second SDM-CD16AC are setaccording to Input Location 49 through 64. Seethe SDM-CD16AC manual for detailedinstructions and examples.

Page 100: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 9. INPUT/OUTPUT INSTRUCTIONS

9-12

PARAM. DATANUMBER TYPE DESCRIPTION

1 2 Reps (# of CD16ACmodules sequentiallyaddressed)

2 2 Starting SDM address(base 4: 00..33)

3 4 Starting input locationnumber

Input locations read: 16 per repetition

*** 113 SDM-SI04 ***

FUNCTIONInstruction 113 communicates with theSDM-SI04 serial input multiplexer. See theSDM-SI04 manual for directions.

*** 114 SET TIME ***

FUNCTIONInstruction 114 can be used to set the CR7clock from values in input locations.

PARAM. DATANUMBER TYPE DESCRIPTION

01: 2 Option code:0 set time with

hr,min,sec withvalues in 3 inputlocations.

1 set time withday,hr,min,secusing 4 inputlocations.

2 set time withyr,day,hr,min,secusing 5 inputlocations.

02: 4 Input location number

Input locations read: 3-5 depending on option

*** 115 SET SDM BAUD ***

FUNCTIONInstruction 115 may be used to set the SDMcommunication rate. This may be necessarywhen communicating over longer cable lengths.The default bit period is 10 microseconds(entering either 0 or 1 will result in this period).

PARAM. DATANUMBER TYPE DESCRIPTION

01: 4 Bit period, 10µs units

Normally this parameter represents the bitperiod. If the parameter is indexed (--), thevalue entered is an Input Location that containsthe bit period to use.

NOTE: The SDM-SI04 Instruction 113automatically adjusts the SDMcommunication rate to the fastest that willwork.

*** 118 SDM-OBD2 ***

FUNCTIONInstruction 118 is used to read sensor values infrom an On-Board Data Acquisition II device. TheOn-Board Data Acquisition II device is used tomeasure different functions of a vehicle’s engine.

PARAM DATANUMBER TYPE DESCRIPTION

01: 2 SDM Address (base4:00..33)

02: 2 # of PIDs (Number ofvalues to store)

03: 4 Starting Input Location

Instruction 118 must be followed byInstruction(s) 63 or 68. An E68 error will bedisplayed when Instruction 118 is not followedenough Instruction 63 or 68. If an “E68 104”appears, this means that the Instruction 118 isthe 3rd instruction in Table 1 and that notenough Instruction 63/68 are following it. Theinstructions are used to list the sensor numbersin the order one wants to store the information.For example, to store the first 5 readings and the12th reading in a specific order (4th, 3rd, 1st,5th, 12th, and 2nd), use the below Instruction 63:

P631: 42: 33: 14: 55: 126: 27: 08: 0

Input Locations Altered: 1 per # of PIDs

Page 101: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

10-1

SECTION 10. PROCESSING INSTRUCTIONS

To facilitate cross referencing, parameterdescriptions are keyed [] to the values given onthe PROMPT SHEET. These values aredefined as follows:

[Z] = User specified input location numberdestination

[X] = Input location no. of source X[Y] = Input location no. of source Y[F] = Fixed data (user specified, entered via the

keyboard)

*** 30 LOAD FIXED DATA, Z = F ***

FUNCTIONStore a fixed value into input location Z.

PAR. DATANO. TYPE DESCRIPTION

01: FP Fixed data [F]02: 4 Destination for input location [Z]

Input locations altered: 1

*** 31 MOVE INPUT DATA, Z = X ***

FUNCTIONMove data from one input location to another.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Destination for input location [Z]

Input locations altered: 1

*** 32 INCREMENT INPUT LOCATION, ***Z = Z+1

FUNCTIONAdd 1 to the current value in input location Z.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Destination for input location [Z]

Input locations altered: 1

*** 33 X + Y ***

FUNCTIONAdd the value in Input location X to the value inlocation Y and place the result in location Z.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Input location of Y [Y]03: 4 Dest. input location of X + Y [Z]

Input locations altered: 1

*** 34 X + F ***

FUNCTIONAdd the fixed number F to the value in locationX and place the result in location Z.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: FP Value to add [F]03: 4 Dest. input location of X + F [Z]

Input locations altered: 1

*** 35 X - Y ***

FUNCTIONSubtract the value in location Y from the valuein location X and place the result in location Z.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Input location of Y [Y]03: 4 Dest. input location for X - Y [Z]

Input locations altered: 1

Page 102: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 10. PROCESSING INSTRUCTIONS

10-2

*** 36 X * Y ***

FUNCTIONMultiply the value in location X by the value inlocation Y and place the result in location Z.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Input location of Y [Y]03: 4 Dest. input location for X * Y [Z]

Input locations altered: 1

*** 37 X * F ***

FUNCTIONMultiply the value in location X by the fixednumber F and place the result in location Z.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: FP Fixed multiplier [F]03: 4 Dest. input location for X * F [Z]

Input locations altered: 1

*** 38 X / Y ***

FUNCTIONDivide the value in location X by the value inlocation Y and place the result in location Z.Division by 0 will cause the result to be set tothe maximum CR7 number (+99999 if positive, -99999 negative).

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Input location of Y [Y]03: 4 Dest. input location for X / Y [Z]

Input locations altered: 1

*** 39 SQUARE ROOT ***

FUNCTIONTake the square root of the value in location Xand place the result in location Z. If the value inX is negative, 0 will be stored as the result.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Dest. input location for X1/2 [Z]

Input locations altered: 1

*** 40 LN(X) ***

FUNCTIONTake the natural logarithm of the value inlocation X and place the result in location Z. Ifthe value in X is 0 or negative, -99999 will bestored as the result.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Dest. input location for LN(X) [Z]

Input locations altered: 1

*** 41 EXP(X) ***

FUNCTIONRaise the exponential base e to the value inlocation X power and place the result in locationZ.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Dest. input location for EXP(X) [Z]

Input locations altered: 1

*** 42 1/X ***

FUNCTIONTake the inverse of the value in location X andplace the result in location Z. If X=0, 99999 willbe stored as the result.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Dest. input location for 1/X [Z]

Input locations altered: 1

Page 103: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 10. PROCESSING INSTRUCTIONS

10-3

*** 43 ABS(X) ***

FUNCTIONTake the absolute value of the value in locationX and place the result in location Z.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Dest. input location for ABS(X) [Z]

Input locations altered: 1

*** 44 FRACTIONAL VALUE ***

FUNCTIONTake the fractional value (i.e., the non-integerportion) of the value in location X and place theresult in location Z.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Dest. input location for FRAC(X)[Z]

Input locations altered: 1

*** 45 INTEGER VALUE ***

FUNCTIONTake the integer portion of the value in locationX and place the result in location Z.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Dest. input location for INT(X) [Z]

Input locations altered: 1

*** 46 X MOD F ***

FUNCTIONDo a modulo divide of the value in location X bythe fixed value F and place the result in locationZ. X MOD F is defined as the REMAINDERobtained when X is divided by F (e.g., 3 MOD 2= 1). X MOD 0 returns X.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: FP Fixed divisor [F]03: 4 Dest. input location for X MOD F [Z]

Input locations altered: 1

*** 47 XY ***

FUNCTIONRaise the value in location X to the value inlocation Y power and place the result in locationZ.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Input location of Y [Y]03: 4 Dest. input location for XY [Z]

Input locations altered: 1

*** 48 SIN(X) ****

FUNCTIONCalculate the sine of the value in location X(assumed to be in degrees) and place the resultin location Z. The cosine of a number can beobtained by adding 90 to the number and takingthe sine (COSX = SIN (X + 90)).

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Dest. input location for SIN(X) [Z]

Input locations altered: 1

*** 49 SPATIAL MAXIMUM ***

FUNCTIONFind the maximum value in the given set orSWATH of contiguous input locations and placethe result in location Z. To find the inputlocation where the maximum value occurs,enter 1000 + the input location number (1000 +Z) as Parameter 03. The input location of themaximum value observed will then be stored indestination [Z] plus 1.

Page 104: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 10. PROCESSING INSTRUCTIONS

10-4

Parameter 3 cannot be entered as an indexedlocation within a loop (Instruction 87). To useInstruction 49 within a loop, enter Parameter 3as a fixed location and follow 49 with Instruction31 (Move Data). In Instruction 31, enter thelocation in which 49 stores its result as thesource (fixed) and enter the destination as anindexed location.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Swath [SWATH]02: 4 Starting input location [1ST LOC]03: 4 Dest. input location for maximum

[MAX or Z]

Input locations altered: 1 or 2

*** 50 SPATIAL MINIMUM ***

FUNCTIONFind the minimum value in the given set orSWATH of contiguous input locations and placethe result in location Z. To find the inputlocation where the minimum value occurs,follow the instructions given above for SPATIALMAXIMUM.

Parameter 3 cannot be entered as an indexedlocation in a loop. Within a loop, Instruction 50must be used in conjunction with Instruction 31as described for Instruction 49.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Swath [SWATH]02: 4 Starting input location [1ST LOC]03: 4 Dest. input location for minimum

[MIN or Z]

Input locations altered: 1 or 2

*** 51 SPATIAL AVERAGE ***

FUNCTIONCalculate the average of the values in the givenset or SWATH of contiguous input locations andplace the result in location Z.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Swath [SWATH]02: 4 Starting input location [1ST LOC]03: 4 Dest. input location for average

[AVG or Z]

Input locations altered: 1

*** 53 SCALING ARRAY WITH ***MULTIPLIER AND OFFSET

FUNCTIONTake 4 input location values, multiply each by afloating point constant, then add another floatingpoint constant to the resulting products andplace the results back into each of the original 4input locations.

PAR. DATANO. TYPE DESCRIPTION

01: 4 First input location [STRT LOC]02: FP Multiplier 1 [A1]03: FP Offset 1 [B1]04: FP Multiplier 2 [A2]05: FP Offset 2 [B2]06: FP Multiplier 3 [A3]07: FP Offset 3 [B3]08: FP Multiplier 4 [A4]09: FP Offset 4 [B4]

Input locations altered: 4

*** 54 BLOCK MOVE ***

FUNCTIONMoves a block of data from one set of inputlocations to another. Parameters specify thenumber of values to move, the source, sourcestep, destination, and destination step. The"step" parameters designate the increment ofthe source and destination Input locations foreach value that is moved. For example, a"source step" of 2 and a "destination step" of 1will move data from every other Input location toa contiguous block of Input locations.

Page 105: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 10. PROCESSING INSTRUCTIONS

10-5

PAR. DATANO. TYPE DESCRIPTION

01: 4 Number of values to move02: 4 1st source location03: 2 Step of source04: 4 1st destination location05: 2 Step of destination

Input locations altered: number of values tomove

*** 55 5TH ORDER POLYNOMIAL ***

FUNCTIONEvaluate a 5th order polynomial of the form.

F(X)=C0+C1X+C2X2+C3X3+C4X4+C5X5

where C0 through C5 are the coefficients for theargument X raised to the zero through fifthpower, respectively. The magnitude of the userentered coefficient is limited to a range of+99999 to -99999. Polynomials withcoefficients outside this range can be modifiedby pre-scaling the X value by an appropriatefactor to place the coefficients within the entryrange. Pre-scaling can also be used to modifycoefficients which are very close to 0 in order toincrease the number of significant digits.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions [REPS]02: 4 Starting input location for X [X]03: 4 Dest. input location for F(X)

[F(X) or Z]04: FP C0 coefficient [C0]05: FP C1 coefficient [C1]06: FP C2 coefficient [C2]07: FP C3 coefficient [C3]08: FP C4 coefficient [C4]09: FP C5 coefficient [C5]

Input locations altered: 1 per repetition

*** 56 SATURATION VAPOR PRESSURE ***

FUNCTIONCalculate saturation vapor pressure over water(SVPW) in kilopascals from the air temperature(oC) and place it in an input location. Thealgorithm for obtaining SVPW from airtemperature (oC) is taken from: Lowe, Paul R.,

1976: An Approximating Polynomial forComputation of Saturation Vapor Pressure.J. Appl. Meteor. 16, 100-103.

Saturation vapor pressure over ice (SVPI) inkilopascals for a 0 oC to -50 oC range can beobtained using Instruction 55 and therelationship

SVPI = -.00486 + .85471 X + .2441 X2

where X is the SVPW derived by Instruction 56.This relationship was derived by CampbellScientific from the equations for the SVPW andthe SVPI given in Lowe's paper.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of air temperature oC[TEMP.]

02: 4 Dest. input location for saturatedvapor pressure [VP or Z]

Input locations altered: 1

*** 57 VAPOR PRESSURE FROM ***WET-/DRY-BULB TEMPERATURES

FUNCTIONThis instruction calculates vapor pressure inkilopascals from wet- and dry-bulbtemperatures in oC. The algorithm is of thetype used by the National Weather Service:

VP = VPW - A(1 + B*TW)(TA - TW) PVP = ambient vapor pressure in

kilopascalsVPW = saturation vapor pressure at the wet-

bulb temperature in kilopascalsTW = wet-bulb temperature, deg. CTA = ambient air temperature, deg. C

P = air pressure in kilopascalsA = 0.000660B = 0.00115

Although the algorithm requires an air pressureentry, the daily fluctuations are small enoughthat for most applications a fixed entry of thestandard pressure at the site elevation willsuffice. If a pressure sensor is employed, thecurrent pressure can be used.

Page 106: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 10. PROCESSING INSTRUCTIONS

10-6

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location no. of atmosphericpressure in kilopascals

[PRESSURE]02: 4 Input location no. of dry-bulb

temp. [DB TEMP.]03: 4 Input location no. of wet-bulb

temp. [WB TEMP.]04: 4 Dest. input location for vapor

pressure [VP or Z]

Input locations altered: 1

*** 58 LOW PASS FILTER ***

FUNCTIONApply a numerical approximation to an analogresistor capacitor (RC) low pass (LP) filter usingthe following algorithm:

F(Xi) = W*Xi + F(Xi-1) * (1-W)

Where, X = input sample,W = user entered weighting function,

O< W <1If W=O, F(Xi)=O; if W=1, F(Xi)=X,

F(Xi-1) = output calculated for previous sample.

The equivalent RC time constant is given byT/W, where T is the sampling time in seconds.For values of W less than 0.25, the analogous"cut off" frequency (the frequency where theratio of output to input is .707) is accuratelyrepresented by W/(2ΠT). For larger values ofW, this "analog" estimate of the cutoff frequencybecomes less representative.

On the first execution after compiling, F(x) is setequal to X.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions [REPS]02: 4 First input location for input data

[X]03: 4 Dest. input location for filtered

data [F(X) or Z]04: FP Weighting function, W [W]

Input locations altered: 1 per repetition

*** 59 BRIDGE TRANSFORM ***

FUNCTIONThis instruction is used to aid in the conversionof a ratiometric Bridge measurement byobtaining the value for Rs which is equivalent toRf[X/(1-X)], where X is the value derived by thestandard CR7 Bridge Measurement Programs(with appropriate multiplier and offset, Section13.5) and Rf represents the MULTIPLIER value.The result of Instruction 59 is stored in thesame location that X was.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions [REPS]02: 4 Starting input location and

destination [X]03: FP Multiplier (Rf) [MULT.]

Input locations altered: 1 per repetition

*** 61 INDIRECT INDEXED MOVE ***

FUNCTIONMoves input data from location X to location Y,where X and Y are indirectly addressed. Thevalues of the location numbers X and Y arestored in the locations specified by Parameters1 and 2. The CR7 looks in the locationsspecified in the parameters to find the locationsto use as the source and destination of the data.When used within a LOOP, a locationparameter can be specified as "indexed"(xxxx-), then the actual Input locationreferenced is calculated by adding the currentindex counter to the value in the specified Inputlocation.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location containing sourcelocation X

02: 4 Input location containing destinationlocation Y

*** 62 COVARIANCE/CORRELATION ***

FUNCTIONThe special Covariance/Correlation Instruction(CV/CR) for the CR7 calculates: 1) means (M),2) variances (V), 3) standard deviations (SD), 4)covariances (CV), and 5) correlations (CR) for aset of input values and stores the results in

Page 107: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 10. PROCESSING INSTRUCTIONS

10-7

Input Storage. The instruction requires the setof input values to be located contiguously inInput Storage. The user specifies the locationof the first value and how many total valuesexist. The number of input values processed byeach type of calculation (means, variances,etc.) is independently specified for each type.The order of the input values determines whichinputs are processed for each type ofcalculation.

The instruction does not conform to the CR7'sfour instruction types. Data located in InputStorage is processed, and the results returnedto Input Storage whenever an averaging periodis completed (Parameter 7) or the Output Flagis set. The instruction controlling the OutputFlag must precede the CV/CR Instruction. Thereason the calculated results are returned toInput Storage is to allow the user access foradditional processing before storing the valuesin Final Storage. Sample Instruction 70 mustbe used to transfer final results from Input toFinal Storage.

To accommodate cases where it is desirable tocalculate the statistical quantities over timeperiods shorter than the Output Interval, anaveraging period shorter than the OutputInterval may be specified. The final valuesobtained at the Output Interval are the properlyweighted average of the values calculated atthe subinterval averaging periods. This featureallows the recording of statistical data overlonger time periods by removing the effect oflonger period frequencies in the input signals;i.e., it provides a high pass filter. For example,assume the variance of an input is desired. It isdetermined that the averaging period should not

exceed five minutes due to variation in themean over longer time intervals. One approachis to calculate and record the variance everyfive minutes. By specifying the subintervalaveraging period as five minutes and the OutputInterval as one hour, however, the average ofthe five minute variances are recorded everyhour. The averaging period is entered as thenumber of input samples in Parameter 7 of theCV/CR Instruction. The number of samples fora given period is given by:

Number of Samples =Averaging period in seconds

Table execution interval in seconds

PAR. DATANO. TYPE DESCRIPTION

01: 2 Number of input values locatedsequentially in input memory

02: 2 Number of means desired03: 2 Number of variances desired04: 2 Number of standard deviations

desired05: 2 Number of covariances desired06: 2 Number of correlations desired07: FP Number of input samples in

averaging period08: 4 Input storage location of first

value in sequential input string09: 4 First Input Storage location to

store string of final results

If the specified number of samples in theaveraging period (Parameter 7) exceeds theactual number of samples occurring in theOutput Interval, the Output Interval becomes theaveraging period.

Page 108: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 10. PROCESSING INSTRUCTIONS

10-8

TABLE 10-1. Maximum Number of Outputs and Output Order for K Input Values.(The output order flows from left to right and from top to bottom)

INPUTS: X1 X2 X3 X4 ..... XK

MAX NO. OUTPUTSTYPE OUTPUTS (1st) (2nd) (3rd) (4th) (Kth)

Means K M(X1) M(X2) M(X3) M(X4) ..... M(XK)

Variances K V(X1) V(X2) V(X3) V(X4) ..... V(XK)

Std. Deviation K SD(X1) SD(X2) SD(X3) SD(X4) ..... SD(XK)

Covariance K/2(K-1) CV(S1,X2) CV(X1,X3) CV(X1,X4) ..... CV(X1,XK)CV(X2,X3) CV(X2,X4) ..... CV(X2,XK)

CV(X3,X4) ..... CV(X3,XK)... ... .. .

CV(XK-1,XK)

Correlation K/2(K-1) CR(X1,X2) CR(X1,X3) CR(X1,X4) ..... CR(X1,XK)CR(X2,X3) CR(X2,X4) ..... CR(X2,XK)

CR(X3,X4) ..... CR(X3,XK)... ... .. .

CR(XK-1,XK)

SYMBOL DEFINITION

M(XK) Mean of Kth valueV(XK) Variance of Kth valueSD(XK) Standard deviation of Kth valueCV(XK,X1) Covariance of Kth and Ith valueCR(XK,X1) Correlation of Kth and Ith value

MAXIMUM NUMBER OF POSSIBLEOUTPUTS

No limitation exists on the number of inputs thatcan be processed by the CV/CR Instruction, butthe processing time and Intermediate Storagerequirements increase rapidly. The instructionrequires that the input values reside sequentiallyin Input Storage. Since the number of outputsis specified for each type of statisticalcalculation, the instruction starts with the firstvalue, working sequentially through the inputvalues. For this reason, the order of the inputvalues determines which values are processed.

Table 10-1 shows the maximum number ofoutputs which can be generated and the outputorder for K input values located sequentially inInput Storage. The output order shown in Table10-1 flows from left to right and top to bottom.

INSTRUCTION PROCESSINGThe CV/CR Instruction contains three separateprocessing phases:

1. Input Processing2. Averaging Period Processing3. Output Processing

Page 109: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 10. PROCESSING INSTRUCTIONS

10-9

The Input Processing phase is where new inputvalues are received, the necessary squares orcross products formed, and the appropriatesummations calculated as required by thedesired final output. The rate at which themeasurements can be made, the input valuesordered, and the input processing phasecompleted without interruption determines themaximum rate of execution (see ExecutionTime).

The Averaging Period Processing occurswhenever the number of input samples enteredin Parameter 7 is satisfied or whenever anOutput Interval occurs (i.e., whenever theOutput Flag is set). Results from thesecalculations are stored sequentially in InputStorage locations starting with the locationspecified in Parameter 9. The calculationsperformed are shown below, where N is thenumber of input samples in the averagingperiod:

1. Means:M(X) = ΣX/N

2. Variances:V(X) = ΣX2/N - (ΣX/N)2

3. Standard Deviations:SD(X) = V(X)1/2

4. Covariances:CV(X,Y) = ΣXY/N - ΣX ΣY/N2

5. Correlations:CR(X) = CV(X,Y)/(SD(X)SD(Y))

NOTES: 1. The square root algorithm inthe CR7 returns a result of 0 for negativearguments.

2. The divide algorithm returns the largestfloating point number possible (±1018displayed as ±99999) for a divide by 0.

3. When computing the variance of aconstant signal, round off error produces asmall negative result. The CR7 returns a 0for the square root of a negative number;therefore, the standard deviation is set to 0.If the signal is also used in a correlationcalculation, division by 0 returns anoverrange value for the correlation result.

If a fast execution interval is specified, it ispossible that the combined execution times ofthe input and averaging period processing mayexceed the program table execution interval.The occurrence of an execution intervalOverrun (see Section 2.1 of CR7 Operator'sManual) is noted by decimal points on eitherside of the G in LOG (*0 MODE). This results inthe omission of one input sample. Thecalculations are not affected, however, since thenumber of input samples is incremented onlywhen valid input processing occurs. Averagingperiod processing occurs only when the numberof input samples specified in Parameter 7 isaccumulated.

Regardless of whether all of the input samplesfor the averaging period (specified in Parameter7) have occurred or not, averaging periodprocessing occurs whenever the Output Flag isset. This accommodates situations where theOutput Interval may not be an integer multiple ofthe averaging period. If for example a 30minute Output Interval is set by Instruction 92and an 8 minute averaging period is specifiedby Parameter 7, then three 8 minute and one 6minute calculations will occur. The properweighting of these values in producing the finaloutput is described below.

The Output Processing occurs only at theOutput Interval and involves averaging thestatistical results obtained at the averagingperiods. These final results are then storedsequentially in Input Storage beginning with thelocation specified in Parameter 9. The SampleInstruction 70 must be used to transfer the datato Final Storage. All but the last averagingperiod in the Output Interval will contain thesame number of input scans as specified byParameter 7. To insure that results from theaveraging periods contribute to the final resultproportional to their averaging periods, theoutput processing uses the following equation:

RF = (NR1 + NR2 + .... + N'RL)/NT

RF is the final resultR1 R2, etc., are the results from the averaging

period processingRL is the result from the last averaging period

in the Output IntervalN is the number of input samples in the

specified averaging period (Parameter 7)N' is the number of input scans in the last

averaging period

Page 110: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 10. PROCESSING INSTRUCTIONS

10-10

NT is the total number of input samplesprocessed in the Output Interval

INTERMEDIATE STORAGE REQUIREMENTS

The number of Intermediate locations willdepend upon the number of input values andoutputs desired:

1. Define K as the number of input values.2. Define S as the maximum of either the

variances, standard deviations, or C, whereC = K if K < the number of correlationsrequested, orC = number of correlations + 1 if K > thenumber of correlations requested.

3. Define Q as the maximum of either thecovariances or correlations desired.

4. Define P as the total number of outputsdesired.

The amount of intermediate memory locations(IML) required, is then given by:

IML = K + S + Q + P + 2

EXECUTION TIMEIf K, S, and Q are defined as in the previoussection, the execution time of the CV/CRInstruction in milliseconds can be approximatedby:

T(ms) = 1.1K + 0.5S + 0.9Q + 1.8

When evaluating how frequently input samplescan be processed by the CV/CR Instruction(i.e., determining the minimum program tableexecution interval), the time required to makethe measurements and order the input valuesmust be added to the CV/CR execution time.Two alternatives exist for the measurementportion of the programming. The fastestmethod is to group as many sensors aspossible into the fewest measurementinstructions, ignoring the Input location orderrequired by the CV/CR Instruction. After themeasurements are made, use "move"instructions (i.e., 31 and 54) to obtain the properinput order. The slower alternative is to orderseparate measurement instructions directly asrequired by the CV/CR Instruction. Whileavoiding "move" instructions, this approachuses more measurement instructions. Thereason the first method is in general faster is

that less overhead time is required in goingfrom one measurement to another within asingle instruction (using the "repetitions"feature) than in going from one measurementinstruction to another.

In many situations, the CR7 must performmeasurement and processing tasks in additionto those associated with the CV/CR Instruction.Uninterrupted operation of the CV/CRInstruction is assured by entering it in ProgramTable 1 (highest priority) and placing theadditional tasks in Program Table 2.

A covariance correlation example is given inSection 8.

*** 66 ARCTAN ***

FUNCTIONCalculate the angle in degrees whose tangent isX/Y. The polarity of X and Y must be known todetermine the quadrant of the angle, as shownhere. If 0 is entered for Parameter 2, theArctangent of X is the result (limits of thefunction are -90o < ARCTAN < 90o).

Quadrant Sign of X Sign of Y

I + +II + -III -IV +

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location of X [X]02: 4 Input location of Y [Y]03: 4 Destination input location for

ARCTAN(X/Y)

Input locations altered: 1

*** 68 EXTENDED PARAMETERS 4 DIGIT ***

FUNCTIONThis instruction is used to give other instructionsadditional parameters. Each of the eightparameters in Instruction 68 is defined by theinstruction it follows. Refer to the specificinstruction that uses extended parameters.

Input location altered: 0

Page 111: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

11-1

SECTION 11. OUTPUT PROCESSING INSTRUCTIONS

*** 69 WIND VECTOR ***

FUNCTIONInstruction 69 processes the primary variablesof wind speed and direction from either polar(wind speed and direction) or orthogonal (fixedEast and North propellers) sensors. It uses theraw data to generate the mean wind speed, themean wind vector magnitude, and the meanwind vector direction over an output interval.Two different calculations of wind vectordirection (and standard deviation of wind vectordirection) are available, one of which isweighted for wind speed.

When used with polar sensors, the instructiondoes a modulo divide by 360 on wind direction,which allows the wind direction (in degrees) tobe 0 to 360, 0 to 540, less than 0, or greaterthan 540. The ability to handle a negativereading is useful in an example where a difficultto reach wind vane is improperly oriented andoutputs 0 degrees at a true reading of 340degrees. The simplest solution is to enter anoffset of -20 in the instruction measuring thewind vane, which results in the correct outputfollowing processing.

When a wind speed sample is 0, the instructionuses 0 to process scalar or resultant vectorwind speed and standard deviation, but thesample is not used in the computation of winddirection. The user may not want a sample lessthan the sensor threshold used in the standarddeviation. If this is the case instruction 89 canbe used to check wind speed, and if less thanthe threshold, Instruction 30 can set the inputlocation equal to 0.

Standard deviation can be processed one oftwo ways: 1) using every sample taken duringthe output period (enter 0 for parameter 2), or 2)by averaging standard deviations processedfrom shorter sub-intervals of the output period(enter the number of scans in the sub-intervalfor parameter 2). Averaging sub-intervalstandard deviations minimizes the effects ofmeander under light wind conditions, and it

provides more complete information for periodsof transition1.

Standard deviation of horizontal windfluctuations from sub-intervals is calculated asfollows:

σ(θ)=[((σθ1)2+(σθ2)2 ...+( σθM)2)/M]1/2

where σ(θ) is the standard deviation over theoutput interval, and σθ1 ... σθM are sub-intervalstandard deviations.

PARAM. DATANUMBER TYPE DESCRIPTION

01: 2 Repetitions02: 4 Samples per sub-interval

(number of scans)03: 2 Sensor/Output 2 digits:

ABA Sensor type:

0 = Speed andDirection1 = East and North

B Output option:0 S, θ1, σ(θ1)1 S, θ12 S, U, θu, σ(θu)

04: 4 First wind speed inputlocation number(East wind speed)

05: 4 First wind direction inputlocation number(North wind speed)

Outputs Generated: 2-4 (depending on outputoption) per repetition

A sub-interval is specified as a number ofscans. The number of scans for a sub-intervalis given by:

Desired sub-interval (secs) / scan rate (secs)

In an example where the scan rate is onesecond and the Output Flag is set every 60

1EPA On-site Meteorological Program Guidancefor Regulatory Modeling Applications.

Page 112: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 11. OUTPUT PROCESSING INSTRUCTIONS

11-2

minutes, the standard deviation is calculatedfrom all 3600 scans when the sub-interval is 0.With a sub-interval of 900 scans (15 minutes),the standard deviation is the average of the foursub-interval standard deviations. The last sub-interval is weighted if it does not contain thespecified number of scans.

There are three Output Options, which specifythe values calculated.

Option 0:

Mean horizontal wind speed, S.Unit vector mean wind direction, θ1.Standard deviation of wind direction, σ(θ1).

Standard deviation is calculated using theYamartino algorithm. This option complieswith EPA guidelines for use with straight-line Gaussian dispersion models to modelplume transport.

Option 1:

Mean horizontal wind speed, S.Unit vector mean wind direction, θ1.

Option 2:

Mean horizontal wind speed, S.Resultant mean wind speed, U.Resultant mean wind direction, θu.Standard deviation of wind direction, σ(θu).

This standard deviation is calculated usingCampbell Scientific's wind speed weightedalgorithm.

Use of the resultant mean horizontal winddirection is not recommended for straight-line Gaussian dispersion models, but maybe used to model transport direction in avariable-trajectory model.

Measured raw data:

Si = horizontal wind speedθi = horizontal wind directionUei = east-west component of windUni = north-south component of windN = number of samples

Calculations:

Scalar mean horizontal wind speed, S:

S=(ΣSi)/N

where in the case of orthogonal sensors:

Si=(Uei2+Uni2)1/2

Unit vector mean wind direction, θ1:

θ1=Arctan (Ux/Uy)

where

Ux=(Σsin θi)/N

Uy=(Σcos θi)/N

or, in the case of orthogonal sensors

Ux=(Σ(Uei/Ui))/N

Uy=(Σ(Uni/Ui))/N

where Ui=(Uei2+Uni2)1/2

Standard deviation of wind direction, σ(θ1),using Yamartino algorithm:

σ(θ1)=arc sin(ε)[1+0.1547 ε3]

where,

ε=[1-((Ux)2+(Uy)2)]1/2

and Ux and Uy are as defined above.

Resultant mean horizontal wind speed, U:

U=(Ue2+Un2)1/2

where for polar sensors:

Ue=(ΣSi Sin θi)/N

Un=(ΣSi Cos θi)/N

or, in the case of orthogonal sensors:

Ue=(ΣUei)/N

Un=(ΣUni)/N

Resultant mean wind direction, θu:

θu=Arctan (Ue/Un)

Standard deviation of wind direction, σ(θu),using Campbell Scientific algorithm:

σ(θu)=81(1-U/S)1/2

Page 113: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 11. OUTPUT PROCESSING INSTRUCTIONS

11-3

*** 70 SAMPLE ***

FUNCTIONThis instruction stores the value from eachspecified input location.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 4 Starting input location number

Outputs generated: 1 per repetition

*** 71 AVERAGE ***

FUNCTIONThis instruction stores the average value overthe given output interval for each input locationspecified.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 4 Starting input location number

Outputs generated: 1 per repetition

*** 72 TOTALIZE ***

FUNCTIONThis instruction stores the totalized value overthe given output interval for each input locationspecified.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 4 Starting input location number

Outputs generated: 1 per repetition

*** 73 MAXIMUM ***

FUNCTIONThis instruction stores the MAXIMUM valuetaken (for each input location specified) over agiven output interval. An internal FLAG is setwhenever a new maximum value is seen. ThisFLAG may be tested by Instruction 79. Time ofmaximum value(s) is OPTIONAL outputinformation, which is selected by entering theappropriate code for Parameter 2.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 2 Time of maximum (optional)03: 4 Starting input location number

Outputs generated: 1 per repetition (plus 1 or 2with time of max. option)

CODE OPTIONS

00 Output the maximum (or minimum)value ONLY

01 Output the max. (or min.) value withSECONDS information

10 Output the max. (or min.) value withHOUR-MINUTE information

11 Output the max. (or min.) value withHR-MIN,SEC information

*** 74 MINIMUM ***

FUNCTIONOperating in the same manner as Instruction73, this instruction is used for storing theMINIMUM value sensed (for each input locationspecified) over a given output interval.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 2 Time of minimum (optional)03: 4 Starting input location number

Outputs generated: 1 per repetition (plus 1 or 2with time of min. option)

*** 75 STANDARD AND WEIGHTED ***VALUE HISTOGRAM

FUNCTIONProcesses input data as either a standardhistogram (frequency distribution) or a weightedvalue histogram.

The standard histogram outputs the fraction oftime that the value in a specified input location(defined as the bin select value) is within aparticular subrange of the total specified range.The count in the bin associated with eachsubrange is incremented whenever the valuefalls within that subrange. The value which isoutput to Final Storage for each bin is computedby dividing the accumulated total in each bin by

Page 114: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 11. OUTPUT PROCESSING INSTRUCTIONS

11-4

the total number of scans. This form of outputis also referred to as a frequency distribution.

The weighted value histogram uses data fromtwo input locations. One location contains thebin select value; the other contains the weightedvalue. Each time the instruction is executed,the weighted value is added to a bin. The sub-range that the bin select value is in determinesthe bin to which the weighted value is added.When the Output Flag is set, the valueaccumulated in each bin is divided by theTOTAL number of input scans to obtain thevalues that are output to Final Storage. Thesevalues are the contributions of the sub-rangesto the overall weighted value. To obtain theaverage of the weighted values that occurredwhile the bin select value was within a particularsub-range, the value output to Final Storagemust be divided by the fraction of time that thebin select value was within that particular sub-range (i.e., a standard histogram of the binselect value must also be output).

For either histogram, the user must specify: 1)the number of repetitions, 2) the number ofbins, 3) a form code specifying whether aclosed or open form histogram is desired (seebelow), 4) the bin select value input location, 5)the weighted value input location (see below),6) the lower range limit, and 7) the upper rangelimit.

The standard histogram (frequency distribution)is specified by entering "0" in the weighted valueinput location parameter. Otherwise, thisparameter specifies the input location of theweighted value. With more than one repetitionthe bin select value location will be incrementedeach repetition and the weighted value locationwill remain the same (same weighted valuesorted on the basis of different bin selectvalues). The weighted value location will beincremented if it is entered as an indexedlocation (key "C" at some point while keying inParameter 5; two dashes, --, will appear on theright of the display).

At the user's option, the histogram may beeither closed or open. The open form includesall values below the lower range limit in the firstbin and all values above the upper range limit inthe last bin. The closed form excludes anyvalues falling outside of the histogram range.

The difference between the closed and openform is shown in the following example fortemperature values:

Lower range limit 10 oCUpper range limit 30 oCNumber of bins 10

Closed Form Open Form

Range of first bin 10 to 11.99o <12oRange of last bin 28 to 29.99o >28o

A common use of a closed form weighted valuehistogram is the wind speed rose. Wind speedvalues (the weighted value input) areaccumulated into corresponding directionsectors (bin select input).

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 4 Number of bins03: 2 Form code (0=open form,

1=closed form)04: 4 Bin select value input location no.05: 4 Weighted value input location no.

(0 = frequency distribution option)06: FP Lower limit of range07: FP Upper limit of range

Outputs generated: number of bins * repetitions

*** 77 RECORD REAL TIME ***

FUNCTIONThis instruction stores the current time in FinalStorage. At midnight the clock rolls over from23:59 to 00:00. The day also changes.

If hourly or daily summary data is output, it maybe desirable to have the previous day specifiedwith the output, since that is when themeasurements were made. Entering a 2 for theday code causes the previous day to be outputif it is the first minute of the day. Similarly,entering 2 for the hour-minute code causes2400 instead of 0000 to be output (the nextminute is still 0001). When day and hour-minute are both output, a 2 for either coderesults in the previous day at 2400.

Page 115: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 11. OUTPUT PROCESSING INSTRUCTIONS

11-5

The year is output as 19xx if xx is greater than85, otherwise it will be output as 20xx. TheCR7 will require a PROM update in the year2085. If year is output along with a 2 option inday or hour-minute, the previous year will beoutput during the first minute of the new year.

CODE RESULTS

xxx1 SECONDS (with a resolution of 0.1 sec.)xx1x HOUR-MINUTExx2x HOUR-MINUTE, 2400 instead of 0000x1xx DAY OF YEARx2xx DAY OF YEAR, previous day during

first minute of new day1xxx YEAR

Any combination of Year, Day, HR-MIN, andseconds is possible (e.g., 1011: YEAR, HR-MIN, SEC).

PAR. DATANO. TYPE DESCRIPTION

01: 4 Enter appropriate TIMEoption code

Outputs generated: 1 for each time parameterselected

*** 78 SET HIGH OR LOW RESOLUTION ***FINAL STORAGE FORMAT

FUNCTIONThis instruction sets the Final Storage Format tohigh resolution (5 character) or low resolution(4 character, Section 2.2). Instruction 78 shouldbe entered ahead of the output instructions forwhich the specified resolution is desired. Thedefault format is low resolution. At thebeginning of each program table execution, thelow resolution format is automatically enabled.

PAR. DATANO. TYPE DESCRIPTION01: 2 0 = low resolution;

1 = high resolution

Outputs generated: 0

*** 79 SAMPLE ON MAXIMUM ***OR MINIMUM

FUNCTIONInstruction 79 samples specified input locationvalues at the time a new maximum or minimumvalue is detected by a previous Maximize (73)or Minimize (74) Instruction. When the OutputFlag is set, the values are transferred to FinalStorage.

Instruction 79 must directly follow the maximumor minimum Instruction to which it refers. If theprevious Instruction 73 or 74 has more than 1repetition, Instruction 79 will sample whenever anew maximum or minimum is detected in any ofthe locations. If sampling is to occur only whena specific input location shows a new maximumor minimum, the previous Maximize or MinimizeInstruction should have 1 repetition referring tothat input location.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions (number ofsequential locations to sample)

02: 4 Starting input location number

Outputs generated: 1 per repetition

*** 80 SET ACTIVE OUTPUT AREA ***

Instruction 80 is used to direct Output data toFinal Storage or to Input Storage. At thebeginning of each table the Active Output areais set to Final Storage. When directed to FinalStorage, the second parameter can be used toset the output array ID. If 80 is used to directoutput to Final Storage, and Parameter 2 is 0,the array ID is determined by the instructionlocation number of Instruction 80 or by theInstruction that set the Output Flag, whichevercame last. When data is sent to Input Storage,no array ID is sent.

Page 116: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 11. OUTPUT PROCESSING INSTRUCTIONS

11-6

PAR. DATANO. TYPE DESCRIPTION

01: 2 Storage area option01 = Final Storage (00 and

02 also default toFinal Storage)

03 = Input Storage Area02: 4 Starting input location

destination if option 03Output Array ID if options 0-2

(1-511 are valid IDs)

*** 82 STANDARD DEVIATION IN TIME ***

FUNCTIONCalculate the standard deviation (STD DEV) ofa given input location. The standard deviationis calculated using the formula:

S = ((ΣXi2 - (ΣXi)2/N)/N)1/2

where Xi is the ith measurement and N is thenumber of samples.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Repetitions02: 4 Starting input location number

Outputs generated: 1 per repetition

Page 117: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

12-1

SECTION 12. PROGRAM CONTROL INSTRUCTIONS

TABLE 12-1. Flag Description

Flag 0 Output FlagFlag 1 to 8 User FlagsFlag 9 Intermediate Processing Disable

Flag

TABLE 12-2. Port Command Codes

0 - Go to end of program table1-9, 79-99 - Call Subroutine 1-9, 79-99

10-19 - Set Flag 0-9 high20-29 - Set Flag 0-9 low

30 - Then Do31 - Exit loop if true32 - Exit loop if false

41-48* - Set port 1 - 8 high51-58* - Set port 1 - 8 low61-68* - Toggle port 1 - 871-78* - Pulse port 1 - 8 100 ms

* The port commands operate on excitation card1 or on the excitation card set active byInstruction 20.

*** 83 IF CASE X < F ***

FUNCTIONInstruction 83 tests the value in an input locationspecified in the Begin Case Instruction 93. Aseries of Instructions 83 are used to comparethe value in the input location to ever increasingfixed values. If the value in the location is lessthan the fixed value entered as Parameter 1,then the command in Parameter 2 is executedand when the next Instruction 83 is encounteredexecution branches to the end of the casestatement. If the fixed value is less, the nextInstruction 83 is executed. See Instruction 93for an example.

PAR. DATANO. TYPE DESCRIPTION

01: FP Fixed value02: 2 Command (Table 12-2)

*** 85 LABEL SUBROUTINE ***

FUNCTIONThis instruction marks the start of a subroutine.A subroutine is a series of instructionsbeginning with Instruction 85 and terminatedwith Instruction 95, END. All subroutines mustbe placed in Table 3 (Subroutine Table). Whena subroutine is called by a command in aProgram Control Instruction, the subroutine isexecuted, then program flow continues with theinstruction following that which called thesubroutine.

Subroutines cannot be embedded within othersubroutines; a subroutine must end before thenext one begins. Subroutines may be calledfrom within other subroutines (nested). Themaximum nesting level for subroutines is 7deep. Attempts to nest more than 7 deep willnot be detected at compilation, but will result ina run time error. When the seventh subroutineattempts to call the eighth, error 31 will bedisplayed. Execution will not branch to theeighth subroutine; it will continue with theInstruction following that calling the subroutine.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Subroutine number (1-9, 79-99)

*** 86 DO ***

FUNCTIONThis instruction unconditionally executes thespecified command.

PAR. DATANO. TYPE DESCRIPTION

01: 2 Command (Table 12-2)

*** 87 LOOP ***

FUNCTIONInstructions included between the LoopInstruction and the End Instruction (95) arerepeated the number of times specified by theiteration count (Parameter 2), or until an ExitLoop command (31, 32) is executed by aProgram Control Instruction within the Loop. If

Page 118: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 12. PROGRAM CONTROL INSTRUCTIONS

12-2

0 is entered for the count, the loop is repeateduntil an Exit Loop command is executed.

The first parameter, delay, controls howfrequently passes through the loop are made.The delay unit is the table execution interval:

A delay of 0 means that there is no delaybetween passes through the loop. Eachtime the table is executed all iterations ofthe loop will be completed and executionwill pass on to the following instructions.

If the delay is 5, every fifth time that theexecution interval comes up, one passthrough the loop is made; only thoseinstructions in the loop will be executed andother portions of the table are not executedin the interim. When the loop is executed,execution starts at the loop, skipping overany previous instructions in the table.

When a fixed number of iterations areexecuted, the time spent in the loop is equal tothe product of the execution interval, delay, andthe number of iterations. For example, a loopwith a delay of 1 and a count of 5 will take 5seconds if the execution interval is 1 second.When the loop is first entered, one pass throughthe loop is made, then the CR7 delays until thenext execution interval and makes the secondpass through the loop. After making the fifthpass through the loop, there is the fifth delay,after which execution passes to the instructionfollowing the END instruction which goes withthe loop.

While in a loop with delay, the table will not beinitiated at each execution interval. (However,the overrun decimals will not be displayed.)Some consequences of this are: The OutputFlag will not be automatically cleared betweenpasses through the loop. Because Table 2cannot interrupt Table 1, Table 2 will not beexecuted while Table 1 is in a loop with delay.Table 1 will not interrupt Table 2 in the middle ofan output array. Thus, if the Output Flag is setin Table 2 prior to entering the loop or within theloop, the flag must be specifically cleared beforethe end of the pass or Table 1 will not be able tointerrupt.

Input locations for Processing Instructions withina loop can be entered as Indexed locations. AnIndexed location causes the input location to beincremented by 1 with each pass through the

loop. (The Index counter is added to thelocation number in the program table.) Inputlocations which are not indexed will remainconstant.

To specify an Indexed location, depress the Ckey at some point while keying in the digits forthe input location and before entering thelocation with the A key. Two dashes, --, appearin the two right most characters of the display,indicating the entry is Indexed.

When the same output processing is requiredon values in sequential input locations, it mustbe accomplished by using the repetitionsparameter of the Output Instruction, not byindexing the input location within a loop.

An Output Instruction within a loop is allotted thesame number of Intermediate Storage locationsas it would receive if it were not in the loop. Forexample, the Average instruction with a singlerepetition is allotted only two Intermediatelocations: one for the number of samples andone for the running total. Each time through theloop the sample counter is incremented and thevalue in the referenced input location is addedto the total. If the input location is indexed, thevalues from all input locations are added to thesame total. If the Average instruction with 1repetition and location 1 indexed is placedwithin a loop of 10 and the Output Flag set highprior to entering the loop, 10 values will beoutput. These will not be the averages forlocations 1-10. The first will be the average ofall the readings in locations 1-10 since theprevious output. Because the Intermediatelocations are zeroed each time an outputoccurs, the next nine values will be the currentvalues (samples at the time of output) ofLocations 2-10.

Loops can be nested. Indexed locations withinnested loops are indexed to the inner most loopthat they are within. The maximum nestinglevel in the CR7 is 9 deep. This applies to IfThen/Else comparisons and Loops or anycombination thereof. An If Then/Elsecomparison which uses the Else Instruction, 94counts as being nested 2 deep.

Page 119: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 12. PROGRAM CONTROL INSTRUCTIONS

12-3

PAR. DATANO. TYPE DESCRIPTION

01: 2 Delay02: 4 Iteration count

The following example involves the use of theLoop Instruction, without a delay, to perform ablock data transformation.

The user wants one hour averages of the vaporpressure calculated from the wet- and dry-bulbtemperatures of five psychrometers. Onepressure transducer measurement is alsoavailable for use in the vapor pressurecalculation.

1. The input locations are assigned as follows:a) pressure -location 10b) dry-bulb temperatures -location 11-15c) wet-bulb temperatures -location 16-20d) calculated vapor pressure -location 16-20(vapor pressure is written over the wet-bulbtemperatures.)

2. The program flow is as follows:a) Enter the Loop Instruction 87 with

delay=0 and iteration count=5.b) Calculate the vapor pressure with

Instruction 57 using a normal locationentry of 10 for atmospheric pressureand Indexed locations of 11, 16, and 16for the dry-bulb, wet-bulb andcalculated vapor pressure, respectively.

c) End loop with Instruction 95.d) Use the If Time Instruction 92 to set the

Output Flag every hour.e) Use the Average Instruction 71 with 5

repetitions starting at Input Location 16to average the vapor pressure over thehour.

The actual keyboard entries for the examplesare shown below with the first exampleInstruction location equal to 10. The InputInstructions to make the pressure andtemperature measurements are assumed.

TABLE 12-3. Loop Example: Block DataTransform

10: P87 Beginning of Loop01: 0 Delay02: 5 Loop Count

11: P57 Wet/Dry Bulb Temp to VP01: 10 Pressure Loc02: 11-- Dry Bulb Temp Loc DRY BLB#103: 16-- Wet Bulb Temp Loc VP #104: 16-- Loc [:VP #1 ]

12: P95 End

13: P92 If time is01: 0 minutes into a02: 60 minute interval03: 10 Set high Flag 0 (output)

14: P71 Average01: 5 Reps02: 16 Loc VP #1

The Loop with a delay may be used so that onlythose instructions within the Loop are executedwhile certain conditions are met. As a simpleexample, suppose it is desired to execute oneset of instructions from midnight until 6 AM,another set between 6 AM and 4 PM, and athird set between 4 PM and midnight. Between6 AM and 4 PM, samples are desired every tenseconds; the rest of the time one minutebetween samples is sufficient. The executioninterval is set to ten seconds; when a oneminute sample rate is desired, a delay of 6 (6 x10s = 60s) is used in the loop.

TABLE 12-4. Example: Loop with DelayExecution Interval = 10 seconds

* 1 Table 1 Programs01: 10 Sec. Execution Interval

01: P87 Beginning of Loop01: 6 Delay02: 0 Loop Count

11: P86 Do01: 1 Call Subroutine 1

Page 120: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 12. PROGRAM CONTROL INSTRUCTIONS

12-4

12: P89 If X<=>F01: 25 X Loc DAY02: 3 >=03: 6 F04: 31 Exit Loop if true

13: P95 End

14: P87 Beginning of Loop01: 1 Delay02: 0 Loop Count

27: P86 Do01: 1 Call Subroutine 1

28: P89 If X<=>F01: 25 X Loc DAY02: 3 >=03: 16 F04: 31 Exit Loop if true

29: P95 End

30: P87 Beginning of Loop01: 6 Delay02: 0 Loop Count

36: P86 Do01: 1 Call Subroutine 1

37: P89 If X<=>F01: 25 X Loc DAY02: 3 >=03: 5 F04: 32 Exit Loop if false

38: P95 End

39: P End Table 1

* 3 Table 3 Subroutines

01: P85 Beginning of Subroutine01: 1 Subroutine Number

02: P18 Time01: 2 Hours into current year

(maximum 8784)02: 24 Mod/by03: 25 Loc [:DAY ]

03: P95 End

*** 88 IF X COMPARED TO Y ***

FUNCTIONThis instruction compares two input locationsand, if the result is true, executes the specifiedCommand. The comparison codes are given inTable 12-5.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location for X02: 2 Comparison code (Table 12-5)03: 4 Input location for Y04: 2 Command (Table 12-2)

Input locations altered: 0Execution time: 0.6ms

TABLE 12-5. Comparison Codes

Parameter 1 Function1 IF X = Y2 IF X ≠ Y3 IF X ≥ Y4 IF X < Y

*** 89 IF X COMPARED TO F ***

FUNCTIONThis instruction compares an input location to afixed value and, if the result is true, performsthe specified Command. The comparison codesare given in Table 12-5.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location for X02: 2 Comparison code (Table 12-5)03: FP Fixed value04: 2 Command (Table 12-2)

*** 90 STEP LOOP INDEX ***

FUNCTIONWhen used within a Loop (Instruction 87),Instruction 90 will increment the index counterby a specified amount after the first timethrough the loop, thus affecting all indexed inputlocation parameters in subsequent instructionswithin the loop. For example, if 4 is specified,the index counter will count up by 4 (0, 4, 8,12,...) inside the loop. Instruction 90 does notaffect the loop counter which still counts by 1.

Page 121: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 12. PROGRAM CONTROL INSTRUCTIONS

12-5

PAR. DATANO. TYPE DESCRIPTION

01: 2 Increment for the loop indexcounter

*** 91 IF FLAG ***

FUNCTIONThis instruction checks one of the ten flags andconditionally performs the specified command.

The first parameter specifies the flag to checkand the flag status (high or low) on which toexecute the command.

1X = execute Command if Flag X is high2X = execute if Flag X is low

PAR. DATANO. TYPE DESCRIPTION

01: 2 Flag/status02: 2 Command (Table 12-2)

*** 92 IF TIME ***

FUNCTIONThe user specifies the number of minutes intoan interval, the duration of the interval, and acommand. The command is executed eachtime the real time is the specified number ofminutes into the interval.

The time interval is synchronized with real time;if a 60 minute time interval is specified with 0minutes into the interval, the Command will beexecuted each hour on the hour. The timeinterval is automatically synchronized by makinga modulo divide of the number of minutes sincemidnight by the specified real time interval. Ifthe result is 0, the interval is up. Thus, the firstinterval of the day always starts at midnight (0minutes). Only one execution is allowed in anyminute (e.g., if the command is to set theOutput Flag, and the execution interval of thetable is ten seconds, there will only be oneoutput generated by this instruction, not six.)

The Output Flag (Flag 0) is a special case inthat it will automatically be set low if it is not timeto set it high.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Time into interval (minutes)02: 4 Time interval (minutes)03: 2 Command (Table 12-2)

*** 93 BEGIN CASE STATEMENT ***

Instruction 93 specifies an input location forcomparison with fixed values in subsequent IfCase instructions (83). When a comparison istrue, the command in the If Case instruction isexecuted and at the next Instruction 83execution jumps to the End Instruction 95associated with the Begin Case Instruction.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Input location for subsequentcomparisons

EXAMPLE:

01: P93 Case01: 2 Case Loc

02: P83 If Case Location < F01: 69.4 F02: 3 Call Subroutine 3

else03: P83 If Case Location < F

01: 72 F02: 10 Set high Flag 0 (output)

else04: P83 If Case Location < F

01: 77.3 F02: 30 Then Do

05: P30 Z=F01: 0 F02: 0 Exponent of 1003: 25 Z Loc :

06: P95 End Then Do

07: P95 End of Case Statement

*** 94 ELSE ***

FUNCTIONWhen Command 30 (Then/Else) is used with anIf Instruction, the Else Instruction is used tomark the start of the instructions to execute ifthe test condition is false (Figure 3.8-1). The

Page 122: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 12. PROGRAM CONTROL INSTRUCTIONS

12-6

Else Instruction is optional; when it is omitted, afalse comparison will result in executionbranching directly to the End Instruction.Instruction 94 has no parameters.

*** 95 END ***

FUNCTIONInstruction 95 is used to indicate the end/returnof a subroutine (Instruction 85), the end of aloop (Instruction 87), the end of an If Then/Elsesequence, or the end of the Case statement(Instructions 88-93 when used with command30). The End Instruction has no parameters.

*** 96 ACTIVATE SERIAL DATA OUTPUT ***

FUNCTIONInstruction 96 is used instead to activate theStorage Module or serial port output. By usingProgram Control Instructions to allow executionof Instruction 96 only at certain times, the usercan control when the output is active.

When used to send data to the SM192 orSM716 Storage Module, the CR7 can determinewhether or not the Storage Module isconnected. If the Storage Module is notconnected, the data will not be sent until it isconnected. Instruction 96 also allows for fasterdata output via the serial port with the BinaryOption, which outputs FINAL STORAGEFORMAT (2 bytes per low resolution data point)instead of ASCII (10 bytes per data point,Section 4.5). Appendix C describes FINALSTORAGE FORMAT.

A single parameter is used to select whether theinstruction is to control the tape, StorageModule, or the printer output, and if the printer isselected, the format and baud rate. Instruction96 must be entered separately for each outputdevice used.

Instruction 96 uses the same Printer pointer asthe *9 mode which can be used to get a residualor partial dump of Final Storage (Section 4).

Do not use *4 to activate a device that isactivated by Instruction 96.

PAR. DATANO. TYPE DESCRIPTION

01: 2 The left digit specifies theOption and the right specifiesthe baud rate for the printer.The code for Storage Moduleis 30.

Option X = Baud Rate0 -- 300

1X -- PRINTER, ASCII 1 -- 12002X -- PRINTER, Binary 2 -- 960030 -- SM192 or SM716 3 -- 76,80031 -- Send filemark to SM192/716

*** 98 SEND CHARACTER ***

Instruction 98 is used to send a character to theprinter. The single parameter sets the baudrate and gives the decimal equivalent of the 7bit character (sent as 8 bits, no parity). Forexample, to send the ASCII character control Rat 9600 baud, 2018 would be entered forParameter 1. This instruction can be used tosend a control character to activate somedevice. The specified character is sent at thetime Instruction 98 is executed; this will cause itto precede any output arrays generated in thesame table, since the output data is sent to theprinter at the completion of the table.

PAR. DATANO. TYPE DESCRIPTION

01: 4 Decimal Value of ASCII character:yxxx xxx=ASCII value (1-127)

y=Baud rate code0 300 baud1 1200 baud2 9600 baud3 76,800 baud

Page 123: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

13-1

SECTION 13. CR7 MEASUREMENTS

13.1 FAST AND SLOW MEASUREMENTSEQUENCEThe CR7 makes voltage measurements byintegrating the input signal for a fixed time andthen holding the integrated value for the analogto digital (A/D) conversion. The A/D conversionis made with a 16 bit successive approximationtechnique which resolves the signal voltage toapproximately one part in 30,000 of either the +or - side of the full scale range (e.g., 1/30,000 x5V = 166µV).

Integrating the signal removes noise that couldcreate an error if the signal wereinstantaneously sampled and held for the A/Dconversion. The slow integration time providesa more noise-free reading than the fastintegration time. One of the most commonsources of noise is 60 Hz from AC power lines.The slow integration time of 16.67 millisecondsis equal to one 60 Hz cycle so that during theintegration time the AC noise would integrate to0.

There are several situations where the fastintegration time of 250 microseconds ispreferred. The fast integration time minimizestime skew between measurements andincreases the throughput rate. The current drainon the CR7 batteries is lower when fastintegration time is used because the I/O CPU isswitched on for shorter time periods. The fastintegration time should ALWAYS be used withthe AC half bridge (Instruction 5) whenmeasuring AC resistance or the output of anLVDT. An AC resistive sensor will polarize if aDC voltage is applied, causing erroneousreadings and sensor decay. The inducedvoltage in an LVDT decays with time as currentin the primary coil shifts from the inductor to theseries resistance, a long integration time wouldresult in most of the integration taking placeafter the signal had disappeared.

FIGURE 13.1-1. Timing of Single EndedMeasurement

Before making a series of measurementsprescribed by an Input Instruction, the CR7makes a calibration measurement. Thecalibration is accomplished by measuring twoknown voltages which are sent through thesame amplifier circuit that will be used for themeasurements. The calibration for a singleended measurement consists of measuring avoltage which is 4/5ths of full scale and thenmaking a measurement with the inputgrounded. A differential measurement is madeonce with the inputs as connected and a secondtime with the inputs reversed (Section 13.2):calibration for differential measurements usesvoltages at ±4/5ths of full scale.

An offset error of up to 1 least significant bit canoccur in a slow, single ended measurement asa result of dielectric absorption in the integratingcapacitor. This error is a function of theprevious measurement. If the CR7 isprogrammed to make a single endedmeasurement on the 5 volt range with the inputsshorted, an error of -166 µV can be observed.

13.2 SINGLE ENDED AND DIFFERENTIALVOLTAGE MEASUREMENTS

NOTE: The channel numbering on theAnalog Input cards refers to differentialchannels. Either the high or low side of adifferential channel can be used for singleended measurements so each side must becounted when numbering single endedchannels, e.g., the high and low sides ofdifferential channel 14 are single endedchannels 27 and 28, respectively.

The timing and sequence of a single endedmeasurement is shown in Figure 13.1-1. Asingle ended measurement is made on a singleinput which is referenced to ground. A singleintegration is performed for each measurement.A differential measurement measures thedifference in voltage between two inputs. Themeasurement sequence on a differentialmeasurement involves two integrations: firstwith the high input referenced to the low, thenwith the inputs reversed. (Figure 13.2-1). TheCR7 computes the differential voltage byaveraging the magnitude of the results from thetwo integrations and using the polarity from thefirst.

Page 124: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-2

FIGURE 13.2-1. Differential VoltageMeasurement Sequence

Because a single ended measurement isreferenced to CR7 ground, any difference inground potential between the sensor and theCR7 will result in an error in the measurement.For example, if the measuring junction of acopper-constantan thermocouple, being used tomeasure soil temperature, is not insulated andthe potential of earth ground is 1 mV greater atthe sensor than at the point where the CR7 isgrounded, the measured voltage would be 1 mVgreater than the thermocouple output, orapproximately 25 oC high. Another instancewhere a ground potential difference creates aproblem is in a case such as described inSection 7.2, where external signal conditioningcircuitry is powered from the same source asthe CR7. Despite being tied to the sameground, differences in current drain and leadresistance result in different ground potential atthe two instruments. For this reason, adifferential measurement should be made on ananalog output from the external signalconditioner. Differential measurements MUSTbe the choice where the inputs are known to bedifferent from ground, such as the output from afull bridge.

In order to make a differential measurement,however, the inputs must be within the CR7common mode range of ±5V. The commonmode range is the voltage range, relative toCR7 ground, within which both inputs of adifferential measurement must lie, in order forthe differential measurement to be made. Forexample, if the high side of a differential input isat 4V and the low side is at 3V relative to CR7ground, there is no problem, a measurementmade on the ±1.5V range would indicate asignal of 1V. However, if the high input is at5.8V and the low input is at 4.8V, themeasurement can not be made because thehigh input is outside of the CR7 common moderange (the CR7 will indicate the overrange withthe maximum negative number, Section 2.2).

Problems with exceeding common mode rangemay be encountered when the CR7 is used toread the output of external signal conditioningcircuitry if a good ground connection does notexist between the external circuitry and theCR7. When operating where AC power isavailable, it is not always safe to assume that agood ground connection exists through the ACwiring. If a CR7 is used to measure the outputfrom a laboratory instrument (both plugged intoAC power and referencing ground to outletground), it is best to run a ground wire betweenthe CR7 and the external circuitry. Even withthis ground connection, the ground potential ofthe two instruments may not be at exactly thesame level, which is why a differentialmeasurement is desired.

A differential measurement has better noiserejection than a single ended measurement.Integrating the signal in both directions alsoreduces input offset voltage due to thermaleffects in the amplifier section of the CR7. Inputoffset voltage on a differential measurement ison the order of 0.1 microvolts, the input offsetvoltage on a single ended measurement may beas high as 1 to 2 microvolts.

A single ended measurement is quitesatisfactory in cases where noise is not aproblem and care is taken to avoid groundpotential problems. Twice as many singleended measurements can be made per AnalogInput Card. A single ended measurement takesabout half the time of a differentialmeasurement which is valuable in cases whererapid sampling is a requirement.

NOTE: Sustained voltages in excess of±16 VDC applied to the analog inputs willdamage the CR7 input circuitry.

Page 125: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-3

13.3 THE EFFECT OF SENSOR LEADLENGTH ON THE SIGNAL SETTLINGTIMEWhenever an analog input is switched into theCR7 measurement circuitry prior to making ameasurement, a finite amount of time isrequired for the signal to stabilize at it's correctvalue. The rate at which the signal settles isdetermined by the input settling time constantwhich is a function of both the source resistanceand input capacitance (explained below). TheCR7 allows a 0.5ms settling time beforeinitiating the measurement. In mostapplications, this settling time is adequate butthe additional wire capacitance associated withlong sensor leads can increase the settling timeconstant to the point that measurement errorsmay occur. There are three potential sources oferror which must settle before the measurementis made:

1. The signal must rise to its correct value.

2. A small transient (5mV) caused byswitching the analog input into themeasurement circuitry must settle.

3. A larger transient, usually about 40 mV/V,caused by the switched, precision excitationvoltage used in resistive bridgemeasurements must settle.

The purpose of this section is to bring attentionto potential measurement errors caused whenthe input settling time constant gets too largeand discuss procedures whereby the effects oflead length on the measurement can beestimated. In addition, physical values aregiven for three types of wire used in CampbellScientific sensors and error estimates for givenlead lengths are provided. Finally, techniquesare discussed for minimizing input settling errorwhen long leads are mandatory.

13.3.1 THE INPUT SETTLING TIME CONSTANT

The rate at which an input voltage rises to its fullvalue or that a transient decays to the correctinput level are both determined by the inputsettling time constant. In both cases thewaveform is an exponential. Figure 13.3-1shows both a rising and decaying waveformsettling to the signal level, Vso. The rising inputvoltage is described by Equation 13.3-1 and thedecaying input voltage by Equation 13.3-2,

FIGURE 13.3-1. Input Voltage Rise andTransient Decay

V V es sot Co T= − −( )/R1 , rise [13.3-1]

V V V V es so eo sot Co T= + − −( ) /R , decay [13.3-2]

where Vs is the input voltage, Vso the truesignal voltage, Veo the peak transient voltage, tis time in seconds, Ro the source resistance inohms and CT is the total capacitance betweenthe signal lead and ground (or some other fixedreference value) in farads.

The settling time constant, τ in seconds, and thecapacitance relationships are given inEquations 13.3-3 through 13.3-5,

τ = RoCT [13.3-3]

CT = Cf + CwL [13.3-4]

Cf = 0.01 nfd [13.3-5]

where Cf is the fixed CR7 input capacitance infarads, Cw is the wire capacitance in farads/footand L is the wire length in feet.

Equations 13.3-1 and 13.3-2 can be used toestimate the input settling error, Ve, directly.For the rising case, Vs = Vso-Ve whereas forthe decaying transient Vs = Vso+Ve.Substituting these relationships for Vs inEquations 13.3-1 and 13.3-2, respectively,yields expressions in Ve, the input settling error:

V V ee sot Co T=

− /R , rise [13.3-6]

V V ee eot Co T=

−' /R , decay [13.3-7]

Where V'eo = Veo-Vso, the difference betweenthe peak transient voltage and the true signalvoltage.

Page 126: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-4

Since the peak transient, Veo, causessignificant error only if it is several times largerthan the signal, Vso, error calculations made inthis section approximate Ve'o by Veo, i.e., Veo≈ Veo-Vso.

If the input settling time constant, τ , is known, aquick estimation of the settling error as apercentage of the maximum error (Vso forrising, V'eo for decaying) is obtained by knowinghow many time constants (t/τ) are contained inthe 0.5 ms CR7 input settling interval (t). Thefamiliar exponential decay relationship is givenin Table 13.3-1 for reference.

TABLE 13.3-1. Exponential Decay, Percentof Maximum Error vs. Time in Units of τ

Time % Time %Constants Max. Error Constants Max. Error

0 100.0 5 0.71 36.8 7 0.13 5.0 10 0.004

Before proceeding with examples of the effectof long lead lengths on the measurement, adiscussion on obtaining the source resistance,Ro, and lead capacitance, CwL, is necessary.

DETERMINING SOURCE RESISTANCE

The source resistance used to estimate thesettling time constant is the resistance the CR7input "sees" looking out at the sensor. For ourpurposes the source resistance can be definedas the resistance from the CR7 input through allexternal paths back to the CR7. Figure 13.3-2shows a typical resistive sensor, (e.g., athermistor) configured as a half-bridge. Figure13.3-3 shows Figure 13.3-2 redrawn in terms ofthe resistive paths determining the sourceresistance Ro, is given by the parallelresistance of Rs and Rf, as shown in Equation13.3-8.

FIGURE 13.3-2. Typical Resistive Half-Bridge

FIGURE 13.3-3. Source Resistance Modelfor Half-Bridge Connected to the CR7

Ro = RsRf/(Rs+Rf) [13.3-8]

If Rf is much smaller, equal to or much greaterthan Rs, the source resistance can beapproximated by Equations 13.3-9 through13.3-11, respectively.

Ro ≈ Rf, Rf<<Rs [13.3-9]

Ro = Rf/2, Rf=Rs [13.3-10]

Ro ≈ Rs, Rf>>Rs [13.3-11]

The source resistance for several CampbellScientific sensors are given in column 3 ofTable 13.3-5.

DETERMINING LEAD CAPACITANCE

Wire manufacturers typically provide twocapacitance specifications 1) the capacitancebetween the two leads with the shield floatingand 2) the capacitance between the two leadswith the shield tied to one lead. Since the inputlead and the shield are tied to ground (oftenthrough a bridge resistor, Rf) in single endedmeasurements such as Figure 13.3-2, thesecond specification is used in determining leadcapacitance. Figure 13.3-4 is a representationof this capacitance, Cw, usually specified aspfd/ft. Cw is actually the sum of capacitancebetween the two conductors and thecapacitance between the top conductor and theshield. Capacitance for 3 Belden leadwiresused in Campbell Scientific sensors is shown incolumn 6 of Table 13.3-2.

Page 127: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-5

TABLE 13.3-2. Properties of Three Belden Lead Wires Used by Campbell Scientific

Belden Rl CwWire # Conductors Insulation AWG (ohms/1000ft.) (pfd/ft.)

8641 1 shld. pair polyethylene 24 23 428771 1 shld. 3 cond. polyethylene 22 15 418723 2 shld. pair polypropylene 22 15 62

FIGURE 13.3-4. Wire ManufacturersCapacitance Specifications, Cw

DIELECTRIC ABSORPTION

The dielectric absorption of insulationsurrounding individual conductors can seriouslyeffect the settling waveform by increasing thetime required to settle as compared to a simpleexponential. Dielectric absorption is difficult toquantify but it can have a serious effect on lowlevel measurements, for example 50mV or less.The primary rule to follow in minimizingdielectric absorption is: AVOID PVCINSULATION around conductors. PVC cablejackets are permissible since the jackets don'tcontribute to the lead capacitance because thejacket is outside the shield. Campbell Scientificuses only polyethylene and polypropyleneinsulated conductors in CR7 sensors (see Table13.3-2) since these materials have negligibledielectric absorption. Teflon insulation is alsovery good but quite expensive.

13.3.2 EFFECT OF LEAD LENGTH ON SIGNALRISE TIME

In the 024A Windvane, a potentiometer sensor,the peak transient voltage is much less than thetrue signal voltage (Table 13.3-5). This meansthe signal rise time is the major source of errorand the time constant is the same as if Cw werebetween the signal lead and ground asrepresented below.

FIGURE 13.3-5. Model 024A Wind DirectionSensor

Ro, the source resistance, is not constantbecause Rb varies from 0 to 10 kohms over the0 to 360 degree wind direction range. Thesource resistance is given by:

Ro = Rb(Rs-Rb+Rf)/(Rs+Rf) = Rb(20k-Rb)/20k[13.3-12]

Note that at 360o, Ro is at a maximum of 5k(Rb=10k) and at 0o, Ro is 0 (Rb=0). It followsthat settling errors are less at lower directionvalues.

The value of Rb for any direction D (degrees) isgiven by:

Rb(kohms) = (10k)(D)/360 [13.3-13]

Equation 13.3-6 can be rewritten to yield thesettling error of a rising signal directly in units ofdegrees.

Error (degrees) = − +De t C C Lo f w/(R ( )) [13.3-14]

Equation 13.3-12, -13 and -14 can be combinedto estimate the error directly in degrees atvarious directions and lead lengths (Table 13.3-3). Constants used in the calculations are givenbelow:

Cf = 0.01 ufd

Cw = 41 pfd/ft, Belden #8771 wire

t = 0.5 ms

Page 128: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-6

TABLE 13.3-3. Settling Error (Degrees) for024A Wind Direction Sensor vs. Lead Length

Wind - - - - - Error - - - - -Direction L=1000 ft. L=500 ft.

360o 47o 8o270o 31o 5o180o 12o 1o90o 1o 0o

The values in Table 13.3-3 show that significanterror occurs at large direction values for leadsin excess of 250 feet. Instruction 4, Excite,Delay and Measure should be used to eliminateerrors in these types of situations. Using a10ms delay, settling errors are eliminated up tolengths that exceed the drive capability of theexcitation channel (≈2000 ft.).

13.3.3 TRANSIENTS INDUCED BY SWITCHEDEXCITATION

Figure 13.3-6 shows a typical half-bridge,resistive sensor such as Campbell Scientific'sModel 107 Temperature probe, connected tothe CR7. The leadwire is a single shielded pair,used for conducting the excitation, Vx andsignal, Vs voltages. When Vx is switched on, atransient is capacitively induced in Vs, the signalvoltage. If the peak transient level, Veo, is lessthan the true signal, Vso, the transient has noeffect on the measurement but if Veo is greaterthan Vso it must settle to the correct signalvoltage to avoid errors.

NOTE: Excitation transients are eliminatedif an option exists to contain excitation leadsin a shield independent from the signalleads.

FIGURE 13.3-6. Resistive Half-BridgeConnected to Single-Ended CR7 Input

The size of the peak transient is linearly relatedto the excitation voltage and increases as thebridge resistor, Rf, increases. Table 13.3-4shows measured levels of Veo for 1000 footlengths of three Belden wires used in CampbellScientific sensors. Values are given for Rfequal 1 kohm and 10 kohm. Table 13.3-4 ismeant only to provide estimates of the size ofexcitation transients encountered since theexact level will depend upon the specific sensorconfiguration.

Equation 13.3-7 can be solved for the maximumlead length, L, permitted to maintain a specifiederror limit. Combining Equations 7 and 4 andsolving for L gives:

L = -(RoCf + (t/ln(Ve/Veo)))/RoCw [13.3-15]

where Ve is the measurement error limit.

TABLE 13.3-4. Measured Peak Excitation Transients for 1000 Foot Lengths of Three Belden LeadWires Used by Campbell Scientific

- - - - - - - - - - - Veo(mV) - - - - - - - - -Vx(mV) Rf=1 kohm Rf=10 kohm

# # # # # #8641 8771 8723 8641 8771 8723

5000 125 200 130 215 320 1804000 100 165 110 180 260 1503000 75 130 90 140 200 1102000 50 100 60 100 140 801000 25 65 40 60 90 40

Page 129: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-7

EXAMPLE LEAD LENGTH CALCULATIONFOR CAMPBELL SCIENTIFIC 107TEMPERATURE SENSOR

Assume a limit of 0.05oC over a 0oC to +40oCrange is established for the transient settlingerror. This limit is a reasonable choice since itapproximates the linearization error over thatrange. The output signal from the thermistorbridge varies non-linearly with temperature(refer to 107 Operator's Manual), ranging fromabout 200 µV/oC at 0oC to 100 µV/oC at 40oC.Taking the most conservative figure yields anerror limit of Ve = 5 µV. The other valuesneeded to calculate the maximum lead lengthare summarized in Table 13.3-5 and listedbelow:

1) Veo ≈ 100mV, peak transient at 4V excitation

2) Ve ≈ 5µV, allowable measurement error

3) t = 500µs, CR7 input settling time

4) Ro = 1kohm, 107 probe source resistance

5) Cf = 0.01nfd, CR7 input capacitance

6) Cw = 42pfd/ft., lead wire capacitance

Solving Equation 13.3-15 gives a maximumlead length of:

L ≈ 965 ft., error ≈ 0.05oC

Setting the allowable error at 0.1oC orapproximately 10µV, the maximum lead lengthincreases to:

L ≈ 1050 ft., error ≈ 0.1oC

13.3.4 SUMMARY OF SETTLING ERRORS FORCAMPBELL SCIENTIFIC RESISTIVESENSORS.

Table 13.3-5 summarizes the data required toestimate the effect of lead length on settlingerrors for Campbell Scientific's resistivesensors. Comparing the transient level, Veo, tothe input range, one suspects that transienterrors are the most likely limitation for the 107sensor. The sensors in the WVU-7 are thesame as in the Model 107 (the lead wire isdifferent) but the signal leads for the WVU-7 wetand dry bulbs are not subject to excitationtransients because they are shieldedindependently from the excitation.

The comparatively small transient yet largesource resistance of the 024A sensor indicatesthat signal rise time may be the most importantlimitation. The analysis in Section 13.3.2confirms this.

The Model 227 Soil Moisture Block has arelatively short time constant and essentially notransient. Lead lengths in excess of 2000 feetproduce less than a 0.1 bar (0-10 bar range)input settling error. With this sensor, the drivecapability of the excitation channel limits thelead length. If the capacitive load exceeds 0.1ufd and the resistive load is negligible, Vx willoscillate about it's control point. If the capacitiveload is 0.1 ufd or less, Vx will settle to within0.1% of its correct value in 150µs. A leadlength of 2000 feet is permitted for the Model227 before approaching the drive limitation.

TABLE 13.3-5. Summary of Input Settling Data for Campbell Scientific Resistive Sensors

Sensor Belden Ro Cw τ* InputModel # Wire # (kohms) (pfd/ft.) (us) Range(mV) Vx(mV) Veo(mV)**

107 8641 1 42 52 15 4000 100207(RH) 8771 1 41 51 150 3000 130WVU-7 8723 1 62 72 15 4000 0227 8641 0.1-1 42 5-52 500 500 0237 8641 1 42 52 50 5000 125024A 8771 0-5 41 1-255 500 1000 0-90

* Estimated time constants are for 1000 foot lead lengths and include 0.01nfd CR7 input capacitance.** Measured peak transients for 1000 foot lead lengths at corresponding excitation, Vx.

Page 130: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-8

Table 13.3-6 summarizes maximum leadlengths for corresponding error limits in sixCampbell Scientific sensors. Since the firstthree sensors are non-linear, the voltage error,Ve, is the most conservative valuecorresponding to the error over the rangeshown.

MINIMIZING SETTLING ERRORS IN NON-CAMPBELL SCIENTIFIC SENSORS

When long lead lengths are mandatory insensors configured by the user, the followinggeneral practices can be used to minimize ormeasure settling errors:

1. When measurement speed is not a primeconsideration, Instruction 4 (Excite, Delayand Measure) can be used to ensure amplesettling time for half-bridge, single-endedsensors.

2. An additional low value bridge resistor canbe added to decrease the sourceresistance, Ro. For example, assume a YSInon-linear thermistor such as the model44032 is used with a 30 kohm bridgeresistor, R'f. A typical configuration isshown in Figure 13.3-7A. Thedisadvantage with this configuration is the

high source resistance shown in column 3of Table 13.3-7. Adding another 1Kresistor, Rf, as shown in Figure 13.3-7Blowers the source resistance of the CR7input but offers no improvement overconfiguration A because R'f still combineswith the lead capacitance to slow the signalresponse at point P. The source resistanceat point P (column 5) is essentially thesame as the input source resistance ofconfiguration A. Moving Rf' out to thethermistor as shown in Figure 13.3-7Coptimizes the signal settling time because itbecomes a function of Rf and Cw only.

Columns 4 and 7 list the signal voltages as afunction of temperature with a 5V excitation forconfigurations A and C, respectively. Althoughconfiguration A has a higher output signal (5Vinput range), it does not yield any higherresolution than configuration C which uses the±150 mV input range.

NOTE: Since Rf' attenuates the signal inconfigurations B and C, one might considereliminating it altogether. However, itsinclusion "flattens" the non-linearity of thethermistor, allowing more accurate curvefitting over a broader temperature range.

TABLE 13.3-6. Maximum Lead Length vs. Error for Campbell Scientific Resistive Sensors

Sensor MaximumModel # Error Range Ve(µV) Length(ft.)

107 0.05oC 0oC to 40oC 5 9651207(RH) 1%RH 20% to 90% 500 19503WVU-7 0.05oC 0oC to 40oC 5 8502024A 3o @ 360o 1390 2502227 - - - 20003237 10 kohm 20k to 300k 500 19003

1 based on transient settling2 based on signal rise time3 limit of excitation drive

Page 131: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-9

TABLE 13.3-7. Source Resistances and Signal Levels for YSI #44032 Thermistor ConfigurationsShown in Figure 13.3-7 (2V Excitation)

- - - A - - - - B - - - - C - - -T Rs Ro Vs(mV) Ro@P Ro Vs(mV)

(kohms) (kohms) (kohms) (kohms)

-40 884.6 29.0 164 30.0 1 5.5-20 271.2 27 498 27.8 1 16.5

0 94.98 22.8 1200 23.4 1 39.5+25 30.00 15.0 2500 15.2 1 82.0+40 16.15 10.5 3250 10.6 1 106.0+60 7.60 6.1 3989 6.1 1 129.5

3. Where possible run excitation leads andsignal leads in separate shields to minimizetransients.

4. AVOID PVC INSULATED CONDUCTORSto minimize the effect of dielectricabsorption on input settling time.

5. Use the CR7 to measure the input settlingerror associated with a given configuration.For example assume long leads are

required but the lead capacitance, Cw, isunknown. Configure Rf on a length of cablesimilar to the measurement. Leave thesensor end open as shown in Figure 13.3-8and measure the result using the sameinstruction parameters to be used with thesensor. The measured deviation from 0V isthe input settling error.

Page 132: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-10

FIGURE 13.3-7. Half-Bridge Configurationfor YSI #44032 Thermistor Connected to CR7

Showing: A) Large source resistance, B)Large source resistance at point P, and C)Configuration optimized for input settling.

FIGURE 13.3-8. Measuring Input SettlingError with the CR7

6. Most Campbell Scientific sensors areconfigured with a small bridge resistor, Rf,(typically 1 kohm) to minimize the sourceresistance. If the lead length of a CampbellScientific sensor is extended by connectingto the pigtails directly, the effect of the leadresistance, Rl, on the signal must beconsidered. Figure 13.3-9 shows aCampbell Scientific Model 107 sensor with500 feet of extension lead connecteddirectly to the pigtails. Normally the signalvoltage is proportional to Rf/(Rs+Rb+Rf) butwhen the pigtails are extended the signal isproportional to (Rf+Rl)/(Rs+Rb+Rf+Rl). Rl ismuch smaller than the other terms in thedenominator and can be discarded. Theeffect on the signal can be analyzed bytaking the ratio of the signal with extendedleads, Vsl to the normal signal, Vs:

Vsl/Vs = (Rf+Rl)/Rf

Plugging in values of Rf=1k and Rl=.012k (500oat 23ohms/1000o, Table 13.3-2) gives anapproximate 1% error in the signal withextended leads. Converting the error to oCgives approximately a 0.3oC error at 0oC,0.6oC error at 20oC and a 1.5oC error at 40oC.The error can be avoided by maintaining thepigtails on the CR7 end of the extended leadsbecause Rl does not add to the bridgecompletion resistor, Rf, and its influence on thethermistor resistance is negligible.

Page 133: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-11

FIGURE 13.3-9. Incorrect Leadwire Extensionon Model 107 Temperature Sensor

13.4 THERMOCOUPLEMEASUREMENTSA thermocouple consists of two wires, each of adifferent metal or alloy, which are joinedtogether at each end. If the two junctions are atdifferent temperatures, a voltage proportional tothe difference in temperatures is induced in thewires. When a thermocouple is used fortemperature measurement, the wires aresoldered or welded together at the measuringjunction. The second junction, which becomesthe reference junction, is formed where theother ends of the wires are connected to themeasuring device. (With the connectors at thesame temperature, the chemical dissimilaritybetween the thermocouple wire and theconnector does not induce any voltage.) Whenthe temperature of the reference junction isknown, the temperature of the measuringjunction can be determined by measuring thethermocouple voltage and adding thecorresponding temperature difference to thereference temperature.

The CR7 determines thermocoupletemperatures using the following sequence.First the temperature of the reference junction ismeasured. If the reference junction is the CR7I/O Module, the temperature is measured withthe PRT in the 723-T Analog Input Card(Instruction 17). The reference junctiontemperature in oC is stored in an input locationwhich is accessed by the thermocouplemeasurement instruction (Instruction 13 or 14).The CR7 calculates the voltage that athermocouple of the type specified would outputat the reference junction temperature if itsreference junction were at 0oC, and adds thisvoltage to the measured thermocouple voltage.The temperature of the measuring junction isthen calculated from a polynomialapproximation of the NBS TC calibrations. If

the CR7 has been instructed to calculate thetemperature difference between the referenceand measuring junctions it will subtract thereference temperature before storing thetemperature value.

13.4.1 ERROR ANALYSIS

The error in the measurement of athermocouple temperature is the sum of theerrors in the reference junction temperature, thethermocouple output (deviation from standardspublished in NBS Monograph 125), thethermocouple voltage measurement, and thelinearization error (difference between NBSstandard and CR7 polynomial approximations).The discussion of errors which follows is limitedto these errors in calibration and measurementand does not include errors in installation ormatching the sensor to the environment beingmeasured.

REFERENCE JUNCTION TEMPERATUREWITH 723-T

The PRT in the CR7 is mounted in the center ofthe 723-T terminal strip. This resistancetemperature device (RTD) is accurate to ±0.1oCover the CR7 operating range. The I/O Modulewas designed to minimize thermal gradients. Itis encased in an aluminum box which isthermally isolated from the CR7 enclosure.Heavy copper grounding bars underlying theterminal strips on the I/O cards and large brassbars running the length of the I/O Moduleprovide thermal conduction for rapidequilibration of thermal gradients. Sources ofheat within the CR7 enclosure exist due topower dissipation by the electronic componentsor charging batteries. In a situation where theCR7 is at an ambient temperature ofapproximately 20oC and no externaltemperature gradients exist, the temperaturegradient between one end of an Analog Inputcard to the other is likely to be 0.05oC, and thegradient between the cards, from one end of theI/O Module to the other, is likely to be 0.1 to0.2oC. The end of the module with the CPUcard will be warmer due to heat dissipated bythe processor.

Given the above conditions, if it is desired tomake a series of thermocouple measurementswith the reference junctions within 0.05oC of theRTD temperature, the temperature obtainedfrom the 723-T card can be used for

Page 134: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-12

thermocouples attached to it and to one 723Analog Input card to either side of it (i.e. AnalogInput cards 1,2, and 3, where card 2 containsRTD). If more than these three cards are used,it is necessary to measure a new referencetemperature to stay within the desired 0.05oClimit. This can be done by using one of thethermocouples from the first set ofmeasurements to measure the referencetemperature for the next set. The secondreference temperature could provide thereference for another bank of three cards. Themeasuring junction for this reference should beclamped (along with the lead from thethermocouple being measured) into one of theinputs in the center of the second card in thisbank. If more severe temperature gradients

within the I/O Module are anticipated orsuspected this technique can be used toquantify these gradients and supply additionalreference temperatures if necessary.

THERMOCOUPLE LIMITS OF ERROR

The standard reference which liststhermocouple output voltage as a function oftemperature (reference junction at 0oC) is theNational Bureau of Standards Monograph 125(1974). The American National StandardsInstitute has established limits of error onthermocouple wire which is accepted as anindustry standard (ANSI MC 96.1, 1975). Table13.4-1 gives the ANSI limits of error forstandard and special grade thermocouple wireof the types accommodated by the CR7.

TABLE 13.4-1. Limits of Error for Thermocouple Wire (Reference Junction at 0oC)

Limits of ErrorThermocouple Temperature (Whichever is greater)

Type Range oC Standard Special

T -200 to 0 ± 1.0oC or 1.5%0 to 350 ± 1.0oC or 0.75% ± 0.5oC or 0.4%

J 0 to 750 ± 2.2oC or 0.75% ± 1.1oC or 0.4%

E -200 to 0 ± 1.7oC or 1.0%0 to 900 ± 1.7oC or 0.5% ± 1.0oC or 0.4%

K -200 to 0 ± 2.2oC or 2.0%0 to 1250 ± 2.2oC or 0.75% ± 1.1oC or 0.4%

R or S 0 to 1450 ± 1.5oC or 0.25% ± 0.6oC or 0.1%

B 800 to 1700 ± 0.5% Not Estab.

When both junctions of a thermocouple are atthe same temperature there is no voltageproduced (law of intermediate metals). Aconsequence of this is that a thermocouple cannot have an offset error; any deviation from astandard (assuming the wires are eachhomogeneous and no secondary junctionsexist) is due to a deviation in slope. In light ofthis, the fixed temperature limits of error (e.g.,±1.0oC for type T as opposed to the slope errorof 0.75% of the temperature) in the table aboveare probably greater than one would experiencewhen considering temperatures in theenvironmental range (i.e., the referencejunction, at 0oC, is relatively close to the

temperature being measured, so the absoluteerror - the product of the temperature differenceand the slope error - should be closer to thepercentage error than the fixed error).Likewise, because thermocouple calibrationerror is a slope error, accuracy can beincreased when the reference junctiontemperature is close to the measurementtemperature. For the same reason differentialtemperature measurements, over a smalltemperature gradient, can be extremelyaccurate.

Page 135: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-13

In order to quantitatively evaluate thermocoupleerror when the reference junction is not fixed at0 oC, one needs limits of error for the Seebeckcoefficient (slope of thermocouple voltage vs.temperature curve) for the variousthermocouples. Lacking this information, areasonable approach is to apply the percentageerrors, with perhaps 0.25% added on, to thedifference in temperature being measured bythe thermocouple.

ACCURACY OF THE THERMOCOUPLEVOLTAGE MEASUREMENT

The accuracy of a CR7 voltage measurement isspecified as 0.02% (0.01% 0 to 40 oC) of thefull scale range being used to make themeasurement. The actual accuracy may bebetter than this as it involves a slope error (theerror is proportional to the measurement beingmade, though limited by the resolution). Theerror in the temperature due to inaccuracy in themeasurement of the thermocouple voltage isworst at temperature extremes, where arelatively large scale is necessary to read thethermocouple output. For example, assumetype K (chromel-alumel) thermocouples areused to measure temperatures at 1000 oC.The TC output is on the order of 40mV,requiring the ±50mV input range. The accuracyspecification of 0.01% FSR is 10µV which is ameasurement error of about 0.2 oC. In theenvironmental temperature range with voltagemeasured on an appropriate scale, error intemperature due to the voltage measurementsis a few hundredths of a degree.

THERMOCOUPLE POLYNOMIAL: Voltage toTemperature

NBS Monograph 125 gives high orderpolynomials for computing the output voltage ofa given thermocouple type over a broad rangeof temperatures. In order to speed processingand accommodate the CR7's math and storagecapabilities, 4 separate 6th order polynomialsare used to convert from volts to temperatureover the range covered by each thermocoupletype. Table 13.4-2 gives error limits for thethermocouple polynomials.

TABLE 13.4-2. Limits of Error on CR7Thermocouple Polynomials (Relative to NBS

Standards)

TC Limits ofType Range oC Error oC

T -270 to 400-270 to -200 +18 @ -270-200 to -100 ±0.08-100 to 100 ±0.001100 to 400 ±0.015

J -150 to 760 ±0.008-100 to 300 ±0.002

E -240 to 1000-240 to -130 ±0.4-130 to 200 ±0.005200 to 1000 ±0.02

K -50 to 1372-50 to 950 ±0.01950 to 1372 ±0.04

REFERENCE JUNCTION COMPENSATION:Temperature to Voltage

The polynomials used for reference junctioncompensation (converting referencetemperature to equivalent TC output voltage) donot cover the entire thermocouple range.Substantial errors will result if the referencejunction temperature is outside of thelinearization range. The ranges covered bythese linearizations include the CR7environmental operating range, so there is noproblem when the CR7 is used as the referencejunction. External reference junction boxeshowever, must also be within these temperatureranges. Temperature difference measurementsmade outside of the reference temperaturerange should be made by obtaining the actualtemperatures referenced to a junction within thereference temperature range and subtracting asdescribed in Section 7.5. Table 13.4-3 givesthe reference temperature ranges covered andthe limits of error in the linearizations withinthese ranges.

Two sources of error arise when the referencetemperature is out of range. The mostsignificant error is in the calculatedcompensation voltage, however error is alsocreated in the temperature difference calculated

Page 136: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-14

from the thermocouple output. For example,suppose the reference temperature for ameasurement on a type T thermocouple is 300oC. The compensation voltage calculated bythe CR7 corresponds to a temperature of 272.6oC, a -27.4 oC error. The type T thermocouplewith the measuring junction at 290 oC andreference at 300 oC would output -578.7 µV;using the reference temperature of 272.6 oC,the CR7 calculates a temperature difference of -10.2 oC, a -0.2 oC error. The temperaturecalculated by the CR7 would be 262.4 oC, 27.6oC low.

TABLE 13.4-3. Reference TemperatureCompensation Range and Polynomial Error

Relative to NBS Standards

TCType Range oC Limits of Error oC

T -100 to 100 ± 0.001J -150 to 296 ± 0.005E -150 to 206 ± 0.005K -50 to 100 ± 0.01

ERROR SUMMARY

The magnitude of the errors described in theprevious sections illustrate that the greatestsources of error in a thermocouple temperaturemeasurement with the CR7 are likely to be dueto the limits of error on the thermocouple wireand in the reference temperature determinedwith the 723-T RTD. Errors in the thermocoupleand reference temperature linearizations areextremely small, and error in the voltagemeasurement is negligible.

To illustrate the relative magnitude of theseerrors in the environmental range, we will take aworst case situation where all errors aremaximum and additive. A temperature of 45 oCis measured with a type T (copper-constantan)thermocouple, using the ±5 mV range. Thenominal accuracy on this range is 1µV(0.01% of10mV) which at 45 oC changes the temperatureby 0.012 oC. The RTD is 25 oC but isindicating 25.1 oC, and the terminal that thethermocouple is connected to is 0.05 oC coolerthan the RTD.

TABLE 13.4-4. Example of Errors inThermocouple Temperature

Source Error oC % of Total Error1oC 1% SlopeError Error

Reference Temp. 0.15 12.8 39.9

TC OutputANSI 1.0 85.00.01 x 20oC 0.2 53.2

VoltageMeasurement 0.024 2.0 6.3

ReferenceLinearization 0.001 0.1 0.3

OutputLinearization 0.001 0.1 0.3

Total ErrorWith ANSI error 1.176 100

Assuming 1% 0.376 100slope error

13.4.2 USE OF EXTERNAL REFERENCEJUNCTION OR JUNCTION BOX

An external junction box is often used tofacilitate connections and to reduce theexpense of thermocouple wire when thetemperature measurements are to be made at adistance from the CR7. In most situations it ispreferable to make the box the referencejunction in which case its temperature ismeasured and used as the reference for thethermocouples and copper wires are run fromthe box to the CR7 (Section 7.4). Alternatively,the junction box can be used to coupleextension grade thermocouple wire to thethermocouples being used for measurement,and the CR7 I/O Module used as the referencejunction. Extension grade thermocouple wirehas a smaller temperature range than standardthermocouple wire, but meets the same limits oferror within that range. The only situation whereit would be necessary to use extension gradewire instead of a external measuring junction iswhere the junction box temperature is outsidethe range of reference junction compensationprovided by the CR7. This is only a factor whenusing type K thermocouples, where the upperlimit of the reference compensation linearization

Page 137: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-15

is 100 oC and the upper limit of the extensiongrade wire is 200 oC. With the other types ofthermocouples the reference compensationrange equals or is greater than the extensionwire range. In any case, errors can arise iftemperature gradients exist within the junctionbox.

Figure 13.4-1 illustrates a typical junction box.Terminal strips will be a different metal than thethermocouple wire. Thus, if a temperaturegradient exists between A and A' or B and B',the junction box will act as anotherthermocouple in series, creating an error in thevoltage measured by the CR7. Thisthermoelectric offset voltage is a factor whetheror not the junction box is used for the reference.it can be minimized by making the thermalconduction between the two points large andthe distance small. The best solution in thecase where extension grade wire is beingconnected to thermocouple wire would be touse connectors which clamped the two wires incontact with each other.

Figure 13.4-1. Diagram of Junction Box

An external reference junction box must beconstructed so that the entire terminal area isvery close to the same temperature. This isnecessary so that a valid reference temperaturecan be measured and to avoid a thermoelectricoffset voltage which will be induced if theterminals at which the thermocouple leads areconnected (points A and B in Figure 13.4-2) areat different temperatures. The box shouldcontain elements of high thermal conductivity,which will act to rapidly equilibrate any thermalgradients to which the box is subjected. It is notnecessary to design a constant temperaturebox, it is desirable that the box respond slowlyto external temperature fluctuations.

Radiation shielding must be provided when ajunction box is installed in the field. Care mustalso be taken that a thermal gradient is notinduced by conduction through the incomingwires. The CR7 can be used to measure thetemperature gradients within the junction box.

13.5 BRIDGE RESISTANCEMEASUREMENTSThere are five bridge measurement instructionsincluded in the standard CR7 software. Figure13.5-1 shows the circuits that would typically bemeasured with these instructions. In thediagrams, the resistors labeled Rs wouldnormally be the sensors and those labeled Rfwould normally be fixed resistors. Circuits otherthan those diagrammed could be measured,provided the excitation and type ofmeasurements were appropriate.

With the exception of Instruction 4, whichapplies an excitation voltage then waits aspecified time before making a single endedmeasurement, all of the bridge measurementsmake one set of measurements with theexcitation as programmed and another set ofmeasurements with the excitation polarityreversed. The error in the two measurementsdue to thermal emfs can then be accounted forin the processing of the measurementinstruction. In Instructions 6-9 the excitationchannel maintains the excitation voltage untilafter the analog to digital conversion iscompleted. In Instruction 5, the AC half bridgegrounds the excitation channel as soon as theintegration portion of the measurement iscompleted. Figure 13.5-2 shows the excitationand measurement sequence for Instruction 6, a4 wire full bridge. When more than onemeasurement per sensor is necessary(Instructions 7 and 9), excitation is appliedseparately for each measurement (e.g., inInstruction 9 used for a 4 wire half bridge, thedifferential measurement of the voltage dropacross the sensor is made with the excitation atboth polarities and then excitation is againapplied and reversed for the single endedmeasurement of the voltage drop across thefixed resistor.

Page 138: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-16

FIGURE 13.5-1. Circuits Used with Instructions 4-9

Page 139: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-17

-1 0 1 2 3 4 5 6 7 8 9

Excitation +Vx

-Vx

0 V

Measurement Sequence

Integration

Integration (ms)

Integration

A/D Conversion

A/D Conversion

FIGURE 13.5-2. Excitation and Measurement Sequence for 4 Wire Full Bridge

TABLE 13.5-1. Comparison of BridgeMeasurement Instructions

Instr. Circuit Description

4 DC Half Bridge User entered settlingtime allowscompensation forcapacitance in longlead lengths. Nopolarity reversal. Onesingle-endedmeasurement.Measured voltageoutput.

5 AC Half Bridge Rapid reversal ofexcitation polarity forion depolarization.One single-endedmeasurement at eachexcitation polarity.Ratiometric output.

6 4 Wire Slightly lower noise thanFull Bridge 9. One differential

measurement at eachexcitation polarity.Ratiometric output.

7 3 Wire Compensates for leadHalf Bridge wire resistance,

assuming resistance issame in both wires.Two single-endedmeasurements at eachexcitation polarity.Ratiometric output.

9 6 Wire Compensates for leadFull Bridge wire resistance. Twoor 4 Wire differentialHalf Bridge measurements at each

excitation polarity.Ratiometric output.

Calculating the actual resistance of a sensorwhich is one of the legs of a resistive bridgeusually requires the use of one or twoProcessing Instructions in addition to the bridgemeasurement instruction. Instruction 59 takes avalue, X, in a specified input location andcomputes the value MX/(1-X), where M is themultiplier and stores the result in the originallocation. Instruction 42 computes the reciprocalof a value in an input location. Table 13.5-2 liststhe instructions used to compute the resistanceof any single resistor shown in the diagrams inFigure 13.5-1, provided the values of the otherresistors in the bridge circuit are known.

Page 140: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-18

TABLE 13.5-2. Calculating Resistance Values from Bridge Measurement

Instr. Result Instr. Multiplier and Offset

4 X V R R Rx s s f= +( / ( ))

R RX V

X Vs fx

x=

/

/14.

59.Mult. = 1/Vx; ofs. = 0Mult. = Rf

RX V X V Rf

x x s=

1

1(( / ) / ( / )) /4.

59.42.

Mult. = 1/Vx; ofs. = 0Mult. = 1/Rs

5 X R R Rs s f= +/ ( )

R RX

Xs f=−1

5.59.

Mult. = 1; ofs. = 0Mult. = Rf

RX X Rf

s=

1

1( / ( )) /5.

59.42.

Mult. = 1; ofs. = 0Mult. = 1/Rs; ofs. = 0

6 or 9* X R R R R R R= + − +1000 3 3 4 2 1 2[ / ( ) / ( )] *used for full bridge

RX X R1

1 1 2

1

1=

−( / ( )) /6 or 9.

59.42.

Mult. = -0.001; ofs. = R3/(R3+R4)Mult. = 1/R2

where X1 3 3 41000= − + +X R R R/ / ( )

R R X X2 1 2 21= −( / ( )) 6 or 9.59.

Mult. = -0.001; ofs. = R3/(R3+R4)Mult. = R1

where X2 1= X

R R X X3 4 3 31= −( / ( )) 6 or 9.59.

Mult. = 0.001; ofs. = R2/(R1+R2)Mult. = R4

where X3 2 1 21000= + +X R R R/ / ( )

RX X R4

4 4 3

1

1=

−( / ( )) /6 or 9.

59.42.

Mult. = 0.001; ofs. = R2/(R1+R2)Mult. = 1/R3

where X4 3= X

7&9* X R Rs f= / *used as half bridge

R R Xs f= 7 or 9. Mult. = Rf; ofs. = 0

R R Xf s= / 7 or 942.

Mult. = 1/Rs; ofs. = 0

Page 141: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-19

13.6 RESISTANCE MEASUREMENTSREQUIRING AC EXCITATIONSome resistive sensors require AC excitation.These include the 207 relative humidity probe,soil moisture blocks, water conductivity sensorsand wetness sensing grids. The use of DCexcitation with these sensors can result inpolarization, which will cause an erroneousmeasurement, and may shift the calibration ofthe sensor and/or lead to its rapid decay.

The AC half bridge Instruction 5 (incorporatedinto the 207 relative humidity measurementInstruction 12) reverses excitation polarity toprovide ion depolarization and, in order tominimize the time excitation is on, grounds theexcitation as soon as the signal is integrated(Figure 13.6-1). The slow integration timeshould never be used with a sensor requiringAC excitation because it results in the excitationlasting about 20 times as long, allowingpolarization to affect the measurement.

FIGURE 13.6-1. AC Excitation andMeasurement Sequence for AC Half-Bridge

INFLUENCE OF GROUND LOOP ONMEASUREMENTS

When measuring soil moisture blocks or waterconductivity the potential exists for a groundloop which can adversely affect themeasurement. This ground loop arisesbecause the soil and water provide an alternatepath for the excitation to return to CR7 ground,and can be represented by the modeldiagrammed in Figure 13.6-2.

FIGURE 13.6-2. Model of Resistive Sensorwith Ground Loop

In Figure 13.6-2, Vx is the excitation voltage, Rfis a fixed resistor, Rs is the sensor resistance,and RG is the resistance between the excitedelectrode and CR7 earth ground. With RG inthe network, the measured signal is:

V VR

R R R R Rxs

s f s f G1 = + +( ) /

[13.6-1]

RsRf/RG is the source of error due to theground loop. When RG is large the equationreduces to the ideal. The geometry of theelectrodes has a great effect on the magnitudeof this error. The Delmhorst gypsum blockused in the 227 probe has two concentriccylindrical electrodes. The center electrode isused for excitation; because it is encircled bythe ground electrode, the path for a ground loopthrough the soil is greatly reduced. Moistureblocks which consist of two parallel plateelectrodes are particularly susceptible to groundloop problems. Similar considerations apply tothe geometry of the electrodes in waterconductivity sensors.

The ground electrode of the conductivity or soilmoisture probe and the CR7 earth ground forma galvanic cell, with the water/soil solutionacting as the electrolyte. If current was allowedto flow, the resulting oxidation or reductionwould soon damage the electrode, just as if DCexcitation was used to make the measurement.Campbell Scientific probes are built with seriescapacitors in the leads to block this DC current.In addition to preventing sensor deterioration,the capacitors block any DC component fromaffecting the measurement.

Page 142: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 13. CR7 MEASUREMENTS

13-20

13.7 PULSE COUNT MEASUREMENTSMany pulse output type sensors (e.g.,anemometers and flow-meters) are calibrated interms of frequency (counts/second). For thesemeasurements the accuracy is related directlyto the accuracy of the time interval over whichthe pulses are accumulated. Variation in thepulse sampling interval DOES NOT effect thosecases where the pulse measurement isindependent of time, i.e., where the total pulsecount is of interest instead of frequency.

The Pulse Count Instruction (#3) causes thepulse channel counters to be read and reset tozero every time the program table is executed.The CR7 operating system checks the programtables every 0.1 seconds to determine whetheror not a table should be executed. If any of the3 tables requires execution and contains aPulse Count Instruction, ALL active pulsechannels in the specified I/O Module are readand reset to zero before the table is executed.Reading the pulse channels immediatelyinstead of when the Pulse Count Instruction isencountered in the program sequenceeliminates variation in the pulse samplinginterval caused by variable program executiontimes.

If the table execution is delayed, for example bylengthy output processing, the pulse channelcounters are not read until the next executioninterval occurs. Whenever a table executionoverrun occurs, a decimal point appears belowthe colon that separates the ID and Data field ofthe display. Frequency data taken during anoverrun is invalid because the pulse samplinginterval is extended. The configuration code(Parameter 4) entered in the Pulse CountingInstruction allows measurements taken duringoverruns to be discarded and replaced by thecount obtained during the previous, correctsampling interval.

PULSE COUNT MEASUREMENTS USINGMULTIPLE I/O MODULES

Pulse channels contained in multiple I/OModules are read and reset based on theprogram table priority. Within a specificprogram table, the channels are reset accordingto the priority of the I/O Module, i.e., Module 1first and Module 4 last. For example, if Table 1and 2 have simultaneous execution intervals, allthe active pulse channels in the I/O Modulesreferenced by Pulse Count Instructions in Table1 are read and reset first, followed by the I/OModules referenced in Table 2. Within Table 1however, pulse channels contained in I/OModule 1 are read first, followed by I/O Module2, etc. All Pulse Counting Instructionsreferencing the same I/O Module should becontained in the same program table.

Approximately 0.6ms is required to read andreset the pulse channels contained in one I/OModule. Thus different I/O Modules having thesame pulse sample intervals are offset in realtime by 0.6ms per I/O Module. The pulsesample interval associated with an I/O Moduleis constant however, as long as theprogramming rules listed below are observed.

1. If possible place all Pulse CountInstructions in the same program table.

2. If more than one program table containsPulse Count Instructions, give Table 1 thefastest execution interval and make theother execution intervals even multiples ofTable 1's interval.

If these rules are violated a 0.6ms variationcould exist in an I/O module's sample interval.For example, suppose Table 1 resets the pulsecounters in I/O Module 1 every 3 seconds andTable 2 resets the pulse counters I/O Module 2every second. When Table 1 is executed thepulse counters in I/O Module 2 will be reset0.6ms later than when only Table 2 is executed.The frequencies must exceed 1.67 kHz beforethe measurement is affected by a 0.6msvariation in the pulse sampling interval.

Page 143: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

14-1

SECTION 14. INSTALLATION

14.1 ENVIRONMENTAL ENCLOSURE,CONNECTORS AND JUNCTIONBOXESThe standard CR7 is equipped with the ModelENC-7F Fiberglass Case. During themanufacturing of the case, the base and lid areformed together to insure a perfectly matchedfit. A six digit serial number is stamped into theextruded aluminum rims on both the base andlid. When more than one CR7 is owned, careshould be taken to avoid a mismatch whichcould prevent a gas-tight seal.

In addition to the AC power input connector andpressure relief valve, the STANDARD ENC-7Fenclosure has two 1.040" dia. access ports,located to the left side of the I/O Module (FigureOV.1-1). These access ports are provided toallow the entry of sensor leads, power cables,etc. Unless otherwise specified at time ofordering, these two access ports are fitted with0.75" dia. conduit bushings, 0-Ring seals andremovable neoprene plugs. The neopreneplugs can be used to form a reasonable seal bydrilling holes in them for accommodating thepassage of sensor leads to the I/O Module.

NOTE: Users wishing to punch additionalaccess ports should be aware that the1.040" dia. punch is a special size. Thegreenlee punch normally used to makeholes for 0.75" conduit bushings is 1.07"dia. This diameter is too large for mountingthe 19 pin connector option.

Access ports fitted with drilled neoprene plugsmay not be sufficient for certain data acquisitionsituations. Alternatively, the access ports canhave connectors installed.

Factors which may influence selection of theappropriate connector type are (1) the sealrequired, (2) the permanent or temporary natureof the CR7 installation, and (3) costconsiderations.

14.1.1 ACCESS PORTS FITTED WITH ELBOWS

Standard 0.75" dia. male conduit elbows maybe screwed directly into the conduit bushingsprovided with the standard environmentalenclosure. Elbows allow entry of individualsensor leads and power cables while preventingprecipitation from entering the enclosuredirectly. Silicon sealer can be used to seal offthe space between the elbow wall and leads.Conduit elbows are inexpensive and well suitedfor field applications where sensor arrays arefrequently changed and a gas-tight seal is NOTrequired.

NOTE: Larger conduit elbows (1.5" dia.)are required for allowing a 9 pin D-typeconnector with ribbon cable attached topass through and access port. In order toaccommodate the larger elbows, accessports must be enlarged and fitted with theappropriate conduit bushings and O-Ringseals.

14.1.2 SOCKET CONNECTORS

Access ports may be reconfigured as connectorports by replacing the conduit bushings withsealed (shell size 14) 19-pin circular socketconnectors. Individual leads are soldered to thebackside of the mounted connector and routedto appropriate I/O terminals. Socket connectorsare recommended for applications where a gas-tight seal IS required.

The connector utilizes a compression screw-actuated sealing gland. This connector isrecommended when multi-connector sensorcable is used between the CR7 and a junctionbox.

14.1.3 JUNCTION BOXES

Individual sensor leads (and multiconductorcables) may be routed directly from the sensorlocations to the CR7 or routed to a junction boxand then to the CR7. Advantages of using ajunction box are two-fold: it provides aconvenient method for changing sensors/sensorleads quickly and can provide additionalprotection against instrumentation damage as aresult of lightning induced high voltages.Junction boxes generally do not require a gas-

Page 144: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 14. INSTALLATION

14-2

tight seal but do require protection from thermalgradients when used for thermocouple leadwires (Section 13.4).

14.2 SYSTEM POWER REQUIREMENTSAND OPTIONSThe standard CR7 is equipped with sealed leadacid battery packs and charging circuitry foraccommodating (1) 120/240 VAC line power,(2) solar panels, (3) vehicular 12V powersources, and (4) external 12V batteries. Whenfully charged, the internal batteries of the CR7are capable of providing 2.5 Amp-Hours ofservice or about 5 days of operation in a typicalapplication where the CR7 is active 10% of thetime.

14.2.1 POWER SUPPLY AND AC CHARGER

Power for charging the internal batteries froman external AC source is provided to the CR7's12V charging regulator circuit board through thepower input connector located on the outside ofthe case to the right of the Control Module.

The LABORATORY ENCLOSURE has a 4-position voltage select (100, 120, 220 or 240)insert chip and 0.1 amp slow blow fuse locatednext to the power input connector (on theoutside of the enclosure). CR7s leave theFactory with the voltage insert chip set to 120VAC. If the intended line voltage is not 120V,reposition the chip to correspond as closely aspossible with the AC line voltage available (thenumber showing when the chip is insertedspecifies the voltage level).

ENVIRONMENTAL ENCLOSURES areequipped with a weather-tight bayonet mount 3-pin circular power connector. Access to the 2-position (115 and 230) voltage select switch and0.1 amp slow blow fuse is by lifting up theControl Module Panel. The switch is set to 115VAC at the factory.

A temperature compensated 12V CHARGINGREGULATOR CIRCUIT BOARD beneath theControl Module regulates the charging voltagesupplied to the lead acid batteries and thevoltage to the CR7 operating system. DCPower sources are connected to the terminalblock on the charging regulator board. Theterminals labeled "EXT BATT" are forconnecting a 12V power source. The terminalslabeled "SOLAR" are for connecting a solarpanel or DC source with sufficient voltage (15-

25 VDC) to charge the internal lead acidbatteries.

The LED auxiliary power light located on theface of the Control Module, is activated by thecharging regulator when solar or AC chargingcircuitry are connected to the CR7. The LEDoperates with the ON/OFF switch in eitherposition but is NOT designed to operate whenan external 12V battery only is connected to theCR7.

Power to the CR7 operating system iscontrolled by the position of the ON/OFF toggleswitch located on the face of the ControlModule.

The sealed lead acid battery packs, locatedbelow the Control Module, are rated at 6V eachand are connected in series to provide 12 VDC.

TABLE 11.2-1. CR7 Battery and ChargingCircuitry Specifications

BATTERY Type Gates #810-0011X

Float Life @ 25 oC 8 yrs minimum

Amp Hour Rating 2.5 amp-hour

Open Circuit Voltage 12.95 typ. with@ Full Charge charging circuitry

deactivated, 14.1@ 25 oC whenactivated

Open Circuit Voltage 11.76 VDC@ Full (SAFE) Discharge minimum

Shelf Life, Full Charge Check twice yearly

Charging Time from Full 40 hrs for fullDischarge (AC Source) charge, 20 hrs for

95% full charge

Charging Circuit Float charge withtemperaturecompensatedvoltage regulation

AC Line Filter (LAB.) 6 amp max, 48-440Hz, 250 VAC max.

AC Line Filter (ENVIR.) 1 amp max, 50-60Hz, 250 VAC max.

Power Supply Transformer 6 watt output

Page 145: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 14. INSTALLATION

14-3

Battery voltage should NOT be allowed todrop below 11.76V before recharging;otherwise, permanent damage to the leadacid cells may occur. CSIs warranty doesNOT cover battery or cell damage resultingfrom deep discharge.

Avoid deep discharge states by periodicallymonitoring voltage level of the CR7s internalbatteries, using Input/Output Instruction 10.Incorporate the battery voltage measurement tothe data acquisition program to avoid deepdischarge of the CR7 internal batteries.

All external charging devices must bedisconnected from the CR7 in order to measurethe true voltage level of the internal batteries.

The internal lead acid batteries of the CR7 willcontinue to discharge with the CR7 turned onbut not scanning or processing data. Thisquiescent current drain will vary depending onthe number of I/O Modules, Excitation andPulse Counter cards contained in the CR7, andthe number and type of external devicespowered by the CR7's Power Supply. Userscan approximate the quiescent current drain oftheir specific CR7 System from the informationprovided in Table 14.2-2.

TABLE 14.2-2. Calculating QuiescentCurrent Drain

Module/Card Current Drain

Control Module 0.4 mAI/O Module 2.5 mAExcitation card 2.0 mAPulse Counter card 0.8 mAAnalog Input card 0.7 mA

As an example, the quiescent current drain of aCR7 System containing a Control Module, anI/O Module, 1 Excitation card, 2 Pulse Countercards and 4 Analog Input cards is about 9.3mA.At this rate of quiescent current drain, fullycharged internal batteries (2.5 AH) are depletedto a full SAFE discharge level (11.76V) after268 hours (about 11 days). When the CR7 isactive, it draws approximately 100mA so theactual current drain is a function of the programbeing executed.

14.2.2 SOLAR PANELS

Auxiliary photovoltaic power sources, such asSolarex Models MSX5, MSX10, and MSX18Solar Panels may be used to maintain chargeon lead acid batteries.

TABLE 14.2-1. Solar Panel Specifications

MSX5 MSX10 MSX18

Typical Peak Power 4.2 8.9 18.6(Watts)Current @ Peak .27 .59 1.06(Amps)Amp Hrs/week 6.4 14.4 26.4

NOTE: Specifications assume 1 kW/m2illumination at a panel cell temperature of25oC. Individual panel performance mayvary as much as 10%.

When selecting a solar panel, a rule-of-thumb isthat on a stormy overcast day the panel shouldprovide enough charge to meet the systemcurrent drain (assume 10% of average annualglobal radiation, kW/m2). Specific siteinformation, if available, could strongly influencethe solar panel selection. For example, localeffects such as mountain shadows, fog fromvalley inversion, snow, ice, leaves, birds, etc.shading the panel should be considered.

Guidelines are available from the SolarexCorporation for solar panel selection called"DESIGN AIDS FOR SMALL PV POWERSYSTEMS". It provides a method forcalculating solar panel size based on generalsite location and system power requirements. Ifyou need help in determining your systempower requirements, contact CampbellScientific's Marketing Department.

The solar panel is connected to the CR7 byattaching the 2 lead wires of the power cable tothe terminal block located on the chargingregulator circuit board (Figure 14.2-1). The freeend of the solar panel power cable is equippedwith a 12V power plug for use with the 21XLMicrologger. Cut this plug off with side cuttersand remove about 1.5" of the cable's outerinsulation. Remove about 0.5" of insulationfrom the exposed black and clear leads. TheBLACK lead is GROUND and the CLEAR leadis positive (+).

Page 146: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 14. INSTALLATION

14-4

Regulated solar panels (e.g., MSX18R) limitvoltage to approximately 14V. The CR7Solar Panel input requires 15-25 VDC tocharge.

14.2.3 EXTERNAL BATTERY CONNECTION

An external battery may be used to supplementthe internal lead acid batteries of the CR7. Theground and +12 leads are connected to theappropriate "EXT BATT" terminals.

The recommended procedure for connectingthe CR7 to an external battery is to make allrequired ground lead connections beforeconnecting the battery. Accidental shorting canbe prevented by insulating one of the powerleads until cable routing is completed. Whendisconnecting a battery, remove the positivelead before disconnecting the ground lead.

Power for operating the CR7 may also beprovided by connecting the power leads from anexternal 12V battery to the 2 terminals locatedon the left side of the I/O Module CPU card.This is a quick and convenient method ofconnecting an alternate power supply to theCR7 if it is necessary to disconnect or replacethe CR7s internal lead acid batteries. However,the primary purpose of the terminals on the I/OModule is to provide access to 12V for poweringexternal devices such as sensors.

Reverse polarity protection is NOT providedon these terminals and CR7 damage willoccur if external power is connected withreverse polarity.

If an external power supply is connected to theI/O Module terminals the CR7 remainspowered-up even when the power switch is off.The external supply must be removed to powerthe CR7 down.

CSI recommends using 22 AWG lead wires orlarger when connecting an external battery tothe CR7.

14.2.4 CONNECTING TO VEHICLE POWERSUPPLY

When the starting motor of a motor vehicle witha 12 Volt electrical system is engaged, thevoltage drops considerably below the nominal12 volts. If the CR7 were connected directly tothe vehicle power supply, the CR7 batterieswould be pulled down as well, causing the CR7to "bomb" any time the vehicle was started. Toavoid this problem, a diode (i.e., 1N4001) and a3 ohm 5 watt resistor must be placed in seriesin the positive lead going to the EXTERNALBATTERY terminal. The diode allows thevehicle to power the CR7 without the CR7attempting to power the vehicle (diode installedwith bar end toward datalogger). To reduce thepotential for ground reference errors inmeasurements, the ground lead should be 16AWG or larger.

FIGURE 14.2-1. Connecting Vehicle PowerSupply to CR7

14.2.5 SAFETY PRECAUTIONS

There are inherent hazards associated with theuse of sealed lead acid batteries. Under normaloperation, lead acid batteries generate a smallamount of hydrogen gas. This gaseous by-product is generally insignificant because thehydrogen dissipates naturally before build up toan explosive level (4%) occurs. However, if thebatteries are shorted or overcharging takesplace, hydrogen gas may be generated at a ratesufficient to create a hazard. Because thepotential for excessive hydrogen build up doesexist, CSI makes the followingrecommendations:

1. A CR7 equipped with standard lead acidbatteries should NEVER be used inenvironments requiring INTRINSICALLYSAFE EQUIPMENT.

2. When attaching an external battery to theCR7, insulate the bare lead ends to protectagainst accidental shorting while routing thepower leads.

Page 147: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 14. INSTALLATION

14-5

3. When the CR7 is to be located in a gas-tight enclosure or used in a gas-tight modewith the standard ENVIRONMENTALLYSEALED FIBERGLASS CASE, the internallead acid batteries SHOULD BE REMOVEDand an external battery substituted.

14.3 HUMIDITY EFFECTS ANDCONTROLThe CR7 system is designed to operate reliablyunder environmental conditions where therelative humidity inside its enclosure does notexceed 90% (noncondensing). Situations wherethe humidity tolerances are exceeded mayresult in damage to IC chips, microprocessorfailure and/or measurement inaccuracies due tocondensation on the various PC board runners.Effective humidity control is the responsibility ofthe user and is particularly important inoperational environments where the CR7 isexposed to salty air.

Several precautionary methods are available forprotecting the CR7 against excessive humidityand subsequent component damage. Selectionof the appropriate method or combination ofmethods will depend on the environmentalcharacteristics prevailing at a specific dataacquisition site. Humidity control methodsinclude:

1. the use of desiccant

2. sealing the CR7 enclosure gas-tight

3. the nitrogen purging technique

14.3.1 DESICCANT

As a minimal precaution, the packets of HUMI-SORB desiccant shipped with the CR7 shouldbe placed inside the Control Module. Thesepackets should be routinely removed from theCR7 and reactivated by warming them in anoven for about 16 hours at a temperature of 120oC (250 oF). The recommended time betweenreactivations varies from one location toanother. Obviously, the desiccant requires morefrequent attention in environments where therelative humidity is high.

14.3.2 GAS-TIGHT ENVIRONMENT

Another method for controlling humidity involvesthe proper selection of connectors for use withthe sealed fiberglass enclosure such that theCR7 operates in a gas-tight environment.Various connector options and associateddetails are described in Section 12. Desiccantis still required with this method.

14.3.3 NITROGEN PURGING

Several CSI customers have had success inpreventing humidity-related equipmentmalfunctions in harsh environments by allowingnitrogen gas to slowly bleed into the dataloggerenclosure. The sensor leads, power cables,etc., are routed to the terminal blocks of thedatalogger through simple, inexpensive conduitelbows which are left unplugged. A nitrogenbottle is then left at the field site with itsregulator valve slightly open so that nitrogen isallowed to escape slowly through a rubber tubewhich is routed along with the sensor leadsthrough the conduit elbows into the CR7enclosure. The tube vent should be positionedunderneath the Control Module.

Equipment required for this method of humiditycontrol generally can be obtained from any localwelding supply shop and includes a nitrogenbottle, regulator with tube adapter (contentgauge, optional), hose clamp and a suitablelength of small diameter rubber tubing.Nitrogen bottles are available in various sizesand capacities. The size of the nitrogen bottleused depends on the transport facilitiesavailable to and from the field site and on thetime interval between site visitations. Wherepractical, larger nitrogen bottles should be usedto reduce cost and refilling frequency.

14.4 RECOMMENDED GROUNDINGPRACTICES

14.4.1 PROTECTION FROM LIGHTNING

Primary lightning strikes are those where thelightning hits the datalogger or sensors.Secondary strikes occur when the lightningstrikes somewhere near the lead in wires andinduces a voltage in the wires. All input andoutput connections in the I/O Module areprotected using spark gaps that are rated to10,000 amps. The spark gaps are connecteddirectly to the heavy copper grounding bar oneach input card with no more than 2 inches of

Page 148: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 14. INSTALLATION

14-6

20 AWG wire. This transient protection isuseless if there is not a good connectionbetween the CR7 and earth ground.

All dataloggers in use in the field should begrounded. A 12 AWG or larger wire should berun from the grounding terminal on the left sideof the I/O Module (Figure OV1-1) to a groundingrod driven far enough into the soil to provide agood earth ground.

A modem/phone line connection to the CR7provides another pathway for transients to enterand damage the datalogger. The DC112Modem has spark gaps on the phone lines. Aground wire should be run between the groundterminal on the modem and earth ground.

14.4.2 EFFECT ON MEASUREMENTS: COMMONMODE RANGE

The effects that a difference in ground potentialbetween a sensor or signal conditioner and theCR7 can have on a measurement werediscussed in Sections 7.2 and 13.2. Thesesections stress that differential voltagemeasurement gets rid of offset caused by adifference in ground potential. However, inorder to make a differential measurement, theinputs must be within the CR7 common moderange of ±5V.

The common mode range is the voltage range,relative to CR7 ground, within which both inputsof a differential measurement must lie, in orderfor the differential measurement to be made.For example, if the high side of a differentialinput is at 4V and the low side is at 3V relativeto CR7 ground, there is no problem, ameasurement made on the ±1.5V range wouldindicate a signal of 1V. However, if the highinput is at 5.8V and the low input is at 4.8V, themeasurement cannot be made because thehigh input is outside of the CR7 common moderange.

Problems with exceeding common mode rangemay be encountered when the CR7 is used toread the output of external signal conditioningcircuitry if a good ground connection does notexist between the external circuitry and theCR7. When operating where AC power isavailable, it is not always safe to assume that agood ground connection exists through the ACwiring. If a CR7 is used to measure the outputfrom a laboratory instrument (both plugged into

AC power and referencing ground to outletground), it is best to run a ground wire betweenthe CR7 and the external circuitry. Even withthis ground connection, the ground potential ofthe two instruments may not be at exactly thesame level, which is why a differentialmeasurement is desired.

14.5 USE OF DIGITAL CONTROLPORTS FOR SWITCHING RELAYSEach of the eight digital control output ports canbe set high or low by the PORT SET command(Instruction 20). Because of current supplylimitations, a digital control output port normallyis used to operate an external relay driver.These relays may be used for activating anexternal power source to run a fan motor or foraltering an external circuit as a means ofmultiplexing signal lines, etc.

Figure 14.5-1 is a schematic representation of atypical external coil driven relay configurationwhich may be used in conjunction with one ofthe CR7s digital control output ports. Theexample shows a DC fan motor (typical of aventilated psychrometer) and 6V battery in thecircuit, but the configuration may be used forother purposes. This particular configurationhas a coil current limitation of 75mA because ofthe NPN Medium Power Transistors used (PartNo. 2N2222). CSI's Model A21REL-12 and A6REL12 are 12 VDC Relay Controllers availablefor use with the CR7 system.

FIGURE 14.5-1. Typical Connection forActivating/Powering External Devices, Using aDigital Control Output Port and Relay Driver.

Page 149: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

15-1

15. I/O CARD ADDRESSING AND MULTIPLE I/O MODULES

15.1 I/O CARD IDENTIFICATIONNUMBER DECODINGEach I/O card must be assigned a unique cardidentification number and have jumpers set forthat number. The numbers allow the cards todecode signals addressed to them by the I/OModule. CR7s leave the factory with cardnumbers assigned. These numbers may bereassigned by the user when a CR7 needs tobe expanded with additional cards orreconfigured for a particular application.

15.1.1 ASSIGNING CARD IDENTIFICATIONNUMBERS

Cards fall into one of two Categories. Category1 includes all Excitation and Pulse Countercards; Category 2 includes Analog Input cardsonly. NUMBERS MUST NOT BEDUPLICATED WITHIN A CATEGORY, but anumber assigned in one category may beduplicated in the other category. While theidentification numbers do not need to followphysical order of the cards, it simplifies wiringsensors if the card ID numbers match thephysical order.

When assigning card numbers the user canavoid confusion by following 4 steps:

1. Categorize the cards.

2. Assign a valid number to each card.

3. Set the jumpers on the cards according tothe numbers assigned.

4. Insert the cards into the Control Module,making certain that the correct number tagis secured with each card (Figure 10.1-1).

Tables 15.1-2 and 15.1-3 list card numbers andthe corresponding jumper placement. The busstructure allows one CR7 Control Module toaddress up to 16 Excitation cards, 16 PulseCounter cards and 32 Analog Input cards. OneControl Module can control up to 4 I/O Modules.

15.1.2 PLACING JUMPERS IN THEIR PROPERLOCATIONS

Jumpers are blue rectangular plastic and metalsleeves, approximately 0.2" in length, with twoholes which are slipped over pins on the circuitboard.

Category 1 cards have 2 jumpers and Category2 cards have 3 jumpers. Jumper positions arelabeled on the card. Figure 15.1-1 shows thelocation of the jumpers on the Excitation, PulseCounter and Analog Input cards. Jumpersettings are listed in Tables 15.1-2 and 15.1-3.

TABLE 15.1-1. Jumper Locations and Labels

Card Jmp/ Card No.Type Cat. Card Loc. Pins

Excitation 1 2 R2 6R6 6

Pulse Count 1 2 R36 6T32 6

Analog Input 2 3 R3 3R4 6R8 6

Page 150: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 15. I/O CARD ADDRESSING AND MULTIPLE I/O MODULES

15-2

FIGURE 15.1-1. Position of Decoding Jumpers on Excitation, Pulse Counter and Analog Input Cards.

Page 151: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 15. I/O CARD ADDRESSING AND MULTIPLE I/O MODULES

15-3

TABLE 15.1-2. Jumper Settings for Excitation and Pulse Counter Cards

Page 152: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 15. I/O CARD ADDRESSING AND MULTIPLE I/O MODULES

15-4

TABLE 15.1-3. Jumper Settings for Analog Input Cards.

15.2 USE OF MULTIPLE I/O MODULESUp to four I/O Modules can be connected to onecontrol module. Additional I/O Modules may beremotely located from the Control Module.

Two enclosures are available for the 720 I/OModule; the standard ENC-7F FiberglassEnvironmental Enclosure or the ENC-7LAluminum Laboratory Enclosure. Options alsoare available for 19" rack mounting (M197) ormounting in a NEMA type enclosure (usesM720 Back Mount Brackets).

The 720XL I/O Module mounts directly in a 19"rack or may be mounted in a NEMA typeenclosure with the Model M720 Back MountBrackets.

TABLE 15.2-1. SC94 Pin Description.

Pin ID Control Module I/O Module

A Transmit data Receive dataB Transmit data return Receive data returnC Receive data return Transmit data returnD Receive data Transmit data

NOTE: Interconnect cable lengths inexcess of a 1000 ft. limit the maximumbaud rate at which data may be transmittedbetween the Control Module and theRemote I/O Module. Cable length andrecommended baud rates are listed inTable 15.2-3.

Page 153: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 15. I/O CARD ADDRESSING AND MULTIPLE I/O MODULES

15-5

TABLE 15.2-2. Hardware Components in SC94

Component Description

Interconnect Cable (1 ea.) Length of the 4-wire cable is made to order, circular connectorsattached at both ends.

Mating Circular Connector (2 ea.) One connector affixed to Control Module enclosure; otherconnector affixed to remote I/O Module enclosure; each joinedto a SC94 circuit card.

SC94 Circuit Card (2 ea.) One card fastens to the remote I/O Module enclosure, the otherto the Control Module enclosure; both have circular socketconnectors.

10-Conductor Ribbon Cable Ribbon cable connects SC94 circuit card to Control Module'sSerial Interface cord or to remote I/O Module's Controller card.

Grounding Wire (2 ea.) 12 AWG; wires are routed between terminals located on SC94cards and 1 of 3 available terminals on the grounding bar onleft side of I/O Module framework; provides transient protectionat both ends of Interconnect cable.

Mating connectors and the associated circuitryare installed at the factory when the CR7System and multiple I/O Modules are purchasedtogether. An SC94 Four Wire Current LoopInterconnect assembly is required for eachremote I/O Module operating in a CR7 System.Table 15.2-2 describes the SC94 hardware.

Remote I/O Modules require their own powersupply. When remote I/O Modules are orderedwith either the Model ENC-7F or the ModelENC-7L enclosure option, the space normallytaken up by the Control Module can be used forhousing the PS12-LA Power Supply. ThePS12-LA 12V charging regulator and batterymay also be mounted with a remote I/O Moduleinside a NEMA type enclosure. Multiple I/OModules can be powered by a single PowerSupply if the distance is not too great.

Once all grounding leads are in place the powersupply leads are usually connected to theterminal block located on the top left of the I/OModule's Controller card. Alternatively, the twopower leads can be routed to the terminals,marked +12V and, ground positioned on theSC94 card.

NOTE: Whenever power is connected tothe I/O Module, it draws current even whenthe power switch on the Control Module isin the OFF position.

15.2.1 PROGRAMMING CONSIDERATIONS

The mating connector(s) affixed to CR7Systems configured to operate with multiple I/OModules are labeled with a unique I/O Moduleidentification number (e.g., 1, 2, 3, 4) beforethey leave the Factory. Instruction 23 is used toaddress subsequent programming instructionsto a particular I/O Module.

At the start of each Program Table, the ControlModule assumes all instructions are meant forI/O Module #1, the I/O Module housed with theControl Module. Instruction 23 must be used toaddress instructions to I/O Modules other than#1. Once Instruction 23 is executed,subsequent instructions are addressed to thespecified I/O Module until Instruction 23 isexecuted again or the I/O Module again defaultsto #1 at the start of a Program Table.

Page 154: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 15. I/O CARD ADDRESSING AND MULTIPLE I/O MODULES

15-6

A typical programming example for a CR7System containing two I/O Modules is given inthe following Program Table. A separate PowerSupply powers the remote I/O Module. Theobjective of the programming example is toconduct a preliminary system check-out bymeasuring the battery voltage of the remotePower Supply and of the power supply poweringthe Control Module and I/O Module #1.

PROGRAMExecution Interval 1 Second

Inst. Param.Loc. No. Entry Description

1 P 10 Measure ControlModule voltage

1 1 Store result in InputLoc. 1

2 P 23 Select I/O Module1 2 I/O Module 2

3 P 10 Measure remotebattery voltage

1 2 Store result in InputLoc. 2

Any subsequent instructions in the examplewould address I/O Module #2 unless Instruction23 were executed again specifying I/O Module#1.

15.2.2 SETTING BAUD RATE BETWEEN I/O ANDCONTROL MODULES

The baud rate that data are transmittedbetween the Control and I/O Modules is pre-setto 38.4 k baud at the Factory. This baud ratecan be used for most datalogging applicationsprovided the distance separating the ControlModule and the I/O Module(s) does not exceed1,000 ft. Distances in excess of 1,000 ft.

require a slower baud rate setting tocompensate for connector capacitance. Slowerbaud rates may limit table Execution Intervals orthroughput rate. Table 15.2-3 listsrecommended baud rates for communicatingwith I/O Modules at varying distance from theControl Module.

TABLE 15.2-3. Recommended Baud Ratesfor Remote I/O Modules

Distance Maximumin Recommended

Feet Baud Rate

0 to 1000 38.4 k baud1000 to 2000 19.2 k baud

The baud rate is determined by jumperplacement at location S5 of the ControlModule's Serial Interface card (Figure 15.2-1)and position G7 of the Model 720 I/O ModuleController card (Figure 15.2-2).

Position S5 has eight pairs of pins. Startingwith the pair nearest to the adjacent board edgeand moving left, baud rates of 1200, 2400,4800, 9600, 19200, 38400, 76300 or 153600baud can be selected. The 76.3 and 153.6 kbaud settings are not recommended.

Figure 15.2-2 shows the I/O Module Controllercard. Position G7 has 14 vertically aligned pinpairs with the 8 uppermost pairs determiningbaud rate. A baud rate of 153.6 k baud isobtained by jumpering the uppermost pair. Thebaud rates from the top pair working down are:153600, 76300, 38400, 19200, 9600, 4800,2400, and 1200 baud.

Baud rate settings for the Control Module andthe I/O Module(s) must be the same.

Page 155: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 15. I/O CARD ADDRESSING AND MULTIPLE I/O MODULES

15-7

Figure 15.2-1. Location of Jumper Controlling Baud Rate to I/O Modules

Page 156: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

SECTION 15. I/O CARD ADDRESSING AND MULTIPLE I/O MODULES

15-8

Figure 15.2-2. Location of I/O Module Jumper Controlling Baud Rate between the I/O Module andthe Control Module

Page 157: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

A-1

APPENDIX A. GLOSSARY

ASCII: Abbreviation for American StandardCode for Information Interchange(pronounced "askee"). A specific binarycode of 128 characters represented by 7 bitbinary numbers.

BAUD RATE: The speed of transmission ofinformation across a serial interface,expressed in units of bits per second. Forexample, 9600 baud refers to bits beingtransmitted (or received) from one piece ofequipment to another at a rate of 9600 bitsper second. Thus, a 7 bit ASCII characterplus parity bit plus 1 stop bit (total 9 bits)would be transmitted in 9/9600 sec = .94ms or about 1000 characters/sec. Whencommunicating via a serial interface, thebaud rate settings of two pieces ofequipment must match each other.

DATA POINT: A data value which is sent toFinal Storage as the result of an OutputInstruction. Strings of data points output atthe same time make up Output Arrays.

EXECUTION INTERVAL: The time intervalbetween initiating each execution of a givenProgram Table. If the Execution Interval isevenly divisible into 24 hours (86,400seconds), the Execution Interval will besynchronized with 24-hour time so that thetable is executed at midnight and everyexecution interval thereafter. The table willbe executed for the first time at the firstoccurrence of the Execution Interval aftercompilation. If the Execution Interval doesnot divide evenly into 24 hours, executionwill start on the first even second aftercompilation.

EXECUTION TIME: The time that it actuallytakes the CR7 to execute an instruction orgroup of instructions. If the execution timeof a Program Table exceeds the table'sExecution Interval, the Program Table willbe executed less frequently thanprogrammed.

FINAL STORAGE: That portion of memoryallocated for storing Output Arrays. FinalStorage may be viewed as a ring memory,with the newest data being written over the

oldest. Data in Final Storage may bedisplayed using the *7 Mode or sent tovarious peripherals.

HIGH RESOLUTION: A high resolution datavalue has 5 significant digits and may rangein magnitude from ±.00001 to ±99999. Ahigh resolution data value requires 2 FinalStorage locations (4 bytes). All Input andIntermediate Storage locations are highresolution. Output to Final Storage defaultsto low resolution: high resolution outputmust be specified by Instruction 78.

INDEXED INPUT LOCATION: An Inputlocation entered as an instruction parametermay be indexed by keying "C" beforeentering by keying "A", two dashes (--) willappear at the right of the display. Within aloop (Instruction 87), this will cause thelocation to be incremented each passthrough the loop. Indexing is also used withInstructions 13, 14 and 75 to cause an Inputlocation, which normally remains constant,to be incremented with each repetition.

INPUT/OUTPUT INSTRUCTIONS: TheseInstructions tell the I/O Module what to do.Input/Output Instructions are used to initiatemeasurements and store the results inInput Storage or to set Digital Control Portsor Continuous Analog Output channels.

INPUT STORAGE: That portion of memoryallocated for storing the results of Input andProcessing Instructions. The values inInput Storage can be displayed and alteredfrom the *6 Mode.

INSTRUCTION LOCATION NUMBER: Asinstructions are entered in a Program Tablethey are numbered sequentially. Theinstruction location number is the numbergiving an instruction's order in the ProgramTable. When programming a table, theinstruction location number and a P (e.g.,04: P00) prompts the user when it is time toenter an instruction.

Page 158: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

APPENDIX A. GLOSSARY

A-2

INTERMEDIATE STORAGE: That portion ofmemory allocated for storing the results ofintermediate calculations necessary foroperations such as averages or standarddeviations. Intermediate storage is notaccessible to the user.

LOW RESOLUTION: This is the default outputresolution. A low resolution data value has4 significant decimal digits and may rangein magnitude from ±0.001 to ±6999. A lowresolution data value requires 1 FinalStorage location (2 bytes).

OUTPUT ARRAY: A string of data pointsoutput to Final Storage. Output occurs onlywhen the output flag is set. The first pointof an Output Array is the Output Array ID,which gives the table and the InstructionLocation Number of the Instruction whichset the Output Flag. The data points whichcomplete the Array are the result of theOutput Processing Instructions which areexecuted while the Output Flag is set. TheArray ends when the Output Flag is reset atthe end of the table or when anotherInstruction acts upon the Output Flag.Output occurs only when the output flag isset.

OUTPUT INTERVAL: The time intervalbetween initiation of a particular OutputArray. Output occurs only when the outputflag is set. The flag may be set at fixedintervals or in response to certainconditions.

OUTPUT PROCESSING INSTRUCTIONS:These Instructions process data values andgenerate Output Arrays. Examples ofOutput Processing Instructions includeTotalize, Maximize, Minimize, Average, etc.The data sources for these Instructions arevalues in Input Storage. The results ofintermediate calculations are stored inIntermediate Storage. The ultimatedestination of data generated by OutputProcessing Instructions is Final Storage.The transfer of processed summaries toFinal Storage takes place when the OutputFlag is set by a Program Control Instruction.

PARAMETER: When used in conjunction withCR7 instructions, parameters are numbersor codes which are entered whenprogramming the CR7 to specify exactlywhat the instruction is to do. Once theinstruction number has been entered in aProgram Table, the CR7 will prompt for theparameters by displaying the parameternumber in the ID Field of the display.

PROCESSING INSTRUCTIONS: TheseInstructions allow the user to furtherprocess input data values and return theresult to Input Storage where it can beaccessed for output processing.Arithmetic and transcendental functions areincluded in these Instructions.

PROGRAM CONTROL INSTRUCTIONS:These Instructions are used to modify thesequence of execution of Instructionscontained in Program Tables, and to set orclear flags.

PROGRAM TABLE: That portion of memoryallocated for storing programs consisting ofa sequence of user instructions whichcontrol data acquisition and processing.Programming can be separated into 2tables, each having its own user enteredExecution Interval. A third table is availablefor programming subroutines which may becalled by instructions in Tables 1 or 2. The*1 and *2 Modes are used to access Tables1 and 2. The *3 Mode is used to accessSubroutine Table 3. The length of thetables are constrained only by the totalmemory available for programming.

SAMPLE RATE: The rate at whichmeasurements are made by the I/OModule. The measurement sample rate isprimarily of interest when considering theeffect of time skew (i.e., how close in timeare a series of measurements). Themaximum sample rates are the rates atwhich the measurements are made wheninitiated by a single instruction with multiplerepetitions. When the I/O Module is told tomake several repetitions of a measurementit will make those measurements as fast aspossible and buffer the data for use by theControl Module. In normal operation theControl Module will complete all processingcalled for by the Input Instruction beforeinstructing the I/O Module to make a

Page 159: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

APPENDIX A. GLOSSARY

A-3

measurement specified by a subsequentinstruction. The time involved in processingthe measurement data to obtain the valuesstored in Input, Intermediate, and FinalStorage makes the throughput rate slowerthan the measurement sample rate.

SIGNATURE: A number which is a function ofthe data and the sequence of data inmemory. It is derived using an algorithmwhich assures a 99.998% probability that ifeither the data or its sequence changes, thesignature changes.

THROUGHPUT: CR7 throughput rate is therate at which a measurement can be made,scaled to engineering units and the readingstored in Final Storage. The CR7 I/OModule has the ability to scan sensors at arate exceeding the throughput rate (seeSAMPLE RATE). The primary factoraffecting throughput rate is the amount ofprocessing specified by the user. In normaloperation, all processing called for by aninstruction must be completed beforemoving on to the next instruction. With the700X Control Module (6303 CPU board),the maximum throughput rate for fast,single-ended measurements isapproximately 310 measurements persecond (1 second execution: Instruction 1entered 4 times, 3 times with 99 repetitions,once with 11 repetitions).

Page 160: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

APPENDIX A. GLOSSARY

A-4

This is a blank page.

Page 161: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

B-1

APPENDIX B. CR7 PROM SIGNATURES FOR SYSTEMS EQUIPPEDWITH STANDARD SOFTWARE

DISPLAYKEY ID DATA PROMENTRY FIELD FIELD NO. REMARKS

*B 01: XXXX Program Memory Sig.A 02: 22764 10437-A Control Mod. PROM #8A 03: 50101 10437-B Control Mod. PROM #7A 04: 15398 10437-C Control Mod. PROM #6A 05: XXXXX Number of K RAM + PROMA 06: XX Number of E08sA 07: XX Number of overrunsA 08: .10000 PROM Version 0.1A 09: 0004 PROM Revision 4A 11:001A 01: 21444 RAM Sig. of I/O Mod. #1

12196 357 EPROM Sig. of I/O Mod. #1 OR 11:00 38407 357A*1

* PROM 357A and a hardware modification make the slow integration time 20 ms (one 50 Hz cycle).This option is available for countries where 50 Hz Ac power is used.

- - - - - CR7 SYSTEMS WITH 2 OR MORE I/O MODULES - - - - -

"2A" 02: 21444 RAM Sig. of I/O Mod. #2

12196 357 EPROM Sig. of I/O Mod. #2

11:00

"3A" 03: 21444 - RAM Sig. of I/O Mod. #3

12196 357 EPROM Sig. of I/O Mod. #3

11:00

"4A" 04: 21444 - RAM Sig. of I/O Mod. #4

12196 357 EPROM Sig. of I/O Mod. #4

11:00

Page 162: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

B-2

This is a blank page.

Page 163: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

C-1

APPENDIX C. BINARY TELECOMMUNICATIONS

The response time and size of the input buffer of the datalogger must be accounted for when attemptingto write a program to make use of the binary commands. The datalogger may delay up to 100 ms beforeresponding to a command or between bytes in a response. The input buffer in the CR10, 21X, and CR7will now hold 64 bytes of commands; earlier versions of the 21X and CR7 software would only buffer 7bytes.

C.1 TELECOMMUNICATIONSCOMMAND WITH BINARYRESPONSESCommand Description

[no. of loc.]F BINARY DUMP - CR7 sends, inFinal Storage Format (binary,the number of Final Storagelocations specified (fromcurrent MPTR locations), thenSignature (no prompt).

DATALOGGER J AND K COMMANDS

3142J The 3142J command is used to toggledatalogger user flags, request FinalStorage data, and to establish the inputlocations returned by the K command.The format of the command is asfollows:

3142J<CR>abcd...nNULL

where

1) "3142J<CR>" is the command.

2) "a" is a 1 byte value representing the userflags to be toggled. The most significant bit(MSB), if set, will toggle datalogger user flag8. Likewise, the 2nd most significant bit, ifset, will toggle user flag 7, and so on to theleast significant bit which, if set, togglesuser flag 1. Toggle means that if a flag isset, it will be then reset, or if it is reset, it willbe set.

3) "b" is a 1 byte value whose MSB willdetermine whether Final Storage Data isreturned after the K command. If the bit isset, Final Storage Data, if any, will bereturned after the next K command. Thedatalogger initially has this bit reset uponentering telecommunications, but once setby a J command, it will remain set untilreset by another J command ortelecommunications is terminated.

The 2nd MSB set means a port toggle bytewill follow and port status is to be returnedwith the K command. Like the MSB, this bitis reset upon entering telecommunications,but remains set once set until reset byanother J command or telecommunicationsis terminated.

The remaining bits are reserved.

4) If the 2nd MSB in "b" was set then "c" is aport toggle byte, otherwise "c,d,...,n" areeach 1 byte binary values eachrepresenting a datalogger Input Storagelocation. The data at those locations will bereturned after the next K command. ASCIIcode 1 (0000001 binary) represents inputlocation 1. ASCII codes 2 (00000010binary) represents input location 2, and soon. The order of the location requests is notimportant. The list is limited, however, to 62total location requests.

5) "Null" or ASCII code 0 (00000000 binary )terminates the J command. Alternately,11111111 binary aborts the J command. Ifaborted, flags will not be toggled andlocation requests will not be saved.

User DataloggerEnters Echo

3 31 14 42 2J J

CR CRLF<

a ab bc cd dn n

Null Null

Page 164: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

APPENDIX C. BINARY TELECOMMUNICATIONS

C-2

K The K command returns datalogger time,user flag status, port status if requested, thedata at the input locations requested in theJ command, and Final Storage Data ifrequested by the J command. The formatof the command is K<CR> (K Return). Thedatalogger will echo the K and Return andsend a Line Feed. The amount of data thatfollows depends on the J commandpreviously executed; four time bytes, a userflags byte, four bytes for each input locationrequested in the J command, Final Storagedata in Campbell Scientific's binary format ifrequested by the J command, andterminating in 7F 00 HEX and two signaturebytes.

User DataloggerEnters Echo

K KCR CR

LFTime Minutes byte 1Time Minutes byte 2Time Tenths byte 1Time Tenths byte 2Flags bytePorts byte (if requested)Data1 byte 1Data1 byte 2Data1 byte 3Data1 byte 4Data2 byte 1Data2 byte 2Data2 byte 3Data2 byte 4DataN byte 1DataN byte 2DataN byte 3DataN byte 4Final Storage Data bytes01111111 binary byte00000000 binary byteSignature byte 1Signature byte 2

Time Minutes byte 1 is most significant.Convert from binary to decimal. Divide by 60 toget hours, the remainder is minutes. Forexample, 00000001 01011001 (01 59 HEX) is345 decimal minutes or 5:45.

Time Tenths byte 1 is most significant. Convertfrom binary to decimal. Divide by 10 to getseconds and tenths of seconds. For example,00000001 11000110 (01 C6 HEX) is 454decimal or 45.4 seconds. Thus the dataloggertime for 01 59 01 C6 HEX is 5:45:45.4.

The Flags byte expresses datalogger user flagstatus. The most significant bit represents Flag8, and so on to the least significant bit whichrepresents Flag 1. If a bit is set, the user flag isset in the datalogger.

The optional ports byte expresses thedatalogger port status. The most significant bitrepresents Port 8, and so on to the leastsignificant bit which represents Port1.

For each input location requested by the Jcommand, four bytes of data are returned. Thebytes are coded in Campbell Scientific, Inc.Floating Point Format. The format is decodedto the following:

Sign(Mantissa*2(Exponent))

Data byte 1 contains the Sign and theExponent. The most significant bit representsthe Sign; if zero, the Sign is positive, if one, theSign is negative. The signed exponent isobtained by subtracting 40 HEX (or 64 decimal)from the 7 remaining least significant bits.

Data bytes 2 to 4 are a binary representation ofthe mantissa with byte 2 the most significant and4 the least. The mantissa ranges in value from80 00 00 hex (0.5 decimal) to FF FF FF HEX(1-2-24 decimal). The one exception is for zerowhich is 00 00 00 00 HEX.

The Mantissa is calculated by converting Databytes 2 to 4 into binary. Each bit representssome fractional value which is summed for all24 bits. The bits are arranged from MSB toLSB with the most significant as bit23 and leastsignificant as bit0. The value that each bitrepresents = 2n-24; where n=bit location. Forexample, if there was a 1 at bit20, it’s valuewould be 2(20-24) or 2-4.

A simple method for programming this is asfollows:

Set Mantissa = 0.

Set Bit Value = 0.5.

Page 165: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

APPENDIX C. BINARY TELECOMMUNICATIONS

C-3

For loop count = 1 to 24 do the following:

If the MSB is one, then add Bit Value to theMantissa.

Shift the 24 bit binary value obtained fromData bytes 2 to 4 one bit to the left.

Multiply Bit Value by 0.5.

End of loop.

Another method that can be used as anestimate is to convert Data bytes 2 to 4 from along integer to floating point and dividing thisvalue by 16777216.

As an example of a negative value, thedatalogger returns BF 82 0C 49 HEX.

Data byte 1 = BF HEX.

Data byte 2 to 4 = 82 0C 49 HEX (or 8522825decimal).

Data byte 1 is converted to binary to find theSign. BF HEX = 10111111 BINARY.

The most significant bit is 1 so the Sign isNEGATIVE.

The exponent is found by subtracting 40 HEXfrom the remaining least significant bits.Converting the binary to hexadecimal, 111111BINARY = 3F HEX (or 63 decimal).

3F - 40 HEX = FF FF FF FF FF HEX. Or indecimal: 63 - 64 = -1.

Exponent is -1 decimal.

The binary representation of Data bytes 2 to 4is: 10000010 00001100 01001001.

Summing all the fractional values: 2-1 + 2-7 +2-13 + 2-14 + 2-18 + 2-21 + 2-24 = 0.50800.

Using the estimate method to find the Mantissa =82 0C 49 HEX / 1 00 00 00 HEX (or 8522825 /16777216) which is 0.50800 decimal.

The value is then (-)0.508*2-1 which equals-0.254.

As an example of a positive value, thedatalogger returns 44 D9 99 9A HEX.

Data byte 1 = 44 HEX.

Data byte 2 to 4 = D9 99 9A HEX (or 891290decimal).

Data byte 1 is converted to binary to find theSign. 44 HEX = 01000100 BINARY.

NOTE: Don’t lose the leading zero!

The most significant bit is 0 so the Sign isPOSITIVE.

The exponent is found by subtracting 40 HEXfrom the remaining least significant bits.Converting the binary to hexadecimal, 1000100BINARY = 44 HEX (or 68 decimal).

44 - 40 HEX = 4 HEX. Or in decimal:68 - 64 = 4.

Exponent is 4 decimal.

The binary equivalent of Data bytes 2 to 4 is:11011001 10011001 10011010.

Summing all the fractional values:

2-1 + 2-2+ 2-4 + 2-5 + 2-8 + 2-9 + 2-12 + 2-13 + 2-16 +2-17 + 2-20 + 2-21 + 2-23 = 0.85000.

Using the estimate method to find the Mantissa =D9 99 9A HEX / 1 00 00 00 HEX (or 14260634 /16777216) which is 0.85000 decimal.

The value is then (+)0.85*24 which equals13.60.

If appropriately requested by a J command,Final Storage data, if any, will immediatelyfollow the input location data. Refer to thedatalogger manual for a description of how todecode Final Storage data in CampbellScientific's binary data format. Final Storagedata will be limited to not more than 1024 bytesper K command.

The K command data is terminated with 7F 00HEX (a unique binary format code) followed bytwo signature bytes. Refer to the dataloggermanual for the meaning and calculation of thesignature bytes. The signature in this case is afunction of the first time byte through the 7F 00HEX bytes. Calculate the signature of the bytesreceived and compare with the signaturereceived to determine the validity of thetransmission.

C.2 FINAL STORAGE FORMATCR7 data is formatted as either 2 byte LOResolution or 4 byte HI Resolution values. Thefirst two bytes of an output array contain a codenoting the start of the output array and theoutput array ID, followed by the 2 or 4 byte datavalues. At the end of the data sent in response

Page 166: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

APPENDIX C. BINARY TELECOMMUNICATIONS

C-4

to the telecommunications F command a 2 bytesignature is sent (see below).

Representing the bits in the first byte of eachtwo byte pair as ABCD EFGH (A is the mostsignificant bit, MSB), the byte pairs aredescribed below.

LO RESOLUTION FORMAT - D,E,F, NOT ALLONES

BITS DESCRIPTION

A Polarity, 0 = +, 1 = -.B, C Decimal locators as defined below.D-H plus 13 bit binary value (D=MSB).second Largest possible number without D,

E, and F all 1 is 7167,byte but CAMPBELL SCIENTIFIC

defines the largest allowable rangeas 6999.

The decimal locators can be viewed as anegative base 10 exponent with decimallocations as follows:

B C Decimal Location

0 0 XXXX.0 1 XXX.X1 0 XX.XX1 1 X.XXX

DATA TYPE WHEN D,E,F, ALL EQUAL ONE

If D, E, and F are all ones, the data type isdetermined by the other bits as shown below. Ximplies a "don't care" condition; i.e., the bit canbe either 1 or 0 and is not used in the decodedecision.

A B C D E F G H DATA TYPE AND SECOND BYTE FORMAT

1 1 1 1 1 1 0 X A,B,C, = 1 - Start of output array, G=0. H is the most significant bitof the output array ID. All 8 bits of the 2nd byte are also included inthe ID.

X X 0 1 1 1 X X C = 0 - First byte of a 4 byte value.

0 0 1 1 1 1 X X A,B = 0; C = 1 - Third byte of a 4 byte value.

0 1 1 1 1 1 1 1 A = 0; remaining bits = 1 - First byte of a 2 byte "dummy" word. TheCR10 always transmits a 0 for the 2nd byte, but the word can bedecoded on the basis of the 1st byte only.

HI RESOLUTION FORMAT

Continuing to use the A-H bit representation, the four byte number is shown below as two two byte pairs.

AB0111GH XXXXXXXX 001111GH XXXXXXXX

Page 167: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

APPENDIX C. BINARY TELECOMMUNICATIONS

C-5

BITS, 1ST BYTE,1ST PAIR DESCRIPTION

CDEF = 0111 Code designating 1st byte pair of four byte number.

B Polarity , 0 = +, 1 = -.

G,H,A, Decimal locator as defined below.

2nd byte 16th - 9th bit (left to right) of 17 bit binary value.

ABCDEF = 001111 Code designating 2nd byte pair of four byte number.

G Unused bit.

H 17th and MSB of 17 bit binary value.

2nd byte 8th - 1st bit (left to right) of 17 bit binary value.

CAMPBELL SCIENTIFIC defines the largestallowable range of a high resolution number tobe 99999.

Interpretation of the decimal locator for a 4 bytedata value is given below. The decimalequivalent of bits GH is the negative exponentto the base 10.

BITS DECIMAL FORMATG H A 5 digits

0 0 0 XXXXX.0 0 1 XXXX.X0 1 0 XXX.XX0 1 1 XX.XXX1 0 0 X.XXXX1 0 1 .XXXXX

C.3 GENERATION OF SIGNATURE

At the end of a binary transmission, a signatureis sent. The signature is a 2 byte integer valuewhich is a function of the data and thesequence of data in the output array. It isderived with an algorithm that assures a99.998% probability of detecting a change in thedata or its sequence. The CR7 calculates thesignature using each transmitted byte exceptthe 2 byte signature itself. By calculating thesignature of the received data and comparing itto the transmitted signature, it can bedetermined whether the data was receivedcorrectly.

SIGNATURE ALGORITHM

- S1,S0 represent the high and low bytesof the signature, respectively

- M represents a transmitted databyte

- n represents the existing byte- n+1 represents the new byte- T represents a temporary location- C represents the carry bit from a

shift operation

1. The signature is initialized with both bytesset to hexadecimal AA.

S1(n) = S0(n) = AA

2. When a transmitted byte, M(n+1), isreceived, form a new high signature byte bysetting it equal to the existing low byte.Save the old high byte for later use.

T1 = S1(n)S1(n+1) = S0(n)

3. Form a temporary byte by shifting the oldlow signature byte one bit to the left andadding any carry bit which results from theshift operation. A "shift left" is identical to amultiply by 2. Ignore any carry bit resultingfrom the add.

T2 = shift left (S0(n)) + carry

4. Form the new low signature byte by addingthe results of operation 3 to the old highsignature byte and the transmitted byte.Ignore any carry bits resulting from theseadd operations.

S0(n+1) = T2 + S1(n) + M(n+1)

As each new transmitted byte is received, theprocedure is repeated.

Page 168: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

APPENDIX C. BINARY TELECOMMUNICATIONS

C-6

This is a blank page.

Page 169: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

D-1

APPENDIX D. CALIBRATION PROCEDURES

The CR7 requires very little maintenance or calibration. Measurements are made in such a way thatsmall errors in the calibration are automatically removed. Over time, shifts in the calibration arepossible, however. Measurements can be made to determine whether the accuracy of the CR7 is withinthe specifications given in Section I.3. If needed, the calibration procedures described in this section canbe performed by an experienced technician having the suggested equipment.

NOTE: The precision of the CR7 exceeds that of most standard electronic equipment. Theseprocedures require that the test equipment have a precision equal to or better than the CR7.

The following procedures are for calibrating the voltage reference and the clock. Other factors such asrange ratios, DAC non-linearity, and offset in either the switched excitation or the CAO voltage requirethat the CR7 be returned to the factory for repair. Please call the factory to obtain authorization beforesending in the unit.

D.1 VOLTAGE REFERENCECALIBRATION PROCEDUREThe following procedure assumes that the CR7being calibrated has an analog input cardconfigured as analog input card #1 and anexcitation card configured as excitation card #1.Adjustments would need to be made in theprogramming example if the cards arenumbered differently.

SUGGESTED INSTRUMENTS:

Five and one half digit digital volt meter (DVM)with 10 microvolt resolution. The accuracy ofthe DVM needs to be equal to that of the CR7which is ±1 mV at 5 VDC.

PROCEDURE:

1. With a small, flat screw driver, pry off thethree silver caps on the top of the AnalogInterface Card in the I/O module (seeFigure D.2-1).

2. Monitor the Digital to Analog Converter(DAC) output by connecting the positivelead of the DVM to the DAC OUTPUTTEST JUMPER. Connect the negative leadof the DVM to a ground on the analog inputcard. Set the DVM to read on its mostsensitive DC Volt scale.

3. Set the DAC to output 0.000 volts DC, byprogramming the CR7 as follows:

* 1 Table 1 Programs01: 1 Sec. Execution Interval

01: P22 Excitation with Delay01: 1 EX Card02: 1 EX Chan03: 900 Delay w/EX (units=.01sec)04: 0000 Delay after EX (units=.01sec)05: 0.0000 mV Excitation CHANGE

AS INSTRUCTED

02: P End Table 1

* 0 Compiles the instructions

4. Adjust the DAC OFFSETPOTENTIOMETER for a DVM reading of0.0000 V (±0.0001 V).

5. Change the CR7's program given in stepthree so that parameter 5 reads 4000 tochange the DAC output to 4 V. Set up theDVM to read 4 VDC.

6. Adjust the VOLTAGE REFERENCE GAINPOTENTIOMETER until a DVM reading of4.0000 V (±0.001 V) is obtained.

7. Change the CR7s program given in step 3so that parameter 5 reads -4000 to changethe DAC output to -4V.

8. A DVM reading of -4.000 V (±0.001 V)verifies the DAC linearity.

9. Lock both potentiometers into position witha dab of finger nail polish.

Page 170: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

APPENDIX D. CALIBRATION PROCEDURES

D-2

D.2 CLOCK CALIBRATIONPROCEDUREThe 700X control module contains 3, 4, or 5cards. The CPU card has one blue connectorwith a ribbon cable connecting it to the 9 pinSERIAL I/O port on the front of the CR7. Theclock circuitry resides on this card.

The frequency of the crystal exhibits a parabolicresponse to temperature. The frequencymaximum occurs at room temperature anddrops off slowly at hotter or coldertemperatures. When the CR7 leaves thefactory it is calibrated to be 20 ppm fast. If theCR7 is placed in a controlled environment withthe temperature close to room temperature, it isbetter to set the crystal frequency exactly on.

SUGGESTED INSTRUMENTS:

Digital frequency counterSTD Bus extender card

PROCEDURE:

1. Remove the CPU card from the controlmodule. Insert an STD Bus extender cardinto the emptied slot. Plug the CPU cardinto the extender card. This is the best wayto gain access to the adjustment points.However, if an "extender card" cannot beobtained, remove all the other cards andmove the CPU card into the back most slotfor better, though still difficult, accessibility.

2. Set up the frequency counter to measureperiod and connect to pin 3 of theIntegrated Circuit shown at Location B16 onFigure D.2-2. Connect the ground lead tothe negative (flat) side of the 10 µFcapacitor at location F21. Adjust thevariable capacitor at location E21 on thesame figure for a period of 49,999.00microseconds (20 ppm fast) or 50,000.00microseconds (exactly on).

3. Lock the variable capacitor into position witha dab of finger nail polish.

Page 171: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

APPENDIX D. CALIBRATION PROCEDURES

D-3

FIGURE D.2-1. Calibration Points for the Analog Interface Card

Page 172: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

APPENDIX D. CALIBRATION PROCEDURES

D-4

FIGURE D.2-2. CR7X CPU Card

Page 173: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

LT-1

LIST OF TABLES

PAGEOVERVIEWOV3-1 *Mode Summary ................................................................................................................. OV-8OV3-2 Key Description/Editing Functions....................................................................................... OV-8OV4-1 Thermocouple Measurement Programming Example ...................................................... OV-11OV4-2 Using *6 Mode to Observe Example TC Measurements

(User with Model 723-T RTD Card) .................................................................................. OV-12OV4-3 Using *6 Mode to Observe Example TC Measurements

(User with Model 723 Card, No RTD) ............................................................................... OV-12OV4-4 Example Programming to Obtain Five Minute Averages .................................................. OV-13OV4-5 Using *7 Mode to View Values in Final Storage................................................................ OV-14OV4-6 EDLOG Listing of Example Program ................................................................................ OV-14OV5-1 Data Retrieval Methods and Related Instructions............................................................. OV-15OV5-2 Data Retrieval Sections in Manual .................................................................................... OV-15

1. FUNCTIONAL MODES1.2-1 Sequence of Time Parameters in *5 Mode .............................................................................1-21.3-1 *6 Mode Commands ...............................................................................................................1-31.5-1 Memory Allocation in Standard 21X........................................................................................1-51.5-2 Description of *A Mode Data...................................................................................................1-51.6-1 Description of *B Mode Data...................................................................................................1-61.7-1 *C Mode Entries and Codes....................................................................................................1-71.8-1 *D Mode Commands...............................................................................................................1-71.8-2 *D Mode Baud Rate and Storage Module Codes ...................................................................1-71.8-3 Program Load Error Codes.....................................................................................................1-81.8-4 Example Program Listing From *D Command 1.....................................................................1-8

2. INTERNAL DATA STORAGE2.2-1 Resolution Range Limits of 21X Data .....................................................................................2-22.2-2 Decimal Location in Low Resolution Format...........................................................................2-32.3-1 *7 Mode Command Summary.................................................................................................2-3

3. INSTRUCTION SET BASICS3.5-1 Input Voltage Ranges and Codes ...........................................................................................3-23.7-1 Flag Description ......................................................................................................................3-33.7-2 Example of the Use of Flag 9..................................................................................................3-43.8-1 Command Codes ....................................................................................................................3-43.9-1 Input/Output Instruction Memory.............................................................................................3-63.9-2 Processing Instruction Memory and Execution Times ............................................................3-73.9-3 Output Instruction Memory and Execution Times ...................................................................3-83.9-4 Program Control Instruction Memory and Execution Times ...................................................3-83.10-1 Error Codes.............................................................................................................................3-9

4. EXTERNAL STORAGE PERIPHERALS4.1-1 Output Device Codes for Instruction 96 ..................................................................................4-14.1-2 *4 Mode Parameters and Codes.............................................................................................4-24.2-2 *9 Mode Entries.......................................................................................................................4-3

Page 174: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

LIST OF TABLES

LT-2

5. TELECOMMUNICATIONS5.1-1 Telecommunication Commands ............................................................................................ 5-2

6. 9 PIN SERIAL INPUT/OUTPUT6.1-1 Pin Description ....................................................................................................................... 6-16.5-1 DTE Pin Configuration ........................................................................................................... 6-3

8. PROCESSING AND PROGRAM CONTROL EXAMPLES8.6-1 Example Sensor Description and 21X Multiplier and Offset .................................................. 8-68.6-2 Example Outputs and Input Storage Locations...................................................................... 8-78.6-3 Example Input Channel and Location Assignments............................................................... 8-7

9. INPUT/OUTPUT INSTRUCTIONS9-1 Input Voltage Ranges and Codes .......................................................................................... 9-19-2 Pulse Count Configuration Codes.......................................................................................... 9-39-3 Thermocouple Type Codes.................................................................................................... 9-6

10. PROCESSING INSTRUCTIONS10-1 Maximum Number of Outputs and Output Order for K Input Values ................................... 10-8

12. PROGRAM CONTROL INSTRUCTIONS12-1 Flag Description ................................................................................................................... 12-112-2 Command Codes ................................................................................................................. 12-112-3 Loop Example: Block Data Transform ................................................................................ 12-312-4 Example: Loop With Delay Execution Interval = 10 seconds.............................................. 12-312-5 Comparison Codes .............................................................................................................. 12-4

13. CR7 MEASUREMENTS13.3-1 Exponential Decay, Percent of Maximum Error vs. Time in Units of τ................................. 13-413.3-2 Properties of Three Belden Lead Wires Used by Campbell Scientific ................................. 13-513.3-3 Settling Error, in Degrees, for 024A Wind Direction Sensor vs. Lead Length...................... 13-613.3-4 Measured Peak Excitation Transients for 1000 Foot Lengths of Three Belden

Lead Wires Used by Campbell Scientific ............................................................................. 13-613.3-5 Summary of Input Settling Data for Campbell Scientific Resistive Sensors ........................ 13-713.3-6 Maximum Lead Length vs. Error for Campbell Scientific Resistive Sensors ....................... 13-813.3-7 Source Resistances and Signal Levels for YSI #44032 Thermistor Configurations

Shown in Figure 13.3-7 ........................................................................................................ 13-913.4-1 Limits of Error for Thermocouple Wire............................................................................... 13-1213.4-2 Limits of Error on CR7 Thermocouple Polynomials ........................................................... 13-1313.4-3 Reference Temperature Compensation Range and Polynomial Error Relative to

NBS Standards................................................................................................................... 13-1413.4-4 Example of Errors in Thermocouple Temperature............................................................. 13-1413.5-1 Comparison of Bridge Measurement Instructions.............................................................. 13-1713.5-2 Calculating Resistance Values from Bridge Measurement................................................ 13-18

Page 175: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

LF-1

LIST OF FIGURES

PAGEOVERVIEWOV1-1 CR7 Measurement and Control System ............................................................................. OV-3OV1-2 CR7 Wiring Panel and Associated Programming Instructions............................................ OV-4OV2-1 Instruction Types and Storage Areas.................................................................................. OV-5OV2-2 Program and Subroutine Tables ......................................................................................... OV-7OV5-1 Data Retrieval Hardware Options ..................................................................................... OV-16

2. INTERNAL DATA STORAGE2.1-1 Ring Memory Representation of Final Data Storage ..............................................................2-12.1-2 Output Array ID .......................................................................................................................2-1

3. INSTRUCTION SET BASICS3.8-1 If Then/Else Execution Sequence...........................................................................................3-53.8-2 Logical AND Construction .......................................................................................................3-53.8-3 Logical OR Construction .........................................................................................................3-5

4. EXTERNAL STORAGE PERIPHERALS4.4-1 Example of CR7 Printable ASCII Output Format ....................................................................4-5

6. 9 PIN SERIAL INPUT/OUTPUT6.1-1 9 Pin Connector ......................................................................................................................6-16.5-1 Transmitting the ASCII Character 1 ........................................................................................6-4

7. MEASUREMENT PROGRAMMING EXAMPLES7.1-1 Wiring Diagram for LI200S......................................................................................................7-17.2-1 Typical Connection for Active Sensor with External Battery ...................................................7-27.4-1 Thermocouples with External Reference Junction..................................................................7-27.5-1 Connection for Thermocouple Differential Temperature Measurement .................................7-37.9-1 Wiring Diagram for Anemometer ............................................................................................7-67.10-1 Wiring Diagram for Raingage with Long Leads ......................................................................7-77.11-1 Wiring Diagram for PRT in 4 Wire 1/2 Bridge.........................................................................7-77.12-1 3 Wire Half-Bridge Used to Measure 100 ohm PRT...............................................................7-87.13-1 Full Bridge Schematic for 100 ohm PRT.................................................................................7-97.14-1 Wiring Diagram for Full Bridge Pressure Transducer ...........................................................7-107.15-1 Diagrammatic Representation of Lysimeter Weighing Mechanism ......................................7-117.15-2 6 Wire Full Bridge Connection for Load Cell .........................................................................7-127.16-1 12 Gypsum Blocks Connected to the CR7............................................................................7-137.17-1 101 Thermistor Probes Connected to CR7...........................................................................7-14

Page 176: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

LIST OF FIGURES

LF-2

PAGE13. CR7 MEASUREMENTS13.1-1 Timing of Single-Ended Measurement................................................................................. 13-113.2-1 Differential Voltage Measurement Sequence....................................................................... 13-213.3-1 Input Voltage Rise and Transient Decay.............................................................................. 13-313.3-2 Typical Resistive Half-Bridge ............................................................................................... 13-413.3-3 Source Resistance Model for Half-Bridge Connected to the CR7 ....................................... 13-413.3-4 Wire Manufacturers Capacitance Specifications, Cw .......................................................... 13-513.3-5 Model 024A Wind Direction Sensor ..................................................................................... 13-513.3-6 Resistive Half-Bridge Connected to Single-Ended CR7 Input ............................................. 13-613.3-7 Half-Bridge Configuration for YSI #44032 Thermistor Connected to CR7......................... 13-1013.3-8 Measuring Input Settling Error with the CR7...................................................................... 13-1013.3-9 Incorrect Lead Wire Extension on Model 107 Temperature Sensor.................................. 13-1113.4-1 Diagram of Sensor Junction Box........................................................................................ 13-1513.5-1 Circuits Used with Instructions 4-9..................................................................................... 13-1613.5-2 Excitation and Measurement Sequence for 4 Wire Full Bridge ......................................... 13-1713.6-1 AC Excitation and Measurement Sequence for AC Half-Bridge ........................................ 13-1913.6-2 Model of Resistive Sensor with Ground Loop .................................................................... 13-19

14. INSTALLATION14.2-1 Connecting Vehicle Power Supply to CR7 ........................................................................... 14-414.5-1 Typical Connection for Activating/Powering External Devices ............................................. 14-6

15. I/O CARD ADDRESSING AND MULTIPLE I/O MODULES15.1-1 Position of Decoding Jumpers on Excitation, Pulse Counter & Analog Input Cards............ 15-215.1-2 Jumper Settings for Excitation and Pulse Counter Cards.................................................... 15-315.1-3 Jumper Settings for Analog Input Cards .............................................................................. 15-415.2-1 Location of Jumper Controlling Baud Rate to I/O Modules .................................................. 15-715.2-2 Location of I/O Module Jumper Controlling Baud Rate........................................................ 15-8

APPENDIX D. CALIBRATION PROCEDURESD.2-1 Calibration Points for the Analog Interface Card....................................................................D-3

Page 177: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

I-1

CR7 INDEX

-6999 9-1-99999 9-1* Modes, see Modes1/X [Instruction 42] 10-2101 Thermistor Probe

Programming example 7-14107 Thermistor Probe [Instruction 11] 9-5

Calculating lead lengths 13-7Programming examples 7-5

207 Relative Humidity Probe [Instruction 12] 9-5Programming example 7-5

227 Soil Moisture BlockProgramming example 7-13

3 Wire Half Bridge [Instruction 7] 9-4Programming example 7-8

4 Wire Full Bridge [Instruction 6] 9-4Programming example 7-9, 7-10

6 Wire Full Bridge [Instruction 9] 9-4Programming example 7-11

5th Order Polynomial [Instruction 55] 10-5Programming example 7-13, 7-14

700 Control Module OV-1720 I/O Module OV-2723-T, Reference junction temperature with 13-11

A

A*X + B Scaling Array [Instruction 53] 10-4ABS(X) [Instruction 43] 10-3AC excitation, Resistance measurements

requiring 13-19AC Half Bridge [Instruction 5] 9-3, 13-19

Programming example 7-13AC Noise, Eliminating 13-1Activate Serial Data Output [Instruction 96] 12-6Analog Input voltage, Maximum 13-2Analog Output [Instruction 21] 9-8

Programming example 8-5Analog to Digital (A/D) conversion 13-1AND construction, Logical 3-5Arctan [Instruction 66] 10-10ASCII

Characters 6-4Definition A-1Dumping (in Telecommunications Mode) 5-3Program listing (*D Mode) 1-7Standard 6-4Transmission 6-4

Average - [Instruction 71] 11-3Computing running 8-1

B

Battery power optionsExternal 14-4

Caution viSealed lead acid 14-2Solar panels with 21XL 14-3Vehicle power supply 14-4

Battery Voltage - [Instruction 10] 9-5Baud rate

Definition A-1, 6-4Output Codes 4-1Setting between I/O and Control Module 15-6

Begin case statement [Instruction 93] 12-5Binary telecommunications C-1Block Move - [Instruction 54] 10-4

Programming example 8-1Branching, Logical AND or OR 3-4Bridge measurements 13-16

3 Wire Half Bridge 100 ohm PRT 7-84 Wire Full Bridge (Pressure Transducer) 7-104 Wire Full Bridge 100 ohm PRT 7-94 Wire Half Bridge 100 ohm PRT 7-76 Wire Full Bridge (Lysimeter) 7-11Comparison of bridge measurement

instructions 13-17Diagram of bridge measuring circuits 13-16AC excitation 13-19

Bridge Transform - [Instruction 59] 10-6Programming example 7-9

C

Cables/LeadsAvoid PVC insulated conductors 13-9Determining lead capacitance 13-4Lead length on signal settling time,

Effect of 13-3Tipping bucket rain gauge with long leads

programming example 7-6Card number 3-1Cassette recorder 4-4Cautionary Notes viChecksum 5-2Clock

Setting/displaying time (*5 Mode) 1-2Programming example OV-13

Common mode range 13-2, 14-6

Page 178: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 INDEX

I-2

Communicating with the CR7Protocol/Troubleshooting 6-4Via telecommunications 5-1With external peripherals 4-1

Compiling 1-2Errors 3-9

ComputerBaud rate, Setting 6-4Saving/loading program (*D Mode) 1-7Using with SC32A Interface 6-3

Control portsDescription OV-3Expansion Module SDM-CD16 9-9Resetting with *0, *B, or *D Mode 1-2Using switch relays 14-6

Cosine 10-3Counter, Pulse Count [Instruction 3] 9-2Covariance/Correlation [Instruction 62] 10-6

Programming example 8-6

D

Data point A-1Data retrieval

External storage peripherals 4-1Manually initiated (*8 and *9 Modes) 4-2Methods and related instructions OV-15On-line (Instruction 96, *4 Mode) 4-1Printer output formats 4-6Storage Module 4-6Tape recorder 4-4Telecommunications 5-1

Data Storage Pointer (DSP) 2-1Data Terminal Equipment (DTE) 6-3Data type, Parameter 3-1Date (*5 Mode), Setting/displaying 1-2Desiccant 14-5Differential measurement 13-1Differential Volts [Instruction 2] 9-1

Programming examples 7-1, 8-2Display Pointer (DPTR) 2-1Displaying/setting Clock (*5 Mode) 1-2Divide

X / Y [Instruction 38] 10-2X Mod F [Instruction 46] 10-3

DO [Instruction 86] 12-1DPTR 2-1DSP, see Data Storage PointerDTE pin configuration 6-3Duplex, Definition 6-4

E

Editing datalogger programs OV-14Editor errors 3-9EDLOG OV-7, 5-3ELSE [Instruction 94] 12-5Enclosures, Environmental 14-1

Gas-tight viEND [Instruction 95] 3-5, 12-6

Programming example 8-2Error codes 3-9

Overranging 3-2Overrun occurrences 1-1

Ex-Del-SE [Instruction 4] 9-3Excit-Del [Instruction 22] 9-8Excitation outputs OV-3Excitation with Delay [Instruction 22] 9-8Excite, Delay, and Measure - [Instruction 4] 9-3

Programming example 7-14Execution interval OV-7, 1-1, A-1Execution time 1-1

Definition A-1Program instruction 3-6

EXP(X) [Instruction 41] 10-2External storage peripherals 4-1

F

File Mark in Storage Module 4-6Fill and stop memory, Storage Module 4-6Final Storage

Changing size of 1-5Data format 2-2, C-3Definition A-1Displaying on keyboard (*7 Mode) 2-3Erasing 1-5Format C-3Output data resolution & range limits 2-2Redirecting data [Instruction 80] 11-5Ring memory 2-1

Flags 3-3Description 12-1Displaying and toggling 1-2Intermediate Processing Disable 3-3Manually toggling (*6 Mode) 1-2Output 3-3Resetting with *0, *B or *D Mode 1-2With J, K commands C-1

Floating point (FP)Data type 3-1Final Storage Format C-3Input Intermediate Storage format 2-2

Fractional Value [Instruction 44] 10-3

Page 179: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 INDEX

I-3

Full Bridge with Excitation Compensation [Instruction 9] 9-4Programming examples 7-8, 7-12

Full Bridge with Single Differential Measurement[Instruction 6] 9-4

Full duplex, Definition 6-4

G

Glossary A-1Ground loop influence on resistance

measurements 13-19Grounding 14-5Gypsum Soil Moisture block 7-13

H

Half duplex, Definition 6-4High frequency pulse, Measuring 9-2High resolution A-1High resolution data 2-2Histogram [Instruction 75] 11-3Hydrogen gas buildup vi

I

I/O, see Input/Output InstructionsI/O modules, Use of multiple 15-4I/O module [Instruction 23] 9-9IF Case X<F [Instruction 83] 12-1If Flag [Instruction 91] 12-5

Programming examples 8-2IF Then/Else comparisons 3-4If Time [Instruction 92] 12-5

Programming example OV-13If X Compared to F [Instruction 89] 12-4

Programming example 8-3If X Compared to Y [Instruction 88] 12-4Increment Input Location [Instruction 32] 10-1Indexed input location 3-2, A-1Indirect Indexed Move [Instruction 61] 10-6Intermediate Processing Disable Flag 3-4Input setting time constant 13-3Input Storage

Altering 1-2Changing size of 1-5Data format 2-3Definition OV-3, A-1Displaying (*6 Mode), Example of OV-12Erasing with *0, *B or *D Mode 1-2

Input/Output Instructions (I/O) 9-1Definition OV-5, A-1Memory and execution times 3-6Voltage range parameter 3-2

Installation and maintenance 14-1Instruction location number A-1Instruction memory and execution time 3-6Instruction Set

Format OV-9Types OV-6

Integer data type parameter 3-1Integer Value - [Instruction 45] 10-3Integration time 13-1Intermediate Processing Disable Flag

(Flag 9) 3-3Intermediate Storage

Changing size of 1-4Data format 2-3Definition OV-3, A-2Erasing with *0, *6, *8 or *D Mode 1-2

Internal temperature [Instruction 17] 9-7Inverse, 1 / X [Instruction 42] 10-2Interval Timer, SDM-INT8 9-13

J

J command C-1Junction boxes 14-1Jumper setting 15-3

K

K command C-2Key functions OV-7Keyboard State, Remote 5-3

L

Label Subroutine - [Instruction 85] 12-1Subroutine Program Table 1-1

Leads, see Cables/LeadsLI-COR LI200S Silicon Pyranometer

Programming example 7-1LN(X) [Instruction 40] 10-2Load Fixed Data, Z = F - [Instruction 30] 10-1Logging data 1-3Loop [Instruction 87] 12-1

Index 3-2Step Loop Index [Instruction 90] 12-4

Low level AC, measuring 9-2Low Pass Filter [Instruction 58] 10-6Low resolution 2-2, A-2LP Filter [Instruction 58] 10-6Lysimeter, weighing 7-11LVDT, integration time for 13-1

Page 180: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 INDEX

I-4

M

Manually initiated data transfer (*8 and *9 Modes) 4-2

Maximum [Instruction 73] 11-3Memory

Allocation 1-4Automatic RAM check on power-up 1-4Description of areas OV-3Erasing all 1-5Pointers 2-1

Minimize [Instruction 74] 11-3Minus sign (-) & (--), Entering 3-1Modem 6-2Modem/terminal 6-3Modulo divide, X Mod F [Instruction 46] 10-3Move Input Data, Z = X [Instruction 31] 10-1Move Signature into Input Location

[Instruction 19] 9-8Move Time to Input Location

[Instruction 18] 9-8MPTR (Modem Pointer) 2-1

N

Natural logarithm LN(X) [Instruction 40] 10-2Negative numbers 3-1Nesting 3-5Nitrogen purging 14-5Noise

Common sources 13-1Modem 6-2Rejection 3-2

O

On-line data transfer 4-1Operating details vOR construction, Logical 3-5Output Array

Calculating data points 4-2Definition 2-1, A-2Setting ID 2-1

Output device codes [Instruction 96] 4-1Output Flag

Description 3-3Example of setting OV-12Interval 3-3Intervals less than one minute 8-3

Output Processing InstructionsDefinition A-2Memory and execution times 3-8

Overranging analog inputs 3-2Overrunning execution interval 1-1Overview of CR7 OV-1

P

ParameterDefinition A-2Data types 3-1

Parity, Checking 6-4PC201 Tape Read Card 4-5PC208 Datalogger Support Software 5-3Password, Security 1-6Peripherals

Enabling 6-2General 4-1Power requirements 14-1

Physical description of CR7 OV-1Pin configuration

9 pin serial I/O port 6-1Polynomial [Instruction 55] 10-5

Programming example 7-13, 7-14Port Set [Instruction 20] 9-8Ports, commands 12-1Power, XY [Instruction 47] 10-3Power supply options 14-2Power up status 1-4, 5-2PPTR 2-1Pressure transducer 7-10Printer

Interfacing with CR7 6-2Manually initiated data dump (*9 Mode) 4-3Output formats 4-6Printer Pointer (PPTR) 2-2Send Character [Instruction 98] 12-8Use with Instruction 96 or *4 Mode 4-2

Processing InstructionsDefinition OV-5, A-2Memory and execution times 3-7

Program Control Flags 3-3Program Control Instructions 10-1

Definition A-2Command code parameter 10-1Logical constructions 3-4Memory and execution times 3-8

Program memoryAllocation 1-5Viewing number of bytes remaining 1-5

Program TablesExecution interval OV-6Compiling 1-2Definition OV-6, 1-1, A-2Entering Subroutines (*3 Mode) 1-1Example of entering program OV-9Exceeding execution interval 1-1Priority/interrupts 1-2

Page 181: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 INDEX

I-5

ProgrammingDisplaying available program memory 1-4Entering negative numbers 3-1Examples OV-9, 7-1, 8-1Logical constructions 3-4Manual control of program execution 1-3Maximum program size 1-5Overview of Instruction Set OV-7Remote 5-3Saving/loading programs (*D Mode) 1-7Sequence OV-8Voltage overrange detection 3-2

Pulse Count [Instruction 3] 9-2Measurements 13-20Programming examples 7-6, 8-3, 8-6

Pulse inputs 9-2PVC insulated conductors, Avoid 13-9

R

Rain gauge, Tipping bucket 7-6RAM (Random Access Memory) 1-4RC35 Cassette Recorder 4-4Record Real Time [Instruction 77] 11-4

Programming example OV-13Reference junction compensation 13-11

Relays, Using digital ports for switching 14-6Relative Humidity Probe, 207 RH Probe

[Instruction 12] 7-5, 9-5Remote Keyboard State 5-3Repetitions parameter 3-1Resetting CR7 1-5Resistance measurements requiring AC

excitation 13-19Resolution, Set Final Storage

[Instruction 78] 11-5Retrieval options, Data storage OV-15RH (207) [Instruction 12] 9-5Ring memory

Final Storage 2-1SM192/716 Storage Modules 4-6

ROM (Read Only Memory) 1-4Checking on power-up 1-4Recording signature 9-8

RS232 Interface SC32A 6-3Run Time errors 3-9

S

Sample [Instruction 70] 11-3Sample on Maximum or Minimum

[Instruction 79] 11-5Sample rate 1-1

Definition A-2

Saturation Vapor Pressure [Instruction 56] 10-5SC32A RS232 Interface 6-3SC92A/93A, Use tape recorder 4-4Scaling Array with Multiplier & Offset

[Instruction 53] 10-4SDM-CD16 16 Channel Port Expansion Module

[Instruction 29] 9-9Security 1-6, 5-3Select I/O Module [Instruction 23] 9-9Send Character [Instruction 98] 12-8Sensors

Effect of lead length on signal settling time 13-3Effect of lead length resistance 7-7Program examples 7-1

Serial Input/OutputInterface details 6-1External peripherals 4-1Telecommunication 5-1

Serial Out [Instruction 96] 12-6Set Active Output Area [Instruction 80] 11-5

Programming examples 8-2, 8-3Set Resolution Data Final Storage Format

[Instruction 78] 11-5Settling errors 13-7Sign, Changing number 3-1Signal settling time, Effect of sensor lead length

on 13-3Signature

Definition A-3PROM 1-6, B-1Generation of C-4Move Signature into Input Location

[Instruction 19] 9-8Sin(X) [Instruction 48] 10-3Single-ended Volts [Instruction 1] 9-1

Programming example 7-1SM192/716, Storage Modules 4-1Smpl on MM [Instruction 79] 11-5Solar panels 14-3Spatial Average [Instruction 51] 10-4

Programming example 8-1, 8-2Spatial Maximum [Instruction 49] 10-3Spatial Minimum [Instruction 50] 10-4Specifications of CR7 OV-17Square Root [Instruction 39] 10-2Standard and Weighted Value Histogram

[Instruction 75] 11-3Standard Deviation in Time

[Instruction 82] 11-6Step Loop Index [Instruction 90] 12-4Storage and retrieval options, Data 4-1

Page 182: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 INDEX

I-6

Storage Modules, SM192/SM716Interrupting card transfer to 6-2Manually initiated data output (*9 Mode) 4-2Operating power 4-6Output device codes for Instruction 96 4-1Saving/loading program (*D Mode) 1-9Use of two 4-6

Storage peripherals, External 4-1Strip charts 8-5Subroutines

Entering 1-1Label Subroutine [Instruction 85] 12-1

Switch closure, Measuring 9-2System memory OV-3System power requirements and options 14-2System status (*B Mode) 1-6

T

Tables, Program 1-1Tape Pointer (TPTR) 2-1Tape recorder 4-4

Connecting to CR7 4-5Manually initiated data transfer

(*8 Mode) 4-2On-line data transfer (Instruction 96 and *4

Mode) 4-1TPTR (Tape Pointer) 2-1

Telecommunication commands 5-1Automatic time-out 5-2Baud rate 5-1with Binary responses C-1Initiate [Instruction 97] 12-6

Telecommunications (Modem) Pointer(MPTR) 2-1

Temp-(107) [Instruction 11] 9-5Temp-Panel [Instruction 17] 9-7Temp-RTD [Instruction 16] 9-7Temp-TC SE [Instruction 13] 9-6Temp-TC DIFF [Instruction 14] 9-7Temperature from Platinum R.T.D.

[Instruction 16] 9-7Programming example 7-6

Temperature from thermocouples, seeThermocouple temperatureTemperature of Input Panel [Instruction 17] 9-7

Programming example OV-11Temperature range, CR7 14-1TERM 5-3

Thermocouple temperatureCalibration 7-4Differential voltage [Instruction 14] 9-7

Programming examples 7-3Single-Ended Voltage [Instruction 13] 9-6

Programming example 7-4, 7-5Technique/error analysis 13-11Using external reference junction 7-2

Thermocouple types 9-6Three Wire Half Bridge - [Instruction 7] 9-4

Programming example 7-3Throughput rate 1-1, A-1Time

Into Input Location [Instruction 18] 9-8Record Real Time [Instruction 77] 11-4Resetting/sending in telecommunications

Mode 5-3Setting/displaying (*5 Mode) 1-2

Timer - [Instruction 26] 9-9Totalize - [Instruction 72] 11-3TPTR 2-1

U

User flags (1-8) 3-4

V

Vapor Pressure From Wet-/Dry-Bulb Temperatures [Instruction 57] 10-5

Vehicle power supply 14-4Volts (SE) [Instruction 1] 9-1

Programming example 7-1Volts (Diff) [Instruction 2] 9-1

Programming example 7-1Voltage measurements

Differential/single-ended 13-1Instructions 9-1Integration 13-1Ranges/codes and overrange

detection 3-2, 9-1

W

WB/DBT-VP [Instruction 57] 10-5Programming example 8-8

WVector [Instruction 69] 11-1Watchdog reset 3-9Wind speed rose 11-4Wind Vector [Instruction 69] 11-1

Programming example 8-5

Page 183: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 INDEX

I-7

X

X * F [Instruction 37] 10-2X * Y [Instruction 36] 10-2X + F [Instruction 34] 10-1X + Y [Instruction 33] 10-1X - Y [Instruction 35] 10-1X / (1-X) [Instruction 59] 10-6X / Y [Instruction 38] 10-2X Mod F [Instruction 46] 10-3XY [Instruction 47] 10-3

Y

Year, Day or time (*5 Mode),Setting/displaying 1-2

Z

Z = 1 / X [Instruction 42] 10-2Z = ABS(X) [Instruction 43] 10-3Z = ARCTAN (X/Y) [Instruction 66] 10-10Z = EXP(X) [Instruction 41] 10-2Z = F [Instruction 30] 10-1Z = FRAC(X) [Instruction 44] 10-3Z = INT(X) [Instruction 45] 10-3Z = LN(X) [Instruction 40] 10-2Z = SIN(X) [Instruction 48] 10-3Z = SQRT(X) [Instruction 39] 10-2Z = X [Instruction 31] 10-1Z = X * F [Instruction 37] 10-2Z = X + F [Instruction 34] 10-1Z = X * Y [Instruction 36] 10-2Z = X + Y [Instruction 33] 10-1Z = X - Y [Instruction 35] 10-1Z = X / Y [Instruction 38] 10-2Z = X MOD F [Instruction 46] 10-3Z = XY [Instruction 47] 10-3Z = Z + 1 [Instruction 32] 10-1

Page 184: CR7 MEASUREMENT AND CONTROL SYSTEM … CR7 Measurement and Control System combines precision ... Campbell Scientific, Inc. provides three documents to aid in ... Working with a CR7

CR7 INDEX

I-8

This is a blank page.