Campbell Scientific BDR301 Data Recorder Operator's Manual PDF

1 of 107
1 of 107

Summary of Content for Campbell Scientific BDR301 Data Recorder Operator's Manual PDF

BDR3O1 BASTC DATA RECORDER

OPERATOR t S ![.ANUAL

REVTSTON:. LO/94

COPYRfGHT (c) 1989, Lgg4, CAMPBEIJL SCIENTIFTC, INC.

I

WARR,AITTY AI{D ASSISTAI{CE

The BDR301 BASIC DATA RECORDER is warranted against defects in materials and workmanship. This warranty applies for five years from date of shipment. we wil-I repair or replace products which prove to be defective during the warranty period provided they are returned prepaid to CAMPBELL scrENTrFrc, rNC. CAMpBELL scrENTrFrc, rNc. will return warranted equipment by surface carrier prepaid. No other warranty is expressed or implied. CAMPBELL scrENTrFrc, rNc. is not liable for consequential damages.

Products may not be returned without prior authorization. To obtain a Returned Materials Authorization (RMA), contact CAMPBELL SCIENTTFIC, INC., phone (801-) 753-2342. After an appfication engineer determines the nature of the problem, an RMA number will be issued. Please write this number clearly on the outside of the shipping container. Campbell Scientific's shipping address is:

Campbell Scientific, Inc. RMA #- 815 West l-800 North I-.rogan, UT 8432L

CAMPBELL SCIENTIFIC, INC. does not

Non-warranty products returned for accompanied by a purchase order to cover

accept collect caIls. repair shoul-d be the repair.

BDR3O1 BASIC

TABIJE OF

DATA RECORDER

coriilIElfirs

1.

WARRJAT.iflTY

SEI.ECTED OPEF,ATING DETAIIJS

OVERVTEW

1.1 Measurement L.2 Programming

and Control- Capability 1 ? Mamnrrz 1,.4 Computer Operations 1.5 Specif icati-ons

2. DESCRIPTION OF CONNECTORS

2.I Analog Connector 2.2 RS232 Connector 2.3 SDI-12 Connector

3. DISPLAY BUTTON OPERATIONS

PAGE a

1-3 J_-5 L-4 1-5 L-6

z-L z-z 2-3

3-1 3-2 3-3

4-L 4-2 4-3 4-3 4-4 4-5 4-7 4-7 4-7 4-8 4-8 4-9 4-9 4-to

f,--L

5-2 3--LU 5-13

4. COMPUTER COMMAI{DS

Command Basics Help Command Status Setting and Displaying the Clock - C Command Data Retrieval Error Logr '1'l-me sec Locr Data Note St.orage and Retrieval Display fnputs Adiust Offset Program Datalogger, Save, Load, and Delete programs Security Exit Summary of Commands

PROMPT PROGRJMMING

5.1_ 5.2 3.3

4.L 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4. l_0 4.14 4.12 4.1,3 4.L4

5.1 5.2 L\<

5.4

TnnrrF arrryu u p n^t a L)d,ud,

Status

Prompt Programming Overview Input Tables Data Storaqe

5.

Editing Tabl-es

l1

5. MATNTENAI{CE AI{D TNSTALIJATION

6.L 6.2 6.3 6.4

'7 1

t -z 7.3 7.4 7.5 7.6 7.7 7.8 7.9 7 .10 7 .L1 7 .r2

8.1 8.2 8.3 8.4

Relays

Power Supplies Protection from

o-J_ 6-3 6-3

6-4 6-5

7 -1,1, I-LL

t-rz

6-J- 8-7 6-ZU B-27

the Environment

oigital Control Port for Switching

Program Syntax and Download Rules

8. BDR INSTRUCTION SET

Grounding Use of the

7.

5.5 Maintenance

DTRECT PROGRAMMING

*1, *A, and *C ModeS '7-1, Program Instruction Tlpes 7-4 Parameter Data Types i-5 Repetitions 7-s Entering Negative Numbers 7-5 Indexing Input Locations 7-6 Input Range and Overrange Detection 7-6 Data Storage and Output Processing i-7 Use of Flags: Program Control 7-B END, fnsLruction 95 Error Codes

Analog Measurement Instructions Processing Instructions Output Processing Instructions Program Control- Instructions

APPENDIX

A. MODEL 103 TEMPERATURE PROBE

A.1 General A-1 4.2 Accuracy A-l_ A.3 Hook-up Notes A-3 A.4 Conversion of 1,0'7 Probe Lo 103 Probe A-3

l_l_1

z.L z.z 2.3 3.3 4 .1,4

7.9-1, 7 .9-2 7.1,r

11 f-f

L-Z 2.1, 2.2 2.3

6 .4-1- 6 .4-2 7.9-L t.>-z 7 .9-3 1aA-f

A-2 A-3 A-4

Commands

Analog Connector Pin RS232 Connector Pin SDf -l-2 Connector Pin Description of Status

TABLES

Description Description Description Information

2-r 2-3 2-3 3-4 4-10 7-3 7-4 7-6 7-8 7-8 7 -L2 7 -:].3 8-1 8-2'7

1-1 r-z z-r z-z 2-3 6-2 6-5 5-5 7-9 7-9 / - l_u A-2 A-3 A-3 A-4

7 .1.2 Description of 7 .I.3 *C Mode Entries 7.7 Input Voltage Ranges and Codes

*A Mode Data

Flag Description Command Codes Error Codes

7.L2 Example Program Listing 8.1-1 Input Voltage Ranges and 8.4-1 I .4-2 8.4-3

Codes Command Codes

If Then/E1se Execution Sequ Logical AND Construction Logical OR Construction Linearization Error 103 Probe Schematic Cutting 107 Probe Placement of 20K Resistor for 103 Measurement

FIag Descript.ion 8-27 Comparison Codes 8-31

FIGURES

Perspective View of BDR301 System Bl-ock Diagram Analog Connector Pin Assignments RS232 Connector Pin Assignments SDI-12 Connector Pin Assiqnment.s Internal Battery Installation Relay Driver Circuit with Relay Power Switching Wit.hout Relay

anna

and Connections

l_v

1

2.

SELECTED OPERATING DETAILS

Instructions for installing the internal supply are found in Section 5.1.1.

Changing an existing datalogger program causes the datalogger to recompile the program. COMPILING ERASES ALL DATA. Always retrieve the existing data prior to making program changes.

To aid in data interpretation, retrieve the Error Log and Time Set Log when retrieving data.

The minimum and maximum external power supply voltage is 9 and 18 volts, respectively. A supply voltage in excess of 18 volts will damage the datalogger.

Damage will occur to the analog input circuitry if voltages in excess of +15 volts are applied for sustained period. The maximum analog input voltage is+5 vol-ts with respect to datalogger ground. Signals j-n excess of +5.5 volts wil1 cause errors and possible overranging on other analog input channels.

Analog measurements are affected if the pulse signal on Pulse Count.er 2 ls greater than 5.5 volts for longer than 100 milliseconds.

7. External power must be supplied when SDI-I-2 sensors are used.

q

SECTION 1. OVERVIEW

The BDR301 Basi-c Data Recorder is a datalogger/conLroller in a rugged, sealed

sDr- 12 Cursor Button

Anclog Connecior Select Button

fu1ly programmable enclosure.

Connector RS2J2 Connector

7.9"

\X.,,V \v'/ ,_\_

FIGURE 1-1. Perspective

3.6"

1- 1_

A11 connections to the BDR are made environmentally sealed connectors shown

SECTION 1. OVERVIEW

through the three in Figure 1-1.

A typical BDR system is shown in Figure l-2. rn mosc cases, the computer is not connected to the system except during site visits.

The buil-t in buttons and display may be used to verify that the BDR and sensors are operating correctly. The select button activates the BDR display and selects the desired category. The cursor button moves the cursor to the categories described bel-ow:

- INPUTS displays the most recent measurement values - DATA displays stored data - STATUS displays information specific to the datalogger and

datalogger vital signs - QUIT deactivat.es the display

A computer must be connected for any of the following operations:

- programming the BDR - retrieving data - storing and retrieving field notes - setting the BDR cl-ock.

System

r-2

ANALOG AND PULSE OUTPUT

SENSORS SDI_I2 SENSORS

FIGURE L-2. Block Diagram

SECTION 1. OVERVIEW

1..1 MEASUREMENT AI{D CONTROIJ CAPABIIJITY

The BDR is SDI-12 compatible. SDI sensors are measurement devices that include one or more transducers and a serial digital interface for communicating with a datalogger and transferring resul-ts. Up to 10 SDI sensors can be connected t.o and addresied by the datalogger.

The BDR301 has two differential input channels. Each differential input can be used as 2 single-ended channels. A calibrated excitation, approximately +O6O+SO mV, is available for ratiometric bridge measurements (potentiomeLers, strai-n gage pressure transducers) .

A fast (fSO Hz) and slow (ZO Hz) pulse count channel are available for measuring switch closure and voltage pulse type sensors. A typical application is a contact closure anemometer(fast) and a tipping bucket rain gage (slow).

Through programming, a control port may be set high (+5 VDC) or l-ow (0 VDC) according to time or a measured event. The con- trol port is typically used to activate an ext,ernal devj-ce through a reIay. A relay driver circuj-t is usually required due to the smal1 current drive of the control port (r.S ma at 3.5 volts).

L.2 PROGRAI,IMING

In a basic applicat.ion the BDR measures the sensor (s) and stores the result, for subsequent transfer to a computer. The BDR can also process the measurements over time and store the average, maximum, minimum, tota1, or standard deviation. For example, sLage height can be measured and stored every 15 minutes. From the 15 minute readings a daily averagel maximum, and minimum can be cal-culated and stored.

The measuring, processing, and storing t.asks performed by the BDR are controll-ed by a user written progiram. The program may be developed in the BDR's prompting program generator ("prompt'r programming) or in EDLOG ("direct" programming) , a datalogger program development modul-e contained in CSI's PC2O8 software package. EDLOG and direct programming imply the same programmi-ng method. Both terms refer to using the BDR instruction set rather than the prompting program generator.

A11 of the software required for prompt programming the datalogger. A terminal- emulator program is required

l_n the

computer so the user can communicate with the datalogger. The prompt programming method is designed for simple programs that measure, process and store data. Specialized programs requiring program branching, subroutines or intermittent output. must be developed through direct progiramming.

t_s in

1_-3

sEcTroN 1. ovERvrEw

EDLOG requires an IBM-PC or compatible computer. The program j-s developed and stored for later Lransfer to the datalogger. This method uses an instruction set similar t,o other CSf dataloggers (CR10, 2LX, CR7) . Several j-nstructj_ons in series constitute a program. Instructions are selected and organized in series by the programmer to perform the required tasks.

When a program is ent.ered or edited, the BDR3O1 must recompile and allocate memory for the program and data storage. Real-locating memory causes all- stored data to be erased. Always retrieve data from the BDR before uraking progrrm changes or reallocating memory.

1.3 MEMORY

For most applications, the BDR301 can store in excess of 30,000 datapoints, depending on the size of the program. A fixed amount of memory is distributed between the following four scorage areas.

- Final storage is where final processed data are stored for transfer to the computer. This area is also the pool from which the remaining three areas take memory. The amount of memory in Final- storage depends on the amount of memory used by Input storage, Intermediate st.orage and Program memory.

- Input storage is where measurement (input) resul_ts and t.he results of arit.hmetic and t.ranscendent.al- operations are stored. For example, the datalogger is programmed to measure a stage height and store the result in Input storage location 1. The stage value is then applied to an equation which calculates and stores discharge in l-ocation 2. 28 Input storage locations are avail-abIe on power-up. Tnput storage locations can be expanded using t.he *A Mode (refer to Section 7\ .

- Intermediate atorage is an internal scratch pad used to calculat.e averages, maximums, minimums, totals, and standard deviations through time. Calculations performed and the amount of memory used in fntermediat.e memory i-s defined by the program. The user does not have access to Intermediate memory.

- Progran memory is available for user progframs entered via the "prompt" or direct programming methods.

r-4

sEcTroN 1. ovERvrEw

On power-up, approximately 6IiO0 bytes of memory are availabl-e. one data point consumes two bytes and a moderately large program is 1600 bytes, including rnput and rntermediate storage. with a l-500 byte program, more than 30,ooo data points are avail-able for Final storage.

I.4 COMPUTER OPERATIONS

A computer is required for programming the BDR, retrieving data from Final storage, storing and retrieving field notes, and setting the BDR cIock. The computer can also be used instead of the display buttons to view current measurements and display stored data and datalogger status. Computer operations are enabl-ed by issuing commands from the computer. The command set is described in Section 4.

1-5

SECTION 1. OVERVIEW

1.5 BDR3O1 SPECIFICATIONS

The following electricar specificati-ons are valid for ambient temperature range of -35 to +55oc, unless stated otherwise.

an

50 Hz Rejection PROM: Full Scale Range Integration Resolution

mV ms uV Auto range

<20.0 2.6 to 49.5

60.0 .9 40.0 1.3 20.o 2.6 5.3 10.2 1.08 49.5

ANALOG INPUTS NUMBER OF CHANNELS: 2 differentiat or

up to 4 single-ended

MEASUREMENT TYPES: single-ended and differential voltage, ratiometric half bridge and full bridge

ACCURACY: Single-ended ordifferential voltage: 0.1% of full scale

Ratiometric bridge measurements: 0.02% of full scale

INPUT RANGE, INTEGRATION TIME, RESOLUTION:

60 Hz Rejection PROM: Full Scale Range Integration Resolution

mV ms uV Auto range -20 to +5000 Fixed range -20 to +80 -20 to +120 -20to +250 -30to +1000 -50 to +5000

s16.7 3.1 to 49.5

50.0 1.0 33.3 1.5 16.7 3.1 5.3 10.2 1.08 49.5

PULSE COUNTERS NUMBER OF CHANNELS: 2

INPUT SIGNAL: Switch closure Channel 1 Channel 2

Max input frequency (Hz) 20 1SO.O

Min switch closure time (ps) 100 200.0

Min voltage pulse low time (Fs) 100 200.0

Max debounce filter time (ms) 10 S.s

Max voltage input (V) 5.0 5.0Result Counts Frequency

NOTE: Pulse count channel I activates the processor on each count requiring 13mA for 20 ms.

sDt-12 Compatible with SDI-12 standard version 1.0, October, 1988

DIGITAL CONTROL OUTPUTS A single digital control output; enabled

according to programmed time or event.

OUTPUT VOLTAGE (no toad): High, 5V +0.1 V Low, <0.1 V

OUTPUT RESISTANCE: 1 000 ohms

RS.232 PORT FORMAT: ASCll, 8 bit, no parity, 1 start bit,

1 stop bit

TYPE: RS-232C

BAUD: 300,1200,9600

MODE: Full duplex, asynchronous

DISPLAY The LCD display has a useful operating

temperature range of 0 to 50eC. 'SELECT' and "CURSOR" control buttons enable viewing of:

-lnstantaneous measurements -Stored records -Datalogger status

TRANSIENT PROTECTION All input and output connections lo the BDR301 are protected using RC filters and transzorbs or spark gaps.

POWER

POWER SUPPLY: 9 VDC minimum: 18 VDC maximum

CURRENT DRAIN: 200 microamos quiescent; 27 milliamps active.

DATA LOSS PROTECTION: tf the power supply drops below 9.0 VDC, the datalogger enters a low power survival state where programming and data are maintained but program execution stops and communication ceases. Functions return to normal when adequate power is provided.

PROGRAMMING

PROMPT PROGRAMMING - program generation from prompted input

DIRECT PROGRAMMING - ftexibte instruction set EDLOG3

MEASUREMENT INTERVAL - 1 second to 1440 minutes

PROCESSING - Numerical and transcendential operations for algorithm development

OUTPUT PROCESSTNG - Sampte, average, totalize, maximize, minimize, histogram, wind vector, sample on max or min, standard deviation

COMPUTER COMMANDS SHORT LIST STATUS - Listing of parameters critical to

datalogger operation

DATA DIAGNOSTICS - Occurrences of run time errors are logged. Changes to real-time clock are also logged.

DATA RETRIEVAL - Retrieve ail data. atl since last retrieval, or time window; optional time tag, ASCII format.

DATA NOTES - Up to 1000 atpha-numeric characters.

DISPLAY INPUTS - Instantaneous measurements on command for on-site verification and calibration of sensors.

ADJUST OFFSET - Enter desired measurement value and offset is calculated automatically.

PHYSICAL SIZE: 8.5 x 3.6 x 4.75 inches without mating

connectors

WEIGHT: 3.7 lbs. indudingg4g!"1__-

-20 to +5000 Fixed range -20 to +60 -20 to +100 -20 to +230 -30 to +1000 -50 to +5000

INPUT NOISE VOLTAGE (on -20 to +80 mV range): 50 Hz: 1.5 pV RMS, 60 Hz: 1.76 pV RMS

COMMON MODE RANGE: t 5 votts

INPUT CURRENT: 1 0 nanoamperes

INPUT RESISTANCE: 6 gigohms

ANALOG OUTPUTS EXCITATION: A single excitation output for

resistive bridge measurements; switched to 4.0 volts + S0 mV at time of measurement. Maximum output current: 35 mA

NOTE: The precise value of the excitation uoltage is measured during the BDR 301 calibration. Bidge measure- ments are ratiometric with an accuracy of 0.02% of full scale.

L-6

SECTION 2. DESCRTPTION OF CONNECTORS

A1l- connections to environmentally sealed mating connectors come required cables. This these connectors.

the BDR are made connectors shown wirh the BDR; the section provides

through the three in Figure 1-1. The user must build the

the pin description of

2.L AIVAIJOG CONNECTOR

SE1--1 ) D|FF. 1

sE 2 --/

SE3 ) DIFF. 2sE 4 --/

FIGURE 2.T. Analog Connector Pin Assignnents (looking into connector sockets)

Mating connector used on the cable is MiI. spec. MS 3115 Fl_2 - 10P.

Name Vx

TABLE 2.1. Analog Connector Pin Description

Description 4v (+50 mV) excitation switched on/off atr beginning/end of Program Table execution. For use in resist j-ve bridge measurements.

pulse counter number 2, 150 hz maximum; input..

Control port, 5V active, 0V inact.ive.

pulse counter number 1-, 20 Hz maximum; input..

Ground for sensor shields and pulse signals.

GND

Pin A

B

c

n

E

CNTR 2

CTRL

CNTR 1

GND

2-r

SECTION 2. DESCRIPTION OF CONNECTORS

TABTE 2.1

F SE4

G SE3

H SE1

J AGND

sE2

Cont.

Single-ended analog channel_

Single-ended analog channel

Single-ended analog channel-

Analog ground,- reference for measurements and Vx return.

Single-ended analog channel

4, input.

3, input.

1-, input .

single-ended

2, input.

SE 1 and 2 are the high different,ial channel 1 SE 3 and 4 are the high differential- channel 2

and low sides of (DIFF 1), respectively. and low sides of

(DIFF 2) , respectively.

2.2 R5232 CONNECTOR

FIGURE 2.2.

Matinq connector

R5232 Connector Pin Aesignments (looking into connector sockets)

used on the cabl-e is Mil. spec. MS 3115 F8- 4P.

z-z

SECTION 2. DESCRIPTION OF CONNECTORS

TABLE 2.2. R5232 Connector pin Description Name GND

Pin A

B

c

D

RTS

Rx

Tx

Nasle DATA

EXT PWR

Description Ground; tied to power pin c).

Request, to send; must for the datalogger to

Data receive; input. Data transmit; output.

ground (SDI - 12 connect,or,

initially be brought high respond to t.he computer.

The datalogger sends ASCff daLa with B bits, ro parity, one start bit and one stop bit.

2.3 SDr-12 CONNECTOR

DATA

EXT PWR

FfGURE 2.3. SDI-12 Connector Pin Aesignments (looking into connector sockets)

Mating connector used on the cable is Mil-. spec. MS 3116 Fg-

TABLE 2.3. SDI-12 Connector Pin Description

3P.

Pin A

IJ

Description SDI-12 data line; input and output.

External power; 9 to 18 VDC; primary power input.. An external power supply must be present when SDI-12 sensors are used.

Power ground.(1

2-3

SECTTON 3. DISPLAY BUTTON OPERATIONS

The select and cursor buttons (refer t,o Figure 1-1) are usedto access and display input measurements, st,ored data, and. datalogger status. rf the display is off, press the select button t.o activate the main menu shown below.

Inputs Data Status Quit

The cursor is initially located to the left of fnputs. Keying the cursor button advances the cursor to Data, Status, Quit. and then back to Inputs. Press the select button when the cursor is next, to the desired option. selecting euit turns the display off or after 250 seconds of no activj_ty, the display turns off automatically.

3.1 INPUTS

When "Inputsrr is selected, programmed measurement instructions are executed at least every five seconds to update input locations. The initial display is the value in Input Location l-. The display format is as follows:

Loc:nnnn A Inpl,bl+00 . 00OUnt

Loc : nnnn

Inpl,bl

+00.000

Unt

= nnnn is the Input Location number being viewed

= First six characters of the input 1abel assigned to this location. If no input label is assigned in the program, this portion of t.he display is blank.

value stored in the Input Location.

7th, 8th and 9th characters of the input label_ assigned to this location, usually units. If no units are assigned in the program, this portion of the display is bIank.

Advance Backup Quit

A- B=

3-t-

SECTION 3. DISPLAY BUTTON OPERJATIONS

Keying the cursor button changes A to B and e. When the A is displayed and the sel-ect button is pressed, the display advances to the next fnput Location. With the B displayed, pressing t.he sel-ect. button backs up the display by one location. If Q is selected, t.he display returns to t.he main menu with the cursor next to Quit.

Hold t.he select button down to increase the speed with which the display advances or backs through fnput Locations.

3 .2 DATA

Select rrDatatr to view f inal processed data in Final storaqe. The initial display is

Tab1e: nnnn Int: nnnn min or s

showing header information for Data Table 1. Final storage consists of one or more Data Tabl-es. If more than one recording interval is desired, more than one Data Tabl-e is created. For example, if hourly and daily recording interval-s are desired, two Data Tables are created in the program.

I'nnnn" is the Data Table number. The order in which the tables are created in the program is the order in which they are numbered and displayed. 'rlntrr is the time interval between Dat.a Table records. Press the cursor but,ton to display header informat.ion of other Data Tables. rf no Data Tables exist., euitis displayed to the right of rrTabf e. rr . Select Quit to return to the main menu.

Press the select button to view time tagged data stored in the selected tabre. The initial display shows the first data point of the most recent record. The format is shown below.

mmmdd HH: MM: SS A InpI,bl+00 .0OUntX

mmmdd HH:MM:SS = month, d"y, hour-minute and second record is st.ored in the Tab1e.

Input location l-abel, same as for

that the

rrlnputsrr .Inpl,bl

+00. O0

Unt

data value stored.

Input location l-abeI, same as for rrlnput.srt.

3-2

SECTION 3.

X = Single let.ter code Instruction applied S = sample H = maximum (high) L = minimum (low) Q = real- time

DISPIJAY BUTTON OPERATTONS

the Output Processing t.he data. = average = total = st.andard deviation = sample on max/min

to next data point in record. to previous data point in record. to same data point location in next

to same data point location in previ-ous record.

for fn

A T D

[= B= ]rl =

Advance Backup Advance record. Backup ( last )

Quit

T-U

Keying the cursor button changes A to B, N, L, and Q. When the A is displayed and the select button is pressed, the display advances to the next data point in the same record. With the B displayed, pressing the select button backs up the display by one data point. A and B do not cross record boundaries. If N is selected, the display advances to the same data point location in the next record. L backs up the display to the same data point. location in the previous (last) record. Hold the select button down to rapidly advance or backup through Data Table locations.

If Q is selected, the display returns to the Data Table Menu and shows the followinq.

Tab1e: Quit Int:

At this point, pressing the Cursor button brings up the next Data Table header. Pressing the Select button returns the display to the Main Menu.

3.3 STATUS

Select Status to display information specific to the datalogger. The initial- display is

mmmdd HH : MM: SS A Year: nn

mmmdd HH:MM:SS Current date and time (month, day, hour- minute and second).

two digit representation of the current year.OII =

3-3

SECTION 3. DISPIJAY BUTTON OPERJATIONS

Advance Backup Quit

Keying t,he cursor button changes A to B and Q and back to A. When the A is displayed and the select button is pressed, the display advances to the next Status l-ine. With the B displayed, pressing the select. button backs up the display to the previous Status line. If Q is selected, the display returns to the Main Menu.

Hold the select but.ton down to rapidly advance or backup through SLatus l-ines.

Current day and time are always shown on the first line of the display while in Status. The second display line shows Status information one line at a time (refer to Table 3.3).

TABLE 3.3. Description of Status Information

A- B=

Time mm/dd/yy hh:mm:ss NextExe hh:mm:ss Battery: +xx. xxx fnput Locs:xxxx Prgm Bytes:xxxx Storage : +xxxxx. Unused: +xxxxx. Data Tabl-es : xxxx Prgm Sig:+xxxxx. EE Sig:+xxxxx. EE Ver:xx CaI : nr:;./ dd/Vy PROM Sig:+xxxxx. Errors = xxxx

PROM fD:+xxxxx SN: +xxxx. x

Cxxxx

Real time Time of next program or calibration execut.io Datalogger power supply voltage Input Locations allocated Program bytes used Storage locations availabl-e for Dat.a Tables Unused storage locations Number of Dat.a Tabl-es in program Program signature EEPROM (calibration) signature Cal-ibration version Date of calibration PROM signature Total number of runtime errors since erasing error 1og PROM identif icat,ion number datalogger serial number Checksum

3-4

SECTION 4. COMPUTER COMMANDS

4.L COMI{AI{D BASICS

A computer/terminal with its RS232 port connected to the dataloggerrs RS232 connect.or is used to retrieve data and program the datalogger. The emphasis of this section is on the commands used when manually (i.e. keyed in by hand) interrogating or programming t.he datalogger via a computer/terminal-. These commands and the responses to t.hem are sent in the American Standard Code for Information fnterchange (ASCII). The commands al-l-ow the user to perform several operations including:

- check BDR status - set real- time clock - retrieve and review Data Tabl-es - enter and retrieve data noLes - monitor inputs - adjust offsets - send/receive or edit programs

The RTS (pin A on the RS232 connector, Figure 2.2) must be puIIed high to "rin9" the datalogger prior to communication. Several carriage reLurns (CR) must be sent to the datalogger to al-low it to set its baud raLe to that of the computer (300, 1200, 9600, or 75,800). Once the baud rat,e is set, the datalogger will send back the prompt

= Help, errorg:nnnn

signaling that it is ready to receive a command. rrnnnnrris the number of run time errors accumulated since the error loq was l-ast erased (Section 4.6) .

GENERAT RULES GOVERNING COMMAI{DS

l-. * from datalogger means "ready for command" .

2. CR to datalogger meansrrexecutert. 3. CRLF from datalogger means "executing command". 4. Commands are l-etters, optionally preceded by number

parameters, and terminated with CR. The response includes a checksum for all ASCII commands.

5. The checksum includes al-l characters sent by the datalogger since the last *, including the echoed command sequence, excluding only the checksum itself. The checksum is formed by summing the ASCII values, without, parity, of the transmitted characters. The largest possible checksum value is 8l-91. Each t.ime 8l-91 is exceeded, the datalogger starts

H *

4-L

SECTTON 4. COMPUTER COMI4AI{DS

the count overi e.g., if the sum of the ASCII values is 8]-92, the checksum is 0. An i11ega1 character increments a counter and zeros t.he command buffer, reLurning a *.

7. ANY character besides a CR sent to the datalogger with a legaI command in its buffer causes the datalogger to abort the command sequence with CRLF'I and to zero the command buffer. The datalogger sends ASCII data with 8 bits, Do parity, one

start bit, and one stop bit. After the datalogger initially responds or completes a

command, it waits about 250 seconds for a valid character to arrive. ff it does not receive a val-id character in this time interval, it 'rhangs up". The datalogger counts all the invalid characters it receives from the time it answers a ring, and terminates communication after receiving 150 inval-id characters.

The datalogger continues Lo execute its measurement and processing tasks whil-e servicing the commands. If the measurement and processing overhead is 1arge, response to the communication commands is slower.

4.2 HEIP COMMAI{D

H HeIp menu.

When t,he H command is issued, the following prompts are displayed on the computer/terminal screen.

A Status nU lu=Errlog, 1111U erases; 2U=TimSetlog, 2222U erases D Send Data: n, b, t, sD (b, t, s optional)

n Table Number b records back to start; no entry = since last t Time tag; no enLry = w/o, I = w/ s records to sendi no entry = to most recent

432L5 Enter a Data Note R Send Data Notes since l-ast; 1R=a11 notes c Display/Set date, time nI Display/Set input location n n,mI Measure/Display m locations starting at n nY Adjust offset at location n 7W Prompt programming '7H Direct programming nL Unl-ock Security with code n 1,2X Transparent to SDI-12 sensor 1985T (Repeat) Power resel

4-2

SECTION 4. COMPUTER COMMAI{DS

Commands not shown in the HEIJP list are 27LBQ, used Lo program the BDR3O1 from a computer file, and 27L8,1.Q, used to save a BDR301- program to a computer fil-e.

4.3 STATUS

A Status

On receiving the A command the datalogger sends the following status information.

Time mm/ dd/yy hh: mm: ss NextExe hh:mm:ss Battery: +xx. xxx Input Locs:xxxx Prgm Bytes:xxxx Storage : +xxxxx. Unused: +xxxxx. Data Tab1es:xxxx Prgm Sig:+xxxxx. EE Sig:+xxxxx. EE Ver:xx Cal : mm/ dd/yy PROM Sig:+xxxxx. Errors = xxxx

PROM ID:+xxxxx SN: +xxxx. x

Cxxxx

Real time Time of next program or calibration executio Datalogger power supply voltage Input Locations al-l-ocated Program bytes used Storage locations available for Data Tables Unused storage locations Number of Data Tables in program Program signature EEPROM (calibration) signature Calibration version Date of calibration PROM signature Total number of runtime errors since erasing error 1og PROM identification number datalogger serial number Checksum

CLOCK - C COMMAND

dispTay time set time set date and time

4 .4 SETTING AI{D DISPIJAYING THE

C hr:min: secC

no/day/yr hr:min: secC

The C command is used to display or change time. To display time, send C onIy.

The clock is always assumed to be correct. Time tags for data records are calcul-ated from the clock t.ime at which the most recent record was recorded. Thus, the next record stored after changing the clock (by more than the recording interval) will change the t.imes cal-culated f or all records in the data table. The Time Set Log (Section 4.7) records the eight most recent times that the cl-ock is set through the C command.

Errors are logged if the time between records is different from the interval set in Instruction 84, and the time has not been changed with the C command.

4-3

SECTION 4. COMPUTER COMMAI{DS

4.5 DATA RETRIEVAIJ

t,sD Send Data; b, t, and s, are optionaT n = Tabl-e Number b = No. of records back to start, ffo entry = since l-ast t - Time Tag; no entry = w/o, 7 = w/ s = No. of records to send, no entry = to most recent

Data are retrieved from the datalogger with the above commands. Options incl-ude collecting all records since the last D command, or a number of records from a specified Data Tabl-e. Time tags are optional in both cases.

The D command has a number of optional parameters, if the default conditions are desired it is not necessary to enter a parameter (entering 0 is t.he same as no entry, resulting in the default. response). The appropriate number of commas must be entered if one parameter is left default and the nexL has a specif ied val-ue. For example:

1D Send all data collected in Data Table 1 since the last rrsince lastrt command to Table 1.

L,25,,5D Table L, go back 25 records, do not time tag, send 5 records

Time tags are not stored in the Data Table. When data are reLrieved time is gienerat.ed based on the time of the most recent output and the output table interval-.

When storing data, error 1,2 is logged if the time between records is different from the i-nterval set in Instruction 84, and the time has not been changed with t,he C command. Resetting the dat.alogger clock does not cause error 12.

If there is a gap in data where t.he clock jumps forward (e.g., shutdown due to l-ow batteries) , the number of recording intervals skipped is stored in the Data Tables. When the data are retrieved, the time discontinuity is represented by a carriage return for each record skipped.

If for some reason the clock jumps backwards (e.9., it is bombed by a Lransient from a lightning strike) there is no break in the retrieved data. Error 12 in the error 1og and t.hej-ncorrect time provide a record of the incident.

For conditional output (not based on time) time is automatically saved with each record.

4-4

SECTION 4. COMPUTER COMMAhIDS

The following examples show the response to requesting the last 3 records of an hourly stage height Data Tab1e, with and without time tags. Notj-ce the datalogger serial number, table number, time of the first output transmitted, tabl-e interval and element l-abels are header information generat.ed by the datalogger from the program.

Most recent 3 arravs with time: *1r3r1D SN:+1026.0 Table:0001- Time :08/28/89 11:00:00 MYI/DD /YY HH : MM : SS STAGE

FT_S 08/28/89 11:00: O0 +01. O0 08/28/89 12:oo:oo +o1.oo 08/28/e9 l-3: oo: oo +01. oo

c2L04

Request mosL recent 3 arrays without time:

*1, 3D SN: +1025. O Table:0001 Time :08/28/Ag 11: O0:00 STAGE FT_S +01.00 +01-.00 +01-. O0

c63s3

4.5 ERROR LOG

Interval:0050 min

Interval- :0060 min

7U 7777U

Send error 7og Erase error 7og

A 1og of how many run time errors have occurred and the first and most recent times of occurrences is kept in memory and sent in response to the l-U command. Entering 1111U erases the error fog. The format of the error log is

cc nn mo/day/yr hr:min:sec mo/day/yr hr:min:sec

where: CC = error COde rrrr = number of occurrences of the error mo/day/yr hr:min:sec = first and most recent occurrences of error

Compiling and edj-tor errors are displayed on the computer screen, but are not st.ored in the error 1og (Section 7 .LL)

4-5

01 UZ n? 04 05 06

08 09 10 11 -LZ

I5

SECTION 4. COMPUTER COMI,I,AIVDS

ERROR LOG CODE DEFINITION

EEPROM coefficients not programmed Measurement hardware overranging Unsuccessful dat.alogger cal-ibration Internal thermistor out of range. Start of low power supply condition Bnd of 1ow power supply condition Signature of PROM, program, and EEPROM does not match value stored. (New signature is then stored. )

Datalogger reset by watchdog timer Insufficient storage space Outer subroutine called from nested inner subroutine

- Program table overrun - Out,put did not occur at programmed interval- - Power-up test faiLed

Once a day at midnight the signature of the PROM, program, and EEPROM is cal-cul-ated and compared with the value it has stored. If the calculated and stored value do not match, error 7 is logged and the newly cal-culated signature is stored.

Error B is the result of a hardware and software I'watchdog" that checks the processor state, software timers, and program related counters. The watchdog will attempt to reset the processor and program execution if it finds that the processor has bombed or is neglecting standard system updates, ot if t.he counters are out of allowable limits. Error code 08 is flagged when the watchdog performs this reset. E08 i-s occasionally caused by voltage surges or transients. Frequent repetitions of E08 are indicative of a hardware problem or a software bug and should be reported to Campbell Scientific.

When stori-ng data, error 1-2 is logged if the time between records is different from the interval set in Instruct.ion 84, and the time has not been changed with the C command. Resetting the datalogger clock does not cause error 12.

Error 13 indicates that a fault in RAM, PROM, or CPU memory was detected on power-up. DO NOT CONTINUE TO USE THE DATALOGGER IF THIS ERROR OCCURS. Contact Campbell Scientific to discuss the problem and arrange for the repairs.

An exanrpJ.e error 1og is shown below.

Errorlog: E'02 99 04/20/89 09:45:00 0s/a6/89 13:15: oO

The example shows that the measurement hardware, error 2, has overranged 99 times or more beLween April 20 at 9 245 AM and May L6 at l-:15 PM. The maximum number of occurrences that may be recorded is 99.

4-6

SECTION 4. COMPUTER COMI,IAI{DS

4.7 TIME SET LOG

2U Send 2222U Erase

Ent.ering 2U returns cl-ock was set (Section 4 set 1og. The format is

time set 7og time set 7og

1og of the last 8 times the datalogger C command). 2222V erases the time

Previous time Time set to mo/day/yr hr:min:sec mo/day/yr hr:min:sec

4.8 DATA NOTE STORAGE AND RETRIEVAL

R Get Data Notes since Tast R command. 7R Get aLf Data Notes, beginning with oTdest. 43275 Enter a Data Note, CtrT C quits.

Up to 1000 characters may be entered as Data Notes using the 432LS command. Editing commands incl-ude:

Backspace to backup and delete Right arrow (^S) for forward Left arrow (^D) for back

A11 Data Notes may be retrieved using the 1R command or, with the R command only those Notes entered since the last R command may be retrieved.

4.9

nI n, mI

DISPI.AY INPUTS

DispTay value in Input Location n and permit entry of new va7ue. Measure/dispTay m Input Locations starting with l-ocation n. Sensors are measured if measurement intervaT > 5 s.

The I command is used to change the value j-n an Input st.orage l-ocation or to view one or more locations. If the program execution interval is greater than or equal to 5 seconds, the n,ml command causes Input/Output Instructions 1-, 2,5, 6,7, 11, and 29 to be executed. If t,he table execution interval is less than 5 seconds the values displayed are the result of the normal table execution.

4-7

SECTION 4. COMPUTER COMITAI{DS

4.10 ADiIUST OFFSET

nY Adjust the offset for the measurement that Toads input Location n.

The Y command is used to set the offset applied to a sensor reading. For example, to correct a water level- reading to match the staff gauge. The Y command a1Iows the measurement offset to be edited without entering a programming mode (7W or 7H commands). Program changes through the Y command do not cause the datalogger Lo recompile. Offset adjustments and all other changes made in t.he 7H mode require the datalogger to recompile, resulting in a l-oss of data.

The Y command operates on Input Locations assigned in measurement j-nstructions 1-, 2, 5, 6, 7, or 29. When the command is sent the BDR responds with the location number or l-abel, the current offset, and the current reading. Key in the desj-red reading, press return, and the BDR calculates the necessary offset. The new offset. and current reading will then be displayed. Press escape to get back to the command state.

Adjusting the offset changes the datalogger program without the need of recompiling. The program signature wifl- change when an offset is changed. The error 1og will show an error 7 at midnight the night aft,er an offset was changed; this provides a record that something was changed in the program. If the actual- value of the offset is to be stored, the program should be saved or an entry made in the dat,a notes.

4.11 PROGRAI{ DATALOGGER, SAVE. I,OAD, AI{D DELETE PROGRAIITS

7W

7H

Enter Prompt Programming Mode (see Section 5), AN,9I standard characters are sent for "up 7ine" and "cfear screen". 7W wiTL send Radio Shack "up 7ine" and "cfs". Enter Direct Programming Mode (*7 Mode) to key in, edit, and review program. *A or *C can then be keyed to change to the *A or *C Mode.

Program dataTogger using a program fiTe

Save a program file Soft reset. Command needs to be repeated. CATTIION: THE PROGR;NIT ,.li[D AI'I' DATA ARE DELETED BY ISSUING THIS COMMATTD

27 78Q

2778,7Q

79867

4-8

SECTION 4. COMPUTER COMMAIIDS

The 7W command prompt programming method is for basic applications requiring measurement, output processing and data storing instructions (refer to Section 5) . Prompt programming also accommodates setting the contro1 port and automated short term measurement averaging.

The 7H command enters the *l- Mode programming table where programs developed using the direct programming method may be edited, or progirams developed in either the prompt or direct programming methods may be reviewed. The *1 Mode is rarely used to develop a program. Program devel-opment using the direct programming approach is commonly done with EDLOG, a program development software module contained in Campbell's PC208 software package.

Programs generated using the prompt programming method must not be edited in the *1 Mode. Programs developed in the direct programming method (EDLOG), must not be edited in the prompt programming mode (7W command).

4.L2 SECURITY

nL UnTock security with code number n

Three l-evels of security are possible, ds described in Section 7.1.3. Each level- is set in the *C Mode using a maximum four character code number, n. Sending nL unl-ocks that level of security using n as the code number.

4.13 EXrT

E Exit teTecommunications.

Sending E and CR terminates communication with the datalogger.

4-9

4.L4 SI'M!dARY OF

Command

A

nI

n, mI

nY

COMMATiTDS

TABITE 4.L4. Commands

Description

Status (8888A C1ears Error Time mn/ dd/W hh : mm: ss NextExe hh:mm:ss

Battery: +xx. xxx

Input Locs:xxxx Prgm Bytes:xxxx Storage : +xxxxx.

Unused: +xxxxx. Data Tables:xxxx

Prgm Sig:+xxxxx. EE Sig:+xxxxx.

EE Ver:xx CaI : mm/ dd/yy PROM Sig:+xxxxx. Errors= xxxx

PROM ID:+xxxxx SN: +xxxx. x Cxxxx

Display/set time. C to display time hr:min:secC sets time. mo/day/yr hr:min:secc sets date and time.

Exit telecommunications .

HeIp menu.

Display Inputs/Enter Values

Display val-ue in fnput Location n and permit. entry of new va1ue.

Display m Input Locatj-ons starting with location n. Measure sensors if measurement interval- is < 5 sec.

Adjust the offset for the measurement that loads input location n.

SECTTON 4. COMPUTER COMMAI{DS

first) .

Reaf time Time of next program or calibration execution Datalogger power supply voltage Input Locations al-located Program bytes used Storage locat.ions available for Data Tables Unused storage locations Number of Data Tables in progiram Program signature EEPROM (calibration) signature Calibration version Date of calibration PROM signature Total number of run time errors since erasi-ng error 1og PROM identification number datalogger serial number Checksum

C

H

4-10

SECTION 4.

Data Retrieval

fl,b, t, sD Send Data; b, t, and s, are opt.ional n : Tabl-e Number b = No. of records back to start, ro t. Time Tag; no entry = w/o, a = w/ s = No. of records to send, no entry

271,8Q

27J.8,\Q

19857

R l-R 432LS

nI-.,

L2X

1U 1111U 2U 2222U

COMPUTER COMMA.I{DS

entrY = since last

= to most recent

7H

Procrram Dataloqger

Enter Prompt Programming Mode (see Section 5), ANSI standard characters are sent for "up line" and 'rclear screenrt. 9W will- send Radio Shack "up 1ine" and rrclsrl 1W lists the program generated in the 7W mode.

Enter Direct. Programming Mode (*t Mode) to key in, edit, and review program. *A or *C can then be keyed t.o change to the *A or *C Mode.

Program datalogger using a program file

Save a program file

Soft reset. Command needs to be repeated. CAUTION: THE PROGRAIT{ AI{D AI.,I, DATA ARE DEIJETED BY ISSUING THIS COMI{AND

Data Notes

Get Data Notes since last. R command. Get all- Data Notes, beginning with oldest. Enter a Data Note, Ctrl C quits.

Securitw

Unlock Security (*C lutode) with code word n. The L command temporarily changes the security 1evel. After terminating communications, security is reset.

spr-12

Communicate with SDI-12 sensor; datalogger is transparent.. Datalogger progranr is interrupted for about, 0.25 seconds af ter sending a conrmand.

Error and Time Set, Loqs

Send error log Erase error 1og Send time set log Erase time set loq

4-LL

SECTTON 5. PROMPT PROGRAMMING

Prompt programming simplifies proglramming requirements for routine BDR30l- datalogger applications. The datalogger prompts for user input and generates the program. Prompt programming is designed for simple programs that measure, process, and store data. ff more programming flexibility is required, i.e.; subroutines, conditj-onal output, set point cont,rol-s, etc. , refer to Direct Programming, Section 7.

CAUTION: The two methods of programming, i.e., prompt programming and direct programming (Sections 7 and 8) can not be mixed. A program generated in the direct method can not be edited in the prompting version. The reverse is also true.

5.1 PROMPT PROGRJA}TMTNG OVERVIEW

The prompt programming main menu, shown below, is displayed by issuing the 7W command (see note on 7W command entry bel-ow).

I - Input Tabl-es D - Data Storage Tables E - Erase all tables ESC - Quit Select f,D,E,ESC

Programming is divided into input, and output programming. Tnput programming is done in Input Tables (option I) which def i-ne:

- t.he interval at which measurements are made. - what measuremenL,s are made on what input channels. - where measurement results are stored.

Output programming is done in Data Storage Tables (option D) which define:

- which processes (average, maximum, sample, etc.) to apply to the measurement results.

- the interval at which processed data are stored, i.e., the time period over which a process is applied.

The E option erases all programming, resulting in the loss of al-1 stored data.

5-1

SECTTON 5. PROMPT PROGRAMMING

ESC exits the 7W mode, and returns operation to the t.erminal emulator command state. If a program was entered or edited, the datalogger will compile the program and erase all stored data.

NOTE z 7W COMMAIiID ENIRY The sequence of characters to enable "cIear screen'r andrrcursor uptr on the computer is not st.andard in all- computers. When the 7W Mode is entered using:

- the rrTWrr command, the sequence of characters for clear screen and cursor up fol-low standard ANSII convention.

- the rr9wrr command, the BDR returns cl-ear screen and cursor up sequences compatibl-e with Radio Shack and Tandy computers.

- rrlwrr lists the program generated in prompt programming.

5.2 TNPUT TABLES

A11 input.s to the datalogger are programmed through the Input Tables option. Datalogger j-nstructions are entered defining what measurements are made on what channels, and where the results are stored.

Two Input Tables are available, either or both may be used. Table 2 offers the same programming capabilities as Tabl-e !, with two additional features:

- Set the control port high a programmable number of seconds or minutes prior to the start of a measurement interval.

- Reduce measurement noise by making multiple measurements, cal-culating the average and storing the result in the designated LOCation.

The main reason to have two Input Tab1es is to measure two groups of sensors at a different intervals. If all sensors are to be measured at t.he same interval, and one of the unique features of Table 2 is needed, all programming should be done in Table 2.

5.2.L TABI,E NT'MBER AND MEASUREMEI{:T INTERVAIJ - HEADER

The default display for t.he I option is the header for Input Table 1:

Input Table Number 01 Measurement Interval- mins 0005

5-2

SECTION 5. PROMPT PROGRJAI'TMING

Input Tab1e Number If a program is present, the display advances to the header

for the fnput Table with the largest number. To change tables, enter the other tabl-e number.

Measurenent Interval The measurement int.erval is the time between measurements

programmed in the Input Table. The default int.erval is 5 minutes. With the cursor on rtmins" strike t.he computer space bar to change the interval units to seconds, ds shown below.

Input Table Number 01 Measurement Interval- secs 0005

The maximum interval is 1,440 minutes and the minimum interval is 1 second.

5.2.2 INPUT TABI,E 2 - HEADER

Tabl-e 2 is accessed by entering a 2 j-n the " InpuL Table Number" l-ine. The default Table 2 header is shown below.

Input Tabl-e Number 02 Measurement Interval mins 0005 Ctrl Port prior turn on mins 0001 Duration of Average (s) 0000 # of Samples in Avg. 0001-

In addition t.o the measurement interval, which has the same meaning as for Tab1e I, there are parameters to al1ow turning on the control port prior to the measurements and averaging several- measurements for the reading. Table 2 is identical to Tab1e L if the control port entry is set to zero and the values for duration of average and number of samples are default, as shown bel-ow.

Input Tabl-e Number 02 Measurement Interval mins 0005 Ctrl Port prior turn on mins 0000 Duration of Average (s) 0000 # of Samples in Avg. 0001

CtrI Port prior turn on (e) This parameter specifies the number of seconds or minutes

before the start of the measurement interval to set the control port high. For example, the dissolved oxygen sensor in the USGS Mini-Monitor must be activated 1 minute before measurements to allow it to equilibrate. The interval must be less than t.he control int,erval. Note that units for the "Ctrl Port prior turn onrrwill change to remain the same as the "Measurement Interval" unit.s. The control port is automatically set 1ow after program execution. Refer to Section 5.4 for relay driver information.

5-3

SECTION 5. PROMPT PROGRiMMING

Duration of Average and # of Samples in Avg. The average of several back to back measurements is often

more representative of the measured parameter than one measure- ment, e.g., a stage measurement made on a surging river.

The entry for "Duration of Average" specifies the time over whj-ch the average is taken. The entry for "# of Samples in Avg. " specifies how many measurements to make within that time. For example, if the duration is 20 seconds, and the number of samples is 10, the average is the resul-t of l-0 measurements with two seconds between each measurement.

The following constraints are placed on these parameters:

- The rrDurat,ion of Average'r can not exceed the Measurement Interval of either Table 1 or 2. (this short Lerm averagl-ng feature is to reduce noise in rronerr measurement; for a long term average use the AVG processing function in the Data Storage fabl-es. )

- The time interval between measurements is in even seconds or, if less than one second, in tenths of a second. If the duration divided by the number of samples does not resul-t. in an even interval, the interval is rounded down. The duration of averaqe will actuallv be shorter t,han the value entered.

Exarrple #1 - Assume the duration is 20 seconds and the number of samples is l-1. Duration/samples is L.82 seconds. The actual- int.erval between measurements is l- second, and the actual- duration is 11 seconds.

Exa"nrp1e #2 - Assume the duration is 2 seconds and the number of samples is 7 . Duration/samples is 0.28 seconds. The actual interval is 0.2 seconds and the actual duration is L.4 seconds.

5.2.3 MEASUREMENT SEI,ECTION

After completing t.he t.ab1e header, the table of measurements is displayed.

Loc Name units Type Chn Mul-t Offset

01 OPT?

This i-s where measurements are assigned to channels, and multipliers and offsets are entered to convert the measurements to engineering unit,s. L,abels and units may be assigned to the val-ues measured.

5-4

SECTION 5. PROMPT PROGRAMMING

toc The Loc column contains the Input Storage location in which

t.he measurement is saved. As measurements are added the location is automatically incremented.

Name The name may be up to a six characters long and should be

descriptive of the parameter being measured. The name entered here is displayed at the t,op of the dat.a cofumn when retrieving data, making the data point easy to identify. For example, "STAGE" can be used for a stage height measurement. Section 3.2 describes how labeIs are used to identify data on the dataloggerrs display.

units Up to three characters may be used to describe measurement

units. For example, "FT" may be the unit of the stage measurement. Secti-on 3.2 describes how labels are used to identify data on the dataloggerrs display.

Trce "Type" refers to the type of sensor to be measured or t.ype

of measurement to be made. Strike the space bar to display the measurement OPTions list.ed below. The rrBrr key backs up to the previous option.

SDI SDI-72 Sensor This measurement addresses, issues a command, and retrieves data from a SDI-12 sensor. Contact Campbell Scientific's Water Resources Group for assistance in selecting an SDI-12 sensor.

Some SDI sensors output more than one data point per output. For example, the Hydrolab SCOUT may be proglrammed to output 9 datapoints each time the datalogger requests measurements. The SDI measurement tlpe must be entered as many times as dat.a points are desired. For example, assume the SCOUT is equipped to make temperature, conductivity, dissolved oxygen and pH measurements each time the datalogger cal-l-s it. The SDI measurement tlpe must be entered four t.imes, once for each parameter. Refer to the SDI channel ("Chn") description below for further j-nformation.

NOTE: An external power supply must be used to power SDI-I-2 sensors (refer to Figure 2.3) .

5-5

SECTION 5. PROMPT PROGRJAMMING

Potentiometer Input Range = -90 to 5000 mv Units of measurement = Ratiometric, Vs/Vx

Vs= signaT voTtage; Vx= excitation voltage The most 1ike1y sensor to be used wlth this instruction is the 10 turn potentiometer commonly used by the USGS. POT is a half bridge measurement which is also used to measure linear thermistors or wind vanes. Single ended analog channels 1- through 4 can be used with this instruction.

BATT Battery voTtage Units of measurement VoTts

The datalogger power supply with the highest potential, i.e., internal or external, is measured using this instruction. Units are in vo1ts. None of the analoq channel-s are used in this measurement.

TEMP DataTogger Temperature Units of measulement = oC

This instruction measures the datalogger temperature in degrees Centigrade. None of the analog channels are used in this measurement.

THERM 703, 7038 Thermistor Units of measurement = oC

Campbell's 103 and 1O3B temperature probes are measured using this instruction. Single ended analog channels 1 through 4 can be used with this instruct.ion. Refer t.o Appendix A for probe details.

C}flf PuTse Count Input Range = 5000 mV maximum Units of measurement

ChnT f - counts Chnl-2=frequency,-Hz

This instruction measures pulses on pulse count channels l- or 2. Channel l- should be limited to slow or infrequent. pulse i-nputs such as a tipping bucket. rain gage. Channel 2 ls a fast pulse counter, designed for a contact c1osure anemometer or a tipping bucket rain gage. Channel- 2 requires less power to operate t.han channel l-.

5-6

SECTION 5. PROMPT PROGRAI{MING

SE Single-ended Voltage Input Range = autorange; -20 to 5000 mV Units of measurement = fitV

The SE instruction makes single-ended voltage measurements. The analog output version of the Mini- Monitor or pressure transducers wit.h single-ended outputs are typical sensors. Single-ended analog channels 1- through 4 can be used with this instruction.

DIFF Differential VoTtage Input Range = Eil)torange; -20 to 5000 mV Units of measurement = fitV

DIFF is a differential voltage measurement, applicable to differential channels 1 and 2. The same sensors measured using SE can be measured with less noise using DIFF.

FULL Fu77 Bridge Input Range = -20 to 80 mV tlnits of measurement = Ratiometric, 7000 (Vs/Vx)

Vs= signaT voltage; Vx= excitation voTtage The full bridge measuremenL applies to differential- channels 1 and 2. A strain gage pressure transducer is t.he most 1ike1y sensor to be used with t.his instruction.

Chn For analog and pulse measurements, I'Chnrr is the abbreviation

for channel-. The sensor connected to the channe] defined here is measured by the instruction specified under rtTlrpetr. Single ended measurements which apply to single ended channels 1 through 4 are POT, THERM, SE, and HALF. Different,ial channel-s 1 and 2 are accessed by measurement types DIFF and FULL, and t.he pulse count channels by CNT.

rehnr for SDI meaeurementg has a different meaning. Assume a three character entry, 'rACVrr, where rrArr is the sensor address, rrcrr is the command, and trvrr is the value.

- The sensor address, A, may be any whole number between 0 and 9.

- The command, C, may be any whole number between O and 9. The command code is specific to the SDI sensor, buL in al-l cases code O means start measuring.

- Value, V, defines which data point shoul-d be stored in the specified Location. Most SDI-1-2 sensors output only one or two data points. To sLore the fi-rst. value returned, enter a 1. Enter 2 Lo store the second val-ue returned. If both values are to be stored, the SDI measurement must be entered twice, with the same address and command, but changing V

5-7

SECTION 5. PROMPT PROGRJAMMING

each time. The example below is for a Hydrolab Scout that is Lo output temperature, conductivity, dissolved oxygen, and pH when commanded to measure. The address and measurementr command remain the same but the value (V) to store changes with each measurement line.

Loc Name units Type Chn Mult Offset

01 temp C SDI 001 +1.0000 +0.0000 02 d.o. ppm SDI 003 +1. OO00 +0.0000 03 pH SDI 004 +l-.0000 +0.0000 04 cond mmh SDI 002 +l-.0000 +0.0000

NOTE: The above example il-lustrates the use of rrvrr , the value parameter. The order of output from the Scout is temperature, conductivity, dissolved oxygen, and pH but the order of storage in the datalogger is temperature, dissolved oxygen, pH, and conductivity.

MuIt The multiplier is the slope of a straight line equation.

The measurement is multiplied by this value to convert the measurement to the desired engineering unit. Before calculating the multiplier, determine what units the measurement type returns.

Multiplier Exanple #1 The sensor is a 1-0 turn, 10 kOhm potentiometer with a 1 foot, circumf erence wheel-. With a one foot wheel at l-000 Ohms per foot, the range goes from 0 to 10 feet. The measurement type is POT, which returns the ratio of the signal voltage to the excitation voltage, or Vs/Vx.

10

ft

Vs/Vx

The multiplier, M, is (10-0) / (l--0) , this example is shown below.

Loc Name units Type Chn Mult

stage ft

or 10. The program for

Offset

05

01 001 +10.000 +0.0000

5-8

SECTION 5. PROMPT PROGRJAMMING

Multiplier Example #2: The sensor is strain gage pressure transducer with a calibration of 10 mV per volt of excitation at 50 feet of waLer. The measurement type is FULL, which reLurns l-000 times the ratio of the signal voltage to the excitation voltage (rooo*Vs/Vx). Vs and Vx are in millivolts, making 1000*Vs/Vx equal to millivolts per volt of excitation.

50

mv/v 10

Loc Name units Type Chn MuIt.

5. The program for

Offset

01 staqe ft FULL 001 +5.0000 +0.0000

Offset The offset is the Y-intercept. After the measurement is

scaled according to the multiplier, the offset is added to adjust the measurement to a known reference, i.e., the outside staff gage. The easiest way to enter the correct offset is through the Y command (refer to Section 4.1-0). The Y command does not work with the THERM or CNT measurement types.

If the offset must be entered directly into the Input Tabl-e, exit the 7W mode with the ESCape key to alIow the datalogger to compile the program. With the offset equal to zero, view the measurement in the designated LOCat.ion using the "n,m,I'r command. Ca1cu1ate the offset as follows:

Offset = Reference - Measurement

Re-enter the 7W mode, advance to the desired program line in t.he Input Table and enter the offset.

5-9

ft

The multiplier, M, is (50-0) / (ro-o) , or this exampl-e is shown bel-ow.

SECTION 5. PROMPT PROGRJilMMTNG

5.3 DATA STORAGE TABI,ES

Data Storage Tables (option D) are used to specify:

- how often to store data - what data to store - what process (average, maximum, sample, et,c.) t,o apply to a

particular measurement .

5.3.1 DATA STORAGE TABI,E HEADER

The default display for the D option is shown beIow.

Data Tab1e Number 01 Recording Interval mins L440

Data Table Number The display advances to the largest number Dat.a Tabl-e,

providing information on how many Data Tables are programmed. To display a different tab1e, enter the number of the desired tabl-e. Available memory is the only constraint, t,o the number of Data Tables which may be programmed.

Recording Interval. The recording interval is the period in which records are

stored, i.., a 50 minute recording interval stores records every hour on the hour. The default interval is one day Q+qO minutes). With the cursor on "mins" strike the computer space bar to change the interval units to seconds, ?s shown below.

Data Table Number 0l- Recording Interval- secs L440

The maximum interval is L440 minutes and the minimum is 1 second.

5.3 .2 DATA TABLE INSTRUCTION SEIJECTION

Enter the Recording InLerva1 (above) to display the next 1eve1 of Dat.a Table programming:

ILem Loc Process

0l- 01 (name) OPT?

Item Item is a count of how many data points are in a record.

Item automatically increments with each output. select,ed.

Loc The Loc column contains the Input Storage l-ocations in which

Lhe measurements programmed in Input Tables are saved. Strike the space bar to display different input locations. The name of

5-J-U

SECTION 5. PROMPT PROGR.JAMMING

the measurement value programmed in Input Tabl-es is automatically displayed to the right of input location.

OPT? Strike the space bar to display the processing opti-ons which

can be applied to the measurement value over the specified recording interval. The rrBrr key backs up to the previous option. Ootions include:

AVG (average) SMPL (sample) MAX (maximum) MIN (minimum) TOTAL (totalize) SD (standard deviation)

Progranming Exanple #1 Assume the sensor is a 10 turn potent.iometer with float, and hourly samples of stage are to be recorded. The Input Table and Data Table programming are given below.

Input Table Number 01 MeasuremenL Interval mins 0050

Loc Name units Tlpe Chn Mult Offset

01 stage ft POT 001- +10.000 +0.0000

Data Table Number 01 Recording Interval mins 0050

Item Loc Process

01 POT SMPL01

Note that. the offset is not entered After exiting the 7W mode, use the 4) to have the datalogger calculate in the Input Tabl-e.

Following the entry of a processing Iine is added, ds shown below.

in the Input. Table. trYrr command (see Section the offset, and enter it,

option, another program

Item I-,oc Process

01 0r_ Por 01 01 POT

SMPL OPT?

5-11

SECTION 5. PROMPT PROGRAMMTNG

If more than one meagurement is programmed, i.., more than one input Location reguires processing, a different location may be displayed by striking the space bar when the cursor is under Loc.

Item Loc Process

01 01 POT SMPL 01- 02 (name) OPT?

A11 of the l-ocations programmed in Input Tables can be displayed by repeatedly striking the space bar.

Programming ExampLe #2 Assume an SDI shaft encoder and Campbell-'s Temperature Probe are measured every 15 minutes. Two Data Tables are progframmed to record:

- 15 minute sample of stage - 24 hour average, maximum, and minimum stage, average

temperature and sample of battery voltage.

Input Table Number 01 Measurement Interval mins 0015

Loc Name units Type Chn MuIt Offset

01 STAGE ft SDr 001 +1. O00O +0.0000 02 TEMP C THRM 004 +1.0000 +0. O0OO 03 BATT V BATT

Data Tabl-e Number 01 Recording Interval mins 001-5

Item Loc Process

01 O1- STAGE SMPL

Data Tab1e Number 02 Recording Interval mins L440

It.em Loc Process

01 01 STAGE AVG 02 01 STAGE MAX 03 01 STAGE MIN 04 02 TEMP AVG 05 03 BATT SMPL

Note in the Input Tabl-e under rrchnrr that the SDI sensor has an address and command of zero and is storing the first measurement returned by the sensor. Note also that the temperature probe is measured on single ended channel 4.

5- rz

SECTION 5. PROMPT PROGRAII{MING

5.3 .3 MEMORY AI,I.OCATION

The datalogger allocates memory for data storage so that the Data Tables fill up their memory at about the same time. In this wdy, records from a1l tables cover the Same time period. If only one Data Table is programmed, memory is allocated to store as many complete records as possible. The amount of time before memory is fulI is displayed after exiting the 7W Mode. For example, given Example Program #2, after exiting the 7W Mode the display reads

Storage fil-Ied in +304.80 days Exiting programming mode H = HeIp; errors:0000

5.4 EDITING

Enter advances to the next location requiring input Right arrow (Ctrl- S) for forward Left arrow (CtrI D) for back Up arrow (Ctrl E) for up Down arrow (ctrl x) for down ESC backs out to previous programming level B backs up to previous OPTion.

When using the ESC key to exit the 7W Mode, and a programming error is detected, the followingl sequence of steps occur:

- the screen is cleared - the error is displayed - strike any key to return to the 7W Mode main menu - select t.he correct option to go and fix the error or strike

ESC to enter the terminal emulator command mode

5-13

SECTION 5. }T,AINTENAI{CE AI{D INSTAI,LATION

5.1 POWER SUPPLIES

The BDR301 is equipped with internal- batteries and a connector to go to a user supplied external battery (SDI-12 connector). Diodes in both power supply circuits provide reverse polarity protection and protection against battery to battery charging. The maximum power supply voltage is 18 volts. Power supply voltages in excess of 18 \IDC wiII danage the datalogger.

The internal batteries are a backup to the external supply. The sealed enclosure contains desiccant t,o keep the el-ectrical components dty, and should rarely be opened. For routine operation, use an exLernal supply to delay the need of replacing the internal batt,eries.

The BDR301 typically draws 80 microamps in the quiescent. stat.e, 22 milliamps during an analog measurement, and 13 milliamps when communicating with a computer, an SDI-12 sensor, or when the display is active.

5.1.1 IMTERNAL POWER SUPPLY

The internal- power supply is eight al-kaline rrcrr celIs. A fresh supply provides approximately 12 volts and 5 amp hours. The minimum internal supply voltage is 9.8 VDC, which appears as 8.6 when measured by the datalogger due to two diodes in the measurement circuit.

INSTALLATION

Batteries are shipped with the datalogger but not installed. Battery install-ation should be done in a clean dry environment. When replacing batteries, retrieve all stored data before removing the o1d bat.t.eries. AII power, data, and programs are lost when changing batteries.

To install the batteries, first. unscrew the four corner screws and remove the enclosure lid. Disconnect the datalogger from the panel board as shown in Figure 6.I. Install the eight batteries in the battery holders located in the enclosure base. Note that the correct battery alignment is imprinted on the hol-ders.

Reconnect the datalogger to the panel board in one smooth motion. If the motion is not smoot.h, the connection might make and break causingf a power-up malfunction. If the connection is successful, "POWER UP TEST" is displayed while the datalogger checks its memory, PROM and EEPROM chips. If I'POWER UP TEST" is

6 -1,

SECTION 6. MAINTENAI{CE AND INSTAI,I,ATION

not displayed within 10 seconds, ot if POWER UP message remains on longer than 30 seconds, digconnect the datalogger, wait 30 seconds and try again. Replace the enclosure lid.

5.1.2 EXTERNAI, POWER SUPPLY

Connections to the user supplied external battery are made through the SDI-1-2 connector. If SDI-12 sensors are used an external- power supply must be used (refer to Figure 2.3) . The minimum and maximum external supply volt.ages are 9 and 18 VDC, respectively. Connections to the battery musL be protected from t.he environment to prevent rusting, shorting, breaking, etc.

ENCLOSURE LID

DATALOGGER

PANEL BOARD

8 ,C" CELL ALKALINE BAT]ERIES

ENCLOSURE BASE

FIGURE 5.1. Internal Batt,ery Installation

A rechargeable external batLery may be float charged using a PS12 12V Charger if AC power is available. Assuming there is adequate exposure to the sun, the MSX1OR Solar Panel may be used for recharging when AC power is not available.

6-2

SECTION 5. IITAIMTENAI{CE AI{D INSTAI,I,ATION

6.1.3 LOW POWER SUPPLY

If the external supply drops below 9.0 VDC and the internal batteries drop below 9.8 VDC, the datalogger enters a Iow power survival- state where programming and data are maintained but program execution stops and communication ceases. Functions return to normal when adequate power is provided.

The BDR "wakes up" every 5 minutes to check if the supply voltage has risen. If the voltage is 1ow, the datalogger returns to the subsistence level-. When an adequate voltage is supplied, the BDR resumes program execution within five minutes or when the select button is pressed, or when it receives a command from the computer. An E05 and E05 error with time is recorded in the Error Log when the low power supply condition starts and stops, respectively.

6.2 PROTECTION FROM THE EMIIRONMEMT

The normal- environmental variables of concern are temperature and moj-sture. The st,andard BDR is production tested to Lperate from -35 to +55oC. For outdoor use Lhe datalogger should be kept in the shade to minimize the temperature inside the enclosure.

Two hal-f unit packets of DESI PAK desiccant are located by the internal batteries. This desiccant will keep the electronic components and juncLions dry between battery changes. Desiccant packets can be dried out by placing them in an oven aL 120 degrees C for L6 hours.

6.3 GROI'IIDING

The purpose of an earth ground is to minimize damage to the system by providing a low resistance path around the system to a point of low potential. CAMPBELL SCIENTIFIC RECOMMENDS THAT ALL DATALOGGERS DEPI,OYED IN THE FIELD BE EARTH GROUNDED. II iS thc users responsibility to provide this earth ground. An earth ground is not necessarily required if t.he datalogger is powered by the internal batteries, and only analogt or pulse output sensors with less than 50 feet of lead are connected.

A11 componenLs of a system (datalogger, sensors, external power supplies, mounLs, housJ-ngs, etc.) should be referenced to one common earth ground. The easiest way to earth ground the BDR301 system is to connecL the negative post of the external battery t.o earth ground. If no external- battery exists, connecL ground (pin C) of t,he SDI-1-2 connector to earth ground.

6-3

SECTION 5. MAIMTENAI{CE NiID TNSTALLATION

EFFECT OF GROUNDTNG ON MEASUREMENTS: COMMON MODE RANGE

The common mode range is the voltage range, relati-ve to the BDR ground, within which both inputs of a different.ial measure- ment must l-ie in order for the differential measurement to be made. Common mode range for the BDR is +5V. For example, if the high side of a differential input is at 5V and the 1ow side is at 0.5V relative t,o BDR ground, a measurement made on the 5V input range is 4.5V. A similar differential measurement results if the high side of the signal is 0V and the low side is -4.5V relative to the BDR ground. If the high input, exceeds 5V, or the low input gioes below -5V, the common mode range is exceeded and the measurement cannot be made.

Exceeding common mode range could be a problem when the BDR is measuring the output. from a sensor which has its own grounded power supply and the low side of the signal is referenced to power ground. If the BDR ground and the sensor ground are at sufficiently different potentials, Lhe signal will exceed t.he common mode range. To solve this problem, the sensor power ground and the BDR ground should be connected, creating one ground for the system.

6.4 USE OF THE DIGITAIJ CO}[rROI.. PORT FOR SWITCHING REI'AYS

The digital control port can be set low or high (0V low, 5V high) using the port commands associated with Program Cont,rol Instructions 83 through 93. A digital output port is normally used to operate an external relay driver circuit because the port. itsel-f has a limited drive capability. Figure 6.4-1 shows a t.ypical relay driver circuit in conjunctj-on with a coil driven relay which may be used to switch external power to some device. In this example, when the control port is set high, 12V from the datalogger passes through the relay coiI, closing the relay which completes the power circuj-t to a fan, turning the fan on. Campbell Scientific offers the A2I-REL-12 Four Channel Relay Driver for use with the BDR.

In other applications it may be desirable to switch power to a device without going through a re1ay. Figure 6.4-2 illust.rates a circuit for switching external power to a device without. going through a relay.

Other control port activat.ed circuits are possible for applications with greater current/voltage demands than shown in Figures 5.4-1 and 2. For more information contact Campbell Scientific' s Marketing Department .

6-4

SECTION 6. }fAINTENAI{CE AND INSTALLATION

SIJPPLY: MAXMUM = MINIMUM =

40 vDc REOUIREO CO'IL VOLTAGE

MAXIMUM CI'RRENT TO COIL lS 75 mA AT 251. 4O mA AT -s0t

CONTROL PORT

Circuit with Relay

Y. 40 \DC MAXMUM

FIGURE 6 .4-L. ReJ.ay Driver

MAXIMUM CURRENT TO PERIPHERAL lS 75 mA AT 25t, 40 mA AT -50'C

FIGURE 6.4-2. Power Switching Without ReJ-ay

5.5 MAINTENAI{CE

The BDR and power supplies require a minimum of routine maintenance. The interna1 bat,teries need to be replaced before they go below 9.8. The external- battery should be replaced at 10.8 volts to avoid discharging the int.ernal batteries. When not in use, remove the internal batteries to eliminate possible corrosion and store in a cool dry pIace.

Protection is required for the cables connected to the datalogger. Terminal junctions should be placed in a desiccated environment, and the desiccant shoul-d be replaced routinely.

CONlROL PORT

5-5

SECTION 7. DTRECT PROGR.AMMTNG

The term "directrr i-s used to differentiate this method of programming from "prompt" programming. Prompt programming is all that is required for the majority of Basic Data Recorder applications; the datalogger prompts for user input and generates the program. Direct programming is used to directly enter the fnstructions which the datalogger executes. Direct programming is more flexib1e, al-lowing program branching, subroutines, and intermittent output.

Direct programming may be done in the datalogger following the 7H computer command, or in EDLOG, a software modu1e for datalogger program development contained in Campbell's PC208 Datalogger Support Software. Campbell's CR10, 2IX and CR7 dat.aloggers use direct programming.

7.1 *L, *A, and *C MODES

The BDR has 3 programmable modes. *1 Mode is the Program Table where all- data acquisition, processingi, and storing instructions reside. The instructions are repeated at a user defined Program Table Interval-. Subroutines are also programmed in the *1 Mode.

*A Mode alIows reall-ocation of Inr:ut Storaqe which is where the results of Input/Output, Processin!, and. redirected Output Processing Instructions are stored.

*C Mode is used to block access to the user's program and certain BDR functions.

Initial programming and subsequent changes Lo the *1, *A, and *C Modes cause the datalogger to recompile the program. Ret.rieve aLl- data prior to making program changes; RECOMPILfNG ERiASES AL'L STORED DATA.

7 .T.T *1 MODE - PROGRJilM TABLE

The Program Table is accessed by entering the 7H computer command. When entered the computer display shows the Program Table Interval. If there is an existing program in the table, entering *1 followed by an instruction location number prior to rrArr wil-I advance the display directly to the instruction (e.9., 'r*15A'r advances the display to the fifth instruction in the table) .

7-1

SECTION 7. DIRECT PROGRJAI{MING

The Table Interval is entered in whole number units of minutes or seconds as fo]lows:

XXXX Minutes XXXX-- Seconds

The dashes after the seconds is entered by keying rrcrt.

Execution of the table is repeated at the rate determined by this entry. The table will not execute if 0 is entered. If a previously entered execution interval- is changed to 0, the table will not recompile and stored data will- not be deleted (See COMPILING A PROGRAM be]-ow) .

If the specified interval is less than the time required to execute the program, the BDR finishes processing the table and waits for the next occurrence of the interval before initiating the table (i.e., when the execution i-nterval is up and the table is stil1 executing, that interval is skipped) Since no advantage is gained in the rate of execution with this situation, it shoul-d be avoided by specifying a Program Tabl-e Interval adequate for the table processing time.

NOTE: Whenever the processing time of the user's programs exceeds the Program Tab1e Interval, Error 11 is logged in the Error Log (Section 4).

If 0-- is entered for the Table Interval-, table execution is defined by the t.ime programmed in one or more Instruction 92ts. Multiple table executions are effected with multiple Instruction 92ts that have different time entries.

- SUBROUTINES

SubrouLines are entered in the programming table (*1 Mode) and are called with program control instructions in the *1 Mode. The group of instructions which form a subroutine st,arts with Inst.ruction 85, Label Subroutine, and ends with Instruct.ion 95, .E;no.

- COMPILING A PROGRAI{

When a program is first entered, or if any changes are made in the *a, *A, or *C Modes, the program must be compiled before it starts running. The compile function checks for programming errors and initializes program informat.ion for use during program execution. If errors are detected, the appropriate error codes are indicated on the computer display. The compile function is executed by entering *0 or ESCape.

7-2

SECTION 7. DIRECT PROGRJ${MING

On compiling, the output port and al-l flags are set 1ow and data values contained in Input Storage are set to zero. ALL STORED DATA ARE ERASED I{HEN THE BDR RECOMPII.,ES.

7.1.2 "A MODE - REALLOCATE INPUT STORAGE

The *A Mode is accessed using the 7H computer command, followed by *A. This Mode is used t.o 1) determine the number of locations a1l-ocated t,o fnput Storage, 2) repart,it.ion this memory.

After repartitioning memory, the BDR COMPILES, ERjASING ALL STORED DATA.

Keyboard En I rrr

*A

TABI,E 7 .L.2.

Display ID: Data

01: XXXX

Description of *A Mode Data

Descri-ption of Data

fnput. Storage Locations. This value can be changed by entering the desired number (minimum of 28)

7 .L.3 *C MODE SECI]RITV

The *C Mode is accessed with the 7H computer command, followed by *C. This mode is used to block access to the userrs program information and certain BDR functions. There are 3 leveIs of security, each with its own 4 digit password. A11 passwords are set to 0000 on power-up which disables security. Setting a password to a non-zero val-ue "focks" the functj-ons secured at that leve1. The password must subsequently be entered to temporarily unlock security through that 1eveI. Passwords are stored in write protected memory and affect the program signature.

When security is disabled, *C will advance directly to the window containing the first password. A non-.zero password must be entered in order to advance to the next window. Leaving a password 0, or entering 0 for the password disables that and subsequent levels of security.

Security may be temporarily disabl-ed by ent.ering a password in the *C Mode or using the L computer command. The password entered determines what, operations are unlocked (e.9., entering password 2 unlocks the functions secured by passwords 2 and 3). Password 1 (everything unlocked) must be entered before any passwords can be altered.

7-3

SECTION 7. DIRECT PROGRAMMTNG

TABIJE 7.L.3. *C Mode Entries

SECURTTY DISABLED Keyboard Display Entry ID: Dat.a Description

*C O1:XXXX Level 1: Non-zero password blocks 7H and 7W commands, and Levels 2 and 3.

A O2:XXXX l-,eve1 2z Non-zero password blocks C, I, 1W commands, and Level 3.

A O3:XXXX L,eve1 3: Non-zero password bl-ocks all commands except A, L, N, H, U, and E.

SECURfTY ENABIJED Keyboard Display Entry ID: Data Description

*C l-2 : 0000 Enter password. If correct, securi-ty is temporarily unlocked through that 1eveI.

A OI-:XX Level to which security has been disabled. 0 -- Password 1 entered

(everything unlocked) 1 -- Password 2 entered 2 -- Password 3 entered

The L computer command temporarily changes the security Ieve1. After terminating communications, security is reset.

7.2 PROGRAI{ INSTRUCTION TYPES

The instructions used to program t.he BDR are divided into 4 types: Input/Output G/O) , Processing, Output Processing, and Program Control. Instructions are identified by a number. Each instruction has a fixed number of parameters associated with it which give the dat.alogger the information it needs to execute the instruction.

- I/O Instructions (numbers L-29) are used to make measurements and store the readings in input locations.

- Processing Instructj-ons (numbers 30-51) perform numerical- operations using data from Input Storage locat.ions and place the results back into specified Input Storage locations.

7-4

SECTION 7. DIRECT PROGR.JA}TMING

- Output Processing Instructions (numbers 70-82) provide a method for generating time or event dependent data summaries from processed sensor readings residing in specified Input Storage locations.

- Program ConLrol Instructions (numbers 83-100) are used to direct program execution based on time and or conditional tests on input data.

7 .3 PARAIITETER DATA TYPES

There are 3 different data tlpes used for Instruction parameters: Floating Poj-nt (FP) , 4 digit integers (4) , and 2 digit integers (2). In the listings of the instruction parameters in Sect,ion B the parameter data type is identified by its abbreviation.

Floating Point parameters are used to enter numeric constants for calibrat.ions or arithmetic operations. While it is only possible to enter and display 5 digits (magnitude +.00001^to +99b9-9.)^ the internal- format has-a much greatrer range Tlxro-19 to 9x1O1o). Instruction 30 can be used to enter a number in scientific notation to be loaded inLo an input l-ocation.

7.4 REPETITIONS

The repetit,ions parameter on many of the T/O, Processing, and Output Processing Instructions is used to repeat the instruction on a number of sequential Input Channels or Input Storage locations. For example, if you have 2 differential voltage measurements to make on the same voltage range, wire the inputs t,o sequential channel-s and instead of entering the Differential- Voltage MeasuremenL Instruction 2 times, enter it once with 2 repetitions. The instruction will make 2 measurements starting on the specified channel number and continuing through the next differential channel, wi-t.h the resul-ts being stored in the specified input l-ocation and the succeeding input location. Averages for the 2 measuremenLs can be cal-culated by entering the Average Instruction with 2 rer:etitions.

7 .5 ENTERING NEGATIVE NT'MBERS

The C key is used to enter a negative. It must be keyed after a number has been keyed in but before the number is entered. On floating point numbers a minus sign (--) will- appear to the left of the number.

7-5

SECTION 7. DIRECT PROGRJN{MING

rr - - rr is also used to the right of the Program Table Interval to indicate seconds and indexed Input Locations in a loop (Section 7.5) . A Tabl-e Interval- of 0-- means execute the table according to t,he time entered in one or more Instruction 92ts.

7 .6 INDEXING INPUT I,OCATIONS

When used within a Loop, Input Locations can be indexed to the loop counter. An input, locatj-on is indexed by keying C after the l-ocatj-on number is keyed but before the number is entered. The loop counLer is added to the indexed value to determine the actual Input Location the instruction acts on. Normally the loop counter is incremented by l- after each pass through the 1oop. Instruction 90, Step Loop Index allows the increment step to be changed. See Instructions B7 and 90, Section B, for more details.

7 .7 INPUT R.JAI{GE AI{D OVERRAI{GE DETECTION

The voltage RANGE code parameter on Input/Output. fnstructions is used to specify the full- scale range of the measuremenL and t.he integration period for the measurement (Table 7.7.) .

TABLE 7.7. Input Voltage Ranges and

Ranqe Code Inteqration time, ms 00 (auto range) up to 1-6.7 01_ 50 02 33.3 03 16.7 04 5.3 05 1.08

Codes

Ranqe, mV -20 to +5000 -20 to +80 -2O to +L20 -20 to +250 -30 to +1000 -50 to +5000

The fuII scale range selected shoul-d be the smallest that will accommodate the fu1l scale output of the sensor being measured. Using Lhe small-est possible range will resul-t in the best resolution for the measurement.

Range code 00 can be used to make the voltage measurement in the proper range without selecting a specific voltage range.

Auto range should be used when a measured voltage varies widely over the 5 volt range, or when several varying voltage measurements are being made with one measurement inst.ruction by using the REPS parameter.

7-5

SECTION 7. DTRECT PROGR.JAII{MING

Auto range is convenient to use since it can make any voltage measurement within the 5 volt 1imit. Two disadvantages exist:

- Some resolution is lost on voltage measurement,s less than 120 mV by using the auto range rather than the 80 mV or 1,20 mV range.

- The integration time of the auto range can be long'er than that of the specific input range if the voltage is greater than 120 mV. Longier integration times increase current drain from the power supply.

When a voltage input exceeds the specified range, the value stored is set to the maximum negative number and displayed as -99999 and stored as -6999.

An input voltage greater than +5 volts on one of the analog inputs will result in errors and possible overranging on other analog inputs. Analog input voltages greaLer than l-6 volts may permanently damage the datalogger.

7.8 DATA STORAGE AIID OUTPUT PROCESSING

Data are stored in Data Tables. The Data Tab1e Int,erval- Instruction (Instruction 84) defines how often and what data are stored. Data output at the specified interval constitute a record.

Output Processing Instructions (Instructions 7O through 82) following the Data Table Interval Instruction define what data are included in the Table. The first Output Processing InsLruction outputs the first data point of the record.

The number of records to store in a Data Table is also specified in Instruction 84. When the program j-s compiled, memory is allocated for each Data Tab1e based on record size and the number of records to store.

The number and size of Data Tables are limited only by memory.

Output. Processing Inst,ruct,ions associated with an Instruction 84 store processed data values when and only when the interval- specified for that, Instruction 84 coincides wit,h the real time clock.

Most Output Processing Instructions require both an inter- mediate data processing operation and a final data processing operation. For example, when the Totalize Instruction, 72, is initiated, t.he intermediate processing operation increments a

7-7

SECTION 7. DIRECT PROGRAMMING

sample count and adds each new Input Storage val-ue to a cumulative total residing in fntermediate Storage. At output time the final processing operations sLore the resulting total and zero intermediate cal-culations.

Intermediate Processing can be disabled by setting Flag 9 which prevents Intermediate Processing without actually skipping over the Output Instruction.

7 .9 USE OF FLAGS : PROGR.jAIII CONTROT

There are 9 flags which may be used in datalogger programs (Table 7.9-I) . FIag 9 is specific to disabling intermediate processing and Flags l--8 may be used as desired in the program. FIag 9 is automatically set low at the beginning of measurement interva1. Flags 1-B remain unchanged until acted on by a Program Control fnstruct.ion or until toggled by an operator through the comDuter.

Flag Flag

1to 9

TABLE 7.9-L. FIag Description

8 - User Flags - Intermediate Processing Disable Flag

Flags are set with Program Control- Instructions.

7 .9.I PROGRAI,I CONTROI. I,OGICAI, CONSTRUCTTONS

Most of the Program Control Instructions have a command code parameter which is used to specify the act,ion to be taken if the condition tested in the instruction is true. Table 7.9-2 lists these codes.

0 '1 -O ?O-OO L Jt

11-19 2t-29

5U 31 32 4I 51 bl- 7I

TABLE 7 .9-2. Coumrand Codes

Go to end of Program Table Ca1l Subroutine a-9, 79-99 Set. Flag 1-9 high Set Flag 1-9 1ow Then Do Exit loop if true Exit loop if fal-se Set Port high Set Port l-ow Toggle Port Pulse Port

7-8

SECTION 7. DIRECT PROGR.JAII{MING

IF A (88-92 wit,h CaI1 subroutine X ELSE (94) IF B (88-92 with Ca1I subroutine X END B (95) END A (95)

command 30) (86, command=X)

command 30) (85, command=X)

FIGURE 7.9-3. Logical OR Construction

A logical OR can also be construct.ed by setting a flag if a comparison is true. (rhe flag must be cleared before making the comparisons.) After al-I comparisons have been made, execute the desired instructions if the flaq is set.

The Begin Case Inst,ruction 93 and If Case Instruction 83 aIlow a series of tests on the val-ue in an Input Location. The case test is started with rnstruction 93 which specifies the location to test. A series of InstrucLions 83 are then used to compare the value in the location with fixed values. When the value in the input location is less than the fixed value specified in Instructj-on 83 the command in that Instruction 83 is executed and execution branches to the END Instruction 95 which closes the Case test (see Instruction 93, Sect.ion 8) .

7 .9.3 NESTING

A branching or loop instruction which occurs before a prevj-ous branch or loop has been closed is nested. The maximum nest.ing leve1 for loops and branching instructions is 9 deep. Begin Case fnstruction 93 counts as 1 l-evel-. fnstructions 83, 85, 88, 89, 9A, and 92 each count as one 1evel when used with Command 30 which is t.he "Lhen do" command. Use of E1se, Inst.ruct j-on 94, also counts as one nesting Ievel each time it is used. For example, the AND construction above is nested 2 deep while the OR construction is nested 3 deep.

Parameter 1 of the Loop Instruction is pass duration, or the time required to make one pass through the loop. Pass duration must be less than l- second in order to nest loops. If the pass duration is greater than or equal to 1 second, loops can not be nested.

Subroutine nesting, which has no limit, is when a subroutine is called from another subroutine. A subroutine cannot be embedded within other subroutines. A subroutine must end before another subroutine begins (error 20, Section 7.11) . Any loops or IF/THEN DO sequences started within a subroutine must end before the subroutine.

7 -1-O

SECTION 7. DTRECT PROGRJLMMING

7 .9.4 FI,AG 9 - IMTERMEDIATE DISABLE FI,AG

The Intermediate Processing Disable Flag (F1ag 9) suspends intermediate processing when it is set high. This flag is used to restrict sampling for averages, totals, maxima, minima, etc., to times when certain criteria are met. The flag is automatically set low at the beginning of the program table.

Flag 9 is unique in that if it is already set high and the test condition of a subsequent program controf instruction acting on Flag 9 faiIs, the flag is set 1ow. This feature el-iminates the need to enter another instruction to specifically set Flag 9 1ow before proceeding to other instructions.

7.LO END, INSTRUCTION 95

The END instruction is required to mark the end of:

- A Subroutine (starts with Instruction 87) - A Loop (start.s with Instruction 85) - An IF THEN DO sequence (starts with one of

Instructions 89-93 with the THEN Do command 30) .

The IF instruct,ions 89-93 require Instruction 95 onTy when the THEN DO command 30 is used.

If one of the above instructions is used without the corresponding END, error 22 is displayed when compiling the program. Error 2I is displayed if END is used wit.hout being preceded by one of these instructions (Section 7.I1-) .

An END j-nstruction is always paired with the most recent instruction that requJ-res an END and does not, already have one. A way of visualizing this is to draw lines between each instruction requiring an END and the END paired with it (as in Figure 7.9-2) . The lines must not cross. To debug logic or find a missing or extra END error, list the program and draw the lines.

7.LL ERROR CODES

There are 3 types of errors flagged by the datalogger: compile, run time, and edit.or. The error 1og, 1U command (Sect,ion 4), is composed of run time errors only (errors 1 through 12).

The codes and descriptions of compile and editor errors is given in Table 7.L1-. These errors appear on the computer screen at the time of il1ega1 operations.

7 -LL

SECTION 7. DIRECT PROGRJN,IMING

TABLE 7.LL. Error Codes

Code Type Description 20 Compile SUBROUTINE encountered before END of

previous subroutine 2t Compile END without IF, LOOP or SUBROUTINE 22 Compile Missing END 23 Compile Nonexistent SUBROUTINE 24 Compile ELSE in SUBROUTINE without IF 25 Compile ELSE wit.hout IF 26 Compile EXIT LOOP without LOOP 27 Compile IF CASE wj-thout BEGIN CASE 28 Compile No Output Processing Instructions

following P84 29 Compile Flag 0 does not exist 30 Compile IF and/or LOOP nested too deep 31 Compile Storage area exceeded 95 Editor Instruction does not exist 96 Edj-tor Att.empt to allocate more fnput t,han is

available 97 Edit.or Time-out on program download 98 Editor Out of program memory 99 Editor Wrong program file type

7.L2 PROGRAM SYNTAX AI{D DOI'INLOAD RULES

This Section describes the syntax requirements for programs developed in a computer for the purpose of downloading to t.he datalogger. This section does not need to be read if the progframs for download are developed in EDLOG, a program development software module contained in Campbell's PC208 Datalogger Support Software.

A program residing in a datalogger may be transmitted to the comput.er usi-ng the 271,8, 1Q command. A program resj-ding on a computer may be loaded to a datalogger using the 27lBQ command.

Table 7.1,2 is an example program which requests stage from an SDI-12 sensor (Instruction 29) , measures datalogger batt.ery (Instruction 1O) and temperaLure (Instruction 1-7) . The first Instruction 84 stores a sample stage reading every hour. The second Instruction 84 saves daily average stage, maximum stage, tj-me of max stage, minj-mum stage and time of minimum stage. The primary purpose of this example i-s to show the syntax required to generate a program on a text editor, not programming per se.

7 -L2

SECTION 7. DIRECT PROGRJN{MING

TABLE 7.L2. Exarrple Program Listing

);3oo ; SAMPLE. DLD

;:STAGE FT:BATT V :TEMP C

MODE 1 Program Table Interval 1

l:P29 1:1-01- 2:L 3:1 4:0

2:PLO 1- z2

3:P17 J-:J

4:P84 1:50 2:4000

5:P70 1:1 2:L

6:P84 t zl44O 2:31

7 zPT]- 1:1 z'. L

8:P73 1:1 2:L0 3:1

9:P74 1:1 2 z1-0 3:l-

MODE 10 Ii26

'7 -L3

z 5

SECTTON 7. DIRECT PROGRJAI{MING

TABLE 7.L2 Cont. MODE 1.2 l-:0000 2:0000 3:0000

RULES FOR DOI{NI,OAD FII,ES

) means start of program and must be the first character of a program. ; is the beginning of a comment l-ine Labels/Unit.s for Input Locations begin and end with rr'$rt. Each Input. Location l-abeI/unit line begins with rr ' : rr . Each line contains 5 groups of 9 characters each, separated by colons (:). The first. 5 characters are used for the labe1; the l-ast three for the units. The first, Iabel/unit entry corresponds to Input l-,ocation L, the second to Input Location 2, etc.

4. "MODE" or rrMrr must, be the f irst character ot,her than a carriage return, line feed, characters in a comment line which start with a semicolon, or rrlrr (7D Hex) . The order that. the Modes are sent does not matter (i.e., the information for Mode 1-2 could be sent before that for Mode 1).q rrPrrrcram Table Intervaf tt iS required before entering the int.erval in minut.es (Xxxx) or seconds (XX- - I .

6. Colons (:) are used to mark the start of actual- data. 7. There are 4 two-character control- codes which may be used to

verify that the datalogger receives a file correctly: ^B ^B (2hex, 2hex) --Discard current buffer and reset signature ^C ^C (3hex, 3hex) --Send signature for current buffer ^D ^D (4hex, 4hex) --Load current buffer and reset signature ^E ^E (Shex, 5hex) --Load current buffer, Bxit, and compile program

As a download file is received, the datalogger buffers the data in memory; the data is not loaded into the editor or compiled until- the BDR receives a command to do so. The maximum size of the buffer is 1.5K. The minimun file that coul-d be sent, provided it is short.er than 1.5 Kbytes, ig the program listing, then ^E ^E.

Larger programs can be l-oaded in blocks. ^C ^C tells the BDR to send the signat.ure for the current buffer of data. If this signature does not match that cal-culated by the sending device, ^B ^B can be sent to discard t,he current buffer and reset the signature. If the signature is correct, ^D ^D can be sent to tell the BDR to load the buffer into t.he editor and reset the signature. Once the complete file has been sent and verified, send ^E ^E to compile the program and exj-t the load command.

7 -L4

SECTION 8. BDR INSTRUCTION SET

8. 1 A.I{AIJOG MEASUREME}i|:T

TABLE 8.1.1.

Ranqe Code 00 (auto range) ul_ 02 03 04 05

FUNCTION This Instruction is

ended input with respect

PARAMETER NUMBER

01 02 U5 o4

INPUT LOCATIONS ALTERED

INSTRUCTIONS

Input VoJ.tage Ranges and Codes

Inteqration time, ms up to L6.7

50 33.3 1,6.7

1.08

Ranqe, mV -20 to +5000 -20 to +80 -20 to +]-20 -20 to +250 -30 to +1000 -50 to +5000

NOTE: When a voltage input exceeds t.he range programmed, the value which is stored is set to the maximum negat.ive number and displayed as -99999 and stored as -6999 in Data Tabl-es.

**** l- SINGLE-ENDED VOLTS ****

DATA TYPE

2 z z 4 FP FP

used to measure voltage at a single- to ground. Output is in millivoIts.

DESCRIPTION

Repetitions Range code Channel number for first measuremenL Input. location for firsL measurement. Mult.iplier Offset

1 per measuremenL

**** 2 DIFFERENTIAI-., VOLTS ****

FUNCTION This Instruction reads the voltage difference between the

high and low inputs of a differential channel. Table 8.1-1 con- tains all valid voltage ranges and their codes. Both the high and Iow inputs must be within +5 vol-ts of Analog Ground (Pin J, Analog Connect.or) to keep the signal in Common Mode Range. Output is in millivo1ts.

d-l_

SECTION 8.1 AI\TALOG MEASUREMEIi|II TNSTRUCTIONS

PARAMETER DATA NUMBER TYPE DESCRIPT]ON

01 02 UJ 04 05 05

2 Repetitions 2 Range code 2 Channel number for first measuremenL 4 Input location for first measurement FP Multiplier FP Offset

INPUT LOCATIONS ALTERED 1 per measurement

**** 3 PULSE COUNT ****

Instruction 3 counts pulses on pulse counL channeLs ! or 2. Channel l- is the slow pulse input, designed for a tipping bucket rain gage (pin o, analog connect,or) . Channel 2 is for faster pulse inputs, such as a contact cl-osure anemometer (pin B, analog connector). Counts are returned for channel 1-, frequency for channel- 2. Channel 1 increases the current drai-n of the BDR in proportion to the frequency of the signal being measured (20ms at 13mA/count).

Pulse input signal types are switch cl-osure and voltage pu1se.

Channel 1: Maximum input frequency is 20 Hz. Minimum switch closure time is 100 microseconds Minimum voltage pulse low time is l-00 microseconds Maximum debounce filter time is 3 ms Maximum voltage magnitude is 5V. Result in counts

Channel 2: Maximum input frequency is 150 Hz. Minimum switch closure time is 200 microseconds Minimum voltage pulse low time is 2OO microseconds Maximum debounce f il-ter time is 2.5 ms Maximum volt.age magnitude is 5V. Result in frequency

8-2

SECTION 8.1 ANALOG MEASUREMENT INSTRUCTTONS

PARAMETER DATA NUMBER TYPE DESCRIPTION

INPUT LOCATIONS ALTERED 1 INTERMEDIATE STORAGE LOCATIONS ALTERED 1

**** 5 HALF BRIDGE ****

FUNCTION This Instruction is used to make a half bridge measuremenL

using the excitation provided by the datalogger. Output is the ratio of the measured single-ended voltage to excitation voltage, vslvx.

PARAMETER DATA NUMBER TYPE DESCRIPTION

01

02 n? 04

01 vz n? 04 05 uo

2 Channel 01 = Pin D, Analog Connector 02 = Pin B, Analog Connector

4 Input Location FP Multiplier FP Offset

2 Repetitions 2 Range code 2 Channel number for first measurement. 4 Input location for first measurement FP Multiplier FP Offset

INPUT LOCATIONS ALTERED 1 per measurement

**** 5 FULL BRIDGE ****

FUNCTION This Instruction is used to make a fuII bridge measuremenL

using the excitation provided by the datalogger. Output is the ratio of the measured differential voltage to excitation voltage, vs/vx.

8-3

SECTION 8.1 AI{AI,OG MEASUREMENT INSTRUCTIONS

PARAMETER NUMBER

01 02 03 o4 05 06

PARAMETER NUMBER

01 UZ 03 04 05

INPUT

DATA TYPE

z z 2 4 FP FP

DESCRIPTION

Repetitions Range code Channel number Input location Multiplier Offset

for first measurement for first measurement

INPUT LOCATIONS ALTERED 1 Der measurement

**** l_0 BATTERY VOLTAGE ****

FUNCTION This Instruction reads the battery voltage and writes it to

an input location. The unit.s for bat.tery voltage are vo1ts. When the batteries are around 8V, false battery readings of 9 to 10V will result, and the quiescent current drain increases to 7mA. At 9 .2 to 9.3V, f al-se analog measurements are possible (Example: 20O0mV input is measured as 201-0 to 2O50mV).

Ol-: 4

INPUT LOCATIONS ALTERED

DATA TYPE

z 2 4 FP FP

LOCATIONS ALTERED

DESCRIPTION

Input location

L

DESCRIPTION

Repet,itions Input. channel number of first measurement Input location for first measurement Multiplier Offset

1 FOR EACH THERMISTOR CHANNEL

8-4

**** 1_l_ BDR THERMISTOR PROBE ****

FUNCTION This Instruction makes a half bridge measurement on the 103

or 1O3B Thermistor Probe and calculates the temperature in oC

with a polynomial linearization. Refer to Appendix A for details on the l-03 probe.

PARAMETER DATA NUMBER TYPE

SECTION 8.1 AI{ALOG MEASUREMENT INSTRUCTIONS

**** 1,6 TEMPERATURE FROM PLATINUM R.T.D.

FUNCTION This Instruction uses the result of a previous

measurement to calculate the temperature accordinq RTD bridge

to the DIN 43760 specification adjusted (1980) to conform to the pending International- Electrotechnical Commission standard. The range of linearization is -2OO oC t,o 850 oC. The error in the l-inearization is less than O. O01oC between -1OOo and +3000, and is l-ess t.han O.0O3oC between -1-8Oo and +8300. The error (r calculated - T standard) is +0. O05o at -2OOo and -O.0060 at +B5Oo. The input must be the ratio R-/R.,, where Ro is the RTD resistance and Ro the resistance of tEe H.to at oocl

PARAMETER NUMBER

01 vz 03 04 05

INPUT LOCATIONS

DATA TYPE

z 4 4 FP FP

ALTERED

DESCRIPTION

Repetitions Input location fnput location

of of

Rs/Ro result

**** 17 INTERNAL TEMPERATURE ****

FUNCTION This Instruction measures the temperature in degrees C of

thermistor on t,he datalogger analog board.

0l-: 4

INPUT LOCATIONS ALTERED

Multiplier Offset

1 FOR EACH RTD

DESCRIPTION

Input location number for temperature

1

PARAMETER NUMBER

DATA TYPE

k** 18 MOVE TIME TO INPUT LOCATION ****

FUNCTION This Instruction takes the current time in seconds into the

minute, minutes into the hour, hours into the d"y, etc. and does a modulo divide (see Instruction 45) on the time value wit.h the number specified in the second parameter. The result is stored in the specified input location. Entering 0 or a number which is greater than the maximum value of the time for the modulo divide will result in the actual time value bei-ncr stored.

8-5

Code

0 1 z 3 4 5

SECTION 8.1

Time val-ues

Seconds into the minute Minutes into the hour Hours into the day Days into the month Months into the year Years into the century

AI{AIOG MEASUREMEMT INSTRUCTIONS

Maximum

OU

60 24 3 o (31) I2 99

PARAMETER NUMBER

0l_ :

02:. 03:

PARAMETER NUMBER

01 03 04 05

INPUT LOCATIONS ALTERED

DESCRIPTION

Time Code Number to modulo divide by Input location number

1

DESCRIPTION

Address (0-9) , Command(0-9) , Value (1--9) Input Location Multiplier Offset

SDI sensor dependent.

z 4 4

DATA TYPE

DATA TYPE

4 + FP FP

29 SDI READ *

FUNCTION This Instruction addresses a SDI sensor and stores the

specified value in an Input location after applying Lhe multiplier and offset. The SDI address, command and value t,o store are al-l specified in parameter 1. At present only command 0 is defined, telling the SDI sensor to commence measuring. The sensor responds with the number of seconds required for measurement and how many values will be senL. Table execution is suspended for the specified time period, after which the value specified is st,ored in the specified input location. If dat,a is not received, -99999 is loaded int,o the specified input location (s) . If several values from a SDI sensor are required, enter an Instructton 29 for each va1ue. If the instructi-ons are entered next to each other, the sensor will only be addressed once.

INPUT LOCATIONS AI,TERED

8-5

SECTION 8.2 PROCESSTNG INSTRUCTTONS

8.2 PROCESSING INSTRUCTIONS

Symbols used to describe the function of the processing inst,ructions are def ined as follows:

lzl = User specified input l-ocation number destination txl = Input l-ocation no. of source X tYl = Input l-ocation no. of source Y tFl = Fixed Data (user specified floating point number)

**** 30 z=F, LOAD FIXED DATA ****

FUNCTION Store a fixed value into an input l-ocation. The value is

entered in scient.ific notation; the absolute value of the number may range from t x to-19 to 9 x l-018. A val-ue smal-Ier than the minimum is set to O, while a larger value is set to t,he maximum.

PARAMETER DATA NUMBER TYPE DESCRIPTION

01: FP Mantissa IFI 02: 2 Exponent of l-0 (Hit C to change sign) 03: 4 Input location no. destination lzl

INPUT LOCAT]ONS ALTERED 1

**** 31 Z=X, MOVE INPUT DATA ****

FUNCTION Move data from one input location to another.

PARAMETER DATA NUMBER TYPE DESCRIPTION

01: 4 Input location no. of source txl O2: 4 Input location no. destination lzl

INPUT LOCATIONS ALTERED 1

8-7

SECTION 8.2 PROCESSING INSTRUCTIONS

**** 32 Z=Z+1, INCREMENT INPUT LOCATION ****

FUNCTION Add 1 to the value in the specified input, location.

PARAMETER DATA NUMBER TYPE DESCRIPTION

01: 4 Input location no. destination tZ)

INPUT LOCATIONS ALTERED 1

****33X+Y****

FUNCTION Add X to Y and place the result in a third input location.

PARAMETER DATA NUMBER TYPE DESCRIPTION

01: 4 Input location no. of source X txl 02: 4 Input. Iocation no. of source Y IYI 03: 4 Input location no. destinat.ion

of X+Y tzl

INPUT LOCATIONS ALTERED ]-

****34X+F****

FUNCTION Add F to X (where F is a fixed floating point number) and

place the result in an input location.

PARAMETER DATA NUMBER TYPE DESCRIPTION

01: 4 Input location no. of source X txl O2: FP Fixed addend tFl 03: 4 Input location no. destinat,ion

of X+F lzl

INPUT LOCATIONS ALTERED 1-

8-8

SECTTON 8.2 PROCESSING INSTRUCTIONS

****35X-Y****

FUNCTION Subtract

PARAMETER NUMBER

01: 02: o?.

Y from X and

DATA TYPE

4 4 4

place the result.

DESCRIPTION

Input location no. Input location no. Input location no. ofX-Y

1

in an Input locatj-on.

of source X of source Y destination

of source X

destination

txl tYl

lzl

INPUT LOCATIONS ALTERED

**** 35 X * Y ****

FUNCTION Multiply X by Y and place the result in an Input l-ocation.

PARAMETER DATA NUMBER TYPE DESCRIPTION

01: 4 Tnput location no. of source X txl 02: 4 Input location no. of source Y tYl 03: 4 Input location no. destination

of X*Y tZ)

INPUT LOCATTONS ALTERED 1

****37X*F****

FUNCTION Mu1t,ip1y X by F (where F is a fixed multiplier) and place

the result in an input location.

PARAMETER NUMBER

0l- :

vz i n?.

DESCRIPTION

Input. location no. Fixed multiplier Input location no. ofX*F

1

DATA TYPE

4 FP 4

txl tFl

tzl

INPUT LOCATIONS ALTERED

8-9

SECTION 8.2 PROCESSTNG INSTRUCTTONS

****38X/Y****

FUNCTION Divide

Division by datalogger

PARAMETER NUMBER

02: 03:

FUNCTION Take

l-ocation.

PARAMETER NUMBER

01: 02:

X by Y and places the resul-t. in an Input l-ocation. 0 will cause the result to be set to the maximum

number (+99999) .

DATA TYPE

4 4 4

DATA TYPE

4 4

DESCRIPTION

Input location Input location Input. location ofx/Y

.L

DESCRTPTION

Input l-ocation Input location of LN (X)

1

no. of source X no. of source Y no. destination

no. of source X no. destination

txl tYl

tzl

INPUT LOCATIONS AI,TERED

the If

**** 39 SQUARE ROOT ****

square root of X and place the result in an input X is negative, 0 wil-I be stored as the resul-t.

]NPUT LOCATIONS ALTERED

DATA TYPE

4 4

DESCRIPTION

Input l-ocation no. of source X Input location no. destination of square root of X

1

**** 40 LN(X) ****

txl

lzl

FUNCTION Take the natural logarithm of X and place the result in an

input location. If X is 0 or negative, -99999 will be stored as the resul-t.

PARAMETER NUMBER

r)1 .

02: txl

Lzl

INPUT LOCATTONS ALTERED

8-l-0

SECTION 8.2 PROCESSING TNSTRUCTIONS

**** 4L EXP (X) ****

FUNCTION Raise the exponential (EXP) base e to the X power and place

it in an input l-ocation.

PARAMETER NUMBER

vz a

DESCRIPTION

fnput location Input location of ExP (X)

1

**** 42 a/X ****

FUNCTION Take the inverse of X and place the resu1t in an input

location. If X=0, 99999 will be given as the result.

PARAMETER DATA NUMBER TYPE DESCRIPTION

0l-: 4 fnput l-ocation no. of source X 02: 4 Input location no. destination

of a/x

]NPUT LOCATIONS ALTERED 1

**** 43 ABS (X) ****

FUNCTION Take the absolute (ABS) value of X and place the resul-t

an input location.

PARAMETER DATA NUMBER TYPE DESCRIPTION

01: 4 Input location no. of source X O2z 4 Input location no. destinat.ion

of ABS (X)

]NPUT LOCATIONS AI-,TERED

DATA TYPE

4 4

no. of source X no. destinati-on

txl

tz)

INPUT LOCATIONS ALTERED

txl

tz)

l_n

txl

lz)

I - 1-1_

SECTION 8.2 PROCESSING INSTRUCTIONS

**** 44 FRACTIONAL VALUE ****

FUNCTION Take the f ractional- (FRAC) val-ue (i . e. , the non- integer

portion) of X and place the result in an input location.

PARAMETER DATA NUMBER TYPE DESCRIPTION

01: 4 Input location no. of source X IXI 02 4 Input location no. destination

of FRAC (X) tzl

INPUT LOCATIONS ALTERED 1

**** 45 INTEGER VALUE ****

FUNCT]ON Take the integer (INT) value of X and place the result in an

input. l-ocation.

PARAMETER DATA NUMBER TYPE DESCRIPTION

01: 4 Input location no. of source X txl 022 4 fnput location no. destination

of INr (x) Lz)

INPUT LOCATIONS ALTERED 1

**** 45 X MOD F ****

FUNCTION Do a modulo divide of X by F and place the result in an

input l-ocation. X MOD F is defined as the REMAINDER obt.ained whenX is dividedbyF (e.9., 3 MOD 2 = 1). XMOD 0 returns X.

PARAMETER DATA NUMBER TYPE DESCRIPT]ON

01: 4 Input location no. of source X txl 02: FP Fixed divisor tFl 03: 4 Input l-ocation no. destination

of XMODF lzl

]NPUT LOCATIONS ALTERED 1

8-L2

SECTION 8.2 PROCESSING INSTRUCTIONS

**** 47 XY ****

FUNCTION Raise X to the Y power and place the resul-t in an input

location.

PARAMETER DATA NUMBER TYPE DESCRIPTION

01: 4 Input location no. of source X IXI 02: 4 Input l-ocation no. of source Y tYl 03: 4 Input location no. destination

of* xY lzl

INPUT LOCATTONS ALTERED ]-

**** 48 SIN (X) ****

FUNCTION Calculate the sine of X (X is assumed to be in degrees) and

place the resul-t in an input location. The cosine of a number can be obtained by adding 90 to the number and taking the sine (COSx = SrN (X + 90)) .

PARAMETER DATA NUMBER TYPE DESCRIPTION

01: 4 Input l-ocation no. of source X txl 02: 4 Input l-ocation no. destinat.ion

of SIN (x) I,zl

INPUT LOCATIONS ALTERED 1

**** 49 SPATIAL MAXIMUM ****

FUNCTION Find the spatial maximum (SPA MAX) val-ue of the given set or

SWATH of input l-ocations and place t.he result in an input location. To find the input location where the maximum vaLue occurs, add l-000 to the input location number destination selected lzl and enter this modified location number as Parameter 03. The input, location ID of the maximum value observed will then be stored in destination tz) plus 1.

Parameter 3 cannot be entered as an indexed location within a loop (Instruction 87) . To use Instruction 49 within a loop, enter Parameter 3 as a fixed location and follow 49 with the Instruction 3l- (Move Data). fn Instruction 31, enter the location in which 49 stores its result as the source (fixed) and enter the destination as an indexed l-ocation.

8-13

PARAMETER NUMBER

01: UZ: o?.

PARAMETER NUMBER

n1 .

uz i

03:

PARAMETER NUMBER

ul_: uz 2

03:

INPUT LOCATIONS ALTERED

SECTION 8.2 PROCESSING INSTRUCTIONS

DESCRIPTION

Swath ISWATH] Starting input location no. [1ST LOC] Input location no. destination of maximum [tvtAX or ZJ

1or2

DESCRIPTION

Swath ISWATH] Starting input location no. [1ST LOC] Input location no. destination of minimum IMIN or Z]

DESCRIPTION

Swath ISWATH] Starting input location no. [1ST LOC] Input location no. destination of average IAVG or Z]

1

4 4 4

DATA TYPE

DATA TYPE

4 4 4

DATA TYPE

**** 50 SPATIAL MINTMUM ****

FUNCTION Find the spatial minimum (Spe MIN) value of the given set or

SWATH of input locations and place the resul-t in an input location. To find the input l-ocation where the minimum value occurs, fo11ow the instructions given above for SPATIAL MAXIMUM.

Parameter 3 cannot be entered as an indexed locat.ion in a 1oop. Wit.hin a loop, Instruction 50 must be used in conjunction with fnstruction 31 as described for InsLrucLion 49.

INPUT LOCATIONS ALTERED ]- oT 2

**** 51 SPATIAL AVERAGE ****

FUNCTION Take the spatial average (Spa AVG) over the given set, or

SWATH of input locations and place the result in an input location.

4 4 +

]NPUT LOCATIONS A],TERED

8-l-4

SECTION 8.2 PROCESSING INSTRUCTIONS

**** 53 SCAI-.,TNG ARRAY WITH MULTIPIJTER AND OFFSET ****

FUNCTION Take 4 input location values, multiply each by a float.ing

point constant, then add another floating point constant to the resul-ting products and place the final results back into each of the original 4 input locations.

PARAMETER NUMBER

01- 02 n? 04

Ub 07 08 09

INPUT LOCATIONS

PARAMETER NUMBER

0l_ UZ 03 04 05

DATA TYPE

4 FP FP FP FP FP FP FP FP

ALTERED

DATA TYPE

4 4 2 + z

**** 54 BLOCK MOVE ****

FUNCT]ON Executes a "block moveI of data in fnput locat.ions.

Parameters specify t.he number of values to move, the source, source step, destination, and destination step. The "steptr para- meters designate the increment of the source and destination fnput locations for each value that is moved. For example, a "source step" of 2 and a "destination step" of l- will move data from every other Input location to a contiguous bl-ock of Input locations.

INTERMEDIATE STORAGE O

DESCRIPTION

Starti-ng input, l-ocat.ion no. [STRT LOC] Multiplier 1 [A1] Offset 1 [B1] Multiplier 2 lA2l Offset 2 lB2l Multiplier 3 [A3 ] offset 3 [83] Mult.iplier 4 tA4l Offset 4 tB4l

4

DESCRIPTION

Number of val-ues to move l-st source location Step of source l-st destination location Step of destination

8-15

SECTION 8.2 PROCESSING INSTRUCTIONS

**** 55 5TH ORDER POLYNOMIAL ****

FUNCTION Evaluate a 5th order polynomial of the form.

F (X) = CO + Cl-X + C2X2 + C3X3 + C4X4 + C5X5

where C0 through C5 are the coefficients for the argument X raised to the zero through fift.h power, respectively. The magnitude of the user entered coefficient is l-imited to a range of - 99999 to 99999. Polynomials with coefficients outside this range can be modified by pre-scaling the X value by an appropriate factor to place the coefficients within the entry rangle. Pre-scaling can also be used to modify coefficients which are very close to 0 in order to increase the number of significant digits. PARAMETER NUMBER

n1 .

02:

03:

04:

05: 07: O8: nq.

DATA TYPE DESCRIPTION

2 Repetitions 4 Starting input location no.

for X 4

FP FP nhEE

FP FP FP

IREPS]

txl

INPUT LOCATIONS ALTERED

St.arting input locat j-on no. destination for F (X) tF (x) or Zl C0 coefficient tcOl Cl- coefficient tcll C2 coefficient lc2l C3 coefficient tc3l C4 coefficient IC4l C5 coefficient tC5l

1* Reps

**** 56 SATURATION VAPOR PRESSURE ****

FUNCTION Calculate sat.uration vapor pressure (over waLer SVPW) in

kilopascals from t.he air temier"Lrrr" (oc) and place it in an input locatio!. The algorithm for obtaining SVPW from air temperature ("C) is taken from: Lowe, Paul R. , 1-977: An approximating polynomial for computation of saturation vapor pressure . ,J. Appl . Meteor 16, 100 - l-03 .

Saturat,ion vapor pressure over ice (SVPI) in kilopascals for a OoC to -50oC range can be obtained using Instruction 55 and the relationship

SVPI= -.00485+.8547I X+.2441 X2

8-15

SECTION 8.2 PROCESSING INSTRUCTIONS

where X is t.he SVPW derived by Instruction 55. This relationship was derived by Campbell Scientific from the equations for the SVPW and the SVPI given in Lowe's paper.

PARAMETER DATA NUMBER TYPE DESCR]PTION

01: 4 Input location no. for air temperature oC ITEMP. l

02: 4 Input l-ocation no. destination for saturated vapor pressure IYP or Zl

INPUT LOCATIONS ALTERED 1

**** 57 VAPOR PRESSURE FROM WET-/DRY-BULB TEMPERATURES ****

FUNCTION This j-nstruction cal-cul-ates vapor pressure in kilopascals

from wet- and dry-bulb temperatures j-n uC. The algorithm is of the type used by the National Weather Service:

VP = VPW - A(1 + B*TW) (fa - TW) P VP = ambient vapor pressure in kilopascals

VPW = saturation vapor pressure at the wet-bulb temperature in kilopascal-s

TW = wet-bul-b temperature, oC

TA = ambient air Lemperature, oC

P = air pressure in kilopascafs A - 0.000560

Although the algorithm reguires an air pressure entry, the daily fluctuations are smal-I enough that, for most applications a fixed entry of the standard pressure at the site elevation wil-I suffice. If a pressure sensor is employed, the current pressure can be used.

PARAMETER DATA NUMBER TYPE DESCRIPTION

4 Input location no. of atmospheric pressure in kilopascals IPRESSURE]

4 Input location no. of dry-

o1

02

03

04

bulb temp. 4 lnput l-ocation no. of wet-

bulb temr:.

IDB TEMP. ]

IWB TEMP. ] 4 lnput location no. destination

of vapor pressure IVP or Z]

INPUT LOCATIONS ALTERED 1

8-r7

SECTION 8.2 PROCESSING INSTRUCTIONS

**** 58 LOW PASS FILTER ****

FUNCTION Apply a numerical approximation to an analog resistor

capacitor (Rc) low pass (LP) filter using the following algorithm. F(Xi) = W*Xi + F(Xi_1) * (1-W)

The equivalent RC time constant is given by T/W, where T is the sampl j-ng time in seconds. For val-ues of W less than 0 .25, the analogous "cut off" frequency (the frequency where the ratio of output to input is .707) is accurately represented by w/ (Z T) .

For larger val-ues of W, this "anaIog" estimate of the cutoff frequency becomes less representative.

Where X - [4[ =

F (Xi_1) =

PARAMETER NUMBER

DATA TYPE

01 vz

03

04

]NPUT LOCATIONS AI-,TERED

input sample user entered weight,ing function, O< W <1 If W=O, F(X;)=9t if W=1, F(X+)=X output calcilated for previofis sample

DESCRIPTION

2 Repetitions 4 Start.ing input l-ocation no.

for input data 4 St,arting input location no.

for filtered dat.a FP Weighting function, W

IREPS]

IX] destination tF (X) or Z)

twl

IREPS]

txl IMULr. ]

**** 59 BRIDGE TRANSFORM ****

FUNCT]ON This instruction is used to aid in the conversion of a

ratiometric Bridge measurement by obtaining the value for Ro which is equivalent to R.,. lx/ (L-X) I , where X is the val-ue delived by the standard Bridge M6asurement Programs (with appropriate multiplier and offset) and Rr represents the MULTIPLIER va1ue. The result of Instruction 59-is stored in the same location that X was.

1 FOR EACH REPETITION

DESCRIPTION

Repetitions Starting input l-ocation no. and destination Multiplier (Rf)

1 FOR EACH REPETITION

PARAMETER NUMBER

n1 .

vz 2

O3:

DATA TYPE

z 4

FP

INPUT LOCAT]ONS ALTERED

B-r_8

SECTION 8.2 PROCESSING TNSTRUCTIONS

**** 5L INDIRECT INDEXED MOVE ****

FUNCTION Moves input data from locatj_on X to locatj-on y, where X

and/or Y are indirectly addressed (X and y are stored in the Iocations specified by Parameters t- and 2) If a locat.ion parameter is specified as "indexed" (xxxx--), then the actual rnput l-ocation referenced is cal-culated by adding the current index counter to the value in the specified Input l-ocat.ion. When used outside a loop, the addressing is simply indirect because the index counter is zero.

PARAMETER DATA NUMBER TYPE DESCR]PTTON

01: 4 Source Input, location 022 4 Destination Input location

INPUT LOCATTONS ALTERED 1

8-1-9

SECTION 8.3 OUTPUT PROCESSING INSTRUCTIONS

8.3 OUTPUT PROCESSING INSTRUCTIONS

The "given output interval" described in the following instructions refers to the output interval- defined i-n the first paramet,er of Instruction 84, Data Table Interval-.

, 70 SAMPLE ****

FUNCTTON This instruction stores the value from each specified input

location. The val-ue(s) stored are those in the input location(s) when Instruction 70 is executed and the end of the output interval is reached.

PARAMETER DATA NUMBER TYPE

O2: 4

OUTPUTS GENERATED

DESCRIPTION

Repetit.ions Starting input

]- FOR EACH

location no.

SAMPLE

**** 71 AVERAGE ****

FUNCTION This instruction st.ores the average value over the given

output interval for each input l-ocation value specified.

UJ-: Z 02: 4

OUTPUTS GENERATED

PARAMETER NUMBER

PARAMETER NUMBER

0l- :

02 -.

FUNCTTON This instruction stores the totalized value over the qiven

output interval- for each input location specified.

DESCRIPTION

Repetitions Starting input location no.

]- FOR EACH INPUT LOCATION

**** 72 TOTALIZE ****

DESCRIPT]ON

Repetitions Starting input location no.

]- FOR EACH INPUT LOCATION

DATA TYPE

DATA TYPE

2 4

OUTPUTS GENERATED

8-20

SECTION 8.3 OUTPUT PROCESSING INSTRUCTTONS

**** 73 MAXIMIZE ****

FUNCTION This Instruction stores the MAXIMUM value taken (for each

input location specified) over a given output interval-. An internal FLAG is set whenever a new maximum value is seen. This FLAG may be tested by Instruction 79. Time of maximum value (s) is OPTIONAL output information, which is formatted and activated by entering one of the following CODES for Parameter no. 2.

CODE

00 0l_ 1_0

11

PARAMETER DATA NUMBER TYPE

01: 2 02: 2 03: 4

OUTPUTS GENERATED

OPTIONS

Output value ONLY Output val-ue with SECONDS output value with HoUR-MINUTE Output value with HR-MIN,SEC

FUNCTION Operating in the same manner as Program 73, this instruction

is used for storing the MINIMUM value sensed (for each input l-ocation specif ied) over a given output interval-.

DESCRIPTION

Repetitions Time of maximum (optional) Starting input l-ocation no.

1 FOR EACH INPUT LOCATION (PLUS 1 OR 2 WITH TIME OF MAX. OPTION)

**** 74 MINIMIZE ****

DESCRIPTION

Repetitions Time of minimum (optional) Starting input location no.

1 FOR EACH INPUT LOCATION (PLUS 1 OR 2 W]TH TIME OF M]N. OPTION)

PARAMETER NUMBER

n1 .

vz2 03:

DATA TYPE

z z 4

OUTPUTS GENERATED

8-2a

SECTION 8.3 OUTPUT PROCESSING INSTRUCTIONS

**** 75 STANDARD AND WEIGHTED VALUE HISTOGRAM

FUNCTION Processes input data as eit,her a standard histogram

(frequency distribution) or a weighted val-ue histogram.

The standard histogram outputs the fraction of the Output Interval- that the value in a specified Input location (defined as the bin select value) is within a particular sub-range of the total specified range. A counLer in t,he bin associated with each sub-range is incremented whenever the val-ue falls within that sub-range. The value which is output to Final- Storage for each bin is computed by dividing the accumulated total in each bin by the total- number of scans. This form of output is also referred to as a frequency distribution.

The weighted value histogram uses data from 2 input locatj-ons. One location contains the bin select value; the other contains the weighted val-ue. Each tj-me the Instruction is executed, the weighted value is added to a bin. The sub-range that the bin sel-ect value is in determines the bin to which the weighted value is added. When the output flag is set, the value accumul-ated in each bin is divided by the TOTAL number of input scans to obtain t,he val-ues that are output to Final Storage. These val-ues are the contributions of the sub-ranges to the overall weighted value. To obt,ain the average of the weighted values that occurred while the bin select value was wit,hin a particular sub-range, the vaLue output to Final Storage musL be divided by the fraction of time that the bin sel-ect value was within that particular sub-range (i.e., a standard histogram of the bin select val-ue must al-so be output.).

For either histogram, the user must specify: 1) the number of repetitions, 2) the number of bins, 3) a form code specifying whether a closed or open form histogram is desired (see bel-ow) , 4) t.he bin select val-ue input l-ocation, 5) the weighted val-ue input location (see below), 6) the lower range l-imit , 7 ) the upper range Iimit.

The standard histogram (frequency distribution) is specified by entering rr0rr in the weighted value input location parameter. Otherwise, this parameter specifies the input location of the wei-ghted value. When more than one repetition is called for, the bin select value location wil-l- be incremented each repetition and the weighted value location will remain the same (same weighted value sorted on the basis of different. bin select values). The weighted value location will be incremented if it is entered as an indexed location (key rrcrr at some point whi]e keying in Parameter 5; two dashes, --, will appear on the right of the display) .

8-22

SECTION 8.3 OUTPUT PROCESSING TNSTRUCTIONS

At the user's option, the histogram may be either closed or open. The open form includes all values below the lower range limit in the first bin and all values above the upper range limit in the last bin. The closed form excludes any values falling outside of the histogram range.

The difference between the closed and open form is shown in the following example for temperature val-ues:

Lower range limit 10 deg. C Upper range limit 30 deg. C Number of bins 10

Closed Form Open Form

Range of first bin 10 to LI.99 deg. 28 deg.

A common use of a closed form weighted value histogram is the wind speed rose. Wind speed val-ues (the weighted value input) are accumulated into corresponding direction sect,ors (bin select input) .

PARAMETER DATA NUMBER TYPE DESCRIPTION

01: 2 Repet,it,ions 02; 4 Number of bins 03: 2 Form code (O=open form, 1=cl-osed form) 04: 4 Bin select value input location no. 05: 4 Weighted value input l-ocation no. (O =

frequency distribution option) 05: FP Lower l-imit of range O7: FP Upper limit of range

OUTPUTS GENERATED NUMBER OF BINS * REPET]TIONS

**** 75 WIND VECTOR ****

FUNCT]ON Output one of several combinations of the following: l-. Mean wind speed 2. Mean wind vector magnitude 3. Mean wind vector direction 4. Standard deviation of direction

This Instruction will work with either polar (wind speed and direction) or orthogonal (fixed East. and North props) sensors and accommodates multiple sets of sensors through the "repetitions"parameter. When used with polar sensors, the wind direction in degrees may be 0 to 360, 0 to 540, less t.han zero, or greater

8-23

SECTION 8.3 OUTPUT PROCESSING INSTRUCTTONS

than 540. This instruction does a modulo divide by 360 which enables it to handle all- ranges. The ability to handle a negative reading is useful in an example where a difficult to reach wind vane is improperly oriented and outputs 0 degrees at a true reading of 340 degrees. The simplest solut.ion is to enter an offset of -20 in the instrucLj-on measuring the wind vane, which resul-ts in a -20 to 340 degree out.put.

Parameter 2 is used to select the type of sensors used and which val-ues are output.

PARAMETER DATA NUMBER TYPE DESCRIPTION

2 Repetitions of wind speed and direction 2 Sensor/Output 2 digits:

AB B Sensor t.1pe: 0 speed and direction

1 East and North A Output option:

0 A11 4 outputs 1 Mean wind speed

Mean wind vector direction Standard deviat.ion of direction

2 Mean wind speed Mean wind vecLor direct.ion

3 Mean wind vector direction Standard deviation of direction

4 First wind speed input location no. (East wind speed)

4 First wind direction input location no. (North wind speed)

OUTPUTS GENERATED 2-4 (depending on output option) FOR EACH REPETITTON

**** 79 SAMPT,E ON MAXIMUM OR MINIMUM ****

FUNCTION Used in conjunction with Instructions 73 or 74, t.his

Instruction copies specified input location values into Intermediate Storage whenever a previous Maximize or Minimize Instruction senses a new maximum or mi-nimum value. When the Output FLAG is set, the values copied to Intermediate Storage will be transferred to Final Storage.

Instruction 79 looks for a flag that is set by Instructj-on 73 or 74 when a new maximum or minimum is sampled. This flag is cleared at the start of a Maximize or Minimize fnstruction or at the beginning of the Program Tab1e. If Instruction 73 or 74 has more than 1 repetition, there is no way for Instruction '79 to

8-24

01 o2

03

o4

SECTION 8.3 OUTPUT PROCESSING INSTRUCTIONS

know which Input location caused the maximum or minimum flag to be set. Thus, Instruction 79 should directly fol-l-ow the maximum or minimum Instruction to which it refers. If sampling is t.o occur only when one specific Input location shows a new maximum or minimum vaIue, the previous Maximize or Minimize Instruction should only refer to that Input l-ocation (f rep) .

OUTPUTS GENERATED

PARAMETER NUMBER

01:

02:

where X1 is PARAMETER NUMBER

0l_ :

02:

DATA TYPE

z

4

s

the ith DATA TYPE

2 4

DESCRIPTION

Repetitions (number of sequential l-ocations to sample) Starting input location no.

1 FOR EACH REPETITTON

= (( "L2

- ( xi)2/N)/N)t/2 measurement and N is the number of samnles.

DESCRIPTION

Repetitions Starting input location no.

1 FOR EACH REPETTTION

k*** 82 STANDARD DEVIATION rN TIME ****

FUNCTION Cal-culate the standard deviation (STD DEV) of a given input

location. The standard deviation is calculated usinq the formula:

OUTPUTS GENERATED

B-2s

SECTTON 8.4 PROGRAM CONTROL INSTRUCTIONS

8.4 PROGP,AIII CO}flTROL INSTRUCTIONS

0 t>->> 1_1--l-9 21,-29

30 31 32 41" 51

- Then - .Eixr_tr

-E;Xl_t Set Set

TABLE 8.4-1. Consrand Codes

- Go to end of Program Table - Ca1l Subrouti-ne ]--9, 79-99 - Set Flag I-9 high - Set Fl-aq 1-9 low

Do loop if t.rue loop if fal-se

Port high Port Iow

Flag Flag

1to 9

TABIJE 8.4-2. FJ.ag Description

8 - User Flags - Intermediate Processing Disable Flag

**** 83 IF CASE X < F ****

FUNCTION If the value in the location specJ-fied in the Begin Case

Instruct.ion 93 is less than the fixed value entered as parameter 1 then execute the command in parameter 2 then go to the end of the case statement when the next fnstruction 83 occurs. E1se, continue to next instruction. See Instruct,ion 93 for an example.

PARAMETER DATA NUMBER TYPE DESCRIPTION

Fixed value Command (Table 8.4-1)

**** 84 DATA TABLE INTERVAL ****

FUNCTION Data are stored in Data Tabl-es. The Data Tabl-e fnterval-

Instruction defines how often and what data are output. Data output at. t.he specified interval constitutes a record.

Output Processing Instructions (fnstructions 7O through 82) following the Dat.a Table Interval Instruction define what data are included in the Tab1e. The first Output Processing Instruction outputs the first data point of the record.

The number of records to store in a Data Table is specified in parameter 2 of fnstructj-on 84. For example, if the interval is 30 minutes, and the time between site visits is 30 days, a

UJ-: uz 2

FP 2

8-26

PARAMETER NUMBER

n1

SECTTON 8.4 PROGRAM CONTROL INSTRUCTIONS

minimum of a440 records must be specified (49 records/day * 3o days = 1440 records). The actual value entered should generally be greater than the carculat.ed minimum to provide a margin ofsafety. When the Dat.a Table is fuIl, the newesr record deletesthe ol-dest record by writing over it. To al-locat,e al-I remaininq memory, enter 99999 for parameter 2.

The number of Data Tables is limited by storage memory. At compile time, an E31 error indicates that too much space i; requested, and an E28 error means no Output processinq Instructions fol-l-ow Instruction 84.

DESCRIPTION

Interval i-n minutes seconds (XXXX- - )

0 = the program = output each

executed 900X= output when

high uzi Storage space to all_ocate for this

Data Tab1e, in units of records. 99999 for all remaining storage space. If a negative number is entered (-XXX;, out.put is redirected to Input Storage starting an the Input locat,ion XXX.

**** 85 LABEL SUBROUTINE ****

FUNCTION This Instruction marks the start of a subroutine -

Subroutines are a series of instructions beginning wit.h rnstruction 85 and terminated with rnstruction 95, END. when a subroutine is called by a command in a prog,ram Control Instruction, the subroutine is executed, then program flow continues with the instruction following that which cal-l-ed the subroutine.

Subroutines may be called from within other subroutines (nested) . A subroutine can not call itsel-f or call another subroutine (or series of subroutines) which cal-]s it. This will resul-t in a run time error: when the subroutine is cal_led the second time, error 10 is logged in the Error Log. Executj-on will- not. branch to the subrout.ine; it will continue with the Instruction fol-lowing that calling the subroutine.

DATA TYPE

4 (XXXX, 1440 max) or

table interval time fnst. 84 is user flag X (1-8) is

8-27

PARAMETER NUMBER

DATA TYPE

2

DATA TYPE

z

SECTION 8.4 PROGRAIU CONTROI., INSTRUCTIONS

DESCRIPTION

Subroutine number (a-9, 79-99)

**** 86 DO ****

FUNCTION This Instruction unconditionally executes the specified

command.

PARAMETER NUMBER

UJ-:

DESCRIPTION

Command (Table 8.4-1)

**** 87 LOOP ****

FUNCTION Instructions included between the Loop fnstruction (87) and

the End Instruction (95) are repeated the number of times specified by the iteration count (Parameter 2), or until an Exit Loop command (31-,32) is executed by a Program Control Instruction within the Loop. If 0 is entered for the count, the loop is repeated unt,iI an Exit. L,oop command is executed. Results from Output Processing InsLructions conLained in a loop are output to Input Storage on the last loop iteration. The resul-ts from the Output Processing Instructions are stored in the Input Locations that they were acting on.

The first parameter, pass duration, controls how frequently passes through Lhe loop are made. Duration units are in 0.1 seconds. A duration of 0 means there is no delay between passes through the 1oop. A duration of 10 means passes through the loop are 1 second apart. Pass durations less than a second cause the quiescent currenL drain to increase to 3 mA while in the Ioop. A11 iterations of the loop are completed before continuing with the tab1e. Only those instructions within the loop are executed and other portions of the tabl-e are not executed in the interim. (et Lhis time if a value less than 10 is entered, the BDR will wait the specified amount of tine after executing the instructions in the loop rather than starting the pass on the interval. )

When a fixed number of iterations are executed, the time spent in the loop is equal t,o the product, of the pass duration and the number of iterations (pass duration > 10) . For example, a loop with a delay of 10 and a count of 5 will take 5 seconds, assuming the contents of the loop may be executed within 1 second. After making the fifth pass through the 1oop, there is

8-28

the fifth delay, after which following the END instruction

If the total durat.ion of execution interval-, the table execution int.erval. Once the will resume on the next even

SECTTON 8.4 PROGR.JN{ COMTROI, INSTRUCTIONS

execution passes to the instruction which defines the end of loop.

a loop with delay exceeds the table wil-l- not be initiated at each loop is over the t.abIe execution

interval.

fnput l-ocations for Processing Instructions within a loop can be entered as Indexed locations. An Indexed locat.ion causes the Input Location to be incremented by l- with each pass through the 1oop. (The Index counter is added to the l-ocation number in the Program rabl-e. ) Input l-ocations which are not indexed will remain constant.

To specify an Indexed location, depress the C key at some point while keying in the digits for the Input. location and before entering the location with the A key. Two dashes, - , appear in the two right most characters of the display, indicating the entry is Indexed.

Input Locations for Output Processing Instructions may not be indexed. When the same output processing is required on values in sequential Input locations, it must be accomplished by using the repetitions parameter of the Output Instruction, not by indexing the Input location within a loop.

An Output Instruction within a loop is allotted the same number of Intermediate Storage locatj-ons as it would receive if it were not in the 1oop. For example, the average instruction with a single repetition is allotted only two Intermediate loca- tions: one for the number of samples and one for the runningr total. Each time through the loop the sample counter is incre- mented and the value in the referenced Input l-ocation is added to the total. ff the Input location is indexed, the values from all fnput locat,ions are added to the same total.

Loops with loop durations l-ess than 1 second (parameter 1 <9) can be nested. Indexed locations within nested loops are indexed to the inner most Ioop. The maximum nesting level is 9 deep. This applies to If Then/E1se comparisons and Loops or any combination thereof. An ff Then/Else comparison which uses the EIse fnstruction (94) counts as being nested 2 deep.

PARAMETER NUMBER

Ul.: 022

DATA TYPE DESCRIPTION

2 Pass durat.ion in tent.hs of seconds 4 number of nasses

8-29

FUNCT]ON This

result is codes are

PARAMETER NUMBER

01 02 UJ 04

PARAMETER NUMBER

ol-: 02: n?. 04:.

TABrE 8.4-3.

Parameter 1 -L

z 3 4

Corrparison Codes

Functi-on

J f

SECTION 8.4 PROGR.AII! COTiTTROL INSTRUCTIONS

88 IF X COMPARED TO Y ****

Tnstruction compares two input locations and, if the Lrue, executes the specified Command. The comparison given in Table 8.4-3.

DATA TYPE DESCRIPTION

Input. location for X Comparison code (Table 8.4-3) Input location for Y Command (Table 8.4-1)

4 z 4 z

**** 89 rF X COMPARED TO F ****

FUNCTION This Tnstruction compares an input l-ocation to a fixed value

and, if the result is true, performs the specified Command. The comparison codes are given in Table 8.4-3.

DATA TYPE

4 z FP z

DESCRIPTION

Input location for X Comparison code (Table 8.4-3) Fixed value Command

**** 90 STEP LOOP INDEX ****

FUNCTTON When used within a Loop (Instruction 87), Instruction 90

will increment the index counter by a specified amount after the first time through the 1oop, thus affecting all indexed Input location parameters in subsequent j-nstructions. For example , if 4 is specified, the index counter will count up by 4 (0,4,8,!2,...) inside the loop. rnstruction 90 does not affect the loop counter which stiIl counts by 1.

8-30

FUNCTTON This fnstruction checks the sLatus of one of the nine Flaqs

and conditionally performs the specified Command.

The first Parameter specifies the condition to check:

PARAMETER NUMBER

PARAMETER NUMBER

UI: 02:

Execute Execute

DATA TYPE

SECTTON 8.4 PROGRAM CONTROI, INSTRUCTIONS

DATA TYPE DESCRTPTTON

2 Increment for the loop index counter

**** gt IF FLAG ****

command if Flag X is high command if Flacr X is l-ow

1X 2X

z z

DESCRIPTION

Flag condition to check Command (Table 8.4-1)

92 IF TIME ****

FUNCTION The user specifies the number of minutes or seconds into an

interval-, the duration of the interval, and a command. The command is executed each time the real time is the specified number of minutes into the interval. The 'rIf rr condition will always be false if 0000 is entered as the time interval-.

The time interval- is synchronized with real t.ime; if a 50 minute time interval is specified wit.h O minutes into t.he interval, the Command wil-l- be executed each hour on the hour. The time interval is synchronized internally by making a modulo divide (Instruction 45) of the number of minutes since midnight by the specified real time interval. If the result is O, the interval is up.

The Command resulting from a true condition is executed only once j-n any minute (e.9., if the command is to execute a subroutine, and the execution interval of the tabl-e is l-0 seconds, the subroutine will executed only once in the minute, not 6 times. )

8-31

sEcTroN 8.4 PROGRJAM CONTROL INSTRUCTTONS

PARAMETER NUMBER

UJ-: uz 2

PARAMETER DATA NUMBER TYPE

01: 4

EXAMPLE:

DATA TYPE DESCRIPTION

4 Time into interval (minutes, 4 Time interval- (xxx minutes, 2 Command (Tab1e 8.4-1)

seconds) seconds )

**** 93 BEGIN CASE STATEMENT ****

The val-ue in the specified input location is compared against parameters in following If Case inst.ructions leg) . When a comparison is Lrue, the command in the If Case instruction is executed and the program fl-ow goes to the End instructj-on (95) associated with the Beqin Case instruction.

01 0l_

o2 01 UZ

o? 01 vz

03 01 02

08 09

P93 0002

P83 69.4 3

P83 '72

l-0

P83 77.3 30

P95 P95

DESCRIPTION

Input. location for subsequent comparisons

Begin CASE Case location

IF Case location < 69.4, THEN Execute command 3 (subroutine 3) else

IF Case location < 72, then Set output flag else

IF Case location < 77 .3, then DO

END OF THEN-DO END OF CASE STATEMENT

**** 94 ELSE ****

FUNCTION When Command 30 (Then/Else) is used with an If Instruction,

t.he Else fnstruction is used to mark the start of the instruc- tions Lo execute if the Lest condition is false. The Else Instruction is optional,- when it is omitted, a f al-se comparison will result in execution branching directly to the End Instruction (refer to Section 7.10). Instruction 94 has no parameters.

8-32

SECTION 8 .4 PROGRJLII{ COMTROIJ TNSTRUCTIONS

**** 95 END ****

FUNCTION rnstruction 95 is used t.o indicate the end/return of a

subroutine (rnst.ruction 85), the end of a loop (rnstruction g7) ,the end of an If Then/E1se sequence (fnstructions 88-92 when usedwith command 30), or the end of a rf case seguence (rnstruction 93). The End Instruction has no parameters.

PARAMETER NUMBER

DATA TYPE

4

**** 100 Do NoTHING ****

DESCRIPTION

Input. location to do nothing to

8-33

APPEIIDIX A. MODEIJ 103 TEMPERATURE PROBE

A. ]- GENERAIJ

The 103 and 1038 Thermistor Probes are for sensing air and soil temperatures, respectively, and are compat,ible with the BDR301 Basic Data Recorder. The probes incorporate the Fenwal- Electronics UUT5l-,J1 Thermistor and are identical except that the 1038 is designed for burial. The standard l-ead length is 10 feet; other lead lengths are available on request.

To prevent direct solar causing high air temperature mounted in the model- 4l-301--5 equivalent.

radiation from heating t,he probe, readj-ngs, the l-03 probe should be 5 Plate Radiation Shield or

The 103 is read by Instruction 11, "THERM" in the Prompt Programming mode, which makes a ratiometric measuremenL and converts the result to oC t,hrough a seventh order polynomial.

A.2 ACCURACY

The overal-l probe accuracy is a combination of Fenwal's interchangeability specifj-cation, the precision of the bridge resistors and the l-inearization error. In a "worsL case'r example all of the errors add in one direction to viel-d a +O .4oC """rri""vover the range of -33oC to +48oC. The major error component is the +0.2oc (6 to dooc, 10.soc at -40oc) iiterchangeabiiity specification of the Lhermistor. The error is typically less than the specification and if desired can be reduced with a single point calibration. The interchangeability error is predominantly offset and can be determined with a single point cal-ibration. The error can then be compensated for with the offset entered in the measurement instruction.

The bridge resistors are 0.1-? tolerance with a 10ppm temperature coefficient .

The error in t.he linearization used to calculate Lemnerature from the measurement error is shown in Figure A-1.

A-1

TEMPERATURE PROBE

l

(

\

/

\

)

\ I

/ \

O !HPo too ft e o o.oE o

E:tt

:' A Jo

oE _o9 6r-io o_5

oFD{ OP \-3

g

E td

oN I

c,.t I

Ndcttt NF ct c)

n o

a o

PclelnoleC - lr)n+ov = JoJJ3

Linearization Error

A-2

FIGURE A.1..

APPEIIDIX A. MODEIJ 103 TEMPERATURE PROBE

A.3 HOOK.UP NOTES

The 103 probe is connecLed to excitation, analog ground, ground, and one of t.he 4 single-ended input channels as shown in Figure A-2.

EXCITATION (PrN A)

CHANNELS 1_4 (PINS H,K,G,F)

UUTs1J1 THERMISTOR

2+9K OHMS aJ%AG

(PrN

+ (PtN

zOK OHMS o.1%

FIGURE A-2. 103 Probe Schemat,ic and Connections

A.4 CONVERSION OF 107 PROBE TO 103 PROBE

The Campbell Scientific IO7 and 1078 temperature probes used with the CR1o, 2!X, and CR7 dataloggers use the same thermistor as t.he 103 probe with a dj-fferent "pick off', resistor. If there is not time to obtain a 103 probe and a 1-07 probe is on hand, it is possible to modify the 107 probe. The end of the probe with the wj-re connections must be cut off as shown in Figure A-3, and a 20 Kohm 0.1? resistor instal-led as close to the BDR3O1 connector as possible (Figure A-4) .

BLACK ATUM HEAT

J)

LIL)

GND (WHITE)

Hr (RED)

EXCTTATTON (BLACK)

Cutting 107 Probe

A-3

CLEAR

FIGURE

Manualsnet FAQs

If you want to find out how the BDR301 Campbell Scientific works, you can view and download the Campbell Scientific BDR301 Data Recorder Operator's Manual on the Manualsnet website.

Yes, we have the Operator's Manual for Campbell Scientific BDR301 as well as other Campbell Scientific manuals. All you need to do is to use our search bar and find the user manual that you are looking for.

The Operator's Manual should include all the details that are needed to use a Campbell Scientific BDR301. Full manuals and user guide PDFs can be downloaded from Manualsnet.com.

The best way to navigate the Campbell Scientific BDR301 Data Recorder Operator's Manual is by checking the Table of Contents at the top of the page where available. This allows you to navigate a manual by jumping to the section you are looking for.

This Campbell Scientific BDR301 Data Recorder Operator's Manual consists of sections like Table of Contents, to name a few. For easier navigation, use the Table of Contents in the upper left corner.

You can download Campbell Scientific BDR301 Data Recorder Operator's Manual free of charge simply by clicking the “download” button in the upper right corner of any manuals page. This feature allows you to download any manual in a couple of seconds and is generally in PDF format. You can also save a manual for later by adding it to your saved documents in the user profile.

To be able to print Campbell Scientific BDR301 Data Recorder Operator's Manual, simply download the document to your computer. Once downloaded, open the PDF file and print the Campbell Scientific BDR301 Data Recorder Operator's Manual as you would any other document. This can usually be achieved by clicking on “File” and then “Print” from the menu bar.