PB85-173946
Optimization of Nitrogen Removal by Rapid Infiltration Volume II:
Remote Computer Operating System
University of Colorado
Boulder,  Colorado
Mar 85
                  auuira
                                   NTIS

-------
                                               EPA/600/2-85/016b
                                               March 1985
OPTIMIZATION OF NITROGEN REMOVAL BY RAPID INFILTRATION

     VOLUME II:  REMOTE COMPUTER OPERATING SYSTEM
                          by

                   David M. Walters
                   Carl G. Enfield
   Robert S. Kerr Environmental  Research Laboratory
         U.S. Environmental Protection Agency
                 Ada, Oklahoma  74820

                         and

                   Edwin R. Bennett
          Department of Civil, Environmental
            and Architectural  Engineering
                University of  Colorado
               Boulder, Colorado  80309
                   Grant No.  807933
                   Project Officer

                   Lowell  E.  Leach
   Robert S.  Kerr Environmental  Research Laboratory
         U.S. Environmental Protection Agency
                 Ada,  Oklahoma  74820


   ROBERT S. KERR ENVIRONMENTAL RESEARCH LABORATORY
           OFFICE OF RESEARCH AND DEVELOPMENT
          U.S. ENVIRONMENTAL PROTECTION AGENCY
                    ADA,  OK 74820

-------
                                  TECHNICAL REPORT DATA
                           (Please read Instructions on the reverse before completing}
 REPORT NO.
   EPA/600/2-85/016b
                             2.
              RECIPIENT'S ACCESSION NO.
                  ~     17 39 46/AS
 TITLE AND SUBTITLE
 OPTIMIZATION OF NITROGEN  REMOVAL BY RAPID INFILTRATION
 Volume II:  Remote Computer  Operating System
            5. REPORT DATE
              March 1985
            6. PERFORMING ORGANIZATION CODE
, AUTHOR(S)
D. M.  Walters, C. G. Enfield,  and E. R. Bennett
            8. PERFORMING ORGANIZATION REPORT NO.
 PERFORMING ORGANIZATION NAME AND ADDRESS
 University of Colorado,  Dept.  of Civil, Environmental
 and Architectural Engineering,  Boulder,  CO  80309
             and
 U.S.  Environmental Protection Agency
 P.O.  Box 1198. Ada. OK  74820
            10. PROGRAM ELEMENT NO.
                   CAZBLB
            11. CONTRACT/GRANT NO.
                   CR-807933
2. SPONSORING AGENCY NAME AND ADDRESS
U.S.  Environmental Protection Agency
Robert S. Kerr Environmental Research Laboratory
P.  0.  Box 1198
Ada,  OK  74820
             13. TYPE OF REPORT AND PERIOD COVERED
                Final  9/22/80 - 12/21/84
             14. SPONSORING AGENCY CODE
                   EPA-600/15
5. SUPPLEMENTARY NOTES
   Project Officer:  Lowell E.  Leach
6. ABSTRACT
   A rapid infiltration municipal wastewater land  treatment system using two infiltra-
   tion beds was remotely controlled in Boulder, Colorado,  utilizing telecommunication
   from the U.S. Environmental Protection Agency,  Robert  S.  Kerr Environmental Research
   Laboratory in Ada, Oklahoma, with a 16-bit computer  system.   Operation of the
   system required unique interfacing of a PDP1123 computer system with a data collec-
   tion system and signal conditioning system.  When  this hardware was integrated
  .together, it allowed data to be collected at Boulder,  Colorado, and the results
   transmitted to the RSKERL in Ada, Oklahoma, where  computer programs analyzed the
   data and transmitted codes back to Boulder to operate  the system as desired.
                                KEY WORDS AND DOCUMENT ANALYSIS
                  DESCRIPTORS
                                              b.lDENTIFIERS/OPEN ENDED TERMS
                          c.  COS AT I Field/Group
   Land use
   Ground water
   Purification
   Quality control
   Sewage treatment
   Nutrient removal
Land application
High-rate  application
Primary pretreatment
Remote computer control
Nitrogen control
Sewage effluents
68D
48B, E, G
18. DISTRIBUTION STATEMENT
   RELEASE TO PUBLIC
19. SECURITY CLASS (ThisReport/
    UNCLASSIFIED
  336
                                              20. SECURITY CLASS (Thispagel
                                                 UNCLASSIFIED
                                                                         22. PRICE
BPA F«rm 2220-1 (R... 4-77)   PREVIOUS EDITION is OBSOLETE

-------
                                  DISCLAIMER


     The information in this document has  been  funded  wholly or in part by
the United States Environmental  Protection Agency  under  assistance agreement
CR807933 to the University of Colorado.   It has been subjected  to the Agency's
peer and administrative review and has been approved for publication as an
EPA document.   Mention of trade  names or  commercial products does not consti-
tute endorsement or recommendation for use.

-------
                                   FOREWORD


     The U.S. Environmental Protection Agency was established to coordinate
the administration of major Federal programs designed to protect the quality
of our environment.

     An important part of the Agency's effort involves the search for infor-
mation about environmental problems, management techniques, and new tech-
nologies through which optimum use of the Nation's land and water resources
can be assured and the threat pollution poses to the welfare of the American
people can be minimized.

     The U.S. Environmental Protection Agency's Office of Research and Develop-
ment conducts this search through a Nationwide network of research facilities.
As one of these facilities, the Robert S. Kerr Environmental Research Labora-
tory is responsible for the management of programs including the development
and demonstration of soil and other natural systems for the treatment and
management of municipal wastewaters.

     The rapid infiltration treatment process for land treatment of municipal
wastewaters uses the unsaturated soil profile beneath infiltration basins as
the treatment media.  This project was designed to evaluate the optimization of
nitrogen removal in the rapid infiltration system using primary wastewater
from the Seventy-Fifth Street Wastewater Treatment Plant in Boulder, Colorado.
Two previous studies conducted at the same site evaluated the treatment
efficiency for maximum hydraulic loading of applied secondary and primary
pretreated municipal wastewater.   Results demonstrate that high rate systems
can be cost effective alternatives for municipal sewage treatment at sites
where conditions are favorable for high hydraulic loading and an excess of
seventy percent of total nitrogen removal can be achieved.

     This report contributes to the knowledge which is essential for the U.S.
Environmental Protection Agency to meet requirements of environmwental laws
and enforce pollution control standards which are reasonable, cost effective,
and provide adequate protection for the American public.
                                      Clinton W. Hall
                                      Director
                                      Robert S. Kerr Environmental
                                         Research Laboratory
                                     m

-------
                                   ABSTRACT
     A rapid infiltration wastewater treatment system was remotely controlled
in Boulder, Colorado utilizing telecommunication lines from Ada, Oklahoma
with a 16-bit computer system.  Environmental  and operating parameters were
collected in Boulder and then transmitted to Ada where computer software
determined the schedule and duration of wastewater applications.  Temperature
corrected soil conductivity was utilized in  the control  of soil moisture
levels.  Minimum air temperature and maximum wind speed  were monitored to
prevent pipe freezing and inadvertent off-site distribution.   The control
plots could be dynamically changed as the system operated to compensate for
changing environmental conditions.  Soil moisture levels to control  the
system could also be dynamically altered.  Reference  resistors were  used to
monitor the reliability of the system.
                                    IV

-------
                              TABLE OF CONTENTS
Disclaimer	    ii
Foreword	   iii
Abstract	    iv
List of Figures	   vii
List of Tables	viii

   1.  Introduction  	     1
   2.  Conclusions 	     1
   3.  Hardware Components 	     2
            Computer system  	     2
            Data collection system hardware  	     8
            Signal conditioning interfaces 	    14
            Temperature interface  	    14
            Conductivity interface 	    18
            Voltage-to-frequency interface 	    19
            Pump control interface	    23
            Flow measurement	    23
            Anemometer interface 	    23
   4.  Computer Software 	    29
            Introduction 	    29
            System software  	    29
            Nonsystem distributed software 	    29
            Configured or system generated system  	    30
            Software control of the computer calling unit   	    30
            Software control of the hp data collection system  ...    33
            Sampling data at remote site	    38
            Foreground - background interaction  	    40
            Internal  traceback feature 	    43
            Land Treatment Control  and Monitoring Programs  	    44
                 Introduction  	    44
                 Control Program (BOULD.REL) 	    44
                       Main driver	    45
                       Main subroutines	    45
                       Secondary and control subroutines 	    50
                 Background Monitor Program (BOURST.SAV) 	    51
                       Introduction  	    51
                       MAIN DRIVER   	    51
                       MAIN SUBROUTINES	    52
                 File Maintenance Program (BOUFIL.SAV) 	    52
                       Main driver	    52
                       Main subroutines	    52
                 Timlib	    53
                 Video routines	    54
                 Command files to build and operate system  	    54

-------
References
                                                                        56
Appendix
Appendix
Appendix
Appendix
Appendix
Appendix
Appendix
  I.
 II.
III.
 IV.
  V.
 VI.
VII.
Control program source codes  	    $
Monitoring program source codes 	   214
File management source codes  	   231
Video control routines  	   262
Linkage map files	   273
Command files to build system 	   302
Functions for time and date calculations	321

-------
                             LIST OF FIGURES


Number                                                                 P age

  1       Overview of computer system use in study 	   3

  2       Interconnection of CCI, scanner, data measurement system,
            signal conditioning interfaces, and transducers  	   9

  3       Schematic diagram of temperature interface 	  16

  4       Connection of temperature interface to data measurement
            system	17

  5       Schematic diagram of conductivity interface  	  20

  6       Connection of conductivity interface to data measurement
            system	  21

  7       Schematic diagram of voltage to frequency interface  ....  22

  8       Schematic diagram of pump control interface  	  24

  9       Connection of pump control interface to data measurement
            system	  25

 10       Connection of flow measurement transducer to data
            measurement system 	  26

 11       Connection of anemometer to data collection system  ....   27

 12       Foreground - background memory and interaction area  ....  41

-------
                              LIST OF TABLES

Number
1
2
3
4
5

6

7
8

9
10
11
12
13
14
15
16
17
18

Equipment Comprising Computer System 	
Addresses and Vectors of Output Devices 	
Addresses and Jumper Arrangement for DLV11-E 	
Computer Calling Unit Switch Settings 	
Addresses and Switch Setting for the Common Carrier
Interface 	
Addresses and Switch Setting of HP-IB Measurement System
ASCII Interface 	
Format of Digital Output from ASCII Interface 	
Format of Digital Output from ASCII Interface as Used in
Data Collection at Boulder 	 .
Switch Settings for 5302A MHz Universal Counter 	
Switch Settings of Scanner for Address ASCII ')' 	
Pin Assignments for the Interface Bus Backplane 	
Parts List for Temperature Interface 	
Parts List for Conductance Interface 	 	
Parts List for Frequency Interface ..... 	
Parts List for Pump Control Interface . 	 	 	 .
Bit Assignments for Digital-to-Analog Converter 	
SYCND.MAC - RT-11 V04.00B System Conditional File ....
System Configuration and System Options as Given by the
SHOW Command 	
4
4
6
7

10

10
11

12
13
13
15
18
19
23
28
28
31

32
  19       Programming Steps Functions  Along  with  Octal  Codes,
             Required Handshake Signal,  and Diagnostic Values  for Byte
             Location JBCTL ................... ^      34
                                 vm

-------
Number                                                                 Page
  20       HP-IB Programming Steps Included in the Control
             Subroutines	     38
  21       Channel  Assignment for Scanner 	     39
  22       Byte Locations for Program Interaction  	     42
  23       Main Subroutine Data Assignments for JBDS1	     42
  24       Secondary Subroutine Data Assignments for JBDS2   	     43
  25       Miscellaneous Data Assignments of Variables   	     43
                                 IX

-------
                                 INTRODUCTION
     Rapid infiltration has been shown to be an effective method for the
treatment of wastewater, but treatment is dependent on the frequency and
duration of wastewater application.  Improper application-drying cycles can
cause a high concentration of a pollutant to reach groundwater at the begin-
ning of an application period (Leach and Enfield 1983).  Maintaining a con-
stant water potential in the soil can eliminate this problem while maintaining
a high population of microorganisms to biodegrade the waste pollutant.   This
type of system requires a high degree of control and attention (Enfield
1977).  Automating the control of a rapid infiltration system allows for
wastewater to be applied at the optimum moisture levels for soil organism
populations which in turn promote transformation of biodegradable compounds.

     Although manual control systems have been shown to be effective for the
operation of rapid infiltration sites they cannot effectively maintain the
moisture conditions at the optimum levels for treatment.  Manual control
systems have no provisions for continuously monitoring environmental condi-
tions.  Analog control systems can control pumps and relays, but cannot
retain data and make complex comparisons and do not have the ability to
easily change control parameters.  A digital control system has the advantage
of both operating a treatment system while storing operational data but at an
increased cost.  Interfacing digital computer software and hardware into a
total system allows data collected at the site to be evaluated and to main-
tain moisture levels within a reasonable predetermined level.  The hardware
consists of the computer itself, the data collection system, the signal
conditioning interfaces and the transducers and sensors measuring environmental
parameters.  All the hardware components except the computer were located in
Boulder, Colorado.  This study was an outgrowth of a manual control study whose
results are presented in Volume I.  The software consists of the control
program, the monitoring program, the file management program and a telecom-
munications program for transferring the data to another computer for backup
storage and statistical analysis.


                                 CONCLUSIONS


     1)   Remote control of a land treatment site has been demonstrated to
         be feasible.

     2)   Field installed sensors had limitations in keeping environmental
         conditions at the optimum level for treatment of wastes.  Reliable
         and accurate sensors were the main constraint in obtaining environ-
         mental  and operational  data.

-------
                             HARDWARE COMPONENTS


     The hardware components of the land treatment control system include a
POP 11/23 computer system, a data collection system,  and signal conditioning
interfaces.  The integrated system allowed data to be collected at Boulder,
Colorado and transmitted to Ada,  Oklahoma, for computer analysis.  If needed,
codes were transmitted back to Boulder to turn the wastewater distribution
system pumps on or off.  Each of  the main components  of the hardware system
are discussed individually.


COMPUTER SYSTEM

     An overview of the computer  system is shown in Figure 1.  This system
was integrated with a modem, an IEEE 488 bus data collection system and
signal conditioning interfaces to collect data and control the Boulder land
treatment system.   Table 1 lists  the components of the computer system.   The
POP 11/23 is a 16 bit micro processor which supports  memory management along
with floating point processing [KEF11-AA] (Digital Equipment Corp.  1979a).
Earlier versions of the POP 11/23 supported 18 bit data addressing  with a
maximum of 256k bytes of memory.   Newer versions support 22 bit addressing to
a maximum of 4 Mbytes of memory.   The CPU used in this project utilized 18 bit
data addressing.   The DLV11-J was used as the interface to the system console
(VT100),  the foreground job terminal  (LA120),  and a serial line printer (LA120)
The LA120 terminal  was switch selectable from printer to foreground terminal.
One DLV11-E board was used to interface the remote job terminal and modem to
the POP 11/23.   The other DLV11-E was used for the communication link to
other computer systems.   The expansion box (BA11-NE)  allowed for the inclusion
of the DLV11-E cards and also gave extra room for system expansion.

-------
CO
                       Computer  Bus
L Q BUS 1
s|
CP
DEC 1
wt
1MB
•onaq


U
1/23
th
wy


Floating
Point
Mloroood*
KEFII





MOS
M*»ory
4-64k Byt*.
M8VII-D



Floppy
Dl*k Drlv*
RXB2/0I



S*rlal Lin*
PrlnUr
LAI2B




Dl*k Drlv*
Control Ur»
RLVII
RXV1I



Hard
Disk Drlv*
2-RL0I





Acynohronou*
Int*rfac*
4 ohann*!
DLVI1-J


Con*ol*
Twnlnal
VTI00


Graphic
V.ctor
T«r«lnal
T«k 4010


I
Aaynohronou*
Intwfac*
with Hodm
Control
DLVI I-E

Bootstrap Asynchronous
Loadw Intarfae*
BDVII-E DLVI I-E
y
Calling Unit
with Mod..
Tln*pl*x
ecu ii


Data ACC*M
Arrang*«*nt
BELL I001D
T*l*phon*











Pilot
Faollltl**
Ada, OK

COB- Ink
to othw
Co«put*r
6y*t*M

Network

Pilot
Facllltl**
Bouldw, CO
Pilot
FaollltlM
Othw- Sit**
               Figure'1. Overview of computer system used in study

-------
                TABLE 1.   EQUIPMENT COMPRISING COMPUTER SYSTEM
        SR-WXLLB-BK
           system includes:
                DLV11-J
                BDV11
                MSV11-D
                VT100-AA
POP 11/23 RT-11 DUAL RL01 SYSTEM

     four asychronous serial interfaces
     bootstrap diagnostic terminator
     64Kb MOS memory boards (2)
     video terminal
        Additional  hardware from DEC:
                VT1XX-AB
                VT100-AC
                DLV11-E
                MSV11-DD
                KEF11-AA
                BA11-NE
                BCV1B-06
                LA120-DA
                RL01K-DC
     VT100 Advanced video option
     VT100 Printer Port option
     Asynchronous line interface (2)
     64 K MOS memory boards (2)
     floating point microcode chip
     large expansion box
     expansion cable assembly
     EIA DECWRITER III terminal
     RL01 5.0 Mb disk cartridge (2)
Note: Identifying numbers and order codes  are those at the time the system
      was ordered.   These numbers may not  be  currently valid.


     The addresses  of the terminal  output  devices  are given in Table 2.
These addresses and vectors along with the baud  rates were hardwired on each
board.  The standard addresses and vectors as specfified by Digital Equipment
Corporation (DEC) were used for the other  devices  in the system (Digital
Equipment Corporation 1981a).
              TABLE 2.   ADDRESSES  AND  VECTORS  OF  OUTPUT DEVICES
           UNIT   TYPE
        OCTAL NUMBER
        ADDRESS   VECTOR   MODULE
BAUD
no
LS
TTl
TT2
TT3

CONSOLE.
PRINTER
LOCAL
LOCAL
REMOTE
COM-LINK
177560*
176500
176510
176520
176530
175640
60,64*
300
310
320
330
340
DLV11-J
DLV11-J
DLV11-J
DLV11-J
DLV11-E
DLV11-E
9600
9600 •
9600
300
300
VARIED

-------
     The DLVll-E used for telecommunications to the remote field site was
hardwired to give a baud rate of 300 with even parity and a 5 bit data type.
This was required in order to communicate with the Hewlett-Packard data
collection system and the IEEE 488 bus.  The DLVll-E utilized in the communi-
cations link was wired to give a programmable baud rate.  This way it could
be used with 300/1200 modems and also directly connected at 9600 baud to a
POP 11/70 computer sytem.  The wiring configuration for both DLVll-E are
given in Table 3.

     A cable from the remote DLVll-E card was connected to a computer calling
unit (CCU) through the RS-232 data interface.  The CCU was in turn connected
to a BELL data arrangement through the coupler interface.  The RS-366 and
modem external interfaces were not used in this system.  The CCU and a BELL
data arragement comprise the link between the computer and the switched
telephone lines.  The CCU translates the digital data furnished by the compu-
ter system to dial pulses recognizable by the telephone network.  The CCU
included the following:

                Timeplex CCU II computer calling unit
                D-DC diagnostic card for manual dialing
                BELL 103 compatible internal modem

See table 4 for the wiring configuration for the CCU.

-------
               TABLE  3.   ADDRESSES  AND  JUMPER  ARRANGEMENT FOR DLVll-E*
Jumper
Designation
A3
A4
A5
A6
A7
A8
A9
A10
All
A12

V3
V4
V5
V6
V7
V8

RO
Rl
R2
R3

TO
Tl
T2
T3
Remote
DLVll-E
I
I
R
I
R
I
R
I
I
I

I
I
R
I
I
R

R
I
R
I

I
R
R
R
Com-1 ink
DLVll-E
R
R
I
R
I
I
I
R
I
I

R
R
I
I
I
R

R
I
R
I

I
R
R
R
Jumper
Designation
B6
P
E

1
2

PB
C
Cl
S
SI

H
B
-B
FD
RS
FB
EF

MT
M
Ml



Remote
DLVll-E
I
I
R

I
R

R
I
I
R
R

R
R
I
I
I
I
R

R
R
R



Corn-link
DLVll-E
I
R
R

R
R

I
I
I
R
R

R
R
I
I
I
I
R

R
R
R



R = Jumper removed
I = Jumper installed
* Digital Equipment Corporation 1981(a),
  Digital Equipment Corporation 1977.

-------
               TABLE 4.  COMPUTER CALLING UNIT SWITCH SETTINGS
D-CC board

      CBT Program socket          all pins jumpered
      B-A                         Installed
      X-X                         Installed
      Y-Y                         Installed
      ACR  timer adjust           switch     1234
                                            on  off  off  on    (60 second)
      all other jumpers and chips removed

D-DC Diagnostics board

      C-6  (Dial bit decoder)   ASCII characters
                1 --> 6
                2 —> 7
                3 --> 10
                4 --> 11

      D-4  Character speed  (300 baud)
                A    Installed
                B    Not installed
                C    Installed.
                D    Installed
                E    Installed
                F    Not installed
                •6    Not installed
                H    Not installed
                  *
       H-6  ASCII parity

               No strap    EVEN Parity

Bell 103 compatible modem board

       Transmitter signal
               thumbwhell setting at -3 dBm

       Program chips locations* of installed straps for CBT mode.

           P-l
               E
           P-2
               A, B, C, D, F, G
           P-3
               A, B, C, D, E, G

           All other straps removed

     * Timplex 1977a, Timplex 1977b.

-------
DATA COLLECTION SYSTEM HARDWARE

     The data collection system took the signals generated from the signal
conditioning interfaces and converted this signal to a serial input (RS-ZJ
which was transmitted back to the computer system (Figure Z).  me data
collection system utilized an IEEE-488 bus for communication.

     The data collection system consists of the following units connected on
the Hewlett-Packard Interface Bus (HP-IB).

         Hewlett-Packard Common Carrier Interface Model 59403A
         Hewlett-Packard Data Measurement System which contains:
            a)  Data Measurement System 5300B
            b)  Hewlett-Packard ASCII Interface Model  5312A
            c)  Hewlett-Packard Universal Counter Model 5302A
         Hewlett-Packard Scanner Model 3495A

     Each of the units was interconnected through software control to either
measure a data point or to turn the sprinkler system on or off.   Programming
considerations of these units are discussed in the software section.

     The Common Carrier Interface (CCI) is an interface between the serial
asynchronous data port of the modem and the HP-IB.  The CCI converts the data
from bit parallel format to a bit serial format which  can be read by a serial
computer port.  Hewlett-Packard recommends CCI units be operated in pairs,
one as a local CCI  at the computer and another CCI at  the remote site to
convert data received by the modem into a HP-IB format.  The local unit and
controller in our configuration was simulated by using software and a DEC
DLV11-E asynchronous interface.

     The fr*ont panel has indicator lights for five service request functions
(parity error, handshake error,  line disconnect, abandon call and retry, call
complete), two mode indicators (handshake, online),  sync detect indicator, and
two address functions (listen and talk).  If any of  these functions are detected,
the appropriate indicator lights are activated.  There are also four sets of
switches.   They are power on/off, baud rate, interface, and parity.  See
Table 5 for settings of these external switches and  the internal  address
switches.   The internal  switches are used to set the talk and listen addresses
as well as to set the unit into a permanent handshake  and/or on-line mode.
The manual gives a  full  discussion of these modes and  operation of this unit.
(Hewlett-Packard, 1976).

     The rear panel  contains the power connector, a  RS-232C serial input
connection, a HP-IB bus  interconnecting port, a dialer port, dedicated line
port, and  a logic probe connection.   In this study,  the RS-232 port was used
to connect this unit to  the modem, and the HP-IB port  was the link to the
HP-IB bus.

     The CCI  is a multi-purpose unit which can be operated in many modes and
with many  devices.   A problem was encountered with the CCI when unclean
electrical  power, mainly caused  by thunderstorms, caused the CCI  to enter a
hung state.   To remedy this condition, the unit had  to be manually cycled on
and off.   After installing a line conditioner to the AC input power, this
problem was  not encountered again.

-------

Computer
System

Te 1 ephone
Network

Modem
Ball 103



RS232 to IEEE 488 Bu.
Interface
(Common Carrier Interface)
HP 59403A
Temperature
 Interface
Anemometer
 Interface
Pump Control
 Interface
Conductance
 Interface
Voltage to
 Frequency
                                     IEEE 488  BUS
                          Scanner

                        <40 Channel
                        MuItIpIexer)


                     HP 3495A u/opt 002
                                       L
                                                        Data Measurement Syetem
                                                              HP 530BB
                                                            ASCII Interface
                                                              HP 53I2A
                                                          Universal Frequency
                                                              Counter
                                                              HP 6302A
                                                           J
                                                                        'emperature
                                                                        ransducers
                                                                        loll 8 Air
                                                                            tlvlty
                                                                       "mn*duc3r?
                                                                        (Homemade)
                                                                       Conductivity
                                                                       Transducers
                                                                        Commercial)
                                                                        Wind Speed
                                                                        Detector
                                                                          Flow
                                                                       Measurement
                                                                       Transducers
                                                                           Pump
                                                                       Transducers
        Figure 2.   Interconnection  of CCI,  scanner,  data measurement  systems
                      signal conditioning interfaces,  and transducers

-------
   TABLE 5.  ADDRESSES AND SWITCH SETTING FOR THE COMMON CARRIER INTERFACED
     Internal switches
        switch number         status
              1                 off
              2                 on
              3                 on
              4                 off
              5                 on
              6                 off
              7                 off

     Front panel switches
              Baud Rate         300
              Interface         ASYN
              Parity            EVEN
                          comment

                           address of remote
                            CCI
                            ASCII 'R1

                          permanent on-line mode
                          permanent handshake mode
     The measurement system mainframe (5300B)  is a solid state measuring
device which is plug connected to a variety of interconnecting modules to
comprise a data sensing system (Hewlett-Packard 1977).   The mainframe unit
itself contains a LED display assembly,  a variable sampling rate switch, and
the power connector.   Other modules are  added  to the mainframe to complete a
total data sensing system as the mainframe itself can only display a given
measurement.

     The ASCII  interface (5312A) is an inter-plug module for the measurement
mainframe (Hewlett-Packard, 1975a).   The module is between the mainframe and
any other associated modules such as a counter.  This module provides the
interface to the HP-IB.   This unit provides the measurement data format,
which includes  all the significant digits, exponents, overflows, error codes,
and miscellaneous function codes to the  bus.   The front panel  contains a talk
and listen indicator.  These indicators  are illuminated when the unit is
addressed to talk or listen, respectively.  The rear panel contains the
connector to the HP-IB and the addressable DIP switches.  The DIP switches
are used to program both the talk and listen addresses (Table 6).  Table 7
shows the general format of the digital  output to the interface bus after the
interface has been addressed to talk.  The particular format received will
depend upon which type of counter unit is present.  The format used in this
project is given in Table 8.

         TABLE  6.  ADDRESSES AND SWITCH  SETTING OF HP-IB MEASUREMENT
                            SYSTEM ASCII INTERFACE
Self-check
1
Shield
0
Talk only
1
A5
0
A4
1
A3
0
A2
1
AO
0
   ASCII address codes determined by switch setting A5 - Al.
     Listen
     Talk
*
J
1 = switch setting to on.
0 = switch setting to off.
                                    10

-------
TABLE 7.  FORMAT OF DIGITAL OUTPUT FROM ASCII INTERFACE
Outpi
order
H
]
(



jt
r* •
Y

L 2 3 4 5 6 1
) F
c
\
F


/
\

[
) [
.
) [
Die
) [
•
•
jit, bl


' 8 <
) [
y
) [
Digit o>
ank or minu;
•- Byte<
> 1C
) [

4-
) 11 12 13 14 15 16 17
) [
-i
) [
.
" decimal
> sign
Digit or blank
Blank





) E + 0 CR LF
3
6
9 Linefeed
Carriage return
Exponent
Plus or minus sign
E for scientific notation
Digit only

Annunciators (Hz, Seconds, Volts, Ohms, Blank)
Overflow or blank







-------
TABLE 8.  FORMAT OF DIGITAL OUTPUT FROM ASCII INTERFACE
          USED IN DATA COLLECTION AT BOULDER
Output
order:
+
1
234
OF D

























56785


D D . D D






Die
+ 	 -i-
Digi"
Blank
Annunciator (Hz)
Overflow or blank
; or blank

Dec

-
:imal
it







h— ____.










Die






Jytes
1C

4-
> — 	 	 .
) 11 12 13 14 15 16 17
D D D E + 0 CR LF



Jit








— .j







3
6 1



9 Linefeed
Carriage return
Exponent
Plus or minus sign
E for scientific notation


Digit only




-------
     The universal counter (5320A) is plug connected to the ASCII interface
which, in turn, was plug connected to the measurement mainframe.  The counter
is capable of measuring frequencies, time intervals, period and period aver-
ages, ratio of two frequencies, and totalizing.  The actual type and range of
output is determined by how the switches are set on the front panel.  Switch
settings are given in Table 9.  A detailed description of the function and
operating features are given in the operating and service manual.  Data col-
lected for this project used the frequency mode of output.  One should pay
particular attention to the discussion on setting the sensitivity of this
unit in the equipment reference manual (Hewlett-Packard 1975b).

     The data signals from the signal conditioning interfaces were connected
to the appropriate signal input connectors on the front panel of this unit.


	TABLE 9.  SWITCH SETTINGS FOR 5302A MHz UNIVERSAL COUNTER	

              Sensitivity (left)     as per manual
              Wave form (left)       middle
              Time base              .1 us
              Function               B
              Wave form (right)      middle
              Sensitivity (right)    as per manual
	Sampling Rate	as per manual	


     The scanner  is a system instrument which can be fitted with up to four
programmable channel switching options (Hewlett-Packard 1974).  Four Option
002, Accessory 44402A, 10 channel relay actuator assembly units were installed
in the scanner main unit.  Each actuator assembly relay consists of one
decade or 10 channels.  This gave the scanner a total of 4 decades or 40
available channels.  Any or all channels can be opened or closed simultaneous-
ly.  The internal switch settings are given in Table 10.  This unit can only
be addressed to listen.  The HP-IB connector cable is located on the back
panel.

     TABLE 10.  SWITCH SETTINGS OF SCANNER FOR SCANNER ADDRESS ASCII ')'


                          ADDRESS BIT        STATUS

                             7                OFF
                             6                ON
                             5                OFF
                             4                ON
                             3                OFF
                             2                ON
                             1                OFF

                     duodecade addressing as per manual*

  *Hewlett-Packard 1974.
                                     13

-------
 SIGNAL  CONDITIONING  INTERFACES

      A  variety  of  transducers are used in the control of the treatment  system.
 Each  of the  transducers had individual characteristics.   It was necessary  to
 construct  a  series of  interfaces which could translate the signals to a
 common  base.  Frequency was selected since it was not affected by cable
 length.  The  output  signal from the flow meters was in frequency and these
 signals were  read  directly by the measurement system.  The anemometer signal
 was buffered  and averaged over a 10 sec.  period and then connected to a
 voltage-to-frequency converter.   All of the instruments were connected to  a
 common  bus structure which interconected the instruments.  The instrument  bus
 was a 44 pin  structure with pin assignments as listed in Table 11.


 TEMPERATURE INTERFACE

      The temperature interface is shown schematically in.Figure 3.  It con-
 sists of a current source to supply a constant current to the National Semi-
 conductor LM335 temperature transducer, a buffer amplifier, Al; and signal
 conditioning  amplifier, A2;  which adjusts the gain to 100mV/°C and the offset
 to 0  VDC at -50° C.  The LM335 temperature transducer is specified to have a
 maximum  uncalibrated temperature error of 9°C and a maximum temperature
 nonlinearity of 1.5°C.   Table  12 gives the parts used in the construction  of
 the interface.  Pin numbers  listed  are for an instrument bus used in conjunc-
 tion  with the scanner/multiplexer to interconnect appropriate instruments  and
 transducers.   Figure 4  indicates how the  temperature interface was connected
 to the data collection  system.

     The temperature transducers were calibrated at one temperature with the
 cable installed  to  correct for offset due to resistance of the wire.   After
 calibration the  maximum error  specified by the manufacturer is 2°C for the
 transducer.   Additional errors may  be present due to thermal drift of the
 interface circuit and variability in the  contact resistances in the Hewlett-
Packard  Scanner. A 5.46K  ohm  reference resistor,  installed in the scanner
was used to evaluate  the stability  and reproducability of the temperature
measurement.   The mean  effective temperature,  based on the resistance of the
reference resistor,  was 5.8°C  with  a standard deviation  of 3.8°C.   If the
errors are  due to thermal  drift  in  the current source, then the reported error
is greater  than  the true error since the  forward voltage drop is not directly
proportional  to  current supplied.
                                    14

-------
	TABLE  11.  PIN ASSIGNMENTS FOR THE INTERFACE BUS BACKPLANE	

Pin No. Function

1       120 VAC
2       no connection
3       120 VAC
4       no connection
5       +15 VDC
6       Instrument common  (Ground)
7       -15 VDC
8       Current  source output to temp, sensor from interface
9       Voltage  output from temp interface
10      Input to voltage/freq interface
11      Output from  voltage/freq interface
12      Current  input from conductivity sensor
13      Programmable gain  (X 0.01)  in conductivity interface
14      Programmable gain  (X 0.10)  in conductivity interface
15      Programmable gain  (X 1.00)  in conductivity interface
16      Conductivity interface output
17      Oscillator output  to conductivity sensor from conductivity interface
18      Programmable gain  common in conductivity interface
19      Voltage  input from anemometer
20      Anemometer interface output
21      no connection
22      no connection
A       no connection
B       no connection
C       no connection
D       no connection
E       Treatment  plant  pump control relay input from scanner
F       Plot 1 (north plot) flow control relay from scanner
G       Distribution pump  control relay from scanner
J       +5 VDC
K       +12 VCD
L       Treatment  plant  pump control relay output - operates a zero voltage
        switch that  controls the motor starter at the treatment plant
M       Distribution pump  control relay output - operates a zero voltage
        switch that  controls the motor starter of the plots in conjunction
        with a liquid level switch which would prevent starting the pump
        without  the  presence of water
N       Plot 1 flow  control signal from Westinghouse controller
P       Plot 2 flow control signal from Westinghouse controller
R       24 VAC
S       24 VAC
T       Distribution pump  control relay from scanner
U       no connection
V       no connection
W       no connection
X       Digital-to-analog  converter output in pump control interface
Y       no connection
Z       no connection
                                     1
                                     r.

-------
                                   Cl
   8
                                R9
                                                  
-------
Modem


RS 232 to
IEEE 488 Bu.
Interface


IEEE 488
BUS
Voltage to Frequency
Interface
Voltage
Input
Frequency
Output
Voltage
Input
Output





Reference
\


Iran
4
   /	 Indicates switch  In scannei—multiplexer
Figure 4.   Connection of temperature interface  to
             data measurement  system

-------
               TABLE 12.  PARTS LIST FOR TEMPERATURE INTERFACE
 Part  No.                 Description                       	Comments
Al
A2
Cl
Rl
R2
R3
R4
R5
R6
R7
R8
R9
RIO
Tl
T2
Burr Brown 3501 OP Amp
Burr Brown 3501 OP Amp
0.22 yF
15k"
10k"
100k"
10k"
Ik"
2.7k"
selected for 0.5mA through pin 8
15k"
2k"
2.7k"
2N3904
2N3904

Polycarbonate
1%
1%
1%
1%
1%
1%
5%
5%
10%
5%
heat sink to T2

 CONDUCTIVITY  INTERFACE

     The electrical conductivity was measured by applying an AC voltage to a
 conductivity  transducer and measuring the current flowing after AC coupling
 the  transducer to measurement circuitry.  To interface with the remainder of
 the  measurement system, the absolute value of the AC output voltage was
 obtained and  filtered to yield a DC voltage proportional to the conductance.
 The  interface contained programmable gain amplifier to facilitate differences
 in the positioning of the stainless steel rods used to assess the electrical
 conductivity  of the soil water system.   A circuit diagram of the conductivity
 interface  is  shown in Figure 5, and parts are listed in Table 13.  Figure 6
 indicates  how the conductivity interface was connected to the data collection
 system.

     The stability of the interface was determined using the frequency of the
 oscillator which 'maintained a mean frequency of 1.18 kHz with a standard
 deviation  of  .16 kHz.  This variation in frequency should not measurably
 impact the results of the measurements, even though, theoretically the measure-
 ments are  frequency dependent.  When the reference resistor was installed in
 the  conductance interface, a mean conductance of 2.5 mS was obtained with a
 standard deviation of .14 mS.  The conductance of natural soil waters is
 temperature dependent with a temperature coefficient of approximately 2% per
 degree C.  All of the conductance measurements were adjusted to reflect this
 temperature dependence.   The deviation of the reference resistor then includes
 corrections due to variations in the reference temperature.  The standard
 deviation reported in the reference conductance therefore includes errors in
 the  reference temperature measurements.  Variations in reference temperature
 account for the majority of the standard deviation in the reference conduct-
 ance.  The overall error in assessment of water content based on conductivity
would be approximately 5%.  This assumes the conductivity of the soil solu-
tion remains constant and is not influenced by differences in solution conduc-
tivity caused by rainfall  events, variations in the conductivity of the waste-
water applied or evapotranspiration.
                                     18

-------
               TABLE 13.  PARTS LIST FOR CONDUCTANCE INTERFACE
Part No.           	Description	                     Comments
Al
A2
A3
A4
A5
Cl
C2
C3
C4
C5
Dl
02
Rl
R2
R3
R4
R5
R6
R7
R8
R9
RIO
Rll
R12
R13
R14
R15
R16
R17
R18
R19
Burr Brown 3501 OP Amp
Burr Brown 3501 OP Amp
Burr Brown 3501 OP Amp
Burr Brown 3501 OP Amp
Burr Brown 3501 OP Amp
0.26 uF
50 uF
0.1 PF
2.2 yF
2.2 uF
1N4154
1N4154
10 kn
1 kn
100 kfi
10 kft
10 kft
10 kft
54 k«
10 kfi
1 k^
10 kfi
10 kn
5 kft
10 kn
10 k^
selected for correct gain
40 k^
4.7 kft
2.2 k^
10 kfi





polycarbonate
electrolytic
polycarbonate
electrolytic
electrolytic


1%
1%
1%







1%
1%
1%
1%

1%


1%
VOLTAGE-TO-FREQUENCY INTERFACE

     The voltage-to-frequency interface converted the DC output voltages
available from many of the transducers to a frequency which could be read by
the Hewlett-Packard measurement system.  All of the input signals were condi-
tioned to have a range of zero to +10 VDC.   The output of the interface was.
set such that the output would be 10 kHz/volt.  The interface is shown sche-
matically in Figure 7.   Table 14 lists the parts for the interface.   There
was no independent measurement for stability of this interface.  Most of the
transducer interfaces utilized this interface (Figures 4, 6, 9, 11).  Errors
from this source are included in other measurements.  The input acts as a
summing junction for all signals applied.  The double contacts at both the
input and output of the voltage-to-frequency converter totally isolate the
module from the remaining circuitry and prevent extraneous current inputs.
                                    19

-------
            ci
ro
o
                                                                                            
-------

L/i


Conpu
Sy.t
	 1 | 	 1 RS 232 to
lar ^ Hodam IEEE 488 Bus
•n Interface

Conductance
Interface
Oscillator
Bridge
Proarammab 1 e
X 0.01 X0.I
' '
Gain
X 1.0
\

Voltage to Frequency
Interface
\ \ Voltage Frequency \
Input Output

D f Transducer
Reference (Homemade)
\ \
IFFF 488
BUS

Data
^ — Measurement
System

Transducer
(Commercial)
\
 /	  Indicates switch  In scanner—multiplexer
Figure 6.   Connection of conductivity interface  to
               data measurement system

-------
                                                            c;
10
         NOTE:  > is pin  number on edge connector
                                                                            R5
                                                             5    ^	WNAAr
                                                                                         //
                                                                                        out
                            Figure 7.  Schematic diagram of voltage-to-frequency interface

-------
                TABLE 14.  PARTS LIST FOR FREQUENCY INTERFACE
Part No.             Description                              Comments	

   Cl              0.001 yF                              polycarbonate
   C2              500 pF                                polycarbonate
   IC1             Burr Brown VFC32                      Voltage-to-frequency
                                                             converter
Rl
R2
R3
R4
R5
10 kfl
22 kfi
50 kft
1 M&
1.8 kfi
5%
1%
5%
1%
5%
PUMP CONTROL INTERFACE

     It was necessary to have the capability of operating the sprinkler
system either manually at the treatment site or automatically through computer
control.  Simultaneously, the computer needed to know if the sprinkler was
being operated manually.  The Pump Control Interface provided the logic and
relays to operate the pumps and valves as well being able to determine the
status of these relays.  The logic was developed using 7476 J-K flip flops in
a divide by 2 mode.  Each contact closure of the appropriate channel in the
Hewlett-Packard Scanner would change the status of the flip flop.  It was
necessary to know the status of the flip flop because there was contact bounce
in the Scanner relays.  On occasion, this bounce would act as a double contact
closure or no change in status.  Six bits of an 8 bit Digital-to-AnaTog
Converter were used to determine the status of the flip flops and manual
switches.  The flip flops controlling the plot valves were not monitored
since the status could be indirectly monitored using the flow meter.  The
circuit diagram is shown in Figure 8 and parts listed in Table 15.  Bit
assignments are listed in Table 16.   Figure 9 indicates how the pump control
interface was connected to the data collection system.


FLOW MEASUREMENT

     Flow measurements were read directly using a ALTOFLUX MT 900 Magnetic-
Inductive flowmeter.   This reading was read directly by the data measurement
system (ALTOMETER).  See Figure 10.


ANEMOMETER INTERFACE

     The anemometer interface was connected directly to the voltage-to-
frequency converter (Figure 11).   The wind speed detector itself was placed
on top of the equipment building so it would not be obstructed by surrounding
equipment.
                                     23

-------
                                                                _n
                                          NOTE:  > is pin  number
                                                 on edge connector
Figure  8.  Schematic diagram of pump control  interface
                         24

-------
Modem


RS 232 to
fEEE 488 Bu«
Interface


IEEE 488
BUS
ro
en
Pump Control
Interface
DAC
Main
Pump
Relay
M
Plot
Pump
Relay
Plot
1
Valve
Relay
Plot
2
Valve
Relay
Flip Flops ft
anual Swl tehee
                                              Vo 1 tage to Frequency
                                                   Interface
                                               Voltage
                                               Input
Frequency
 Output
                      /—   Indfcatee twitch In scanner-multiplexer
                       Figure 9.  Connection  of pump control  interface to
                                       data measurement system

-------
Mod.™


RS 232 to
IEEE 488 Bus
Interface


IEEE 488
BUS
ro
CTl
                                       /	  Indicate* switch In seanno!—multiplexer
                            Figure 10.  Connection of flow measurement transducer to
                                             data measurement system

-------
Hod.m


RS 232 to
IEEE 488 Bu.
Interface


IEEE 488
BUS
no
Anemometer
Interface


_N V_

Voltag*
Input

Wind
Speed
Detector
Voltage to Frequency
Interface
Voltag*
Input
Frequency
Output
                                       /—  Indicate* ewltch In *cann*r-nu11Iplexer
                       Figure  11.   Connection  of anemometer to  data collection system

-------
TABLE 15.  PARTS LIST FOR PUMP CONTROL INTERFACE
Part Nn
r Q i L 11 \j •
C1-C4
C5-C8
Dl
D2-D3
D4
D5-D6
D7
D8-D9
D10
Dll-12
IC1-IC2
IC3

Rl
R2
R3
R4
R5
R6
R7
R8
R9
RIO
Rll
R12
R13
R14
R15
R16
RE1-RE4
S1-S4
TABLE
Pin
4
5
6
7
8
9
10
11
Description
0.1 MF
0.22 yF
1N4154
1N4154
1N4154
1N4154
7476
DAC82KG

3.3 k^
4.7 kn
3.3 k^
100 kfi
3.3 kft
4.7 M
3.3 k"
100 k^
3.3 kQ
4.7 kn
3.3 kfi
.100 kft
3.3 ka
4.7 kft
3.3 k«
100 k«
SPOT 20A rel
DPDT switch
Comments

light emitting diode
light emitting diode
light emitting diode
light emitting diode

J-K flip flop
Burr Brown 8 bid Digital to
Analog converter
5%
5%
5%
5%
5%
5%
5%
5%
5%
5%
5%
5%
5%
5%
5%
5%
ay 12VDC coil
manual override on switch
16. BIT ASSIGNMENTS FOR DIGITAL TO ANALOG CONVERTER
Bit
1
2
3
4
5
6
7
8
Assignment
Primary pump at clarifier flip flop
Sprinkler (plot) pump flip flop
Primary pump manual switch
Sprinkler (plot) pump manual switch
North plot (1 in computer program) manual switch
Center plot (2 in computer program) manual switch
Tied to ground (not used)
Tied to ground (not used)
                       28

-------
                              COMPUTER SOFTWARE

INTRODUCTION

     The software needed to control the land treatment system includes the
distributed computer system software, specialty software for communications
links to other computers, and developed software to actually control and
monitor the site.

SYSTEM SOFTWARE

     The operating system used was a system generated multi-terminal RT-11.
RT-11 is a disk-based single-user real-time operating system which allows for
dedicated online applications and interactive program development (Digital
Equipment Corporation, 1981d).  As this system is a single-user system,
real-time turn around is very rapid.  Batch facilities can be installed if
desired.

     There is a choice of three monitor programs with RT-11.  They are single
job  (SJ) with the baseline monitor subset, foreground-background (FB), and
extended memory (XM).  These monitors are upward compatible, that is a pro-
gram that will execute under the SJ environment will usually run under FB and
XM monitors without modifications.  The SJ monitor can run one job at a time,
and  its major advantages are its high data throughput and its low overhead
leaving more memory for actual application programs.  The FB monitor can
execute two jobs concurrently, a foreground job and a background job.  In
addition to these, a system job may also be executing.  An example of a
system job is the error logger or printer queue.  The foreground job is usually
the  real-time critical job and has priority over the other jobs in memory.
If a foreground job does not have enough interrupts it can take total control
over the system and exclude all other jobs.  A job like this should be run
under the SJ monitor.  The XM monitor includes all the features of the FB
monitor plus it allows programmed requests beyond the 64Kb address limit of
the 16 bit CPU.  These requests are made in assembly language and are not
part of a higher-level language like FORTRAN.

     RT-11 also has the capability of associating a logical device name with
a physical system device.  Output was written to logical unit 80U.  BOU could
be assigned to either one of the hard disks by the use of the ASSIGN command
(Digital Equipment Corporation, 1981g).

NON-SYSTEM DISTRIBUTED SOFTWARE

     In addition to the distributed software with RT-11 Version 4, the following
sotfware from DEC was installed

        QJ960-AQ        SSP-11 (scientific subroutine package)
        QJ813-CQ        FORTRAN IV/RT-11 (version 02.5)

     SSP was used for mathmatical  and statistical analysis of the collected
data.  The actual  control program was written in FORTRAN IV with some calls
to the RT system library.   The RT system library contains FORTRAN callable
subroutines which give the programmer control over system memory and peripheral
devices.
                                    29

-------
      The following  terminal  emulator package from UNIQUE AUTOMATION  PRODUCTS
 was also installed
      This  package  was  used to transmit the data to other computer  systems for
 data analysis  and  storage.


 CONFIGURED OR  SYSTEM GENERATED SYSTEM

      The RT-11  FB  system  used in this project was generated  and  configured
 for specific hardware  devices.  The distributed FB system did  not  support
 multi-terminal  devices  and certain time-out features which were  deemed  to be
 necessary  for  adequate  control of the land treatment site.   A  modified  FB
 monitor was chosen for  the following reasons:

      1.  The data  collection program was to execute concurrently with  a
 background monitoring  program.  This monitoring program sensed whether  the
 program was executing  properly or whether a piece of hardware  caused the
 computer or data bus to hang.

      2.  The Timplex dialer and graphics output device required  their  own
 terminal support features.  The Timplex dialer required that the telephone
 number be  entered  as an ASCII string for the phone to properly be  dialed.
 The graphics terminal was used as an output device and not as  an interactive
 terminal.   This allowed graphics output, to be entered on another terminal
 before it  was displayed.

      3.  The total  control system required two terminals, one  for  the  fore-
 ground program output and one for the background program output.   The  BG
 program  gives a constant update of the status of the FG program  and, therefore,
 needs a  dedicated  output device.   It was also found that the FG-BG monitor
 was more efficient  if FG and BG jobs did not share the same  terminal.

      System generation is accomplished by answering hardware and system
 option questions using an interactive program supplied by DEC  (Digital  Equip-
 ment Corporation, 1981c).   This program produces a system conditional  file
 (Table 17)  which is compiled and linked with the hardware and  system monitor-
 ing software which  produces a customized operating system for  the  specified
 hardware.   Table 18 lists the operating system features resulting  from  the
 system generation process.

 SOFTWARE CONTROL OF THE COMPUTER  CALLING UNIT

     To initiate control of the CCU, the data terminal ready (DTR) is  set low
 and  then set high.   Setting the DTR low causes the phone to  disconnect  and
 clears the way for dialing a new number,   when the DTR is set  high, a phone
 number can be passed to the CCU.   The number is an ASCII string  prefaced  by
 the  number 1.   This causes the CCU  to go off hook and dial the number.   At
 this point, the program would go  into a loop to check for carrier  detect.
When the carrier was detected,  control  would pass back to the main program.
Data can now be transmitted over  the phone lines to the data collection
system at Boulder.   If  the carrier  was not detected after a  set  time, the
dialing operation  would be restarted.   See BOUDAL for Appendix I.
                                    30

-------
      TABLE 17.  SYCND.MAC - RT-11 V04.00B SYSTEM CONDITIONAL FILE
SYSG$N
TIME$R
RDF$L
SYT$K
MTT$Y
MAT$S
MTI$M
TIM$IT
TTYOUT
TTYIN
ROL$OV
U$TIL
L$ANG
M$INI
CLOCK
STARST
FPU$11
DYSCSR
DY$VEC
DL$UN
LS$CSR
LS$VEC
DL11$L
DL11$M
DL11$N
DLC$0
DLV$0
DLC$1
DLV$1
DLC$2
DLV$2
DLC$4
DLV$4
DZ11$N
= 1
= 1
= 1
= 1
= 1
= 1
= 1
= 1
= 40.
= 132.
= 1
= 1
= 1
= 1
= 60.
= 1
= 1
= 177170
= 264
= 2.
= 176500
= 300
= 4.
= 1.
= 3. + 1.
= 177560
= 60
= 176510
= 310
= 176520
= 320
= 176530
= 330
= 0
;INDICATE SYSGENED MONITOR
;ADO TIMER SUPPORT
;ADD SYSTEM I/O ERROR MESSAGE
;SYSTEM JOB SUPPORT
;MULTI-TERMINAL SUPPORT
ASYNCHRONOUS TERMINAL STATUS
;TERMINAL TIME OUT
;DEVICE TIME OUT (REQUIRED BY TERMINAL TIME-OUT)
;SIZE OF OUTPUT RING BUFFERS
;SIZE OF INPUT RING BUFFERS
;MONTH ROLLOVER SUPPORT
jUTILITY COMMANDS
;LANGUAGE COMMANDS
jMINIMAL COMMANDS
;POWER LINE FREQUENCY
;STARTUP COMMAND FILE
;FLOATING POINT SUPPORT
;STATUS REGISTER FOR FIRST RX02
jVECTOR FOR FIRST RX02
;NUMBER OF RL01/RL02 UNITS
;CSR FOR SERIAL LINE PRINTER
;VECTOR FOR SERIAL LINE PRINTER
jNUMBER OF LOCAL DL11 INTERFACES
jNUMBER OF REMOTE DLll-E LINES
;TOTAL NUMBER OF DLll LINES
;CSR OF FIRST (CONSOLE) DLll
•jVECTOR OF FIRST (CONSOLE) DLll
;CSR OF SECOND (LOCAL) DLll
;VECTOR OF SECOND (LOCAL) DLll
;CSR OF THIRD (LOCAL) DLll
jVECTOR OF THIRD (LOCAL) DLll
;CSR OF FOURTH (REMOTE) DLll
;VECTOR OF FOURTH (REMOTE) DLll
;NO DZ11 OR DZV11 SUPPORT
                                  31

-------
          TABLE 18.  SYSTEM CONFIGURATION AND SYSTEM OPTIONS AS GIVEN
 	BY THE "SHOW" COMMAND

 RT-11FB (S) V04.00I

 Booted from DLO:RT11FB
 Resident Monitor base is  127236 (44702.)
 USR is set SWAP
 TT is set NOQUIET
 Indirect file abort level  is  ERROR
 Indirect file nesting depth  is  3

 POP 11/23 Processor
 FPll  Hardware Floating Point  Unit
 Extended Instruction  Set  (EIS)
 KT11  Memory Management Unit
 60 Cycle System Clock

 Device I/O  time-out support
 Multi-terminal  support
 System job  support

 Device      Status       Vector
NL
LS
DY
DL
Installed
Installed
Installed
Resident
000
300 304
264
160
TT  (Resident)
DL  (Resident)
    DLO = SY , DK , BOU, INP
    DL1 = OUP
MQ  (Resident)
DY
LS   = LP
NL
3 free slots

      Unit Owner     Type      WIDTH   TAB   CRLF   FORM   SCOPE    SPEED

          0        S-Console DL   132     No    Yes    Yes    Yes      N/A
          1        Local      DL   132     No    Yes    Yes     No      N/A
          2        Local      DL    96     No    Yes     No     No      N/A
          3        Remote    DL    80     No    Yes     No     No      N/A
                                    32

-------
SOFTWARE CONTROL OF THE HP DATA COLLECTION SYSTEM

     Control signals which come through the modem data line interface are
then sent to the CCI and passed along the HP-IB.  The CCI acts as the manager
to the HP-IB.  By sending the proper signals from the computer system one can
cause the scanner channels to open or close, activate the data measurement
system or multiplex them together to get a data reading.

     The HP-IB bus has two modes of operation:  The data mode and the command
mode.  While in the command mode, the CCI recognizes certain codes to be
command functions.  But in the data mode, the HP-IB must be addressed to
listen for commands to be acted upon.

     For the following sequences to work properly, the internal and external
switches of the units must be set as discussed in the Hardware Section.   This
operation assumes asynchronous communication with the handshake and on-line
modes activated.  Certain commands require a handshake value to be returned
before any further communications will take place.  If the proper handshake
value is not received the command can be resent until it is received.   Table
19 gives the octal codes and required handshake characters.  If after a few
tries the proper handshake is not received, the bus needs to be cleared, and
all the command sequences to that point retransmitted.


     1.  Abort remote bus (interface clear)

         An  interface clear signal is sent to the remote bus causing all data
transfers to be aborted and the bus to be set to an unlisten or clear mode.
This stops all data-transfers on the bus.  A hung bus can result if the proper
handshake response is not returned.

     2.  Put bus in remote control

         Informs the remote CCI that the next sequence is a command sequence
and is to be interpreted as such.

     3.  Set bus in command mode

         The command mode of the remote bus is activated.

     4.  Set bus to unlisten

         When in the unlisten mode the CCI passes commands to the other units
on the bus.   Commands are now transparent to the CCI.  Other units on the bus
are set to an unlisten state and can only communicate on the bus if addressed
to listen.

     5.  Talk address controller

         This is the address of the controlling CCI.  In multiple control
systems,  there can be more than one local-remote CCI pair.  This address
informs the  bus which local  is communicating.  For our application, this was
a dummy value which the bus  was expecting, since there is no real local CCI.
(See discussion on data system collection hardware.)
                                     33

-------
                       TABLE  19.   PROGRAMMING  STEPS  FUNCTIONS ALONG WITH OCTAL CODES, REQUIRED HANDSHAKE SIGNAL AND
                                                 DIAGNOSTIC VALUES FOR BYTE LOCATION JBCTL
OJ
STEP FUNCTION


1.

2.

3.

4.
5.
6.
7.

8.

9.


10.

SETUP SCANNER
Abort remote bus (interface clear)

Put bus in remote control

Set bus in command mode

Set bus to unlisten
Talk address controller
Listen address scanner
Set bus in data mode

Clear mode command
SEND CHANNEL NUMBERS TO CLOSE
Send scanner channel(s) to be closed.

CLOSE CHANNELS
Execute commands to scanner
ASCII


OLE
C
OLE
R
OLE
A
?
}
)
OLE
B
C

FIRST DIGIT
SECOND DIGIT

CR
OCTAL HANDSHAKE
CODE ASCII

020
103 F
020
122
020
101 F
077 ?
175 1
051 )
020
102
103 C

060-067
060-067

015 CR
HANDSHAKE
OCTAL


106



106
077
175
051


103

FIRST DIGIT
SECOND DIGIT

015
JBCTL*
VALUE

18
19
20
21
22
23
24
25
26
27
28
29

060-067
060-067

30
(continued)
    *JBCTL refers to a program internal diagnostic  value  (See  Table 22  and section on Foreground-Background Interaction.

-------
                                                     TABLE 19.   (Continued)
     STEP
FUNCTION
        ACTIVATE DATA MEASUREMENT SYSTEM
ASCII
OCTAL
CODE
HANDSHAKE
  ASCII
HANDSHAKE
  OCTAL
JBCTL*
VALUE
CO
en
11

12

13
14
15
16

17
18
19
20
21
22


23

Put bus back in remote control

Set bus in command mode

Set bus to Unlisten
Send talk address of controller
Listen address of counter
Set bus in data mode

Initiate data collection system
Set bus in command mode
Set bus to unlisten
Send talk address of counter
Listen address of controller
Set bus back in data mode

RETRIEVE DATA
Retrieve data from the data
measurement system
OLE
R
OLE
A
?
}
*
OLE
B
I
OLE
?
J
}
OLE
B

LAST CHARACTER

020
122
020
101 F
077 ?
175 }
052 *
020
102
111 I
020
077 ?
112 J
175 }
020
102

NEXT CHARACTER




106
077
175
052


111

077
112
175





1
2
3
4
5
6
7
8
9
10
11
13
14
15
16
17



     *JBCTL refers to a program internal diagnostic value (See Table 22 and section on Foreground-Background Interaction,

-------
      6.   Listen address  scanner

          Addresses  the  scanner and  programs  it  to  enter  a listen mode.   The
 scanner  can now be  sent  commands.

      7.   Set bus in data mode

          The bus is set  in  the data mode,  so commands  and channel  numbers
 can be sent to the  scanner.

      8.   Clear mode command

          This causes the bus to  recognize  only  management signals  and lets
 other signals pass  through  the bus.  This  command  also opens  all  scanner
 channels that were  previously closed.

      9.   Send scanner channel(s) to be closed.

          The scanner channels to be closed are  now sent  along  the  bus.   To
 address  an  individual channel the decade of the channel  is  first addressed
 and then the unit of the channel is addressed.  The format  is  to send the
 channel  in  two individual octal  codes.  That is, to close channel  8,  one would
 send an  octal  0 and then an octal 10, where 0 would be the  decade  and 10
 (decimal 8)  would be the unit number.  Single digit channel numbers must be
 prefixed by a zero.   To  close channel 23 one would send  an  octal  2 and  then
 an octal 3.   Each digit  must be  echoed back before the next digit  is  sent.
 This handshaking ensures that the proper channels will be closed as desired.
 More than one channel can be closed at one time.  If one  needed  to close
 channels 11,  25,  37;  one would send the octal equivalents of  these channels.
 The order the channels are sent  is  the order in which  they  are closed.   This
 order can be random if desired.  This channel closing  ability  allows  a  sensor
 to be chained to a  signal conditioning interface, the  voltage-to-frequency
 converter,  and any  other equipment  desired.

      10.  Execute commands to scanner

          After  the  channels to be  closed are sent to  the scanner, they need
 to be closed.  This  is accomplished by sending  a carriage return  character
 (CR)  to  the  bus  which tells the scanner to execute the previous  commands.
 After this character  is  received the channels will then  be  closed.

      11.  Put  bus back in remote control

          Prepares remote bus to be put back into a command mode.

      12.   Set  bus in command mode

          The bus is now put back into a command mode  so  control characters
can be recognized as commands and not data.

     13.   Set bus to unlisten

          Make sure  all  the devices are in a nonlistening mode and not
addressed.
                                    36

-------
     14.  Send talk address of controller

          The dummy address of the local CCI was sent to satisfy the require-
ments of the bus.

     15.  Listen address of counter

          Address the ASCII interface of the data measurement system to let
it know that next sequence of commands are for it.

     16.  Set bus in data mode

          The bus is now set in the data mode so data can be transmitted
along it.

     17.  Initiate data collection system

          The initiate command tells the data measurement system to take a
reading and Save this "reading until it can be sent back along the bus to the
computer.

     18.  Set bus in command mode

          The bus is now put back into a command mode so another device can
be addressed.

     19.  Set bus to unlisten

          Make sure all the devices are in a nonlistening mode.

     20.  Send talk address of counter

          Address the data measurement system (counter).  This informs this
device that it is to perform the instructions which follow.

     21.  Listen address of controller

          This informs the bus that the data is to be sent to the controlling
device, in this case the computer system (local CCI).

     22.  Set bus back in data mode

          Sets the bus to data mode so that the next information to come down
the bus is data and will not be recognized as a command sequence by any of
the devices.

     23.  Retreive data from the data measurement system

          The data are sent to the controller a byte at a time.   To initiate
transfer of the data, the last handshake signal which was present on the bus
is sent to the measurement system.   The measurement system then echoes back
the first value in the talk output format.  See Table 8.  This process is
repeated until all 17 bytes are sent.   The correctness of the data format can
be verified by checking the received data bytes with the talk data format.
For example, bytes 16 and 17 are supposed to be a carriage return (CR) and a

                                    37

-------
 line-feed,  respectively  (LF).   If  something  else  is  in  these  locations,  the
 data bytes  returned  maybe  suspect.  To  insure  the  correctness  of the data
 format,  the following  data bytes were checked  for  the appropriate values:
 bytes 2,  7, 13,  16,  17.  If any of  these  locations varied  from the expected
 value, the  data  bytes  were retransmitted.  After  the data  bytes were collec-
 ted, the octal codes were  converted to  real  numbers of  the magnitude which
 would correspond to  ther location  in the  talk  output format (Table 8).  _These
 values were then summed  to give a  data  reading.   (See BOUWRT for Appendix I.)

      To effectively  utilize computer resources, each programming step listed
 above was contained  in a control subroutine.   The  FORTRAN  code of the subrou-
 tines are given  in Appendix I.  The control  subroutines  and the programming
 steps they  contain are given  in Table 20.
     TABLE  20.   HP-IB  PROGRAMMING STEPS INCLUDED IN THE CONTROL SUBROUTINES
                    SUBROUTINE
                                PROGRAMMING STEPS
BOURLL
BOUCHN
BOURET
BOURTL
BOUWRT
1 TO 8
9
10
11 TO 22
23
 SAMPLING  DATA AT REMOTE SITE

     The  channel assignments for the scanner are given in Table 21.  These
 channels  were multiplexed through programming the HP-IB so transducers  and
 detectors could be connected to the data measurement system and the proper
 signal conditioning interface.   The steps involved in reading a sensor  were
 as  follows:
     1,
     2,

     3,
     4.
     5,
     6.
Set up scanner.
Send channel codes to the scanner to multiplex sensors and signal
conditioning interface to the data measurement system .
Close channels.
Activate data measurement system.
Retrieve data from site.
Verify data were in the proper range; if not
If after 3 tries data are still  out of range
the job terminal and proceed.
Store data on disk.
Start sequence for next sensor.
                                                       start sequence  again.
                                                       log the problem on
     If a control code for the HP-IB did not respond with the proper handshake
signal; the code was resent and the handshake rechecked.  If after a few
times, the correct code was not received,  the subroutine that was in control
(Table 20) would exit and be restarted.   In some cases the whole sequence
would be restarted from the beginning with step 1 above.  BOUPRS.FOR (Appendix
I) is an example of a routine to collect data from the remote site.
                                    38

-------

Variable
IBCONB
IBCOO
MBCONR(l)
MBCONR(2)
MBCONR(3)
IBFCI
IBVFI
IBVFO
IBTCM
IBREFR
MBTMP (1)
MBCON 1)
MBPRS(l)
MBTMP (2)
MBCON (2)
MBPRS(2)
MBTMP (3)
MBTMP (4)
MBCON (3)
MBPRS(3)
MBTMP (5)
MBCON(4)
MBPRS(4)
MBTMP (6)
MBCON (5)
MBPRS 5)
MBTMP (7)
MBTMP 8)
MBCON(6)
MBPRS(6)
MBTMP (6)
IBWS
IBMPR
IBPPR

MBFFT(l)

MBFFT(2)

MBPMP(l)

MBPMP(2)



IBPNIC
TABLE 21.
Channel
00
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

34

35

36

37

38

39
CHANNEL ASSIGNMENT FOR SCANNER
Comment
Conductance bridge
Conductance oscillator output
Cond Range x 0.01
Cond Range x 0.1
Cond Range x 1.0
Frequency counter input
Voltage/frequency input
Voltage/frequency output
Temperature conversion module
Reference resistor 5.46k
Temperature Plot 1 station 1 3 cm
Conductivity Plot 1 station 1
Comm Cond. plot 1 station 1
Temperature Plot 1 station 2 3 cm
Conductivity Plot 1 station 2
Comm Cond. plot 1 station 2
Temperature Plot 1 station 3 3 cm
Temperature Plot 1 station 3 30 cm
Conductivity Plot 1 station 3
Comm Cond. plot 1 station 3
Temperature Plot 2 station 1 3 cm
Conductivity Plot 2 station 1
Comm Cond. plot 2 station 1
Temperature Plot 2 station 2 3 cm
Conductivity Plot 2 station 2
Comm Cond. plot 2 station 2
Temperature Plot 2 station 3 3 cm
Temperature Plot 2 station 3 30 cm
Conductivity Plot 2 station 3
Comm Cond. plot 2 station 3
Ambient Air temperature
Wind speed
Main pump relay (normally open drain)
Plot pump relay (delay time before turning
on)
Plot 1 flow freq. transducer
(determines flow rate)
Plot 2 flow freq. transducer
(determines flow rate)
Plot 1 valve current relay
(turns on valve controller)
Plot 2 valve current relay
(turns on valve controller)
Reference resistor for temp check
(same as 09 but used to eliminate crosstalk)
flow test DAC converter
39

-------
 FOREGROUND  - BACKGROUND INTERACTION

     A  unique  aspect of this project was the communication link between
 the  foreground  and background programs.  The DEC RT system library sup-
 ports FORTRAN  callable routines which can send data between th.e foreground
 (FG) and  background (BG) jobs, but to utilize these routines both the FG
 and  BG  jobs have to be running concurrently and have synchronized input/-
 output  processes (Digital Equipment Corporation, 1981e).  If they are not
 synchronized,  the FG job will pause and wait for the background jobs
 input/output requests before data will be transmitted again.  This restric-
 tion made the  use of the library routines unsuitable for our needs.  A
 system  was  needed where the foreground job would execute independently of
 the  background  job.

     A  system  was utilized where the FG job wrote its status to a particu-
 lar  byte  addresses in the computer memory.  The background monitoring
 job, when present, read the value in the appropriate address, converted
 the  reading from a specific byte code to an memonic string which was
 displayed on the BG terminal screen.  The BG program also could send
 information to  the FG program in this manner (Figure 12).

     The  byte  locations used were from locations 170 to 178.  These are
 located in  the  trap and interrupt vector area part of the memory and are
 reserved  by DEC for individual users (Digital Equipment Corporation, 1981b),
 This section of memory is not changed by normal FG/BG program execution
 which makes it  an excellent location for storing numbers and data to be
 used in the interaction of the FG/BG jobs.

     The  bytes  locations and functions are listed in Table 22.  Associated
 with each location is a variable name which is used in the FG and BG pro-
 grams to  refer  to that particular location.   The location addresses are
 given in  octal.

     The  input/output device can be set by using location JBDIO.  This
 allows  input and/or output to be from the FG terminal or the default disk
 file.   Location JBDPGM informs the BG program whether the FG program is
 in a wait state before next sampling period or if the program had some
 type of error and terminated abnormally.   Location JBDS1 is the name of
 the main  subroutine that the program is currently executing (Table 23).
 Each subroutine had only one code except the routine to dial the telephone.
 This routine had a code for each critical operation of the dialing sequence
 (Table  23).   As the program executes, each subroutine toggles the-appro-
 priate  code in the interaction area.   Location JBOS2 acts the same as the
 main subroutine locator,  except the name of the secondary or control
 subroutine is sent (Table 24).   The last channel number sent to the
 scanner is located in location JBCHl.   JBCH2 is the location of the
 override  byte.   The override byte is set from the BG program.  JBCTL is
 the last  location in  the control  subroutines which was executed (Table
 19).   Handshake and some timing problems are easily diagnosed knowing the
 last control location.   JBERR is the error byte.  Critical equipment such
 as the  conductivity bridge have an error code associated with them if an
 error occurs.   These  error codes are additive so that one can extract the
exact error  by  knowing  the total  error code (Table 25).   Other miscellane-
ous byte values are also  listed in Table 25.
                                    40

-------
          FOREGROUND
           MEMORY
            AREA
       MAIN SUBROUTINES
       u   n
I
N
T
E
R
A
C
T
I
0
N

A
R
E
A
BACKGROUND
  MEMORY
   AREA
Figure  12.   Foreground-background  memory and interaction area

-------
               TABLE 22.   BYTE LOCATIONS FOR PROGRAM INTERACTION.
VARIABLE
JBDIO
JBDPGM
JBDS1
JBDS2
JBDCH1
JBDCH2
JBDCTL
JBDERR
* Octal number.
TABLE 23.
VARIABLE
JBDAL
(+D
(+2)
(+3)
(+4)
(+5)
JBTMP
JBWND
OBCON

JBPRS
JBFFT

JBERR

JBMAH


JBPMP


JBSTA
JBTIM
JBDK1
JBSLP
JBPKC
JBINT
JBFAL
LOCATION*
170
171
172
173
174
175
176
177

FUNCTION
input/output device
program execution byte
main subroutine
control or secondary subroutine
channel to be acted upon
override shutdown
control subroutine location
error byte

MAIN SUBROUTINE DATA ASSIGNMENTS FOR JBDS1
VALUE*
10
11
12
13
14
15
20
30
40
41
50
60
61
70
71
80
81
82
90
91
92
93
100
110
120
121
130
140
150
151
250
SUBROUTINE
BOUDAL (phone dialing)
passed timer
printed number
looks for carrier
test carrier
succesful attach
BOUTMP (temperature)
BOUWND (wind speed)
BOUCON (conductivity)
BOUOSC (oscillator test)
BOUPRS (commercial conductivity)
BOUFFT (flow rate)
BOUDAC (digital-analog converter)
BOUER1 (error detection)
BOUER2 (shutdown)
BOUMH1 (calcs ave cond.)
BOUMH2 (calcs ave readings)
BOUMHT (calcs ave temp)
BOUPMP (manipulates pumps)
BOUPDC (checks sync of pumps)
BOUPFT (checks sync of relays)
BOUPFD (turns pumps off if error)
BOUSTA (outputs current status)
BOUTIM (calcs time pumps on)
BOUDK1 (outputs info to disk files)
BOUDK2 (daily ave file operations)
BOUSLP (calcs time ref for sleep)
BOUPKC (reset diag bytes)
BOUIN1 (sets operating conditions)
BOUIN2 (sets operating conditions)
BOUFAL (exit program restart from bg)
*Decimal number.
                                    42

-------
TABLE 24. SECONDARY SUBROUTINE DATA ASSIGNMENTS FOR JBDS2
VARIABLE
JBRTL
JBCHN
JBRLL
JBWRT
JBRET
JBRED
JBBIT
VALUE*
10
20
30
40
50
60
70
SUBROUTINE
BOURTL
BOUCHN
BOURLL
BOUWRT
BOURET
BOURED
BOUBIT
(sets cond so data read)
(decimal channel to octal)
(open/close scanner channel)
(reads information at site)
(channel command sent)
(disk operations)
(calcs bit status from words)
*Decimal number.
          TABLE 25.  MISCELLANEOUS DATA ASSIGNMENTS OF VARIABLES
        VARIABLE
VALUE*  LOG.
FUNCTION
JBDISK
JBTT
JBECON
JBEINT
JBETMP
JBEFFT
JBEDAL
JBEHND
JBEADD
JBESHT
JBOVR
JBWAIT
JBRUN
JBSLEP
0
10
1
2
4
8
16
32
64
128
1
10
20
30
JBDIO
JBDIO
JBDERR
JBDERR
JBDERR
JBDERR
JBDERR
JBDERR
JBDERR
JBDERR
JBDCH2
JBGPGM
JBDPGM
JBDPGM
output to disk
output to terminal
error oscillator
error init disk read
error conductance board
error DAC
error phone
error handshake
error on backup write
error shut down
override shut down
wait mode before starting
program running
sleep period
* Decimal number.

INTERNAL TRACE BACK FEATURE

     The foreground program, along with giving diagnostic support with the
background program, has an internal trace back system which,  in the case of
equipment or timing failure, traces the hierarchy at time of  failure.   Each
routine updates a LOGICAL*! array which is common with every  subroutine in
the program.  This way the program can be traced back both for failure in
timing with the data collection equipment and to check the data as the pro-
gram is running.   BOUCHK will  print out the common area if the the source
program is compiled with the debugging feature set.   All  source lines  which
have a 'D' in column 1 are compiled into the code if the  debugging feature is
set.  If the debugging feature is not set, these lines are just considered to
be comments.  The call to BOUCHK is prefaced by a 'D1 in  the  main driver, so
for normal operations it is ignored.
                                     43

-------
              LAND TREATMENT CONTROL AND MONITORING PROGRAMS

 INTRODUCTION

     There are actually three programs involved with the control of the land
 treatment system.  They are:

     1) BOULD.REL    -  Foreground program that monitors and controls the
                        Land Treatment site.

     2) BOURST.SAV   -  Backgound program which monitors the status of
                        Foreground program.   This program will restart
                        BOULD.REL if for some reason it terminates or gets
                        hung in a loop.   An example of this would be the
                        loss of the carrier or unclean telecommuniction
                        lines.

     3) BOUFIL.SAV   -  Background program which lets one view the data
                        files used by BOULD.REL

     The background programs were integrated so that when one was exited, the
 next program was automatically loaded into memory and executed.  To return to
 the FG monitor one had to enter the correct password.  This was to prevent
 inadvertent termination of the monitoring program.   If the monitoring program
 was not functioning, the foreground program would not be restarted.

     All three programs were developed using a modular approach.  Critical
 data which were used by each module were put into common blocks, so any module
 could access it.   Each routine was written so its function was independent of
 the other routines.  By combining routines through subroutine calls and
 hierarching, a total function could be accomplished, that is, the conductivity
 could be read, or the pumps could be turned on.


 CONTROL PROGRAM (BOULD.REL)

     BOULD.REL is divided into 3 sections.  They are:  the 1) main driver
 program, 2) the main or function subroutines and 3) the control or secondary
 subroutines.  The main driver calls each main, or function subroutine as it
 is needed.   The function subroutines are the ones which control each type of
 sensor or do a specific calculation involved with the collected data.  The
 control subroutines are'the routines which control the H-P data collection
 system.  The secondary subroutines are oriented to input/output and date-time
 calculations.   See Figure 12.

     This program was developed so that if the equipment was not working
 properly, error recovery routines would be executed.  Depending upon the
 severity of the error or equipment failure,  the system would perform recovery
 routines or totally shutdown.  If equipment failure was detected in critical
modules, the program went into  a shutdown mode which then turned off all
pumps and relays  until  the equipment was repaired.   Noncritical module failure
was logged  into an error report file for maintenance purposes and, if needed,
predefined  default values would be used instead of actual data.
                                    44

-------
     An example of a critical, hardware module was the conductivity bridge.
If this module failed there was no way to determine the soil moisture, thus
no way to control the system.  A noncritical module would be the wind speed
module.  If this failed the treatment system could still operate, but we
would only lose the wind blow factor which is dicussed later.

     The program was too large to fit into the computer memory, so it was
overlayed into three sections.  Each overlay section can be called from the
previous overlay section, but cannot call any subroutine in the concurrent
section.

     Sometimes- to keep a given overlay section as small as possible, a routine
would be broken or written in two or more sections.  Depending upon the
routine, these sections may be independent of each other.  In other cases
they were position dependent, such as the error handling routine which had to
be executed in order.  By using overlays, the only contraints are on the sizes
of the common blocks for data storage.  The output map from the task building
processes lists each subroutine and the amount of memory it requires (Appendix
V).

     Data files were not accessed by the FORTRAN IV open/close statements but
by using RT-11 system library routines.  The FORTRAN IV methods used too much
system overhead or buffer space for both the sequential and direct access
file operations (Digital Equipment Corporation, 1980).  The advantage of
using RT system calls was the overhead for file I/O could be kept at a minimum
as the files were stored binarily, and any record could be accessed in any
order.  The disadvantage is that the user, not the FORTRAN OTS (operating
time system), has to keep track of the next record to be written.  The user
has to realize that if the file is improperly named, one could inadvertently
write over an entire disk.  By using standard device and file names this
should never occur.  The disk I/O is much faster with this method than with
the FORTRAN method, but it stores data as words (2 bytes), so all data must
be of the same type (real, integers) (Digital Equipment Corporation, 1981e).

     A description of the routines which made up the control program are
listed by functional section below.  The FORTRAN source code is in Appendix
I.
MAIN DRIVER

     BOULDM is the main driver program.  This routine calls all the main
subroutines and executes the wait or sleep period before the next reading.
The waiting period between cycles for data collection and control could be
dynamically changed.

     BOUDAT contains all the data in common with each routine.  This is a
FORTRAN BLOCK DATA file.  This file also contains valuable comments and
calculation sequences for determining the setpoints and acceptable ranges.


MAIN SUBROUTINES

     BOUCHK is used as a dignostic tool when debugging the program.  All data
in the common block are dumped to the FG terminal if this routine is called.

                                     45

-------
      BOUCON  starts  the sequence which reads the conductivity  sensors  in the
 plots   The  conductivity module is also checked to make sure  it  is  operating
 within  specifications.  If the module is out of specification, an error flag
 is  set.   This  error flag is later tested in BOUER1.  A failure in the conduc-
 tivity  module  is  a  fatal error and will cause the program to  terminate after
 it  enters the  shutdown mode.

      BOUDAC  reads the Digital-to-Analog (DAC) converter to determine  the
 status  of the  main  and plot pumps.  Manual and computer operation can also be
 determined by  analyzing the bit code returned.  The reading from the  DAC is
 converted from a  decimal to a binary equivalent.  This binary number  tells
 which pumps  are actually on.  Sometimes the scanner relays had chatter which
 caused  the flip/flop chips to be in the opposite state than they indicated.
 The DAC reading gave the correct state of the pumps and relays.

      BOUDAL  dials the telephone at the field site in Boulder.  This is accom-
 plished by passing  a phone number in a variable length ASCII  byte string.
 That phone number is then dialed by the CCU dialer and modem.  Control  is
 returned to  the main program after a carrier is detected.  If the carrier  is
 not detected within a given length of time, the program will  exit and restart
 again.   The  telephone communications were found to be very susceptible to
 interferences  and power flucuations.

      BOUDK1  is the  first part of the disk writing routine.  This section
 writes  the data which must be updated every time the system was  sampled and
 writes  it to the  appropriate data files.  See BOUDAT (BLOCK DATA) Appendix
 I for the appropriate files.

      BOUDK2  is the  second part of the disk writing routine.   This section- is
 called  only  when the current date is changed.   The days data  are averaged  when
 appropriate  and stored in a daily average file.  The file pointer is  then
 incremented  to the  next record of the file.

      BOUER1  is the  first part of the error detection routine.  Various  options
 are performed  depending on the error encountered.   These are  in  the form of
 informative  messages and/or system shutdown at the site and program termina-
 tion until repairs  are made.   This section determines which,  if  any,  signal
 conditioning modules are bad.   If any are found to be faulty, BOUER2  is
 executed.  If  everything is working properly,  then BOUER2 is  skipped.

      BOUER2  is  the  second part of the error detection routine.   This  section
 determines if  the system shut  down mode should be executed.   If  so, system
 shutdown  is  attempted.   First, it is determined if the system shutdown  mode
 is  to be  overidden.   This override is accomplished through the BG program
 with  the  FG-BG  interaction  mode.   If the override is not set, then  an attempt
 is  made to turn off all  pumps  and relays.   If the failure was not caused by
 the  scanner or CCI then  this  should work.   All pump flags and status  indica-
 tors are  initialized,  and  the  current status is written to the disk.   If an
 equipment problem occurs  or a  piece of equipment does not meet its specifica-
 tion, the program is normally  set to terminate.   The override byte prevents
this termination.   This  is  especially important in an initial testing  stage
where the equipment  does  not  always perform as one would expect.
                                     46

-------
     BOUFAL is executed only when the program goes into a timing failure.
Timing failures are either telephone related (no answer, CCI bad) or trans-
mission line related (bit dropped).  The routines currently being executed are
logged on to the job terminal, the phone is disconnected, and the program
termination byte is set- so the program can be restarted.  A code is passed to
this routine which tells the reason for failure.

     BOUFFT starts the sequence which determines the flow rate to the indi-
vidual plots.  The flow rates are read directly from the flow transducer and
needs no conversion.

     BOUIN1 is the first of three initializer routines.  This section is read
only when initially starting or restarting the program.  In this section the
device handler for the disk files is verified to be loaded.  If it is not
loaded, it is fetched and loaded.  The current readings are read into memory
and all status flags are set to the current status.  If there was an error on
reading the current status file, the backup status file is read.   If there is
an error reading the backup file, the system logs this on the job terminal
and sets a flag so the pump status cannot be changed.

     BOUIN2 is the second part of the initializer routines.  This section is
also only executed when starting or restarting the program.  First, the date
and time of the control program's next execution is read, and the time to wait
for the program to sample the data is calculated.  The program either waits
this period of time or starts immediate execution of the program if the
required time has past.  A status byte is sent to the B6 program to indicate
if the program is waiting or if immediate execution is to take place.  Next
the system configuration word is read to determine which system the program
is running on.  This program was also written to run on a POP 11/03 as a
backup computer if the POP 11/23 failed for a particular reason.   Each compu-
ter had different addresses for the job terminal and telephone modem so these
assignments were then changed.  The monitor was also checked to make sure
that the program was operating under the proper monitor.

     BOUIN3 is the third section of the initializer routines.  The setpoints,
wait period, time delays, and values to use for minimum acceptable temperature
and wind speed, along with the default temperature to use if the temperature
board fails are read from a disk file.   This data can be changed by using the
file management program.  If an error occurs reading this file, the default
values specified in the BOUDAT are used.   This routine is called every time
the program runs, not just at startup.

     BOUMH1 averages the plot data to determine if the plot pumps and/or
relays need to be turned on.   If deviations in readings are detected, they
are logged for maintenance.  Depending on the severity of the deviations, the
pumps are either turned off if already on, or not turned on until the problem
is corrected.  Readings out of the specification range for the conductivities
causes the conductivities from the plot to default to the setpoint at which
control is being held.   This will prevent the pumps and relays from turning
on.   The conductivity probes are checked to see if the readings are within a
specified range of each other.  Any probe which fails this test is logged and
not used in the calculations to determine the average conductivity.
                                    47

-------
      BOUMH2 stores the current  pump  status  data  in  the  proper locations.  The
 wind speed is checked to determine  if  its velocity  is  low enough to apply
 wastewater.  If the wind speed  is too  high,  a  flag  is  set so  the pumps cannot
 be turned on.   This prevents  inadvertant blow  off from  the site.   The air
 temperature is checked to determine  if it is warm enough  to apply wastewater.
 If the temperature is too low,  a flag  is set to  prevent the wastewater appli-
 cation.  The current conductivity readings  are then  checked against the
 setpoints.   If the current reading  is  less  than  the  setpoint,  the flag to
 turn on a given plot relay is set.   If too  many  probes  are out of range, as
 determined, in BOUMH1, then that plot's relay cannot  be  turned  on.

      BOUMHT calculates the average temperature per plot by taking the mean of
 the temperature transducers in  the plot.  The  transducer  readings are compared
 to each other to determine if they are within  specified limits.   A weighted
 average is calculated by taking the  readings which are  in the  specified limits.
 This average is used in calculating  the temperature  corrected  conductivity
 readings.   If too many probes are out  of range,'  then the  average temperature is
 set to that specified in the file BSTATS.DAT.  Any readings which are out of
 range are logged on the output  device.  If  the average  temperature is less
 than that specified in BSTATS.DAT, a flag is set which  prevents  the pumps from
 turning on.  This is to prevent freezing of the  wastewater distribution system.

      BOUOSC reads the oscillator in  the conductivity and  tests it to verify
 that the reading is in a specified range.   If  the reading is  out of range, an
 internal error flag is set, and the  background program  is also informed of the
 error.

      BOUPDC reads the DAC  to determine current pump status.   If  the wrong
 pumps are turned on or off, this routine reestablishes  the proper synchroni-
 zation.  Manual  operation  of the system is  also  noted on  the  output device.
 If sychronization cannot be reestablished in a given amount of time,  an error
 flag is set and  control  is  passed to a section which continuously tries to
 turn the pumps off.

      BOUPDF is similar to  BOUPDC except pump synchronization  is  continuously
 tried until reestablished.  The program timer  is canceled during this process.

      BOUPFT reads  the  flow  transducer  to verify that the  plot  relays  were
 turned  on.   If the  relays  cannot be turned on  due to some error,  an internal
 flag is set,  and  the  error  is logged on the output device.

      BOUPKC clears  foreground/background interaction bytes which communicate
 information to the  background program.   The following bytes are  not reset
 because they are  information bytes from the background  program to  the fore-
 ground  program: JBDIO  and JBCH2.  Byte JBDPGM  is reset  in another  section as
 it  informs  the background program that the foreground program  is  still  execut-
 ing.  This  byte  is  only  set when the foreground program abnormally terminates.

      BOUPMP determines the proper sequence to  turn the  pumps and relays  on or
off.  The pumps and relays are not on  a standard on-off type of  control  but
are driven  by J/K flip flops which permit clearing the  channel scanner  (which
opens the switch contact) without, turning off  the pump.   The second scanner
switch closure opens the relay which operates  the individual pump.  The
current pump status is analyzed  to determine which purnps  are on  and which
ones need to be on or off.  Only these pumps and relays are acted  upon.


                                    48

-------
     BOUMH2 stores the current pump status data in the proper locations.  The
wind speed is checked to determine if its velocity is low enough to apply
wastewater.  If the wind speed is too high, a flag is set so the pumps cannot
be turned on.  This prevents inadvertant blow off from the site.  The air
temperature is checked to determine if it is warm enough to apply wastewater.
If the temperature is too low, a flag is set to prevent the wastewater appli-
cation.  The current conductivity readings are then checked against the
setpoints.  If the current reading is less than the setpoint, the flag to
turn on a given plot relay is set.  If too many probes are out of range, as
determined in BOUMH1, then that plot's relay cannot be turned on.

     BOUMHT calculates the average temperature per plot by taking the mean of
the temperature transducers in the plot.  The transducer readings are compared
to each other to determine if they are within specified limits.  A weighted
average is calculated by taking the readings which are in the specified limits.
This average is used in calculating the temperature corrected conductivity
readings.  If too many probes are out of range, then the average temperature is
set to that specified in the file BSTATS.DAT.  Any readings which are out of
range  are logged on the output device.  If the average temperature is less
than that specified in BSTATS.DAT, a flag is set which prevents the pumps from
turning on.  This is to prevent freezing of the wastewater distribution system.

     BOUOSC reads the oscillator in the conductivity and tests it to verify
that the  reading is in a specified range.  If the reading is out of range, an
internal  error flag is set, and the background program is also informed of the
error.

     BOUPDC reads the DAC to determine current pump status.  If the wrong
pumps  are turned on or off, this routine reestablishes the proper synchroni-
zation.   Manual operation of the system is also noted on the output device.
If sychronization cannot be reestablished in a given amount of time, an error
flag is set and control is passed to a section which continuously tries to
turn the  pumps off.

     BOUPDF is similar to BOUPDC except pump synchronization is continuously
tried until reestablished.  The program timer is canceled during this process.

     BOUPFT reads the flow transducer to verify that the plot relays were
turned on.  If the relays cannot be turned on due to some error, an internal
flag is set, and the error is logged on the output device.

     BOUPKC clears foreground/background interaction bytes which communicate
information to the background program.   The following bytes are not reset
because they are information bytes from the background program to the fore-
ground program:  JBDIO and JBCH2.   Byte JBDPGM is reset in another section as
it informs the background program that the foreground program is still execut-
ing.   This byte is only set when the foreground program abnormally terminates.

     BOUPMP determines the proper sequence to turn the pumps and relays on or
off.   The pumps and relays are not on a standard on-off type of control but
are driven by J/K flip flops which permit clearing the channel scanner (which
opens the switch contact)  without turning off the pump.   The second scanner
switch  closure opens the relay which operates the individual pump.  The
current pump status is analyzed to determine which pumps are on and which
ones  need to be on or off.  Only these pumps and relays are acted upon.


                                    49

-------
     BOUPRS is similar to BOUCON except a commercial conductivity probe  is
 used.

     BOUSLP determines the time to wait before the data collection program  is
 to  start again.  The time to wait is stored in the file BSTAT.DAT.  The  new
 time and date for execution are calulated from this value and the current
 system date and time.  The new date and time are stored in the file BPOLLD.DAT
 in  case of a system failure at which time it can be recalled.  This wait time
 is  also assigned to variables which are used in the ISLEEP system subroutine.

     BOUSTA outputs the current status information to the output device.  The
 temperature, wind speed, flow readings, conductivity readings, pump status,
 and setpoints are listed.  Averages as well as individual readings are listed.
 Conductivities are in microsiemens, temperatures in degrees centigrade,  and
 wind speed in km/hr.

     BOUTIM calculates the amount of time each pump is on.  The date and time
 the pumps were turned on are compared to the present date and time.   This
 information is then stored in a data array for disk storage.

     BOUTMP starts the sequence which reads the temperature sensors in the
 plots.  The temperature module is also checked to make sure it is operating
 within specifications.  Signal conditioning interface failures or readings
 out of the specification range for the module cause the temperatures from the
 plot to default to the temperature specified in BSTATS.DAT.   An error flag  is
 also set which is tested in BOUERR.

     BOUWND starts the sequence which reads the wind speed at the Boulder
 site.  The program will temporarily suspend operations when the wind exceeds
 that specified in BSTATS.DAT.


 SECONDARY AND CONTROL SUBROUTINES

     BOUBIT converts a decimal number to its binary equivalent.  This binary
 equivalent represents a bit pattern from either a location in memory or the
 DAC board.

     BOUCHN enters into the proper memory address the channel number which  is
 to  be opened or closed.  This  channel number is converted from a single or
 double digit base ten number to two distinct octal digits.  An error flag is
 returned from this subroutine  if the channel operation did not occur.  This
 information is also sent to the background program.

     BOUDTC calculates the number of days difference between two dates.  It
 is  possible for a system failure to leave the pumps on for more than one day.
This is used to determine the  length of time that the pumps were on.  Leap
years are taken into consideration.

     BOUDTI converts a REALM  date into three distinct integers.   These
integers are used in date-time calculations.  Dates and times are stored as
REAL*4  numbers to be compatible with the rest of the data in the disk files.
(See section on control program:   BOULD.REL)
                                    50

-------
     BOUDYR calculates the next day of the year in a REAL*4 format.  Leap
years and end of year turnover are taken into consideration.

     BOURED is used for file reading and writing on the disk.  Dummy variables
are passed to this subroutine when the designated file has either read, write,
or read/write operations performed on it.  An error flag is also returned
which indicates that an error occurred and the severity of the error.  All
disk data file storage uses this routine.

     BOURET sends a carriage return to the scanner which tells it that all
commands and channels have been sent and to close the channels.  If the
channels are not closed properly, an error flag is returned.

     BOURLL sends conditions so the scanner channels can be closed.  An error
flag is returned if the commands are not accepted.  See the section on Program-
ming the HP-IB bus for the sequence to program the scanner.

     BOURTL sends conditions so the data measurement system can be accessed.
An error flag is returned if the commands are not accepted.  See the section
on Programming the HP-IB bus for the sequence to program the data measurement
system.

     BOUWRT is the subroutine which reads the data from the Hewlett-Packard
Measuring system.  This data is converted from a ASCII string to a REAL*4
number  and then stored in a data array where further data manipulations and
conversions can take place.


BACKGROUND MONITOR PROGRAM (BOURST.SAV)

INTRODUCTION

     The background monitoring program gives a dynamic update of the fore-
ground  program status on a video terminal screen.  This update is a routine
by routine location of the foreground program.  A listing of the FORTRAN
codes for the routines is in Appendix II.

MAIN DRIVER

     BOURST is the main driver for the background monitoring program.  This
routine inhibits the normal control C abort feature of the RT-11 system.
This program can only be exited through the commands "EXIT" or "QUIT".  The
JSW (job status word) is also set to allow single character input without
waiting for a terminator (Digital Equipment Corporation, 1981f).  This is used
because the program is constantly checking the bytes in the interaction area
for information from the foreground job.  If the program had to wait for a
command, it is possible that the foreground program could exit without the
background program noting this abnormal end.  If this happened, the foreground
program would not be restarted.   The override byte is also set in with routine.
Commands are entered one byte at a time until a carriage return is encountered
or a maximun number of bytes are encountered.  The command string is then
checked against the list of valid commands.  If the command is not a valid
command, the command string is cleared and byte rechecking resumes.  If the
command is a valid command, the command is executed, the command string is
cleared, and byte rechecking resumes.   Exiting this program automatically
                                    51

-------
 starts  the  file maintenance program.  If the foreground  program  is  executing
 (not  in a sleep mode), the location and status of each subroutine  is  displayed
 on the  screen.  This display is dynamic as it is constantly  updated as  the _
 program executes.   If the foreground program is not executing, the  display is
 cleared, but  the  program still checks the interaction bytes  for  an  indication
 as to when  the foreground program starts execution again.


 MAIN  SUBROUTINES

      BOUHDR prints  the labels for the screen information.  These labels are
 formatted on  the  screen at predesignated locations.

      BOUFLL causes  the background program to exit and tries  to restart  the
 foreground  program.  The JSW is reset to normal, then the cause of  the  failure
 is displayed  before the foreground restart command is sent to the system
 monitor.

      BOURED is the  file manipulation routine.  This is discussed under  the
 foreground  program.

      BOUHLP is the  help file which is displayed on the screen.   In  the  normal
 mode  this file is only displayed for a few seconds before byte rechecking
 resumes.  It  is possible to display this file longer but to  do so inhibits
 byte  checking.


 FILE  MAINTENANCE PROGRAM (BOUFIL.SAV)

 INTRODUCTION

      The file maintenance program is the background access to the foreground
 data  files.  This program also can change some of the operating parameters
 and setpoints of the foreground program.  A listing of the FORTRAN  codes for
 the routines  is in Appendix III.


 MAIN  DRIVER

      BOUFIM is the main driver for the program BOUFIL.SAV.   This routine
 prompts for the file to be viewed or manipulated;  then one must verify  that
 this  is the correct file,  and the file is then displayed on  the terminal
 screen.   File selection is determined either by stepping through the  file
 list  one file at a time or by going directly to the file by  entering  its
 number.   Exiting this program causes an automatic restart of the monitoring
 program.


 MAIN SUBROUTINES

     BOUFIS allows the user to change the data in one of the data files.
This module is entirely screen driven with one record of the file displayed
at a time.   A  write protection code is needed to be able to change  data.
This routine is mainly used to change the input data to BOULD.REL from  the
file BSTATS.DAT.


                                    52

-------
     BOUFIR outputs a selected range of nonblank records of the specified
file to the output device.  A nonblank record is a record which is not all
zeros.  Initially, all data files are built or created to have blank records.

     BOUFID outputs all nonblank records of the specified file to the output
device.

     BOUFIH is the help file for this program.  This help file is displayed
on the screen.  The output device for data dumps is also listed.

     BOUFIW initializes the specified file to all zeroes or all blank records.
A write protection code must be entered before this process will take place.

     BOUFIP reads and outputs only a maximum of 10 fields of data from each
record to the output device.  Blank records are not ignored.  The locations in
the data array of the fields to be listed are entered one at a time.

     BOUFIN creates a file of specified length and number of words.   The
created file  is a binary  file and not a file created by FORTRAN IV (Digital
Equipment Corporation, 1981e).

     BOUFIF lists the functions of each file on the screen.  The names are
printed by the main driver.

     CONVRT converts a LOGICAL*! or BYTE string, to a REAL*4 number.  This
number is accurate for 6  places on either side of the decimal point.  If the
string cannot be converted to a number, an error flag is returned which
specifies that this is a  string and not a number.  This routine is used in
the main driver to determine which file is to be accessed.

     BOURED is the file manipulation routine which is fully discussed under
BOULD.REL.

     TIMLIB holds the initial time and date calculations function.  The
system date and time were accessed using this group of subroutines.   The
specific routines are discussed below.

     TIMDIF is a function routine which calculates the difference between two
times.  The new time is the first variable and the old time is second vari-
able.  Both times are in REAL*4 format and the result is a REALM number.

     SYSTIM accesses the system data and time and converts  them to REAL*4
numbers.

     SYSTMC returns the minutes in the time to its decimal  equivalent.  The
time 9:30 becomes 9.50.

     TIMADD adds  two REALM times together and returns a flag which tells if
this time is  in the next day.   There are 60 minutes in a hour so times cannot
be directly added.
                                    53

-------
 VIDEO  ROUTINES

     All  the  video  handler routines are prefaced by  'VT'  and  then  a  mnemonic
 of their  function.  These mnemonics resemble as closely as possible  those
 specified in  the  VT100 users manual (Digital Equipment Corporation 1979c).

     VTDHLB sets  the VT100 to accept the bottom half of a double height  line,
 This is the same  text as sent with VTDHLT and must be synchronized with  it.

     VTDHLT sets  the VT100 to accept the top half of a double height line.
 This is the same  text as sent with VTDHLB and must be synchronized with  it.

     VTED erases  the specified area of the display.  If an 'A'  is  specified,
 the whole display is erased.  If a '£' is specified, the  display is  erased
 from the  current  cursor location to the end of the display.   If a  'B'  is
 specified, the  display is erased from the current location to the  beginning
 of the display.   In all cases the cursor is left in  its current position.

     VTERSE erases  the whole screen and returns the cursor to home position.
 This is used  to clear the screen and start printing at the top of  the  screen.

     VTHVP positions the cursor at a specified horizontal and vertical posi-
 tion.  The row  and  column are sent to the screen and the  cursor is positioned
 at that point.

     VTSGR selects  the type of graphic rendition to display on the screen.
 The graphic renditions are reverse video (R), underline (U),  blinking  (B), and
 bold or halfbright  (H).  The type of rendition is accomplished by  sending a
 R, U,  B,  or H.

     VTTBM sets the top and bottom margins of the scrolling region of  the
 screen.   The  default scrolling region is from line 1 to line 24.  The  minimum
 scrolling region  can be as small as any two consecutive lines on the display.

     VTWID changes the width of the screen to 80 or 132 columns, and vice
 versa.

     VTDWL causes the next text on that line to double width  instead of single
 width.

     VTEL erases the specified area of the current line.  If  an 'A'  is speci-
 fied,  the whole line is erased.   If a 'E'  is specified, the current  line  is
 erased from the cursor location to the end of the line.   If a 'B1  is specified,
 the  line  is erased from the cursor to the beginning of the line.   In all
 cases,  the cursor is left in its current position.


 COMMAND FILES  TO BUILD AND  OPERATE SYSTEM

     The  following is  a brief function of the command files to build the
Boulder data  collection,  file maintenance and monitoring programs.   The '@'
character  in front of  the  name implies that this type file is a command file
with a  file type of  '.COM1  and can be executed directly by typing the file
name as specified  below.  The command file made it easy to maintain  and
update  the computer  code  for the total  data collection  system.  The whole


                                    54

-------
software system could be rebuilt in a matter of minutes.  A list of the
command files is in Appendix VI.

     (3TIMLIB builds the time calculation library TIMLIB.OBJ.

     0BOULDA builds the foreground program BOULD.REL.  This file calls two
other command files: @BOULDF (FORTRAN source compilation) and @BOULDL (task
builder and overlay).

     @BOUFIA builds the program that reads and manipulates the data files.
The resultant program is BOUFIL.SAV.

     0BOURSA builds the status and restart program BOURST.SAV.  This file
calls two other files: 0BOURSF (FORTRAN source compilation) and 0BOURSL (task
builder and overlay).

     @VTLIB builds the video handler library VTLIB.OBJ.

     @BOULD starts the foreground program and then returns to the monitor.

     (3RESTRT starts  both 0BOULD and BOURST.SAV.

     0BFILE starts BOUFIL.SAV when exiting BOURST.SAV.

     @BSTRT starts BOU:BOURST.SAV when exiting BOUFIL.SAV.
                                    55

-------
                                  REFERENCES

 ALTOMETER.  ALTOFLUX MT 900 Magnetic-Inductive flowmeter.  B.V. Altometer
      Sliedrecht/Netherlands Postbus 46.

 Digital  Equipment Corporation.  1977.  DLVll-E and DLV11-F Asynchronous  Line
      Interface Users' Manual.  EK-DLV11-OP-001.  Maynard, MA.

 Digital  Equipment Corporation.  1979a.  Microcomputer Processor Handbook.
      Maynard, MA.

 Digital  Equipment Corporation.  1979b.  PDP-11 FORTRAN Language Reference
      Manual.  AA-1855-TC.  Maynard, MA.

 Digital  Equipment Corporation.  1979c.  VT100 USER GUIDE.  EK-VT100-UG-002.
      Maynard, MA.

 Digital  Equipment Corporation.  1980.  RT-11,RSTE/E FORTRAN IV Users Guide.
      AA-5749B-TC.  Maynard, MA.

 Digital  Equipment Corporation.  1981a.  Microcomputer Interfaces Handbook.
      Maynard, MA.

 Digital  Equipment Corporation.  1981b.  Microcomputer and Memories.  Maynard,
      MA.

 Digital  Equipment Corporation.  1981c.  RT-11 Installation and System Genera-
      tion Guide.  AA-H376A-TC.  Maynard, MA.

 Digital  Equipment Corporation.  1981d.  Introduction to RT-11.  AA-5281B-TC.
      Maynard, MA.

 Digital  Equipment Corporation.  1981e.  RT-11 Programmer's Reference Manual.
      AA-H378A-TC.  Maynard, MA.

 Digital  Equipment Corporation.  1981f.  RT-11 Software Support Manual.
      AA-H379A-TC.  Maynard, MA.

 Digital  Equipment Corporation.  1981g.  RT-11 System Users Guide.  AA-5279B-TC.
      Maynard, MA.

 Enfield, C. G.,   1977.   Servo Controlled Optimization of Nitrification-
      Denitrification of Wastewater in Soil.   J. Environ. Qual.  6:456-458.

 Hewlett Packard.   1974.   Programming and Service Manual Model 34951 Scanner.
     Manual part no.  03495-900012.   Hewlett Packard Co.  Loveland, CO.

 Hewlett Packard.   1975a.   Operating and Service Manual ASCII Interface 5312A.
     Manual part no.  05312-90004.   Hewlett Packard Co.  Loveland, CO.

Hewlett Packard.   1975b.   Operating and Service Manual Universal Counter
     5302A.   Manual  part  no.  05302-90009.   Hewlett Packard Co.   Loveland, CO.


                                    56

-------
Hewlett Packard.  1976.  Operating and Service Manual.   Revision A Model
     59403A Common Carrier Interface.   Manual  part no.  59403-90001.   Hewlett
     Packard Co.  Loveland, CO.

Hewlett Packard.  1977.  Operating and Service Manual.   Measuring System
     5300B and Battery Pack 5310A.  Manual  part no.  05300-90035.   Hewlett
     Packard Co.  Loveland, CO.

Leach, L. E. and C. G. Enfield.  1983.  Nitrogen Control  in Domestic Waste-
     water Rapid Infiltration Systems.  J.  Water Pollut.  Control  Fed.
     55:1150-1157.

Timplex.  1977a.  Model CCU-II Computer Calling Unit.   Customer Manual.
     Timplex.  Hackensack, NJ.

Timplex.  1977b.  Timplex Modem Systems 103 C/D Customer  Manual.   Timplex.
     Hackensack, NJ.
                                    57

-------
         APPENDIX I



CONTROL PROGRAMS SOURCE CODE
           58

-------
        PROBRflM BOULD
C 1
c
c
c
c
C.
T
c
c
c
c
c
c
c
c
Program : BOULD. REL
Module : BOULD. FOR
Function: Main driver for boulder land treatment program


See BOUDflT. FOR for documentation and variable assignments

See BOULD. BLD for the use of command files to build the needed

	 1.
1
1
1
1
1
1
1
progr 1
1
NOTE: THE CONVENTION FOR CONTINUflTION LINES IS fi TflB flND ft CHftRflCTERI
SUCH flS fl '*' OR ft " ".

C T
c- —
c — data common block
c —
1
1



        COMMON/BOULD/BOUDflT(60),BOUft(£5),BOUB(£5), BDflTO(60), BOUT(60),
        *NflRRfiY,BCONflV(£),BTMPftV(£),BPRSfiV(£),NPL,NPR,NBT1,NBT£,NBC1,
        *NBC£, NBP1,NBP£,LBCF(£),LBTF(£),LBPF(£),SETPTC(£),LOCB,
        *KFBR(£),KFBP, KSBR(£), KSBP, KTMPF,KCONF,KPRSF,KINTF,KWNDF, KFFTF,
        *KPUMP(£)
c—
c—     channel  switching  common block
c—
        COMMON/CHflN/IBCONB,IBCOO, IBFCI,IBVFI,IBVFO,IBTCM,IBREFR,
        *IBWS,IBMPR,IBPPR,IBPNIC,MBCON(7), NBCON,MBTMP(10),
        *NBTMP,MBPMP(2),NBPMP,MBPRS(7), NBPRS, MBFFT(2), NBFFT,
        *MBCONR(3),NBCONR
c—
c—     data  checking  common block
c—
        COMMON/CONDCL/WINDMX,TEMPMN,BCONL, BCONH, BCONRF(3), BRI(3),
        *BVOLTS, Bfll,BTMPRF, BCONIN,BflVETP(2),BTMPHZ, RflNL,RflNH,BFTDflC(4)

c—     control  character  common block

        COMMON  /CONTRL/Lfl, LB, LC, LR, LDLE,LQU, LLftS, LTftCT, LLflCT,LTRC,
        *LLOC, LI,LF,LCR,LLF,ITRH1,ITRM1,ITRS1,ITRT1, ITRT2, ITRT3
c—
c—     diagnostic  block
c—
        LOGICftL*! LEVEL1,LEVELS,LEVELS,LEVEL4
        INTEBER*4 IlfiREfl,I2ftREft
        COMMON  /DIflG/LEVELl (10), LEVEL2U0), LEVEL3(10), LEVEL4(10),
        *LTERM,ITERM,flTIMES,BTIMES,IflDPOK, IflDPEK,IPHONE,ILDTR,IHDTR,
        *IlflREft(4),I£AREfl(4),SYSTMi,SYSDflT,JBDIO,JBDP6M,JBDS1,JBDS£,
        *JBDCH1,JBDCH£,JBDCTL,JBDERR,JBDflL,JBTMP,JBWND,JBCON,JBPRS, JBFFT,
        *JBERR,JBMflH,JBPMP,JBSTA, JBTIM, JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL,JBCHN,JBRLL,JBWRT,JBRET, JBRED, JBBIT,JBFflL,JBDISK,JBTT,
                                    59

-------
         *JBECON, JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD, JBESHT, JBRUN,
         *JBOVR, JBWflIT,JBSLEP
 c—
 c—     file  information  block
 c—
         COMMON/FILE/BOUDEV,MflBLK(4>, MBBLM4), MCBLK(4) ,MDBLK(4),
         *MEBLK (4), MFBLK (4), MGBLK<4), MHBLK (4), MIBLK (4), MJBLK (4), MKBLK(4),
         *MLBLK (4), MMBLK (4), MNBLK (4), MOBLK (4), MPBLK (4), MQBLK (4), MRBLK (4),
         *MSBLK<4),
         *MflBLKL, MflBLKW, MBBLKL, MBBLKW, MCBLKL,
         *MCBLKW, MDBLKL, MDBLKW, MEBLKL, MEBLKW, MFBLKL, MFBLKW, MSBLKL,
         *MGBLKW,MHBLKL, MHBLKW, MIBLKL, MIBLKW, MJBLKL, MJBLKW, MKBLKL,
         *MKBLKW,MLBLKL, MLBLKW, MMBLKL, MMBLKW, MNBLKL,MNBLKW,MOBLKL,
         *MOBLKW, MPBLKL, MPBLKW, MQBLKL, MQBLKW, MRBLKL, MRBLKW, MSBLKL, MSBLKW
 c—
 c—     telephone number  common block
 c—
         LOGICflL*! NUMBOU,NUMflDfl
         COMMON/NUMBER/NUMBOU(13), NUMflDfi(9)
 c—
 c—     base address common block
 c—
         COMMON/PROCES/IflD103, IflDl£3, ITM03,ITM£3
 c—.
 c—     timer failure common block
 c—
         COMMON/TIMER/1TMH, ITMM, ITMS, ITMT, ITDH,ITDM,ITDS,ITST
 c—
 c—     main program sleep block
 f— n	
         COMMON/WfllT/IBPOLH, IBPOLM, IBPOLS, IBPOLT, IBCC, IBCH, IBCM,
         *IBCS,IBCT
 c—
 c—
 c—     bits common
 c—
         COMMON/BITS/IBITU6), IWORD
 c—
 c—     0 0 {> <> <> <> <> <> <> (> <> <> <> <> <> <> <> <> <> <> <> <> <> {> 0 0 0  0 (> <} <} 0 {
 c—
         EXTERNAL FOIL
 c—
 c—     wait  for bg  program monitoring
 c—
         CflLL  ISLEEP  (0,0,10,0)   ISYNC WITH BG TESTING
         CflLL  flSSIGN  (LTERM,'TT:')
         CflLL  BOUPKC      ! RESET  DIflGIMOSTIC BYTES WITH  BG
 c—
 c—      get time and date  before  anything else
c—

c—
SYSTMl=SYSTIM(SYSDflT)    !get  system date and time  (real*4)
                                    60

-------
c—     check for  proper date
c—
        IF  (SYSDflT.ST.830000.)  BOTO  500
        DO  535,1=1,10
535     WRITE  
-------
c-
c-
c-
c-
c-
c—
c—
c—
c—

c—
CftLL BOUIN3

following £ lines set and test timer to make sure their
is a normal return,  if communications takes longer  than that defid
by the timer subroutine fail is called.

IF( ITIMER (ITMH, ITMM, ITMS, ITMT, IlflREft, l,FflIL).NE. O)
  WRITE(LTERM, 334)
BTIMES=BTIMES+1  !number of times thru
WRITE(LTERM,£0) BTIMES
SYSTMl=SYSTIM(SYSDflT)   !get system date and time (real*4)
SYSDflT=SYSDAT
WRITE 
-------
c—
        CftLL BOUERS
c—
D       CRLL BOUCHK      !***************
c—
        COLL BOUMH1
c—
D       CfiLL BOUCHK      I***************
c—
        CflLL BOUMH2
c—
D       CftLL BOUCHK      !********##******
c—
        CflLL BOUPMP
c—
        CflLL BOUPDC(IEQUIP)      !CHECKS DflC  FOR  PUMP  SYNC
c—
        CflLL BOUPFT(IEQFFT)              !CHECKS  FLOW  FOR PLOT  RELflY  OPERflN
c—
        CflLL IPOKE (IPHONE,ILDTR)        ICflUSES  PHONE TO DISCONNECT
c—
        CflLL ICMKTd, IlflREfl)     ICflNCELS TIMER
c—
        CflLL BOUTIM      .'calculate  how long  pumps  where on
c—
        CftLL BOUSTfl      !OUTPUT STflTUS INFORMflTION
c—
        CflLL BOUDK1      Iwirte  part of information to disk
c—
        CftLL BOUDK2      Iwrite  rest of information to the disk
c—
        CflLL BOUSLP      !calculate  amount of time  to  sleep
c—
        CflLL BOUPKC      !RESET  DIflSNOSTIC BYTES
c—
c—     bg  sleep  indicator
c—
        CflLL IPOKEB  (JBDPBM, JBSLEP)      Isleep period
c—
c—     close ouput  file  last thing beforre  sleep
c—
99      CflLL CLOSE (LTERM)
        CflLL ISLEEP  (IBCH,IBCM,IBCS,IBCT)
        BO  TO 10         !go to  10 and  repeat program
c	
c—
c—     format statements

£0      FORMflT (/,'1TIMER RESET  TIMES THRU= ',F10.0)
£1      FORMflT C  TIME :', F5. 0,  10X,'DflTE :',F7. 0)
98      FORMflT C  PROBRflM IS NOT TO RUN FOR  flNOTHER',
        *I3,'  HOURS',14,' MINUTES')
                                   63

-------
333     FORMAT ('  NOT ENOUGH FREE SPftCE FOR QUEUE ELEMENTS')
334     FORMflT ('  TIMER DID NOT HflVE NORMflL RETURN')
        END
                                 64

-------
        BLOCK DfiTfl

c  I Program  :    BOULD.REL
c  I Module   :    BOUDflT.FOR
c  I Function:    DflTA  BLOCK  FIND  DCOUMENTftTION OF VflRIflBLES
c  +	••	
cl
cl
cl Synopsis of
cl
c I   DflTE
Q | 
-------
 c*        i)  BOULD.REL    - Foreground program that monitors  and controlse
 c*                          Land Treatment site.
 c*        £>  BOURST.SflV   - Backgound program which monitors  the status of
 c*                          Foreground program.  This program  will restart
 c*                          BOULD. REL if for some reason  if terminates.
 c*                          (  timing errors from phone  lines)
 c*        3)  BOUFIL. SflV   - Background program which lets one  vieWthe daa
 c*                          files used by BOULD.REL
 c*
 c*    If one leaves  either Backgroud program by the "EXIT" command the
 c*     Background program will start.  There are help files in  both progra.
c—
c—
c—
c—
         data common block
                                              (£5),BDflTfl<60),BOUT(60)
                                               MDI  MDD MJ3T1 MPT?' WRn
 C	
 c—     channel  switching  common block

         COMMON/CHflN/IBCONB, IBCOO, IBFCI, IBVFI, IBVFO, IBTCM,IBREFR,
         *IBWS,IBMPR,IBPPR, IBPNIC,MBCON(7), NBCON, MBTMP(10),
         *NBTMP,MBPMP(2),NBPMP, MBPRS(7), NBPRS, MBFFT(£),NBFFT,
         *MBCONR(3),NBCONR
 c—
 c—     data checking  common block
 c—
         COMMON/CONDCL/WINDMX,TEMPMN,BCONL,BCONH,BCONRF(3),BRI (3),
         *BVOLTS, Bfll, BTMPRF, BCONIN, BflVETP (£), BTMPHZ, RflNL, RflNH, BFTDflC<4)
 c—
 c—     control  character  common block
 c—
         COMMON /CONTRL/LA, LB, LC, LR, LDLE, LQU, LLOS, LTfiCT,LLflCT,LTflC,
         *LLflC, LI,LF,LCR,LLF, ITRH1, ITRM1, ITRS1, ITRT1, ITRT£, ITRT3
 c—
 c—     diagnostic  block
 c—
         LOGICftL*! LEVEL1,LEVELS,LEVELS,LEVEL4
         INTESER*4 IlfiREfl,I£fiREfi
         COMMON /DIflS/LEVELl(10),LEVEL£(10),LEVEL3(10),LEVEL4(i0),
         *LTERM, ITERM, flTIMES,BTIMES, IflDPOK, IflDPEK, IPHONE, ILDTR, IHDTR,
         *IlflREfl (4),  I£flREfl(4), SYSTM1, SYSDflT, JBDIO, JBDP6M, JBDS1, JBDS2,
         *JBDCH1,JBDCH£, JBDCTL, JBDERR, JBDftL, JBTMP, JBWND,JBCON, JBPRS, JBFFT,
         *JBERR,JBMflH,JBPMP, JBSTft, JBTIM, JBDK1, JBSLP,JBPKC,JBINT,
         *JBRTL,JBCHN,JBRLL, JBWRT, JBRET, JBRED, JBBIT,JBFfiL,JBDIBK, JBTT,
         *JBECON,JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD, JBESHT, JBRUN,
         *JBOVR, JBWflIT,JBSLEP
c—
                                   66

-------
c—      file  information block
c—
         COMMON/FILE/BQUDEV,MflBLK(4), MBBLK(4),MCBLK <4>,MDBLK(4),
         *MEBLK(4),MFBLK(4),M6BLK(4), MHBLK(4), MIBLK <4),MJBLK(4), MKBLK(4),
         *MLBLK(4),MMBLK(4),MNBLK(4),MOBLK(4),MPBLK(4),MQBLK(4),MRBLK(4),
         *MSBLK<4),
         *MflBLKL,MflBLKW,MBBLKL,MBBLKW, MCBLKL,
         *MCBLKW,MDBLKL,MDBLKW,MEBLKL,MEBLKW, MFBLKL,MFBLKW, MGBLKL,
         *MSBLKW, MHBLKL, MHBLKW, MIBLKL, MIBLKW,MJBLKL,MJBLKW,MKBLKL,
         *MKBLKW, MLBLKL, MLBLKW, MMBLKL,MMBLKW, MNBLKL,MNBLKW,MOBLKL,
         *MOBLKW,MPBLKL,MPBLKW,MQBLKL,MQBLKW,MRBLKL,MRBLKW,MSBLKL,MSBLKW
c—
c—      telephone number common block
c—
         LOGICftL*! NUMBOU,NUMflDfl
         COMMON/NUMBER/NUMBOU(13), NUMflDfl(9)
c—
c—      base  address common block
c—
         COMMON/PROCES/IflD103,IflDl£3, ITM03,ITM23

c—      timer failure common block
c—
         COMMON/TIMER/ITMH,ITMM,ITMS, ITMT,ITDH,ITDM, ITDS, ITST
c—
c—      main  program sleep block
c—
         COMMON/WRIT/IBPOLH,IBPOLM,IBPOLS, IBPOLT,IBCC, IBCH, IBCM,
         *IBCS,IBCT
c—
c—      <> 0 0 <> <> <> <> <> <> <> <> <> 0 0 <> 0  0 0 <> <> <> <> 0 <> <> 0 0 <> <> <> 0 <> <>
c—
c
c
c                DflTfl STATEMENTS flND DOCUMENTflTION
c
c

c—
c—      data  for  output  and  main timer  functions
c—      main  timer  in driver determines  how long program is to  run
c—      before  program  is  to exit  and restart,  this is usually  caused  by  a
c—      hand  shake  error.
c—
c—      ..M.    refers  to  main timer  in  main program
c—      ..D.    refers  to  timer  in dialing  section
c—      ...H    hours
c—      ...M    minutes
c—      ...S    seconds
c—      ...T    ticks
c—
c—      output takes place with  LTERM. this is decided in the main  program
                                    67

-------
 c__     by reading  one of the diagnostic bytes in locations "170-"177
 c—     [options are a disk file BOULDER.DflT or the job terminal]
 c—                                                             	

 c—
         DflTfl LTERM/3/ITMH,ITMM, ITMS, ITMT/0,10,0,0,/
         *ITDH,ITDM,ITDS,ITST/0, 5, 0, &/
 c	
 c—
 c—     telephone numbers and other address  data
 c—     nurnada  number for ada
 c—     numbou  number for boulder

         DflTfl NUMBOU/' 1',' 1',' 8', ' 0',' 0', ' 4',' 5', ' 7' ,' 8',' 0' , ' 9' ,' 3', "000/
         DflTfl NUMflDfl/' 1' , ' 3', ' 3' , ' £' , ' 8' , ' 8' ,' 1', ' 0' , "000/
 c—
 c—     first  "1" is to take phone  off hook  (TIMPLEX  dialer specific)
 c—
 c—     data for DTR (data terminal  ready) connects and hangs up phone
 c—     ILDTR    hangs up phone
 c—     IHDTR    connects phone so number can be  dialed
 c—
         DflTfl ILDTR/"144/IHDTR/"146/
 c—
 c—     address  data  for 1103 and 11£3
 c—     flD1103  base  address 1103
 c—     flDll£3  base  address 11£3
 c—     base addresses are used  to  calculate IflDPOK IflDPEK IPHONE
 c--     IPHONE=base
 c—     IflDPEK=base+£
 c—     IflDPOK=base+6
 c—
 c—     IflD 1103= "176500          remote terminal  >»  ITM03 = £
 c—     IflD 11 £3= "176530          remote terminal  >»  ITM£3 = 3
 c—
 c—     these  values  are used  in bouint  to determine  which proceesor
 c—     pdp  1103 or  pdp  11£3 that the  program  is  running  under.
 c—     the  proper assignments and conditions are then set.
 c—
         DflTfl IflD103/"176500/IflDl£3/"176530/ITM03/£/ITM£3/3/
 £ — — — —— — — — — —— — .——*___—__ — — —«-——— ————————.___ — .——..— ______„_______._______________	
 c—     data to  define file  names
 c—     file names are radix50 format  that is
 c—
 c—     DflTfl NflME/3RDEV,3RFILE,3RNfiM, 3RDflT/
 c—
 c—      which means file name  is called DEVsFILNflM. DRT  which follows
 c—     name is  an integer*£ array   name(4)
 cfile manipulations are done according to  those procedures
c—     outlined  in  RT-11 PROBRflMMERS REFERENCE  MftNUOL MflRCH  1981
c—     order no. flfl-H378fl-TC  Chapter 3 System  Subrountine Decryptions ad
c—     Examples.
                                    63

-------
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
The following subroutines are used during file operations:
CLOSEC SECTION 3.3
IENTER SECTION 3. £4
LOOKUP SECTION 3.74
IFREEC SECTION 3. £6
I6ETC SECTION 3. £7
IREOPN SECTION 3.44
ISOVES SECTION 3.45
IREflDW SECTION 3. 4£
IWRITW SECTION 3.60
The beginning block number of a file starts at block 0.
Do not reference a device only at block 0 as it is possible to thin
distroy the directory segment.


For a real*4 array the number of words
the array
per word.

Format for
where . =
M.BLK(4)
M. BLKL
M. BLKW


MflBLK<4)
• MBBLK(4)
MCBLK(4)
MDBLK(4)
MEBLK(4)
MFBLK(4)
MGBLK(4)
MHBLK<4)
MIBLK(4)
MJBLK(4)
MKBLK(4)
MLBLKC4)
MMBLK(4)
MNBLK(4)
MOBLK(4)
MPBLK(4)
MQBLK(4)
MRBLK(4)
MSBLK(4)

BOUDEV


is equal to
length * £ that is an array of 60 variables * £ bytes
[ 60*£=l£0words ]

naming variables to be used
R, B, C,D, etc.


with file operations

array to store file name
variable for length of
variable for length in

FILE NflMES LENBTH
BOUsBREflDD. DOT 1
BOU: BflVE01.DAT 1
BOU :BflVE£4. DflT £4
BOU :BflVEDL. DflT 90
BOU :BflVEDR. DflT 1
BOU: BflVEWK. DflT 7
BOU :BflVEWR. DflT 1
BOU:BflVEMN. DflT 30
BOU :BflVEMR. DflT 1
BOlhBPOLLD. DflT 1
BOU :BflLLRC. DflT 1
BOU: BflLLRD. DflT £00
BOU :BflCKUP. DflT 1
BOU :BSTflTS. DflT 1
****** EXTRfl FILES





the file in blocks
words of the read/write ary

WORDS COMMENTS
1£0 last reading
1£0 ace for hourly ave
i£0 staus bytes for BB
120 daily ave
£ rec num for da i lye
1£0 previous 7 days
£ rec num for prev y
1£0 previous 30 days
£ rec num for prev y
4 time to run
£ rec num for £00 rd
1£0 last £00 readings
1£0 backup for mablk
1£0 set points and vas
BELOW HERE ******





BOU: OPERflTIONS ON LOGICflL NflME BOU:


DOTfl MflBLK/3RBOU,3RBRE, 3RPIDD, 3RDflT/MftBLKL, MflBLKW/1, 1£0/
                            69

-------
DflTfl MBBLK/3RBOU, 3RBflV, 3REQ1, SRDflT/MBBLKL, MBBLKW/i,1£0/
DflTft MCBLK/3RBOU, 3RBflV, 3RES4, SRDflT/MCBLKL, MCBLKW/24,1£0/
DflTfl MDBLK/3RBOU,3RBflV, 3REDL, 3RDflT/MDBLKL, MDBLKW/90,1£0/
DflTft MEBLK/3RBOU, 3RBflV, 3REDR, SRDflT/MEBLKL, MEBLKW/i,£/
DflTfl MFBLK/3RBOU, 3RBflV, 3REWK, 3RDflT/MFBLKL, MFBLKW/7,1£0/
DflTft MSBLK/3RBOU, 3RBRV, 3REWR, SRDflT/MBBLKL, MGBLKW/1,£/
DflTft MHBLK/3RBOU,' 3RBflV, 3REMN, 3RDRT/MHBLKL, MHBLKW/30,1£0/
DflTfl MIBLK/3RBOU, 3RBflV, 3REMR, 3RDflT/MIBLKL, MIBLKW/1,£/
DflTfl MJBLK/3RBOU,3RBPO, 3RLLD, 3RDflT/MJBLKL,MJBLKW/1, 4/
DftTfl MKBLK/3RBOU, 3RBflL, 3RLRC, 3RD6T/MKBLKL, MKBLKW/1,£/
DflTft MLBLK/3RBOU, 3RBflL, 3RLRD, 3RDftT/MLBLKL, MLBLKW/£00,1£0/
DftTfl MMBLK/3RBOU,3RBflC, 3RKUP, 3RDRT/MMBLKL, MMBLKW/1, 1£0/
DflTfl MNBLK/3RBOU, 3RBST, SRflTS, 3RDOT/MNBLKL, MNBLKW/1,i£0/
DflTfl MOBLK/3RBOU,3R   , 3R   , 3RDflT/MOBLKL, MOBLKW/1, £/
c —
c —
c —
c —
c —
c —
c —
c —
. c —
c —
c —
c —
c —
c —
c—
c —
c —
c —
c
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
DflTft MPBLK/3RBOU, 3R
DflTfl MQBLK/3RBOU, 3R
DflTfl MRBLK/3RBOU, 3R
DflTfl MSBLK/3RBOU, 3R
DflTfl BOUDEV/3RBOU/
, 3R , SRDflT/MPBLKL, MPBLKW/ 1 , £/
,3R ,3RDflT/MQBLKL,MQBLKW/l,£/
, 3R , 3RDRT/MRBLKL, MRBLKW/ 1 , £/
,3R ,3RDflT/MSBLKL,MSBLKW/l,£/
boua is used for converting readings to valid
data values for BOUfl
Formula to calculate
degrees centigrade
Kl and K£ are


calibration £0-oct-83

plot sta depth
reference

1 1 3
1 1 3

1 £ 3
1 £ 3

1 3 3
133

1 30
1 30


£ 1 3
£ 1 3

£ £ 3
array
temperature is:
= ((freq/10. )+Kl)/K£
constants




freq. temp.
54.8 6

35. 37 38. 3
48.74 0.5

83. t£ 36.7
47.81 0.5

48. 59 35. 0
19.53 0.5

80. 54 33. 3
48.61 0.5


89. 67 £3. 9
67.89 0.5

flfl. ?A 5-7 •?
data








constant 1.
-4.88
-5. 84 1
-4.71
-4.82
-4. 76 £
-4.64
-4.73
-4. 68 3
-1.36
-1.90
-1.63 4
-4.7£
-4.81
-4. 76 5

-6.58
-6.74
-6. 66 6
-=! 7ft
                          70

-------
c—
c—
c—
c—
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
C'
c
C'
c
c
c

c-
c-
c-
c-
c-
c-
c-
c-
c—
c—
c—
       2
       2

       £
       £

       air
       air
                 3
                 3
   3
   3

   30
   30
   57.73

   76.31
   53. £4

   79.80
   59.51

   69. 14
   5£. 30
             0.5

             £3.3
             0.5

             £3.3
             0.5

             £1. 1
             0.5
            -5. 7£

            -5.30
            -5. £7

            -5.65
            -5.90

            -4.80
            -5. 18
                                                                 -5.71
                                                                 -5.£8   8
                                           -5.78
                                                                -4.99
                                                   10
        Statistics are used to determine the  allowable  ranges  and
          set points  for control
       statistics table  for  conductivity  sensors

         loc  array  mean  lower   upper    s.d.    s.e.
                                       median   cv
— conductivity

        pi1.1  1£   £094    1£59   3984
        pll.S  13   5370    1410  £4895
        pi1.3  14   3000    431  10748
        pl£.1  15  ££390   14905  £87£0
        pl£.£  16  11556    4£56  £0915
        pl£. 3  17   346£    1285   7051
— commercial conductivity
        pll.l  19
        pll.£  £0
        pll.3  £1
        pl£. 1  ££
        pl£. £  £3
        pl£.3  £4
14£8    904
 469    £81
 34£    £44
1755    778
 508    100
 335
£62
1753
3613
 410
3046
1354
1033
                       557
                      4543
                      £025
                      4400
                      4394
                      11£7
177
478
 33
71£
315
8£
                      39  £00   197£
                     3£1  £00    361
                     143  £00   £324
                     311  £00  £373£
                     310  £00   9628
                      79  £00   3231
                                                    13   £00
                                                    33   £00
                                                     £   £00
                                                    50   £00
                                                    ££   £00
                                                     6   £00
1456
 385
 347
1821
 502
 308
         NOTE: BOUfl is used to store the lower limit of reading
               BOUB is used to store the upper limit of reading
        DflTfl BOUR/-4. 88,-4. 825,-4.733, -1. 911, -4.812,
        +-&. 74£,-5.724,-5. 273, -5. 906, -5.189,
        + 1.0E+3,1259.,1410. ,431., 14905.,
        +4£56. , 1285. ,1., 904. ,281.,
        +244.,778.,100.,262., 1. OE+3/
                                                        15-10
                                                        !11-15
                                                        !16-20
                                                        !21-£5
                                 £6.6%
                                 84.6
                                 67.5
                                 19.7
                                 38.0
                                 3£.5
 12.4
102. 1
  9.5
 40.6
 62.2
 24.7
c—
c—
                                   71

-------
c —
c —
boub is used for converting readings to valid data
data values for BOUB array
DflTfl BOUB/0. 10, 0.0969, 0.0975, 0.08£3, 0.0983, ! 1-5
+0.0931,0.0989,0. 1018,0.0890,0.0818, 16-10
+ 1.0,3984. ,£4895., 10748. , £87£0. , 111-15

+£0915.
, 7051.,!., 1753., 3613. , ! 16-£«
+410. , 3046. , 1354. , 1033. ,1.07 ! £1-25
c —
c —
c —
c —

c 	
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —




data array initialization


DflTfl BOUDflT/60*0. /BDflTfl/60*0. /BOUT/60*0. 7NflRRflY/60/


Data and variables for conductivity and temperature readings

BCONL
BCONH
BRI
BTMPRF
BCONRF
BCONIN
BVOLTS
Bfll
BTMPHZ



low conductance test for conductance range
high conductance test for conductance range
(input resistor) conductivity bridge range resistor
reference temperature for temperance correction
reference values for range test
conductance by temperature for temp correction
output rms voltage of conductivity bridge multivibrator
— not used at present — set to 0.
frequency (kHz) of reference resistor for temp mod check
resistor gives reading of 56khz which equals 6 degrees c

DflTfl BCONL/1. /BCQNH/100. /BCONRF/1. 8£, 18. 18, 181. 81/

*BRI/1.
0E+03, 10.0E+03, 100. 0E+03/BVOLTS/1. /Bfll 700. /
*BTMPRF/£5. /BCONIN/0. 0£/BTMPHZ/6. /
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —

c —
c —
c —
c —
c —


Naming


convention for arrays which contain switches or channels
of sensors or pumps

M. . . .
N. ...
. B. ..
..TMP
..CON
..PRS
..PMP
..FFT

Initial

Channel
This is

switch or channels
number of switches
array is used for boulder program
temperature array
conductivity array
commercial conductivity array
pump array
flow frequency

ize arrays for temperature , conductivity, and pumps

number 9 is the location of the reference resistor
the same as IBREFR the reference resistor is used
:—      to determine if a problem exists in a given module.
                                  72

-------
c	
c—
c—      Conductivity    NBCON=rmmber of conductivities
c—
         DflTfl  MBCON/11,14,18,£1,24,28,"000/NBCON/6/
c—
c.	
c—
c—      Temperature     NBTMP=nurnber of temperatures
c—
         DflTfl  MBTMP/38,10,13,16,17,20,23,£6,£7,30/NBTMP/10/
c—
c	<
c—
c—      Pump  locations
c—
         DflTfl  MBPMP/36,37/NBPMP/£/
c—
c.	
c—
c—      Commercial conductivity locations
c—
         DflTfl  MBPRS/9,1£,15, 19, 2£, £5, E9/NBPRS/7/
c—
c.	

c—      Ranges for conductivity
c—
         DflTfl  MBCONR/£,3,4/NBCONR/3/
c—
c.	
c—
c—      Flow  frequency locations
c—
         DflTfl  MBFFT/34,35/NBFFT/2/
c—
c	

c—      Channel  locations  data  for  switches
c—
         DflTfl  IBCONB/0/IBCOO/1/IBFCI/5/IBVFI/6/IBVFO/7/IBTCM/8/IBREFR/9/
         *IBWS/31/IBMPR/32/IBPPR/33/IBPNIC/39/
c—
c	
c—
c—      Data  for pump  test DflC  (digital  analog  converter)
c—
         DflTfl  BFTDflC/99. 61, 0. 3906£75, 0., 0. /
c—
c—      BFTDflC(l)  base voltage  for  dac
c—      BFTDflC(2)  factor to multiply reading  by in binary  conversion
c—      BFTDflC(3)  ibit(7)  status of plot pump
                                   73

-------
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —

c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
BFTDflC(4> ibit(8) status of primary pump

bftdac(£> is calculated by the folowing:

bftdac(£> = 99.61/255 where £55 is all the possible
for a 8 bit digital chip <(£**8>-l)

the above values are used for a binary conversion of
reading to determine which pumps are on and whic are

DflC output readings


pump status voltage frequency


all off 9-96 99.6
manual plot £ relay 9.81 98.1
manual plot 1 relay 9.65 96.5
manual plot pump 9.34 93.4
manual primary pump 8.71 87.1
manual all on 7. 6£ 76. £
computer plot pump 7. 47 74. 7
computer primary pump 4.96. 49.6
computer primary and plot pump £. 46 £4. 6
all on 0. 1£ 1.2

#NOTE: Bits 1 and £ are not used and should always be
( bit 8 — > bit 1 ) 8765 43£1


Reference for channel locations


Variable Channel Comment
IBCONB 00 Conductance bridge
IBCOO 01 Conductance oscillator output
MBCONR(l) 0£ Cond Range x 0.01
MBCONR(£) 03 Cond Range x 0.1
MBCONR<3) 04 Cond Range x 1.0
IBFCI 05 Frequency counter input
IBVFI 06 Voltage/frequency input
IBVFO 07 Voltage/frequency output
IBTCM 08 Temperature conversion module
IBREFR 09 Reference resistor 5.46k
MBTMP(l) 10 Temperature Plot 1 station 1
MBCON(l) 11 Conductivity Plot 1 station 1
MBPRSU) 1£ Comm Cond. plot 1 station
MBTMP(£) 13 Temperature Plot 1 station £








cornbinat ions




the dac
off







*

bit pattern


0000
0000
0000
0001
0010
0011
0100
1000
1100
1111

zero

















3 crn

1
3 crn


0000
0100
1000
0000
0000
1100
0000
0000
0000
1100























74

-------
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c ~ •
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
MBCONC2)
MBPRS(£)
MBTMP(3)
MBTMP(4)
MBCON(3)
MBPRS(3)
MBTMP(5)
MBCON(4)
MBPRS<4)
MBTMP(S)
MBCON(5)
MBPRS(5)
MBTMP(7)
MBTMP<8>
MBCON(6)
MBPRS<6)
MBTMP(6)
I BUS
IBMPR
IBPPR

MBFFT ( 1 )

MBFFT(£)

MBPMP ( 1 )

MBPMP(£)



IBPNIC
array
there

BOUDftT ( 1 )
BOUDfiT(£>
BOUDAT(3)
BOUDOK4)
BOUDflT(5)
BOUDRK6)
BOUDftT(7)
BOUDflT(B)
BOUDfiTO)
BOUDftT<10)
BOUDftT (11)
BOUDflT(l£)
BOUDftT (13)
BOUDftT (14)
BOUDftT (15)
14 Conductivity Plot 1 station £
15 Cornm Cond. plot 1 station £
16 Temperature Plot 1 station 3 3 cm
17 Temperature Plot 1 station 3 30 cm
18 Conductivity Plot 1 station 3
19 Comrn Cond. plot 1 station 3
£8 Temperature Plot £ station 1 3 cm
£1 Conductivity Plot £ station 1
££ Comm Cond. plot £ station 1
£3 .Temperature Plot £ station £ 3 cm
£4 Conductivity Plot £ station £
£5 Comm Cond. plot £ station £
£6 Temperature Plot £ station 3 3 cm
£7 Temperature Plot £ station 3 3i3 cm
£fl Conductivity Plot £ station 3
£9 Comm Cond. plot £ station 3
38 ftmbient ftir temperature
31 Wind speed
3£ Main pump relay (normally open drain)
33 Plot pump relay (delay time before turning
on)
34 Plot 1 flow freq. transducer
(determines flow rate)
35 Plot £ flow freq. transducer
(determines flow rate)
36 Plot 1 valve current relay
(turns on valve controller)
37 Plot £ valve current relay
(turns on vave controller)
38 Reference resistor for temp check
(same as 09 but used to eliminate crossta)
39 flow test DflC converter
locations for boudat array
are presently 60 values in this array

reference temperature check
temperature plot 1 station 1 3 cm
temperature plot 1 station £ 3 cm
temperature plot 1 station 3 3 cm
temperature plot 1 station 3 30 cm
temperature plot £ station 1 3 cm
temperature plot £ station £ 3 cm
temperature plot £ station 3 3 cm
temperature plot £ station 3 30 cm
ambient air temperature
reference oscillator check
conductivity plot 1 station 1
conductivity plot 1 station £
conductivity plot 1 station 3
conductivity plot £ station 1
75

-------
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
r- IT ._
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
BOUDflT<16>
BOUDfiT(17)
BOUDflT(lS)
BOUDflT(19)
BOUDflT(£0)
BOUDfiT(£l)
BOUDfiT(££)
BOUDfiT(£3)
BQUDflT(£4)
BOUDflT<£5)
BOUDfiT(££)
BOUDftT<£7)
BOUDflT<£8)
BOUDflT(£9)
BOUDRH30)
BOUDftT(31)
BOUDftT(3£)
BOUDflT<33)
BOUDflT<34)
BOUDfiT(35)
BOUDflT(36)
BOUDOK37)
BOUDOT(38)
BOUDflT(39)
BOUDftT(40)
BOUDfiT(41)
BOUDflT(4£)
BOUDflT(43)
BOUDftT<44)
BOUDfiT(45)
BOUDflT(46)
BOUDflT(47)
BOUDflT<48)
BOUDflT<49)
BOUDftT(50>
BOUDftT(Sl)
BOUDflT(5£)
BOUDfiT(53)
BOUDOT<54)
BOUDfiT(55)
BOUDflT(56)
BOUDflT(57)
BOUDftT(58)
BOUDflT(59)
BOUDfiT(60)
bdata
array

BDflTfl(l)
BDflTfl(£)
conductivity plot £ station £
conductivity plot £ station 3
reference comm cond. check
comm cond. plot 1 station 1
comm cond. plot 1 station £
comm cond. plot 1 station 3
comm cond. plot £ station 1
comm cond. plot £ station £
comm cond. plot £ station 3
wind speed
main pump relay on (1) off (0)
DfiC reading after pumps status corrected
plot 1 flow rate
plot £ flow rate
plot 1 valve relay on (1) off (0)
plot £ valve relay on (1) off (0)
plot 1 time valve turned on
plot £ time valve turned on
plot 1 date valve turned on
plot £ date valve turned on
system time of previous read
system date of previous read
DflC reading coming into program (stability)
temp reading ave - probes out of range plot 1
temp reading ave - probes out of range plot £
cond reading ave - probes out of range plot 1
cond reading ave - probes out of range plot £
comm cond read ave - probes out of range plot 1
comm cond read ave - probes out of range plot £
average temperature plot 1
average temperature plot £
average conductivity plot 1
average conductivity plot £
average cornm. cond. plot 1
average cornm. cond. plot £
total time on plot 1
total time on plot £
ace flow plot 1 (in this period)
ace flow plot £ (in this period)
most recent time relay on plot 1
most recent time relay on plot £
most recent date relay on plot 1
most recent date relay on plot £
date to write ave to disk
counter for times thru always 1. used in ace file
array locations
for daily and hourly averages

reference temperature check
temperature plot 1 station 1 3 crn
76

-------
c —
c —
f- , J|;
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
C"~""
c —
c —
c —
c —
c —
c —
c —
c —
c —
BDflTft(3)
BDflTfl (4)
BDflTfl (5)
BDftTfl<6)
BDflTfl (7)
BDflTfl (8)
BDflTfl (9)
BDflTfl (10)
BDflTR (11)
BDflTfl <1£)
BDflTfl (13)
BDflTfl (14)
BDflTftUS)
BDflTfl (16)
BDflTfl (17)
BDflTfl (18)
BDflTfl (19)
BDflTfl (£0)
BDflTfl (£1)
BDflTfl <££)
BDflTfl (£3)
BDflTfl (£4)
BDflTfl (£5)
BDflTfl (£6)
BDflTfl (£7)
BDflTfl (£8)
BDflTfl (£9)
BDftTfl(30)
BDflTfl (31)
BDflTfl (3£)
BDflTfl (33)
BDflTfl (34)
BDflTfl (35)
BDflTfl (36)
BDflTfl (37)
BDfiTfl (38)
BDflTft(39)
BDflTfl (40)
BDflTfl(41)
BDftTfl(4£)
BDflTfl (43)
BDflTfl (44)
BDflTfl (45)
BDflTfl (46)
BDflTfl (47)
BDflTfl (48)
BDflTfl (49)
BDflTfl (50)
BDflTfl (51)
BDflTfl <5£)
BDflTfl (53)
BDflTfl (54)
temperature plot 1 station £ 3 cm
temperature plot 1 station 3 3 cm
temperature plot 1 station 3 30 cm
temperature plot £ station 1 3 cm
temperature plot £ station £ 3 cm
temperature plot £ station 3 3 cm
temperature plot £ station 3 33 cm
ambient air temperature
reference oscillator check
conductivity plot 1 station 1
conductivity plot 1 station £
conductivity plot 1 station 3
conductivity plot £ station 1
conductivity plot £ station £
conductivity plot £ station 3
reference comrn cond. check
comm cond. plot 1 station 1
comm cond. plot 1 station £
comm cond. plot 1 station 3
comm cond. plot £ station 1
comm cond. plot £ station £
comm cond. plot £ station 3
wind speed


plot 1 ave flow rate
plot £ ave flow rate
plot 1 times valve relay on
plot £ times valve relay on
plot 1 previous time valve on
plot £ previous time valve on
plot 1 previous date valve on
plot £ previous date valve on
system time of previous read
system date of previous read

temp reading ave - probes out of range plot 1
temp reading ave - probes out of range plot £
cond reading ave - probes out of range plot 1
cond reading ave - probes out of range plot £
comm cond read ave - probes out of range plot 1
comm cond read ave - probes out of range plot £
average temperature plot 1
average temperature plot £
average conductivity plot 1
average conductivity plot £
average comm. cond. plot 1
average comm. cond. plot £
total time on plot 1
total time on plot £
ace flow plot 1 ( this day)
ace flow plot £ ( this day)
77

-------
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
BDflTfl(55)       most recent time  relay on plot 1
BDflTfi(SS)       most recent time  relay on plot £
BDfiTfi(57)       most recent date  relay on plot 1
BDflTft(58)       most recent date  relay on plot £
BDflTft(5S)       date writen to disk
BDfiTfl(60)       counter for times thru
SETPTC  conductivity set point for  plots  (l)plot  1  (2)plot£
BCONfiV  ave for cond for each plot  (l)plot  1  (£)plot£
BTMPflV  ave for tmp for each plot  (l)plot 1  (£)plot£
BPRSfiV  ave for cornm cond for each  plot  
-------
c—
c—     KF..  —> FLAG           KB..    —>  CURRENT STATE
c—
c—     for flags i=on  [turn  pump  on]  0=off [turn pump off]
c—
c—     KFBR    flag  for relays   (1)  plotl  <£)  plots
c—     KFBP    flag  for pumps  [main  and  plot  purnps]
c—
c—     for current state  l=on  [ pump on]  0=off [ pump off]
c—
c—     KSBR    current state of relays (1)plotl  (2)plot2
c—     KSBP    current state of pumps [main and  plot pumps]
c—     KPUMP   array to store  pump channels which need to be turned on
c—     KCNT    counter to see  if  any pumps need  to be turned on
c—     KPC     counter to see  if  all pumps turned on
c—
£____	__	——
        DATA KFBR/£*0/KFBP/0/KSBR/£*0/KSBP/0/

c—
c—     time to wait  before rerunning program
c—     that is how often  should prrogram be run
c—
c—     IBPOLH  wait  in hours
c—     IBPOLM  wait  in minutes
c—     IBPOLS  wait  in seconds
c—     IBPOLT  wait  in ticks
c—
c—     for practical purposes  ticks  and  seconds  are not realistic
c—     time intervals  for boulder except  for debugging.
c—     hours and minutes  would  be used for the polling period.

        DATA IBPOLH, IBPOLM,IBPOLS, IBPOLT/0,5,0,0,/
c 	
c —
c —
c —
c ~ —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
octal constants


variable

LA
LB
LC
LR
LDLE
LQU
LLAS
LLACT
LTACT
LTAC
used

octal
value

"101
"10£
"103
11 1 £2
-ei£0
"077
"851
"175
"175
"11£
for control sequences


meaning

A
B (flTTENTION CLEAR)
C (INTERFACE CLEARCLOSE FOLLOWING CHANNEL)
R (REMOTE SET)
DLE (DATA LINK ESCAPE)
? (UNLISTEN)
) (LISTEN ADDRESS SCANNER)
> (LISTEN ADDRESS CONTROLLER)
> (TALK ADDRESS CONTROLLER)
J (TALK ADDRESS COUNTER)
                                   79

-------
c —
c —
c —
c —
c —
c 	
LLflC
LI
LF
LLF
LCR

"05£
"111
"106
"01£
"015

* (LISTEN flDDRESS COUNTER)
I (INITIATE)
F (FOR HflNDSHflKING)
LINE FEED
CflRRIGE RETURN

         DflTfl Lfl/"101/LB/"10£/LC/"103/LR/"l££/LDLE/"0£0/LQU/"077/
         *LLflS/"i351/LTflCT/"175/LLflCT/"175/LTflC/"ll£/LLfiC/"05£/
         *LI/"lll/LF/"106/LCR/"015/LLF/"eil£/
c 	
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c—
c —
timing values for control sequences for ISLEEP system subroutine
in RTLLI,RLLTI,RET

ITRH1
ITRM1
ITRS1
ITRT1
ITRT£
ITRT3

control

hours to wait
minutes to wait
seconds to wait
ticks to wait
ticks to wait
ticks to wait

sequences take from £-15 ticks for minimum turn around
depending upon the sequence sent
        DflTfl  ITRHl/0/ITRMl/0/ITRSl/0/ITRTl/£/ITRT£/7/ITRT3/15/

 c—
 c—     active diagnostic assignments
 c—
 c—     byte  locations for diagnostic data
 c—

 c-      VftRIflBLE      LOCATION  FUNCTION

 c—     JBDIO           "170    input/output device
 c—     JBDPBM          "171    program execution byte
 c—     JBDS1           "17£    main subroutine
 c—     JBDS£           "173    control or secondary subroutine
 c—     JBDCH1          "174    channel to be acted upon
 c—     JBDCH£          "175    override shutdown
 c—     JBDCTL          "176    control subroutine loacation
 c—     JBDERR          "177    error byte

 c—     MflIN SUBROUTINE DflTfl flSSIBNMENTS FOR JBDS1
 c—
 c—     VflRIflBLE        VflLUE           SUBROUTINE

 c—     JBDflL           10              BOUDOL   (phone dialing)
 c—      (+l>            11               passed timer o. k.
c        f+£)            1£               printed number o. k.
c*+3)            13               looks for carrier
c~~      <+4)            14               test carrier
                                   80

-------
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c—
c —
c —
c —
c —
c —
c —
c —
c~~
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
(+5)
JBTMP
JBWND
JBCON

JBPRS
JBFFT

JBERR

JBMflH


JBPMP



JBSTfi
JBTIM
JBDK1

JBSLP
JBPKC
JBINT

JBFfiL
SECONDflRY

VflRIflBLE
JBRTL
JBCHN
JBRLL
JBWRT
JBRET
JBRED
JBBIT
15
£0
3(3
40
41
50
60
61
70
71
80
81
8£
90
91
92
93
100
110
1219
121
130
140
150
151
£50
SUBROUTINE

VflLUE
10
£0
30
40
50
60
70


























succesful attach
BOUTMP (temperature)
BOUWND (wind speed)
BOUCON (conductivity)
BOUOSC (oscillator test)
BOUPRS (commercial conductivity)
BOUFFT (flow rate)
BOUDflC (digital-analog converter)
BOUER1 (error detection)
BOUER£ (shutdown)
BOUMH1 (calcs ave cond. )
BOUMH£ (calcs ave readings)
BOUMHT (calcs ave temp)
BOUPMP (manipulates pumps)
BOUPDC (checks sync of pumps)
BOUPFT (checks sync of relays)
BOUPFD (turns pumps off if error)
BOUSTfi (outputs current status)
BOUTIM (calcs time pumps on)
BOUDK1 (outputs info to disk fil)
BOUDK£ (daily ave file operation)
BOUSLP (calcs time ref for sleep)
BOUPKC (reset diag bytes)
BOUIN1 (sets operating condition)
BOUIN£ (sets operating condition)
BOUFflL (exit program restart fro)
DflTfl flSSIGNMENTS FOR JBDS2









miscellaneous data assignments

VflRIflBLE
JBDISK
JBTT
JBECON
JBEINT
JBETMP
JBEFFT
JBEDflL
JBEHND
JBEflDD

VflLUE
0
10
1
2
4
8
16
3£
64

LOG.
JBDIO
JBDIO
JBDERR
JBDERR
JBDERR
JBDERR
JBDERR
JBDERR
JBDERR

SUBROUTINE
BOURTL (sets cond so data read)
BOUCHN (decimal channel to octal)
BOURLL (open/close scanner chann)
BOUWRT (reads information at sit)
BOURET (channel command sent)
BOURED (disk operations)
BOUBIT (calcs bit status from wo)


FUNCTION
output to disk
output to terminal
error oscillator
error init disk read
error conductance board
error dac
error phone
error handshake
error err on backup write
81

-------
c —
c —
c —
c —
c —
JBESHT
JBOVR
JBWAIT
JBRUN
JBSLEP
128
1
10
SO
30
JBDERR
JBDCH2
JBGP6M
JBDPBM
JBDPBM
error shut down
override shut down
wait mode before starting
program running
sleep period
DATA JBDIO/"170/JBDPGM/"171/JBDS1/"1727JBDS2/"173/
*JBDCH1/"174/JBDCH2/"175/JBDCTL/"1767JBDERR/"177/
DATA JBDAL/10/JBTMP/20/JBWND/30/JBCON/40/JBPRS/50/
*JBFFT/60/JBERR/70/JBMAH/80/JBPMP/90/
*JBSTA/100/JBTIM/110/JBDK1/120/JBSLP/130/JBPKC/140/
*JBINT/150/JBFAL/250/
DATA JBRTL/10/JBCHN/20/JBRLL/30/JBWRT/40/
#JBRET/50/JBRED/60/JBBIT/70/
DATA JBDISK/0/JBTT/10/JBECON/1/JBEINT/2/JBETMPM/JBEFFT/8/
*JBEDflL/16/JBEHND/32/JBEflDD/64/JBESHT/128/JBOVR/l/JBWAIT/10/
«JBRUN/£0/JBSLEP/30/
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c--
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —




DIflGNOSTIC VftLUES FOR CONTROL SUBROUTINE RTLLI, RLLTI, RET
THESE ORE NflMED BOURTL.
THE SYSTEM DIRECTORY
FOR, BOURLL. FOR,

THESE VALUES ORE IN LOCATION "175 AND
PROGRAM. THEY ARE BYTE


VALUES AND NOT


value mnemonic octal

SUBROUTINE RTLLI
-„ *v*v*v*v

LISTEN ADDRESS COUNTER
7 #

ATTENTION CLEAR
e OLE


020
122


020
101


077


175


052


020


na
na


na
106


077


175


052


na

INITIALIZATN
RECEIVED




















                          82

-------
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
f*«_w
c —
c —
c —
c —
c —
c —
c —
c —
£===!===
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
r* - -TT-
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
9 B

SEND INITIATE
10 I

ATTENTION SET
11 DLE
1£ A

UNLISTEN
13 ?

TALK ADDRESS COUNTER
14 J

102


111


0£0
101


077


11£

na


111


na
106


077


11£

LISTEN ADDRESS CONTROLLER
15 >

ATTENTION CLEAR
16 DLE
17 B

ISSSZJS~ SS~~S~~SSS— SSS — —— *^~SS
SUBROUTINE RLLTI



INTERFACE CLEAR
18 DLE
19 C

REMOTE SET
£0 DLE
£1 R

ATTENTION SET
££ DLE
£3 A

UNLISTEN
£4 ?

TALK ADDRESS CONTROLLER
£5 >

LISTEN ADDRESS SCANNER
£6 )

ATTENTION CLEAR
£7 DLE
£8 B

175


0£0
10£

175


na
na

REMOTE LISTENER, LOCAL TALKER INITIAIZATIN
SETS CONDITIONS SO
OPENED AND CLOSED


0£0
103


020
12£


020
101


077


175


051

.
020
10£

SCANNER CHANNELS CAN BE



na
106


na
na


na
106


077


175


051


na
na

83

-------
c—     CLOSE FOLLOW IN6 CHflNNELS
c—     £9                C             1133             103

c—     SUBROUTINE RET          POKES fl CflRRIflGE RETURN flND LINE FEED
c—                             TELLS SCflNNER THflT fiLL COMMfiNDS HflVE BEENT
c—
c—     30                CR            015             015
c—
c	
        END

-------
        SUBROUTINE BOUCHK
c +
c I  Program  :     BOULD. REL
c I  Module   :     BOUCHK. FOR
c I  Function:     routine to output status information  for  debugging
c I
c
c
c
data common block
c—
c—      channel  switching common block
c—
         COMMON/CHAN/IBCONB,IBCOO, IBFCI, IBVFI,IBVFO, IBTCM, IBREFR,
         *IBWS, IBMPR, IBPPR,  IBPNIC, MBCONK7), NBCON, MBTMP < 10),
         *NBTMP,MBPMP(2),NBPMP,MBPRS(7), NBPRS,MBFFT <£),NBFFT,
         *MBCONR<3),NBCONR
c—
c—      data checking common block
c—
         COMMON/CONDCL/WINDMX,TEMPMN,BCONL,BCONH,BCONRF(3),BRI (3),
         *BVOLTS,Bfll,BTMPRF, BCONIN,BflVETP<£),BTMPHZ,RflNL,RflNH,BFTDftC(4)
c—
c—      control  character common block
c—
         COMMON /CONTRL/Lfl,LB,LC,LR,LDLE,LQU,LLftS, LTflCT, LLflCT, LTOC,
         *LLflC,LI,LF,LCR,LLF, ITRH1,ITRM1,ITRS1,ITRT1,ITRT£, ITRT3
c—
c—      diagnostic block
c—
         L06ICOL*!  LEVEL1,LEVELS,LEVELS,LEVEL4
         INTEBER#4  IlfiREfl,ISfiREfi
         COMMON  /DIflG/LEVELl(1B),LEVEL£(10), LEVELS(10),LEVEL4<10),
         *LTERM, ITERM, flTIMES,BTIMES,IODPOK, IflDPEK,IPHONE, ILDTR, IHDTR,
         *I IflREft<4),ISflREA(4),SYSTM1, SYSDflT,JBDI0,JBDPGM,JBDS1,JBDS£,
         *JBDCH1,JBDCH£, JBDCTL, JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
         #JBERR, JBMflH,JBPMP,JBSTfl, JBTIM, JBDK1, JBSLP, JBPKC,  JBINT,
         *JBRTL,JBCHN,JBRLL,JBWRT,JBRET, JBRED, JBBIT,JBFflL,JBDISK,JBTT,
         *JBECON,JBEINT,JBETMP,JBEFFT,JBEDftL, JBEHND,JBEflDD, JBESHT, JBRUN,
         *JBOVR,JBWflIT,JBSLEP
c—
c—      file  information  block
c—
         COMMON/FILE/BOUDEV,MflBLK(4), MBBLK(4),MCBLK(4),MDBLK(4),
         #MEBLK(4),MFBLK(4),MBBLK(4), MHBLK(4), MIBLK(4), MJBLK(4), MKBLK(4),
         *MLBLK(4),MMBLK(4),MNBLK(4),MOBLK(4),MPBLK(4),MQBLK(4),MRBLK(4),
         *MSBLK(4),
                                    85

-------
          *MflBLKL,MflBLKW, MBBLKL, MBBLKW, MCBLKL,
          *MCBLKW,MDBLKL,MDBLKW, MEBLKL, MEBLKW, MFBLKL, MFBLKW,M6BLKL,
          *M6BLKW,MHBLKL, MHBLKW, MIBLKL, MIBLKW, MJBLKL, MJBLKW,MKBLKL,
          *MKBLKW,MLBLKL,MLBLKW, MMBLKL, MMBLKW, MNBLKL,MNBLKW, MOBLKL,
          *MOBLKW, MPBLKL, MPBLKW, MQBLKL, MQBLKW, MRBLKL, MRBLKW, MSBLKL, MSBLKW
 c—
 c—      telephone  number  common  block
 c—
          L06ICflL*l  NUMBOU,NUMflDfl
          COMMON/NUMBER/NUMBOU(1£), NUMflDfl(9)
 c—
 c—      base address common block
 c—
          COMMON/PROCES/IflD103, IflDl£3, ITM03, JTM23
 c—
 c—      timer failure common  block
 c—
          COMMON/TIMER/ITMH, ITMM, ITMS, ITMT, ITDH, ITDM,ITDS,ITST
 c—
 c—      main program sleep block
 c—
         COMMON/WfllT/IBPOLH, IBPOLM, IBPOLS, IBPOLT, IBCC, IBCH, IBCM,
         *IBCS, IBCT
 c—
 c—      0 0 0 0 0  0 0 0 0 0 {> 0  <> <> <> <> <> <> {> {> <> <> <> <> {> {> <> <> <> <> <> <> <>
 c—
 c—     formfeed  to top of page
 B       WRITE (LTERM,55) "014
 c—
 c—     list  hierarchy
 c—
         WRITE (LTERM,52)
 52       FORMflT  (//,'  THE HIERflRCHY OF SUBROUTINES ftT  '/
         1' THE  TIME OF  PRINT  flRE: ')
         CflLL  PUTSTR (LTERM,LEVEL1)
         CflLL  PUTSTR (LTERM,LEVELS)
         CflLL  PUTSTR (LTERM,LEVELS)
 c—
 c—     list  boudat array
 c—
         WRITE  (LTERM,19)
         WRITE  (LTERM,£0)  (L, BOUDflT(L),L=1,60)
 c—
 c—     list averages and  set points
 c—
         WRITE  (LTERM,30)  (L,BCONflV(L), L,BTMPflV(L),L, BPRSflV(L),L=1, £)
         WRITE 
-------
        WRITE  (LTERM,65)  ((KSBR(L),L=l,£),KSBP)
        WRITE  (LTERM,70)  KTMPF,KCONF,KPRSF, KINTF, KWNDF, KFFTF
        WRITE  (LTERM,80)  NftRRflY, NPL,NPR,NBT1,NBT£,NBC1,NBC£, NBP1, NBP£
c—
        WRITE  (LTERM,55)  "014
        RETURN

c—
c—     format  statements
c—
c	
19      FORMflT  C  BOUDftT fiRRflY' )
£0      FORMfiT  (5(X, 13,'==>  ',F10. £))
55      FQRMfiT  (Ifil)
60      FORMfiT  C  FLOG =»  PLOT 1£,MflIN ',315)
65      FORMfiT  C  CURR STfiT =»  PLOT l£,MflIN ',315)
30      FORMfiT  C  BCONfiV, I1,F10.£,'     BTMPftV',11,
        *F10.£,'         BPRSftV, II, ,F10. £)
40      FORMfiT  C  SETPTC ',8F10.£)
50      FORMfiTC  LBCF',15, '      LBTF', 15,'       LBPF', 15)
70      FORMfiT  C  KTMPF', I£,5X, 'KCONF', 12, 5X, 'KPRSF', 12, 5X, 'KINTF', 12, 5X,
        *'KWNDF',12,5X, 'KFFTF', I£)
80      FORMfiT  CNflRRflY', 14, X,' NPL', 14, X,'NPR', 14, X,'NBT1', 14, X,
        *»NBT£', I4,X,'NBC1',I4, X,'NBC£', 14, X, ' NBP1', 14, X, 'NBP£',I4, )
        END
                                    87

-------
         SUBROUTINE BOUCON
 c +	
 c I  Program :     BOULD.REL
 c I  Module  :     BOUCON.FOR
 c I  Function:     Reads homemade commercial conductivity  probes
 c I
 c +	
 c—
 c—     data common block
 c-
aata common DIOCK

COMMON/BOULD/BOUDflT (60), BOUfl (£5), BOUB (£5), BDftTfi (63), BOUT (60),
*NflRRflY, BCONftV(£>, BTMPfW(£), BPRSflV (£), NPL, NPR, NBT1, NBT2, NBC1,
*NBC£,NBP1,NBP£,LBCF(£), LBTF(£), LBPF(£),SETPTC(£),LOCB,
*KFBR<£), KFBP, KSBR(£), KSBP, KTMPF, KCONF, KPRSF, KINTF "' •""- "m
*KPUMP<£)
                                                           ',KWNDF,KFFTF,
 c—
 c—     channel  switching common block
 c—
         COMMON/CHflN/IBCONB, IBCOO, IBFCI, IBVFI, IBVFO,IBTCM,IBREFR,
         *IBWS,IBMPR, IBPPR, IBPNIC,MBCON(7), NBCON, MBTMP(10),
         *NBTMP,MBPMP<£),NBPMP,MBPRS(7), NBPRS, MBFFT(£),NBFFT,
         *MBCONR(3),NBCONR
 c—
 c—     data checking common block
 c—
         COMMON/CONDCL/WINDMX, TEMPMN, BCONL, BCONH,BCONRF(3), BRI (3),
         *BVOLTS,BflI,BTMPRF,BCONIN,BflVETP(£),BTMPHZ, RflNL,_RflNH,BFTDflC(4)
 c—
 c—     control  character common block
 c—
         COMMON  /CONTRL/Lft, LB, LC, LR, LDLE, LQU, LLflS, LTflCT,LLfiCT,LTftC,
         *LLAC,LI, LF, LCR, LLF, ITRH1, ITRM1, ITRS1, ITRT1,ITRT£,ITRT3
 c—
 c—     diagnostic  block
 c—
         LOGICAL*! LEVEL1, LEVEL£, LEVELS, LEVEL4
         INTE6ER*4 IlflREfl,I£fiREft
         COMMON  /DIflS/LEVEL1(10), LEVEL£(10), LEVELS(10),LEVEL4(10),
         *LTERM, ITERM, OTIMES,BTIMES, IflDPOK, IflDPEK, IPHONE, ILDTR, IHDTR,
         *IlftREfl (4), I£flREfl (4), SYSTM1, SYSDflT, JBDIO, JBDP6M, JBDS1, JBDS£,
         *JBDCH1, JBDCH£, JBDCTL, JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
         *JBERR,JBMflH, JBPMP, JBSTfi, JBTIM, JBDKl, JBSLP, JBPKC,JBINT,
         *JBRTL, JBCHN,JBRLL,JBWRT, JBRET, JBRED, JBBIT, JBFflL, JBDISK, JBTT,
         «JBECON,JBEINT, JBETMP, JBEFFT, JBEDftL, JBEHND, JBEftDD, JBESHT,JBRUN,
         *JBOVR, JBWflIT, JBSLEP
c—
c—      	
c—
c—
c—      bg program diagnostics
c—
        CflLL IPOKEBUBDSl, JBCON)
                                   88

-------
c—
c—     timing  failure traceback
c—
        CflLL  SCOPY C  BOUCON', LEVELS)
        CflLL  SCOPY ('       ', LEVELS)
c—
c—     temporary diagnostics for debugging
c—
D       COLL  PUTSTR(LTERM, '  LOCATION:  ','0')
D       CftLL  PUTSTR(LTERM, LEVEL1,'  ')
D       CflLL  PUTSTR(LTERM,LEVEL2,'  ')
D       CRLL  PUTSTR
-------
        IF  (MFLflB.EQ. 1) BO TO £0
c—
c—     close conductance bridge
c—
        CALL BOUCHN  (IBCONB,MFLflB)
        IF  (MFLflB.EQ.1) BO TO £0
c—
c—     close specified channel
c—
        CflLL BOUCHN  (MBCON(L),MFLflG)
        IF  (MFLAB.EQ.1) BO TO £0
c—
c—     close range  selector
c—
        CflLL BOUCHN  (MBCONR(LTEST),MFLflG)
        IF  (MFLflB.EQ. 1) BO TO £3
c—
        CflLL RET (MFLflG) .'tells scanner  all  commands have been sent
        IF  (MFLflB.EQ.1) BO TO £0
c—
        CflLL RTLLI(MFLflG)        Isets conditions so data can be received
        IF  (MFLflB.EQ. 1) SO TO £0
c—
        CflLL WRITE(BOUDflT(LOCB),MFLflB)   !converts data to real*4 number
        IF  (MFLflB.EQ. 1) SO TO £0
c—
D       WRITE  
-------
        GOTO 30
40      WRITE (LTERM,41) L
41      FORMfiT  (////' PROBLEM IN CONDUCTIVITY RflNGE. CHANNEL  ',15,////)
30      CONTINUE
        RETURN
        END
                                   91

-------
         SUBROUTINE BOUDflC
 c  +	
 c  I  Program :     BDULD.REL
 c  I  Module  :     BOUDflC.FOR
 c  I  Function:     Reads Digital  to flnalog converter
 c  |               This gives an  indication on how stable the  dac  and relay
 c  |               in the switches are.  This value is compared to  that in
 c  I               BOUPDC.FOR  for the stability
 c  I
 c  |                Bit codes are explained in BOUDflT.FOR
 c  I
 c  +	
 c—
 c—     data common block
 c—
         COMMON/BOULD/BOUDflT(60), BOUfl(£5), BOUB(£5),BDflTfl(60), BOUT(60),
         *NflRRflY, BCONflV(£), BTMPfiV(£), BPRSflV (£), NPL, NPR, NBT1, NBT£, NBCi,
         *NBC£,NBP1,NBP£,LBCF(£), LBTF(£), LBPF(£), SETPTC(£),LOCB,
         *KFBR(£), KFBP, KSBR(£), KSBP, KTMPF, KCONF, KPRSF, KINTF, KWNDF, KFFTF,
         *KPUMP(£)
 c—
 c—     channel  switching common block
 c—
         COMMON/CHfWIBCONB, IBCOO, IBFCI, IBVFI, IBVFO, IBTCM, IBREFR,
         *IBWS,IBMPR, IBPPR, IBPNIC,MBCON(7), NBCON,MBTMP (10),
         *NBTMP,MBPMP(£),NBPMP, MBPRS(7), NBPRS, MBFFT(£),NBFFT,
         *MBCONR(3),NBCONR
 c—
 c—     data checking common block
 c—
         COMMON/CONDCL/WINDMX, TEMPMN, BCONL, BCONH,BCONRF(3),BRI (3),
         *BVOLTS, Bfll, BTMPRF, BCONIN, BflVETP (£), BTMPHZ, RflNL, RflNH, BFTDflC (4)
 c—
 c—     control  character common block
 c—
         COMMON  /CONTRL/Lft, LB, LC, LR, LDLE, LQU, LLflS, LTftCT, LLflCT,LTflC,
         *LLflC,LI,LF,LCR,LLF, ITRH1, ITRM1,ITRS1,ITRT1,ITRT£,ITRT3
 c—
 c—      diagnostic  block
 c—
         LOBICftL*! LEVEL1, LEVEL£, LEVELS, LEVEL4
         INTE6ER*4  IlfiREfl,I£flREO
         COMMON  /DIflG/LEVEL1(10), LEVELS(10), LEVELS(10), LEVEL4(10),
         *LTERM, ITERM, flTIMES,BTIMES, IfiDPOK, IflDPEK, IPHONE, ILDTR, IHDTR,
         *IlflREfl (4),I£flREfl(4), SYSTM1, SYSDflT, JBDIO, JBDPGM, JBDS1, JBDS£,
         *JBDCH1,JBDCH£, JBDCTL, JBDERR, JBDflL, JBTMP, JBWND, JBCON,JBPRS,JBFFT,
         *JBERR,JBMflH,JBPMP, JBSTfl, JBTIM, JBDK1, JBSLP, JBPKC,JBINT,
         *JBRTL,JBCHN,JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFflL, JBDISK,JBTT,
         *JBECON,JBEINT, JBETMP, JBEFFT, JBEDfiL, JBEHND, JBEflDD,JBESHT,JBRUN,
         *JBOVR, JBWflIT,JBSLEP
c—————————————~—	
c—
                                    92

-------
c—
c—      bits  common
c—
         COMMON/BITS/IBIT(16), IWORD
c—
         REftL*4  LABEL(4, 3)
         DftTfl  LflBEL/'Plot','Plot','Plot','Prim',
         *'  1  r','  £ r1,'  pum',' ary •,
         *'elay','elay','p   ','pump'/
c—
c—      diagnostic information
c—
c—      bg  diagnostics
c—
         COLL  IPOKEB(JBDS1, JBFFT+1)
c—
c—      timing  failure traceback diagnostics
c—
         CflLL  SCOPY C  BOUDflC', LEVELS)
         CflLL  SCOPY C       ',LEVELS)
c—
c—      temporary diagnostics
c—
D        COLL  PUTSTR(LTERM, '  LOCflTION:  ','0')
D        CflLL  PUTSTR
-------
         CflLL BOUCHN (IBVFO,MFLflG)
         IF (MFLflG.EQ.1)  60 TO £0
 c—
 c—     close DflC converter
 c—
         CflLL BOUCHN (IBPNIC, MFLflG)
         IF (MFLflG. EQ.1)  60 TO £0
 c—
 c—     finish control sequence
 c—
         CflLL RET(MFLflS)  !tells scanner all commands have been sent
         IF (MFLAG. EQ. 1)  60 TO £0
 c—
         CftLL RTLLI(MFLflG)        Isets conditions so data can be received
         IF (MFLflG. EQ. 1)  GO TO £0
 c—
         CflLL WRITE(BOUDflT(LOCB), MFLflG)   !converts data to real*4 number
         IF (MFLflG.EQ.1)  GO TO £0
 c—
 c—     check for zero condition
 c—     a zero may  not be a zero but  a bad reading ckeck and see
 c—
         ITRY=ITRY+1
         IF (ITRY.LE. 5 . flND.BOUDflT(LOCB)  . EQ.  0.) GOTO £0
 c—
 c—
 c—     check to see if  in proper range
 c—     if not go back and get  reading again
 c-—
         IF (BOUDflT(LOCB)  . LT.  0.0
         * .OR.  BOUDflT(LOCB)  .ST. 100.0)
         *   GOTO 19
         IF (BOUDflT(LOCB)  . EQ.  0.0)  GOTO  999
 c—
 c—     convert  reading
 c—•
         CflLC  = (BFTDflC(l)-BOUDflT(LOCB))/BFTDflC(£)
         IWORD=CflLC
         ZHOLD=DIM(CflLC, FLOflT(IWORD))
         IF (ZHOLD.GE. 0.5)  IWORD=IWORD+1
 C
         CflLL  BOUBIT
 c—
 c—      store  current status of  pumps  for  test  in  boufft
         BFTDflC(3)=IBIT(7)
         BFTDflC(4)=IBIT(B)
 c—
 c—      out put results for debug
 c—•
 D        WRITE(LTERM, 9000)  BOUDflT(LOCB), IWORD, SYSTMl,SYSDflT,LEVELS
c—
c—     check to see if any problems with  the readings
                                   94

-------
c—
c—      is  purnp  status correct
£*—*~
         IF  (KFBP .EQ.  IBIT(B)
         * .flND.  KFBP .EQ.  IBIT(7»
         *    GOTO 900
c—
c—      pumps out of sync
c—
         WRITE (LTERM,*) 'BOUDflC - Pumps out of sync'
         WRITE (LTERM,800)  KFBP, 
908      FORMflT (X,3fl4)
D9000    FORMflT 
-------
         SUBROUTINE DlflLT(NUMB)
c +-
c 1
c 1
c 1
c 1
c 1
c 1
c +-
c —
c —
c —
Program :
Module :
Function:




diagnost

BOULD. REL
BOUDflL. FOR
PHONE D I PILLING ROUTINE
phone number is in variable NUMB
phone number is assigned in main driver
	 +

ic block

         LOGICflL*! LEVEL1,LEVELS, LEVELS, LEVEL4
         INTEGER** IlflREfl,ISflREfl
         COMMON /DIfl6/LEVELl(10),LEVEL£(10),LEVEL3(10),LEVEL4(10),
         *LTERM, ITERM, flTIMES,BTIMES, IflDPOK, IflDPEK, IPHONE, ILDTR, IHDTR,
         *IlflREfl<4), I£flREfl<4), SYSTMl.SYSDflT, JBDIO, JBDPGM, JBDS1,JBDSS,
         *JBDCH1, JBDCH2, JBDCTL, JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
         *JBERR, JBMflH, JBPMP, JBSTfl, JBTIM, JBDK1, JBSLP, JBPKC, JBINT,
         *JBRTL, JBCHN, JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFflL, JBDISK, JBTT,
         *JBECON, JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD, JBESHT, JBRUN,
         *JBOVR, JBWflIT,JBSLEP
 c—
 c—     timer failure  common block
 c—
         COMMON/TIMER/ITMH, ITMM, ITMS, ITMT, ITDH,ITDM,ITDS,ITST
 c—
 c—***************************#*#*****#*#*****#*###*##***#**#**#
 c—
         EXTERNfiL  FOIL
 c—
 c—     set  bit configuration  and  counters
 c—
         DflTfl ITOGLE/"167777/ICNT1, ICNT2, ICNT3/0, 0,0/
 c—
 c—     tell  bg where you are
 c—
         CflLL IPOKEB  (JBDS1,JBDflL)        !passed timer o.k.
 c—
 c—     timing failure diagnostics
 c—
         CflLL  SCOPY C DIflL',LEVELS)
         CflLL  SCOPY (»      ', LEVELS)
 c—
 c—     temporary diagnostics for  debugging
 c—
 D        CflLL  PUTSTR(LTERM, '  LOCATION:  ','0')
 D        CflLL  PUTSTR(LTERM, LEVEL 1,'  ')
D        CflLL  PUTSTR(LTERM, LEVELS,'  ')
D        CflLL  PUTSTR(LTERM, LEVELS,'  ')
c—
                                   96

-------
c—
c—      following   line  set  and  test  timer to make sure there
c—      is a normal  return.  Timer  is  set  for 5 minutes.
c—      if communications with greenhouse takes longer than 5
c—      minutes  subroutine FOIL  is called.  Normal  communication time
c—      is about 0.5 minutes.
c—
         IF(  ITIMER  (ITDH, ITDM, ITDS, ITDT, I£flREfl, 3,FflIL).NE. 0)
         * WRITE  
-------
         IF  (ICNT3.GT.3) CflLL FflIL(3)  ! go  to  fail  and  restart  - phone probm
         60 TO 55
300      CONTINUE
c—
         CflLL IPOKEB  (JBDS1,JBDflL+5)     Isuccesful attach
c—
         CflLL MTDTCH  (ITERM)     Idetatch remote terminal
c—
         CflLL ICMKT<3, I2flREfl>    .'cancels timer
c—
         RETURN
c—
c—      format statements
c—
£00     FORMflT C  10 UNSUCCESSFUL  flTTEMPTS TO flTTflTCH THE TELEPHONE')
334     FORMflT C  DIftL TIMER DID NOT HflVE  NORMflL RETURN')
        END
                                 98

-------
        SUBROUTINE BOUDK1
c + ----------------------------------------------------------
c  I Program  :     BOULD. REL
c  I Module   :     BOUDK1.FOR
c  I Function:     WRITES DfiTfl TO STSTUS ftND ACCUMULATOR FILES
c  I
c
c
c
data common block
                                         ,BOUB(£5),BDflTO(60),BOUT(60),
                                         flV(£),NPL, NPR,NBT1,NBT£,NBC1,
                                         LBPF (£), SETPTC (£) ,'LOCB,
n i nni^ i *n i • fcpfcrfwi^n v \ L_ / • u t 11
*NBC£,NBP1,NBP£,LBCF(
*KFBR(£),KFBP,KSBR(£)
*KPUMP(£)
 c—
 c—
 c—
         LOGICAL*! LEVEL1,LEVELS,LEVELS, LEVEL4
         INTEBER*4 I1AREA,I£flREA
         COMMON /DIAG/LEVELK10), LEVEL£<10>, LEVEL3U0), LEVEL4Q0),
         *LTERM,ITERM,ATIMES,BTIMES,IADPOK, IflDPEK,IPHONE,ILDTR, IHDTR,
         *I10REfi(4),I£flREfl(4),SYSTM1,SYSDflT,JBDIO, JBDP6M, JBDS1, JBDS£,
         *JBDCH1,JBDCH£,JBDCTL,JBDERR, JBDflL,JBTMP,JBWND,JBCON,JBPRS,JBFFT,
         *JBERR, JBMflH,JBPMP,JBSTA,JBTIM,JBDK1, JBSLP, JBPKC, JBINT,
         *JBRTL,JBCHN,JBRLL,JBWRT,JBRET, JBRED, JBBIT, JBFflL, JBDISK, JBTT,
         *JBECON,JBEINT,JBETMP,JBEFFT,JBEDftL,JBEHND, JBEflDD,JBESHT, JBRUN,
         *JBOVR, JBWflIT,JBSLEP
 c—
 c—     file information block
 c—
         COMMON/FILE/BOUDEV,MftBLK(4), MBBLK(4), MCBLK(4),MDBLK(4),
         *MEBLK(4), MFBLK(4),MBBLK(4), MHBLK(4), MIBLK(4), MJBLK(4),MKBLK(4),
         *MLBLK(4), MMBLK(4), MNBLK(4), MOBLK(4), MPBLK(4), MQBLK(4),MRBLK(4),
         *MSBLK(4),
         *MflBLKL,MfiBLKW,MBBLKL,MBBLKW, MCBLKL,
         #MCBLKW,MDBLKL,MDBLKW,MEBLKL,MEBLKW,MFBLKL,MFBLKW,MSBLKL,
         *M6BLKW,MHBLKL,MHBLKW,MIBLKL,MIBLKW, MJBLKL, MJBLKW, MKBLKL,
         *MKBLKW,MLBLKL,MLBLKW,MMBLKL,MMBLKW, MNBLKL,MNBLKW, MOBLKL,
         *MOBLKW,MPBLKL, MPBLKW,MQBLKL,MQBLKW,MRBLKL,MRBLKW,MSBLKL,MSBLKW

 c—
 c—     bg  diagnostic traceback
 c—
         CflLL  IPOKEB  (JBDS1,JBDK1)
 c—
 c—     timing failure  traceback
 c—
         CflLL  SCOPY C BOUDK1     »,LEVEL£)
 c—
c—      tempory diagnostics for debugging
c—
                                   99

-------
 D       CflLL PUTSTR(LTERM,' LOCflTION:  ','0')
 D       CflLL PUTSTR(LTERM,LEVEL1,'  ')
 D       CflLL PUTSTR(LTERM, LEVELS.1,'  ')
 D       CftLL PUTSTR
-------
c—     averages and  flags
c—
        DO 35, 1=39, 54
35      BOUT(I)=BOUT(I)+BOUDAT(I)
c—
c—     disk write and ace  counter
c—
        DO 34, 1=55,NflRRRY-1
34      BOUT(I)=BOUDAT(I)
        BOUT(NARRAY)=BOUT(NflRRAY)+BOUDflT(NARRAY)
c—
c—     write  data,close  file  and check for errors
c—
        CALL BOURED(MBBLK,BOUT,MBBLKW/2, MBBLKW,0,'WR','CL',LERR)
        IF  (LERR.NE.0) GOTO 1001
c—
c—     keep  last  mlblkl  readings
c—     block  numbers run from 0-199 for a £00 block file
c—     so to  test  for end  must subtract  one from file length
c—
510     flLBLK=0
        COLL  BOURED(MKBLK,RLBLK,MKBLKW/£,MKBLKW, 0,' RE' ,' BO' ,LERR)
        IF  (LERR.NE. 0) GOTO 1106
        LBLK=flLBLK
        CALL  BOURED(MLBLK,BOUDflT,MLBLKW/£, MLBLKW,LBLK,'WR', 'BO',LERR)
        IF  (LERR.NE. 0) GOTO 1107
        ALBLK=ALBLK+1
        IF  (ALBLK.GT. (MLBLKL-D) flLBLK=0
        CALL  BOURED(MKBLK, ALBLK, MKBLKW/£,MKBLKW, 0,' WR' ,' BO' , LERR)
        IF  (LERR.NE.0) GOTO 1108
40      RETURN

c—     error  messages
c	~	~—~	~      ~
c—
1000    WRITE  (LTERM,*)'DK1-ER MBBLK'
        GO TO  40
1001    WRITE  (LTERM, *) 'DK1-EW MBBLK'
        GO TO  40
1005    WRITE  (LTERM,*) 'DK1-EW MflBLK'
        GOTO 80
1006    WRITE  (LTERM,*) 'DK1-EW MMBLK'
        GOTO 81
1106    WRITE  (LTERM,*) 'DK2-ER MKBLK'
        GO TO  40
1107    WRITE  (LTERM,*) 'DK£-EW MLBLK'
        GO TO  40
1108    WRITE  (LTERM,*) 'DK£-EW MKBLK'
        GO TO  40
        END
                                   101

-------
         SUBROUTINE BOUDK£
                                                       __ -_!_, -, ___ -_^^ —
 c + ------------------------------------------  -
 c I  Program  :    BOULD. REL
 c I  Module   :    BOUDK£.FOR                               ,-T, «
 c I  Function:    WRITES DflTfl TO DfllLY  PECULATOR ftND DflTfl FILES
 c I
 c + -------------------------------------------------------
 c —
 c —
*NflRRflY, BCONflV<£), BTMPflV<£), BPRS
*NBC£, NBP1, NBP£, LBCF (£) , LBTF (2) ,
*KFBR <£) , KFBP, KSBR (£) , KSBP, KTMPF,
*KPUMP(£)
         *KPUMP(£)
 c —
 c —     diagnostic block
 c —
         LOG I COL* 1 LEVEL 1 , LEVEL£, LEVELS, LEVEL4
         INTEGER*4 IlftREA, I£fiREfl
         COMMON /DIflG/LEVELK10),LEVEL£<10),LEVEL3(10),LEVEL4U0),
         *LTERM, ITERM, flTIMES.BTIMES, IflDPOK, IflDPEK, IPHONE, ILDTR, IHDTR,
         *IlflREfl (4) , I£flREfl<4) , SYSTM1, SYSDflT, JBDIO, JBDPGM, JBDS1, JBDS£,
         *JBDCH1, JBDCH£, JBDCTL, JBDERR, JBDftL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
         #JBERR, JBMflH, JBPMP, JBSTA, JBTlM, JBDK1, JBSLP, JBPKC, JBINT,
         *JBRTL, JBCHN, JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFfiL, JBDISK, JBTT,
         *JBECON, JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD, JBESHT, JBRUN,
         *JBOVR, JBWflIT, JBSLEP
 c —
 c —     file information block
 c —
         COMMON/FILE/BOUDEV, MflBLK (4) , MBBLK (4) , MCBLK (4) , MDBLK (4) ,
         *MEBLK (4) , MFBLK (4) , MGBLK (4) , MHBLK(4) , MIBLK <4) , MJBLK (4) , MKBLK (4) ,
         *MLBLK(4) , MMBLK (4) , MNBLM4) , MOBLK(4) , MPBLK (4) , MQBLK (4) , MRBLK (4) ,
         *MSBLK(4),
         *MflBLKL, MfiBLKW, MBBLKL, MBBLKW, MCBLKL,
         *MCBLKW, MDBLKL, MDBLKW, MEBLKL, MEBLKW, MFBLKL, MFBLKW, MGBLKL,
         *MGBLKW, MHBLKL, MHBLKW, MIBLKL, MIBLKW, MJBLKL, MJBLKW, MKBLKL,
         *MKBLKW, MLBLKL, MLBLKW, MMBLKL, MMBLKW, MNBLKL, MNBLKW, MOBLKL,
         *MOBLKW, MPBLKL, MPBLKW, MQBLKL, MQBLKW, MRBLKL, MRBLKW, MSBLKL, MSBLKW
 c —
 Q— — ----------- _ — «.«.«. ------- . ____________ ___„_ _ M_ _ _ _ ^M_«.«.^. „._„__ ____ ^.
 c —
 c —     diagnostic section
         CALL  IPOKEB  (JBDS1, JBDK1+1)
         CflLL  SCOPY  C BOUDK2 ',LEVEL£)
 D        CftLL  PUTSTR(LTERM, '  LOCfiTION:  ','0')
 D        CflLL  PUTSTR(LTERM, LEVEL1,1  »)
 D        CflLL  PUTSTR(LTERM, LEVELS,!  ')
 D        CflLL  PUTSTR(LTERM, LEVELS,'  ')
c — •
c —      initialize temporary array
                                    102

-------
c—     check to see  if  any  file  needs operated on
c—
        IF  (SYSDftT.EQ. BOUDflT<59))  RETURN
c—
800     BOUDftT < 59)=SYSDflT
c—
c—     clear out array    (be  sure)
c—
        DO  44,I=l,NORRflY
44      BDflTfi
-------
         IF  
-------
        BO TO 500
1101     WRITE (LTERM,*) 'DK2-EW MDBLK'
        BO TO 500
110£     WRITE (LTERM,*) 'DK2-EW MEBLK'
        BO TO 500
1103     WRITE (LTERM,*) 'DK2-ER MBBLK'
        BO TO 510
1104     WRITE (LTERM,*) 'DK2-EW MFBLK'
        BO TO 510
1105     WRITE (LTERM,*) 'DK2-EW MBBLK'
        BO TO 510
1106    WRITE (LTERM,*) 'DK2-ER MIBLK'
        BO TO 41
1107    WRITE (LTERM,*) 'DKS-EW MHBLK'
        BO TO 41
1108    WRITE (LTERM,*) 'DK2-EW MIBLK'
        BO TO 41
1110    WRITE (LTERM,*) 'DK2-EW MBBLK'
        BO TO 41
        END
                                   105

-------
         SUBROUTINE BOUER1
c + 	
c 1 Program
c 1 Module
c 1 Function
c 1
c 1
c + 	
c —
c — data
c —
: BOULD. REL '
: BOUER1.FOR '
: TEST DflTfl MODULES ERROR FLflGS TO DETERMINE 1
SEVERITY OF DETECTED ERRORS 1
I
common block

         CQMMON/BOULD/BOUDflT<60), BOUfl<£5> ,BOUB(£5) ,BDflTfl(60>, BOUT(60),
         *NflRRflY,BCONftV(£), BTMPfiV<£), BPRSflV<£) ,NPL, NPR,NBTi,NBT£, NBC1,
         *NBC£, NBP1,NBP£,LBCF<£), LBTF(£), LBPF(£), SETPTC(£),LOCB,
         *KFBR (£), KFBP, KSBR(£), KSBP, KTMPF, KCONF, KPRSF, KINTF, KWNDF, KFFTF,
         *KPUMP<£)

 c—      channel  switching  common block
 c—
         COMMON/CHftN/IBCONB, IBCOO, IBFCI, IBVFI, IBVFO, IBTCM, IBREFR,
         *IBWS,IBMPR, IBPPR, IBPNIC,MBCON(7), NBCON,MBTMP(10),
         *NBTMP, MBPMP (£), NBPMP, MBPRS (7), NBPRS, MBFFT (£), NBFFT,
         *MBCONR(3),NBCONR
 c—
 c—      control  character  common block
 c—
         COMMON /CONTRL/Lfl, LB, LC, LR, LDLE, LQU, LLflS, LTftCT, LLfiCT,LTfiC,
         *LLflC,LI,LF,LCR,LLF, ITRH1, ITRM1, ITRS1, ITRT1,ITRT£,ITRT3
 c—
 c—      diagnostic  block
 c—
         L06ICflL*l LEVEL1,LEVEL£, LEVELS, LEVEL4
         INTE6ER*4 IlflREfl,I£flREft
         COMMON /DIfl6/LEVELl(10), LEVEL£(10>, LEVEL3U0), LEVEL4<10),
         *LTERM, ITERM,flTIMES,BTIMES, IflDPOK, IflDPEK,IPHONE,ILDTR, IHDTR,
         *I IflREO(4),I£flREfl(4), SYSTM1, SYSDflT, JBDIO, JBDP6M,JBDS1,JBDS£,
         *JBDCH1,JBDCH£,JBDCTL, JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS,JBFFT,
         *JBERR,JBMflH,JBPMP, JBSTfl, JBTIM, JBDK1, JBSLP, JBPKC, JBINT,
         *JBRTL,JBCHN,JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFflL, JBDISK,JBTT,
         *JBECON,JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD,JBESHT,JBRUN,
         *JBOVR, JBWflIT,JBSLEP
c—
c—      file  information block
c—
        COMMON/FILE/BOUDEV, MftBLK(4), MBBLK(4), MCBLK(4),MDBLK(4),
        *MEBLK(4),MFBLK(4), MBBLK(4), MHBLK(4), MIBLK(4), MJBLK(4),MKBLK(4),
        *MLBLK(4),MMBLK(4), MNBLK(4), MOBLK(4), MPBLK(4),MQBLK(4),MRBLK(4),
        *MSBLK(4),
        *MflBLKL,MflBLKW, MBBLKL, MBBLKW, MCBLKL,
        *MCBLKW, MDBLKL, MDBLKW, MEBLKL, MEBLKW, MFBLKL,MFBLKW, MSBLKL,
        *M6BLKW, MHBLKL, MHBLKW, MIBLKL, MIBLKW,MJBLKL,MJBLKW, MKBLKL,
        *MKBLKW, MLBLKL, MLBLKW, MMBLKL, MMBLKW,MNBLKL,MNBLKW, MOBLKL,
                                   106

-------
        *MOBLKW, MPBLKL, MPBLKW, MQBLKL, MQBLKW, MRBLKL, MRBLKW, MSBLKL, MSBLKW
c—
c—     bg  diagnostic  traceback
c—
        CflLL  IPOKES (JBDS1,JBERR)
c—
c—     timing  failure traceback
c—
        CflLL  SCOPY C  BOUERR', LEVELS)
        CflLL  SCOPY C        ',LEVELS)
c—
c—     temporary debugging diagnostics
c—
D       CftLL  PUTSTR(LTERM,'  LOCflTION:  ','0')
D       CftLL  PUTSTR(LTERM,LEVEL1,'  ')
D       CftLL  PUTSTRtLTERM,LEVELS,'  ')
D       CftLL  PUTSTR(LTERM, LEVEL3,'  ')

c—
c—     test  error flags
c—      if  not  error flags set return

         IF  (KCONF.EQ.0 .flND.  KTMPF.EQ.0 .AND.  KPRSF.EQ.0)
        * RETURN
c	
c—
c—     check all values to determine if scanner or measuring system faile
c—
c—     LVflR  -  total number of sensors (cond,  temp,  cornrn.  cond. )
c—      IVOR  -  counter to find out  how mant temp sensors are bad
c—              temp sensors are bad if all read £0.  degrees C
c—
c—     Sensors for cond and comrn.  cond.  are checked  to see if they are
c—     0.  This indicates that some piece of  equipment is faulty
c—     possibly the measurement system
c	
c—
c—     nbtmp=number of temperatures
c—     1=  oscillator
c—     nbprs=number of comm  cond probes
c—
40      LVflR=(NBTMP+l+NBPRS)
        IVflR=0   UNIT  TO  0
c—
c—     check temp  sensors
c—     check comm.cond and cond probes and oscillator

        DO 43 1=1,LVflR
43      IF  (BOUDflT(I).EQ. 0. )  IVflR=IVflR+l
c—
c—     how many sensors  were  bad
c—     all ??  whole system down
                                   107

-------
c—
c—
part??  check that part
c—
c—
c—
c—
c—
c—
        IF (IVflR. NE. LVflR)
        WRITE  (LTERM,4£)
        RETURN
                  RETURN
section to test oscillator
        IF  (KCONF.EQ.0. ) BOTO £0
60      IF  (KCONF.BE. 1) WRITE (LTERM,61)
        IF  (KCONF.BT.1) WRITE  (LTERM,66)
                                         !IF £
c—
c—
c—
c—
c—
£0
temp module failure ?????
possible scanner failure
if temp mod failure make temp eq £0
IF (KTMPF.EQ.0) 60TO 30
IF (KTMPF.BE.1) WRITE  (LTERM,£1)
IF (KTMPF.BE. 1) WRITE  (LTERM,£3)
IF (KTMPF.ST.1) WRITE  (LTERM,££)
c 	
c —
c —
c —
c —
30
section to test where conductance problem
IF (KPRSF. EQ.0) BO TO 50
is in bouprs

        IF (KPRSF.BE.1) WRITE(LTERM,31)
        IF (KPRSF.BT.1) WRITE  (LTERM,36)
c 	
c —
c —
c —
c —

50
c —
c —

4£
61
66
£3
£1
££
31
36
was ternp only problem?
check in second part of subroutine

RETURN

format

FORMflT
FORMflT
FORMflT
FORMflT
FORMflT
FORMflT
FORMflT
FORMflT






statements

C
C
C
C
C
C
C
('

SCflNNER OR MEflSURINS SYSTEM FfllLURE' )
OSCILLflTOR PROBLEM ' )
BflD OSCILLflTOR1 )
REFERENCE TEMPERftTURE OUT OF RflNBE' )
TEMPERflTURE MODULE CHECK' )
TEMPERflTURE MODULE FfllLURE')
CONDUCTflNCE PROBLEM WITH COMMERCIflL PROBES' )
BflD OSCILLflTOR' )
                                    108

-------
END

-------
        SUBROUTINE  BOUER£
c +	
c  I Program  :     BOULD.REL
c  I Module   :     BQUER£.FOR
c  I Function:     SHUT  DOWN SYSTEM IF SEVER ERROR IN DfiTfl MODULES
c  I
c +	
c—
c—     data common block
c—
        COMMON/BOULD/BOUDflT(G0),BOUA<£5),BOUB<£5),BDflTA(&iZl>,BOUT(6(Zi),
        *NflRRflY,BCONflV<£), BTMPfiV(£), BPRSflV<£> ,NPL, NPR, NBT1, NBT£,NBC1,
        *NBC£,NBP1,NBP£, LBCF<£), LBTF <£), LBPF(2), SETPTC<£),LOCB,
        *KFBR(£),KFBP,KSBR(2), KSBP, KTMPF, KCONF, KPRSF, KINTF, KWNDF,KFFTF,
        *KPUMP(£>
c—
c—     channel  switching common block
c—
        COMMON/CHflN/IBCONB, IBCOO, IBFCI, IBVFI, IBVFO, IBTCM, IBREFR,
        *IBWS, IBMPR, IBPPR, IBPIMIC,MBCON(7), NBCON, MBTMP(10),
        *NBTMP,MBPMP<£), NBPMP, MBPRS(7), NBPRS, MBFFT(£), NBFFT,
        *MBCONR(3),NBCDNR
c—
c—     control  character common block
c—
        COMMON /CONTRL/Lfl, LB, LC, LR, LDLE, LQU, LLfiS, LTflCT,LLftCT,LTflC,
        *LLflCvLI,LF,LCR,LLF, ITRH1, ITRM1, ITRS1, ITRT1,ITRT2,ITRT3
c—
c—     diagnostic  block
c—
        LOGICAL*! LEVEL1,LEVEL£, LEVELS,LEVEL4
        INTEGER*4 IlflREfl,I£AREfl
        COMMON /DIflG/LEVELl(10), LEVEL£(10), LEVEL3(10), LEVEL4(10),
        *LTERM, ITERM, flTIMES,BTIMES, IflDPOK, IflDPEK, IPHONE, ILDTR, IHDTR,
        *IlflREfl(4),I£flREfl(4),SYSTMl,SYSDflT, JBDIO, JBDPBM, JBDS1, JBDS£,
        *JBDCH1, JBDCH£, JBDCTL, JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
        *JBERR, JBMflH, JBPMP, JBSTfl, JBTIM, JBDK1, JBSLP, JBPKC,JBINT,
        *JBRTL,JBCHN, JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFflL, JBDISK,JBTT,
        *JBECON, JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD, JBESHT, JBRUN,
        *JBOVR, JBWflIT,JBSLEP
c—
c—     file information  block
c—
        COMMON/FILE/BOUDEV, MflBLK(4), MBBLK(4), MCBLK(4),MDBLK (4),
        #MEBLK(4), MFBLK(4), MBBLK(4), MHBLK(4), MIBLK(4), MJBLK(4),MKBLK (4),
        *MLBLK (4), MMBLK (4), MNBLK (4), MOBLK (4), MPBLK (4), MQBLK (4), MRBLK (4),
        *MSBLK(4),
        *MflBLKL,MflBLKW, MBBLKL, MBBLKW, MCBLKL,
        *MCBLKW,MDBLKL, MDBLKW, MEBLKL, MEBLKW, MFBLKL,MFBLKW,MGBLKL,
        *MGBLKW,MHBLKL, MHBLKW, MIBLKL, MIBLKW, MJBLKL, MJBLKW,MKBLKL,
        *MKBLKW,MLBLKL, MLBLKW, MMBLKL, MMBLKW, MNBLKL,MNBLKW, MOBLKL,
        *MOBLKW,MPBLKL, MPBLKW, MQBLKL, MQBLKW, MRBLKL,MRBLKW, MSBLKL, MSBLKW
                                   no

-------
c—
c—
•c—
         DflTfl  IBELL /"007/
         KCNT=0
         KCP=0
c—
c—
c—
         CflLL  IPOKEB (JBDS1,JBERR+1)
c—
c—
c—
         CflLL  SCOPY C  BOUER2', LEVELS)
         COLL  SCOPY C        ',LEVELS)
c—
c—
c—
D        CflLL  PUTSTR(LTERM, '  LOCftTION:  ','8')
D       .CflLL  PUTSTR(LTERM, LEVEL!,'  ')
D        CflLL  PUTSTR(LTERM, LEVELS,1  ')
D        CflLL  PUTSTR(LTERM, LEVELS,'  ')

 c—
 c—      was temp only problem?
 c—
 c	
 50      IF (KTMPF.LE.1 . flND.KCONF.EQ. 0 . ftND.
         * KPRS.EQ. 0)  RETURN

 c—
 c—      shut  down system
 c—

 100      WRITE (LTERM,101)
 101      FORMflT (///,'  System shuting down to to failure of
         ^equipment',/,'  see BOULD.DflT for reason',///)
c	
c—
c—      check to see  if pumps on
c—      if on turn off
c—
c	
c—
c—      if override byte  set do not  shut  down
c—

c—      override  turned on  for  debugging  remove for normal execution
         IF (IPEEKB(JBDCH£).NE. JBOVR)  GOTO 1£0
         WRITE (LTERM,*) 'Override byte set'
         RETURN
                                    111

-------
  c—
  c—     see if any pumps need to be turned off
  c—
  1£0     IF (KINTF. GT. 13)  60TO 9

  c—
  c—     no pumps  need  be off
  c—     if 0  pump is off
  c—     if 1  pump is on
  c—
  c	
          RETURN
  C? [[[
  C[[[
  C[[[
          IF (KFBP.EQ. 0) GOTO  108
  c•'    ~"~*~	
  c—
  c—      some pumps need  be off
  c—
  c	
  150      CflLL RLLTI(MFLflG)
          IF  (MFLflG. EQ. 1)  GOTO 150
 c—
         KPC=0   linit purnp locator ie which purnp to  turn on/off
 c—
 c—     turn off main pump and plot pump
 c—
         CflLL BOUCHN(IBMPR, MFLflS)
         IF (MFLflG.EQ.1) GOTO ISO
 c—
 c—      turn off plot  purnp
 c—
         CflLL BOUCHN(IBPPR,MFLflG)
         IF (MFLflG.EQ.1)  GOTO 150
 c—
 c—      calculate  which plot  relay is to acted upon
 c—
 150      KPC=KPC+1
 c—
 c—      does this  relay need  turned off
 c—      no   —>  go check  if  that  is all the relays

-------
c—     is this all the relays?
c—     no —) do  it again
c—     yes —> close  the channels
c—
170     IF  (KPC. LT. KCNT) GOTO  160
c—
c—     close the  channels  now
c—
        CflLL RET(MFLAB)
        IF  (MFLflG.EQ. 1) SOTO  150
c—
c—     reset current  state of pumps for future reference
c—
        BOUDflT<30)=0
        BOUDflT(31>=0
        BOUDflT(26)=0
        BOUDflT<£7)=0

c—
c—     write to  disk  file  information on pumps
c—
c	
        CflLL BOURED  (MflBLK,BOUDftT, MflBLKW/2,MflBLKW,0,'WR','BO',IERR)
        IF  (IERR.NE.0)  GOTO 900
        GOTO 108
c—
c—     error on  write to main disk file
c—
900     WRITE  (LTERM,*> 'Error on main file write in BOUER£'
        WRITE  (LTERM,*) 'Backup  file was used'
        CflLL BOURED  (MMBLK,BOUDflT, MMBLKW/2, MMBLKW,0,' WR',' BO' ,IERR)
        IF  (IERR.EQ.0)  GOTO 106
c—
c—     error on  write for  backup
c—     tell background program
c—
        WRITE  (LTERM,*) 'Error on backup read.  '
        IPOK=(IPEEKB(JBDERR))+JBEADD
        CflLL IPOKEB(JBDERR,IPOK)
        GOTO 108

c—     error flag set so no action  taken
c—
9       WRITE (LTERM,*) 'No action  in  pump control  due  to
        *kintf flag set'
c-—
c—

c—
108     WRITE (LTERM,110)  IBELL
110     FORMflTC*',fll,'System  shutdown  i  Error  codes  are:')
        WRITE (LTERM,*) 'ktmpf',KTMPF,'  kconf',KCONF,'  kprsf',KPRSF,
                                    113

-------
        *' kintf ,KINTF
c—
c—     close output device
c—
        CflLL CLOSE(LTERM)
        CflLL ICMKTO, IlflREfl)     ICflNCELS flLL TIMERS
c—
c—     send message to restrt program that shut down has occurred
c—
        CflLL IPOKE(IPHONE, ILDTR)         IHflNB UP PHONE
        CflLL IPOKEB (JBDERR,JBESHT)      !SET ERROR BYTE
        CflLL EXIT
        RETURN
        END
                                  114

-------
SUBROUTINE FOIL (ID)
'
c
c
c
c
c
c
Program :
Module :
Function:



C f 	
c —
c — diagnost
c —
BOULD. REL
BOUFflL. FOR
ROUTINE FOR SYSTEMftTIC SHUTDOWN OF COMMUNICflTIONS LINES
flND SYSYTEM PRIOR TO ft RESTflRT. ft TRftCEBflCK TO THE PROGR
LOCflTION flT FftlLURE TIME IS GIVEN


ic block

         LOGICftL*1  LEVEL1,LEVEL2,LEVELS,LEVEL4
         INTEBE R*4  11 flREfl, 12fl REfl
         COMMON /DIPB/LEVEL1(10), LEVELS(18), LEVELS(10),LEVEL4(10),
         *LTERM,ITERM,flTIMES,BTIMES,IflDPOK, IflDPEK,IPHONE, ILDTR, IHDTR,
         *IlflREft(4),I£flREfl(4), SYSTM1,SYSDflT,JBDIO, JBDPGM, JBDS1,JBDS2,
         *JBDCH1,JBDCH2,JBDCTL, JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
         *JBERR,JBMftH,JBPMP,JBSTft, JBTIM, JBDK1, JBSLP, JBPKC,JBINT,
         *JBRTL,JBCHN,JBRLL,JBWRT, JBRET, JBRED, JBBIT, JBFflL, JBDISK, JBTT,
         *JBECON,JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEftDD, JBESHT,JBRUN,
         *JBOVR, JBWflIT,JBSLEP
 c—
 c—     cancel any timers set
 c—
         CflLL  ICMKT (0,IlftREfi)    ICRNCELL MflIN TIMER
         CflLL  ICMKT (0,ISftREfl)    ICflNCEL TIMER FROM DIflL
 c—
 c—     cancel any ctrl o that  was set
 c—
         CflLL  RCTRLO     !RESETS CTRL 0
 c—
 c—     ring  bell  to get attention

         DO 8  JK=1,5
 8       CflLL  PRINT ("007,"£00)
 c—
 c—     hang  up phone
 c—
         CflLL  IPOKE 
-------
£31     FORMflT  (' HflNDSHAKE FfllLURE  IN  BOURTL')
£32     FORMflT  (' TIMER FfllLURE  IN DIflL SECTION  OF PROGRflM')
        WRITE
-------
SUBROUTINE BOUFFT
c 1 Program :
c 1 Module :
c 1 Function:
c 1
c —
c — data
c —
BOULD. REL
BOUFFT. FOR
REfiDS FLOW FREQUENCY TRftNSDUCER
common block

	 H
1
1
1
1

         COMMON/BOULD/BOUDftT(60),BOUfl(£5),BOUB(25),BDflTA(60), BOUT(60),
         *NflRRflY,BCONflV<£), BTMPftV(£), BPRSRV(£),NPL, NPR, NBT1, NBT2, NBC1,
         *NBC£, NBP1,NBP£,LBCF(£),LBTF(£),LBPF(£),SETPTC(£),LOCB,
         *KFBR(£),KFBP,KSBR(£),KSBP,KTMPF,KCONF,KPRSF,KINTF,KWNDF,KFFTF,
         *KPUMP(£)
c—
c—      channel  switching common block
c—
         COMMON/CHflN/IBCONB,IBCOO, IBFCI,IBVFI,IBVFO,IBTCM,IBREFR,
         *IBWS,IBMPR, IBPPR, IBPNIC,MBCON(7), NBCON, MBTMP(10),
         *NBTMP, MBPMP(2),NBPMP,MBPRS(7),NBPRS, MBFFT(£), NBFFT,
         *MBCONR(3),NBCONR
c—
c—      data  checking common block
c—
         COMMON/CONDCL/WINDMX,TEMPMN,BCONL,BCONH,BCONRF(3), BRI(3),
         *BVOLTS,Bfll,BTMPRF,BCONIN,BflVETP<£),BTMPHZ,RflNL,RflNH,BFTDftC<4)

c—      control  character common block
c—
         COMMON /CONTRL/Lfl,LB,LC,LR,LDLE,LQU,LLflS,  LTOCT, LLftCT, LTOC,
         *LLftC,LI,LF, LCR,LLF,ITRH1,ITRM1,ITRS1,ITRT1,ITRT£,ITRT3
c—
c—      diagnostic  block
c—
         LOGICflL*1 LEVEL1,LEVEL£,LEVELS, LEVEL4
         INTEGER** IlftREft,I20REP
         COMMON /DIRG/LEVEL1(10), LEVEL£(10), LEVELS(10),LEVEL4(10),
         *LTERM, ITERM, flTIMES,BTIMES,IflDPOK, IflDPEK,IPHONE,ILDTR, IHDTR,
         *IIftREft(4),I£flREfl(4), SYSTM1,SYSDflT,JBDIO,JBDPGM, JBDS1, JBDS2,
         *JBDCH1,JBDCH2,JBDCTL,JBDERR, JBDAL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
         *JBERR, JBMflH, JBPMP,JBSTfi,JBTIM,JBDK1, JBSLP, JBPKC,  JBINT,
         *JBRTL,JBCHN,JBRLL,JBWRT,JBRET,JBRED, JBBIT, JBFflL,  JBDISK,JBTT,
         *JBECON,JBEINT,JBETMP,JBEFFT,JBEDflL,JBEHND, JBEflDD,JBESHT,JBRUN,
         *JBOVR,JBWOIT,JBSLEP

c—      diagnostic  information
c—
c—      bg diagnostics
c—
         CflLL  IPOKEB(JBDS1, JBFFT)
c—
                                    117

-------
c—     timing  failure  traceback diagnostics
c—
        CflLL SCOPY  C BOUFFT',LEVELS)
        COLL SCOPY  C       ',LEVELS)
c—
c—     temporary diagnostics
c—
D       CflLL PUTSTR(LTERM,'  LOCATION:  ','0')
D       CflLL PUTSTR(LTERM,LEVEL1,'  ')
D       CflLL PUTSTR(LTERM,LEVELS,'  ')
D       CflLL PUTSTR(LTERM, LEVELS,'  ')
c—

c—
c—
c—
        DO 30,L=1,NBFFT
        ITRY=8   linit zero check
        LOCB=£7+L        .'array location  for  boudat  loc (£8,29)
c—
c—     start control sequence
c—
£0      CftLL RLLTI(MFLflG)        !set conditions so  channels can be closed
        IF (MFLflG.EQ. 1)  GO TO £0
c—
c—     close frequency counter  input
c—
        CflLL BOUCHN (IBFCI,MFLflB)
        IF (MFLflG.EQ.1)  BO TO £0
c—
c—     close frequency transducer  for plot
c—
        CflLL BOUCHN (MBFFT(L),MFLflG)
        IF (MFLflG.EQ.1)  GO TO £0
c—
c—     finish  control  sequence

        CflLL RET(MFLflG)  !tells scanner all commands have been sent
        IF (MFLflG. EQ. 1)  GO TO £0
c—
        CftLL RTLLI (MFLflG)        .'sets conditions so data can be received
        IF (MFLflG.EQ.1)  GO TO £0
c—
        CflLL WRITE(BOUDflT(LOCB),  MFLflG)   !converts data to real*4 number
        IF (MFLflG.EQ.1)  GO TO £0
c—
c—     check for zero  condition
c—     a zero may  not  be  a zero but a bad reading  ckeck and see
c—
        ITRY=ITRY+1
c—
c—     is the flow 0?  it  will be if all pumps  are  off
                                   118

-------
c—      use  this method instead of pumps flags because
c—      pumps  could have been turned off when supposed to be on
c—      this method will pick it up.
c—
         IF  (BDUDflT(LOCB).EQ. 0.  .flND.  (BFTDflC(3) .EQ. 0)
         * .ftND.  (BFTDflC<4>  .EQ.  0)) BOTO 30
         IF  (ITRY.LE.5 . ftND.BOUDflT
c—
c—      diagnostic block
c—
         LOGICflL*1  LEVEL1,LEVEL2,LEVELS, LEVEL4
         INTEBER*4  IlOREfl, I£flREfl
         COMMON /DIfl6/LEVELK10),LEVEL£(10),LEVEL3(10),LEVEL4(10),
         *LTERM, ITERM, flTIMES,BTIMES,IflDPOK,IflDPEK,IPHONE, ILDTR, IHDTR,
         *IIflREft(4),I£AREfl(4),SYSTM1,SYSDflT,JBDIO,JBDPBM,JBDS1, JBDS£,
         *JBDCH1,JBDCH£,JBDCTL,JBDERR,JBDftL,JBTMP,JBWND,JBCON,JBPRS,JBFFT,
         *JBERR, JBMflH, JBPMP,JBSTfl,JBTIM,JBDK1, JBSLP, JBPKC, JBINT,
         *JBRTL, JBCHN, JBRLL,JBWRT,JBRET,JBRED,JBBIT, JBFflL, JBDISK,JBTT,
         *JBECON,JBEINT,JBETMP,JBEFFT,JBEDflL,JBEHND, JBEflDD,JBESHT, JBRUN,
         *JBOVR, JBWflIT, JBSLEP
c—
c—      file information  block
                                    119

-------
 c—
         COMMON/FILE/BOUDEV,MABLK(4),MBBLK(4),MCBLK<4),MDBLK<4),
         *MEBLK(4), MFBLK(4), MBBLK(4), MHBLK(4), MIBLK(4),MJBLK (4),MKBLK (4),
         *MLBLK (4), MMBLK (4), MNBLK (4), MOBLK (4), MPBLK (4), MQBLK (4), MRBLK (4),
         *MSBLK<4>,
         *MflBLKL,MABLKW, MBBLKL,MBBLKW, MCBLKL,
         *MCBLKW,MDBLKL, MDBLKW, MEBLKL, MEBLKW, MFBLKL,MFBLKW,MGBLKL,
         *MBBLKW, MHBLKL, MHBLKW, MIBLKL, MIBLKW, MJBLKL, MJBLKW,MKBLKL,
         *MKBLKW,MLBLKL,MLBLKW, MMBLKL, MMBLKW, MNBLKL,MNBLKW,MOBLKL,
         *MOBLKW,MPBLKL,MPBLKW, MQBLKL, MQBLKW, MRBLKL, MRBLKW, MSBLKL, MSBLKW
 c—
 c—     main program sleep  block
 c—
         COMMON/WAIT/IBPOLH, IBPOLM, IBPOLS, IBPOLT, IBCC, IBCH,IBCM,
         *IBCS,IBCT

 c—
 c—     dimension for handler  checking and  time dernension array
 c—
         DIMENSION  ICBLK(4),ZWRITE<£)
 c—
 c—     data declaration
 c—
         DATA ICBLK/4*8/
 c—
 c—     bg  diagnostics
 c—
         CALL IPOKEB  (JBDS1,JBINT)
 c—
 c—     timing  failure traceback
 c—
         CALL SCOPY  ('  BOUIN1',LEVEL£)
         CALL SCOPY  C      ',LEVELS)
 c—
 c—     temporary diagnostics  for debugging
 c—
 D       CALL PUTSTR(LTERM,' LOCATION:  ','0')
 D       CALL PUTSTR(LTERM,LEVEL1,'  ')
 D       CALL PUTSTR(LTERM, LEVELS,'  ')
 D       CALL PUTSTR(LTERM,LEVELS,'  ')
 c—
 c——	—		
 c—     make sure handler is loaded
 >•		T   _m		
 c—
         CALL IDSTAT  (BOUDEV,ICBLK)       !make  sure device handler is loadd
         IF  (ICBLK(3).NE.0)GO TO  500
         ITEST=IFETCH(BOUDEV)
         WRITE  (LTERM,*) 'HANDLER BEING  FETCHED'
c—
c—      error on loading handler  stop  program
c—
                                    120

-------
        IF
        KFBR(2)=BOUT(31)
        KFBP=BOUT(£6)
        DO  8,I=l,NflRRflY
8       BOUDflT(I)=BOUT(I)
        RETURN
c—
c—     error on read for pump status
c—
900     WRITE  (LTERM,*) 'ERROR ON MftIN FILE  REflD IN BOUIN1'
        WRITE  (LTERM,*) 'BflCKUP FILE WfiS  REflD'
c—
c—     on  error read backup file
c—
        CflLL BOURED (MMBLK,BOUT,MMBLKW/£,MMBLKW,0,'RE' ,' BO' , IERR)
c—
c—     backup ok continue
c—
        IF  (IERR.EQ.0) BOTO 9
c—
c—     error with backup also
c—
        WRITE  (LTERM,*) 'ERROR ON BfiCKUP  REflD. '
        KINTF=1  !set error flag if  error  on  backup skip  pump section
        WRITE  (LTERM,*) 'ERROR FLAB SET SO PUMPS CRN  NOT
        *BE TURNED ON OR OFF!!!!'
c—
        IPOK=(IPEEKS(JBDERR))+JBEINT
        CflLL IPOKEB(JBDERR,IPOK)
        RETURN
c—
c—     format statements
c—
501     FORMflTC  DEVICE NOME SPECIFIED DOES  NOT  EXIST')
                                   121

-------
502     FORMftT ('  NOT ENOUGH MEMOREY TO LOfiD HflNDLER1)
503     FORMftT ('  NO HANDLER EXISTS ON THE SYSTEM DEVICE')
        END
                                 122

-------
SUBROUTINE BOUIN2
c 1 Program :
c 1 Module :
c 1 Function:
c 1
c —
c — data
c —
BOULD. REL
BOUIN2.FOR
DETERMINES


common block


1
1
CPU RUNNING ON flND DATE flND TIME OF NEXT RUN I
1



        COMMON/BOULD/BOUDflT<60),BOUfl(£5>,BOUB(£5),BDflTfl(60),BOUT(60),
        *NflRRflY,BCONflV(S),BTMPflV(£),BPRSflV(2),NPL, NPR, NBT1, NBT2, NBC1,
        *NBC£, NBP1,NBP2,LBCF(2),LBTF(2),LBPF(2),SETPTC(2),LOCB,
        *KFBR(2),KFBP,KSBR(2),KSBP,KTMPF,KCONF, KPRSF,KINTF, KWNDF, KFFTF,
        *KPUMP(£)
c—
c—     diagnostic block
c—
        LOBICflL*!  LEVEL1,LEVEL2,LEVELS,LEVEL4
        INTEGER**  IlRREfl,I2flREfl
        COMMON /DIflG/LEVELK10),LEVEL£(10),LEVEL3(10),LEVEL4(10>,
        *LTERM, ITERM, flTIMES,BTIMES,IflDPOK,IflDPEK,IPHONE, ILDTR, IHDTR,
        *IIfiREft(4), I£flREfl (4), SYSTM1,SYSDflT,JBDIO,JBDPGM,JBDS1, JBDS2,
        *JBDCH1,JBDCH2, JBDCTL,JBDERR, JBDflL,JBTMP, JBWND, JBCON, JBPRS, JBFFT,
        *JBERR,JBMflH,JBPMP,JBSTfi,JBTIM,JBDK1,JBSLP, JBPKC, JBINT,
        *JBRTL, JBCHN, JBRLL,JBWRT,JBRET,JBRED,JBBIT, JBFfiL, JBDISK,JBTT,
        *JBECON,JBEINT,JBETMP,JBEFFT,JBEDflL,JBEHND, JBEODD, JBESHT, JBRUN,
        *JBOVR,JBWflIT,JBSLEP
c—
c—     file information block
c—
        COMMON/FILE/BOUDEV,MfiBLK(4), MBBLK(4), MCBLK(4), MDBLK(4),
        *MEBLK(4), MFBLK(4),MGBLK(4),MHBLK(4),MIBLK(4), MJBLK(4), MKBLK(4),
        *MLBLK(4),MMBLK(4),MNBLK(4),MOBLK(4),MPBLK(4), MQBLK(4), MRBLK(4),
        *MSBLK(4),
        *MftBLKL,MflBLKW,MBBLKL,MBBLKW, MCBLKL,
        *MCBLKW,MDBLKL,MDBLKW,MEBLKL,MEBLKW,MFBLKL, MFBLKW, MGBLKL,
        *MGBLKW,MHBLKL,MHBLKW,MIBLKL,MIBLKW,MJBLKL, MJBLKW, MKBLKL,
        *MKBLKW,MLBLKL,MLBLKW,MMBLKL,MMBLKW, MNBLKL, MNBLKW, MOBLKL,
        *MOBLKW,MPBLKL,MPBLKW,MQBLKL,MQBLKW,MRBLKL,MRBLKW,MSBLKL, MSBLKW
c—
c—     base address  common block
c—
        COMMON/PROCES/IftD103,IflDl£3, ITM03, ITM23
c—
c—     main program  sleep  block
c—
        COMMON/WfllT/IBPOLH,IBPOLM, IBPOLS,IBPOLT, IBCC, IBCH, IBCM,
        *IBCS,IBCT
c—
c—
c—
                                    123

-------
 c—      bits  common
 c—
         COMMON/BITS/IBIT(16), IWORD
 c—
 c—
 c—      time  array to store  date and  time
 c—
         DIMENSION ZWRITE(£)
 c—
 c—      bg diagnostics traceback
 c—
         CftLL  IPOKEB  
-------
c—
c—     compare time how long has  it  been
c—
        IF  (SYSTM1 .BT.TIME) BOTO  30
        TDIF=TIMDIF(TIME,SYSTM1)         Idiff  in times  from disk  system
c—
c—     <0 no wait go and run
c—
c—
c—
c—     calculate how long you are supposed to wait
c—
        IBCC=1   !set new time flag
        IBCH=(TDIF>/100.         Ihours
        IBCM=(TDIF)-
-------
        RETURN
c—
c—     set conditions for 1183 processor
c—
300     IPHONE=IflD103
        IflDPEK=IflD103+£
        IflDPOK=IflD103+6
        ITERM=ITM03
D       WRITE (LTERM,*) 'This is a 11/03 processor.'
D       WRITE (LTERM,*) 'Proper address assignments are  being  made'
D       WRITE (LTERM,!) IPHONE,ITERM
        RETURN
c—
c—     wrong monitor —>  exit
c—
£00     WRITE (LTERM,*) 'You are not running under the
        *foreground or extened memory monitor !'
        CflLL EXIT
c—
c—     format statements
c—
Dl      FORMflT ('  Base address:  ',OB, 10X,'Remote terminal: ',I3,//)
        END
                                  126

-------
        SUBROUTINE  BOUIN3
c I  Program  :    BOULD.REL
c I  Module   :    BOUIN3.FOR
c I  Function:    ROUTINE  TO READ CHANBEABLE VALUES FROM BSTATS.DAT
c I
P \	 "           —          ...  - .          — i       —	  	 - _ im -.- ._] 		u	•. i
c—
c—     data common  block
c—
        COMMON/BOULD/BOUDAT(60),BOUfl(£5),BOUB(£5),BDATA(60), BOUT(60),
        *NflRRAY,BCQNAV(£), BTMPAV(£), BPRSflV(£),NPL,NPR,NBT1, NBT£, NBC1,
        *NBC£,NBP1,NBP£,LBCF(£),LBTF(£),LBPF(£),SETPTC(£),LOCB,
        *KFBR(£), KFBP, KSBR(£),KSBP,KTMPF,KCONF,KPRSF,KINTF,KWNDF, KFFTF,
        *KPUMP(£)
                 ,
        *KPUMP(£)
c—
c—     channel  switching common block
c—
        COMMON/CHAN/IBCONB,IBCOO,IBFCI,IBVFI, IBVFO, IBTCM, IBREFR,
        *IBWS, IBMPR, IBPPR, IBPNIC,MBCON(7), NBCON, MBTMP(IO'),
        *NBTMP, MBPMP(£),NBPMP,MBPRS(7),NBPRS, MBFFT(£), NBFFT,
        *MBCONR(3),NBCONR
c—
c—     data checking  common block
c—
        COMMON/CONDCL/WINDMX,TEMPMN,BCONL,BCONH,BCONRF(3), BRI(3),
        *BVOLTS, BAI,BTMPRF,BCONIN,BAVETP(£),BTMPHZ,RPNL,RANH,BFTDAC(4 >
c—
c—     control  character common block
c—
        COMMON /CONTRL/Lfl,LB,LC,LR, LDLE,LQU,LLAS, LTACT, LLACT, LTAC,
        *LLAC,LI,LF, LCR,LLF, ITRH1, ITRM1, ITRS1,ITRT1,ITRT£,ITRT3
c—
c—     diagnostic  block
c—
        L06ICftL*l LEVEL1,LEVEL£,LEVELS,LEVEL4
        INTE6ER*4 IlflREO,I£flREft
        COMMON /DIflS/LEVELl(10),LEVEL£(10),LEVEL3(10),LEVEL4(10),
        *LTERM, ITERM,flTIMES,BTIMES,IflDPOK,IflDPEK,IPHONE,ILDTR, IHDTR,
        *IIflREfl(4),I£flREfl(4), SYSTM1,SYSDflT,JBDIO,JBDPBM, JBDS1, JBDS£,
        *JBDCH1, JBDCH£, JBDCTL,JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
        *JBERR, JBMflH, JBPMP,JBSTR,JBTIM,JBDK1,JBSLP,JBPKC, JBINT,
        *JBRTL,JBCHN,JBRLL,JBWRT,JBRET,JBRED,JBBIT,JBFflL, JBDISK,JBTT,
        *JBECON, JBEINT, JBETMP, JBEFFT, JBEDflL,JBEHND, JBEfiDD,JBESHT, JBRUN,
        #JBOVR, JBWflIT,JBSLEP
c—
c—     file information  block
c—
        COMMON/FILE/BOUDEV,M&BLKC4), MBBLK(4), MCBLK <4>,MDBLK(4),
        *MEBLK(4),MFBLK(4),MBBLK(4),MHBLK(4),MIBLK(4), MJBLK(4),MKBLK(4),
        #MLBLK(4),MMBLK(4),MNBLK(4),MOBLK(4),MPBLK(4),MQBLK(4),MRBLK(4),
        *MSBLK(4),
                                    127

-------
         *MflBLKL,MflBLKW,MBBLKL, MBBLKW, MCBLKL,
         #MCBLKW,MDBLKL, MDBLKW, MEBLKL, MEBLKW, MFBLKL, MFBLKW, MGBLKL,
         *MGBLKW,MHBLKL, MHBLKW, MIBLKL, MIBLKW, MJBLKL, MJBLKW,MKBLKL,
         *MKBLKW,MLBLKL, MLBLKW, MMBLKL, MMBLKW, MNBLKL, MNBLKW,MOBLKL,
         *MOBLKW, MPBLKL, MPBLKW, MQBLKL, MQBLKW, MRBLKL, MRBLKW, MSBLKL, MSBLKW
 c—
 c—     telephone number common block
 c—
         LOBICflL*! NUMBOU,NUMftDfl
         COMMON/NUMBER/NUMBOU(13), NUMflDfl(9)
 c—
 c—     base address common block
 c—
         COMMON/PROCES/IflD103, IflDl£3, ITM03, ITM£3
 c—
 c—     timer failure common block
 c—
         COMMON/TIMER/ITMH, ITMM, ITMS, ITMT, ITDH,ITDM, ITDS, ITST
 c—
 c—     main program sleep  block
 c—
         COMMON/WRIT/IBPOLH, IBPOLM, IBPOLS, IBPOLT, IBCC, IBCH,IBCM,
         *IBCS,IBCT

 c—     dimensions for this routine
 c—
         DIMENSION TEMP(60)
 c—
 c—     diagnostics
 c—
 c—     bg diagnostic byte
 c—
         CflLL IPOKES 
-------
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-
c-

c-
c-
c-
c-
c—
c—
c—
100

c—
c—
c—
c—
c—
setptc(l)
setptc<£)
windrnx
ternprnn
bavetp(l)
bavetp<£)
itmh
it mm
itdh
it dm
ibpolh
ibpolrn
ternp(l)
ternp(£)
temp (5)
temp(6)
temp(7)
ternp(8)
temp(ll)
temp(l£)
temp(13)
temp(14)
temp(£0)
temp(£l)
set point plot 1
set point plot £
max wind speed
minimum temperature
temp set if error in temp module
temp set if error in temp module
main timer - hours
main timer - minutes
dialer timer - hours
dialer timer - minutes
wait or sleep time - hours
wait or sleep time - minutes
other array  locations are  unassigned  at  this time
see BOUDflT.FOR for more  information about  each  variable
        or their default values
read data file

CflLL BOURED(MNBLK,TEMP,MNBLKW/£, MNBLKW, 0,' RE',' BO' , LERR)

check for error
if error ignore rest and return

IF 
-------
c—
        RETURN
        END
                                 130

-------
        SUBROUTINE  BOUMH1
c +	+

c I  Program  :     BQULD.REL                                                I
c I  Module   :     BOUMHi.FOR                                               I
c I  Function:     CflLCULATE flVERflBE CONDUCTIVITY flND DETERMINE  IF flNY  PROBI
c I                ftRE OUT OF RflNBE                                         I
c I                                                                         I
  C-^^^——^—^—«^__^^^___^^___________^__                                       »
  r                                         _«__ w_ .«.—.—«—.«.».—.—.-.————— — ____»__|.
c +	+
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c
c-
c-
c-
      NOTE:
determination is done  by  assigning the values 1,£,  or 4 to probes
 1,£, 3 for a given  plot .These  values are then accumulated

    value        probes

      0           none
      1             1
      2             2
      3             1   £
      4             3
      5             1   3
      6             23
      7             1,  £,   3  (all)
c—
c—     data checking common  block
c—
        COMMON/CONDCL/WINDMX,TEMPMN,BCONL, BCONH,BCONRF(3), BRI(3),
        *BVOLTS, Bfll,BTMPRF, BCONIN,BflVETP<£),BTMPHZ,RflNL,RftNH, BFTDflC(4)
c—
c—     diagnostic block
c—
        LOSICRL*1 LEVEL1,LEVEL2,LEVELS,LEVEL4
        INTEGER*4 IlftREfl,I£flREft
        COMMON /DIfiS/LEVELK10),LEVEL£(10),LEVEL3(10),LEVEL4(10),
        *LTERM, ITERM,flTIMES,BTIMES,IftDPOK,IflDPEK,IPHONE,ILDTR, IHDTR,
        *IIfiREfl(4),I£flREfl(4),SYSTM1,SYSDflT,JBDIO,JBDPGM, JBDS1, JBDS2,
        *JBDCHi,JBDCH£, JBDCTL,JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
        *JBERR, JBMflH, JBPMP, JBSTft,JBTIM,JBDK1,JBSLP, JBPKC, JBINT,
        *JBRTL,JBCHN,JBRLL,JBWRT,JBRET,JBRED,JBBIT, JBFfiL, JBDISK,JBTT,
        *JBECON,JBEINT, JBETMP, JBEFFT, JBEDflL,JBEHND, JBEflDD,JBESHT,JBRUN,
        *JBOVR, JBWflIT,JBSLEP
                                   131

-------
c—
c—     set bg diagnostics
c—
        COLL  IPOKEB  =0
9       LBPF
-------
c—     this range  is specified  in boudat.for
c—     do this by  number of plots and number  off  probes
c—

c—     conductivity probes
c—
            IY=MOD  (4, (4-1))
        IF (BOUDftT(I+IZC). 6E. BOUfl( I+IZC). flND.
        * BOUDftT(I+IZC). LE.BOUBC I+IZC) )  60TQ i£
          LBCF(J)=LBCF(J)+IY
D       WRITE  (LTERM,*) 'COND CHECK',BOUfl(I+IZC),BOUDflT(I+IZC),BOUB(I+I2C)
        BOTO 15
1£      BCONftV(J)=BCONftV(J)+BOUDftT(I +1Z C)
        NPRC=NPRC+1
c—
c—     commercial  conductivity  probes
c—
15      IF (BOUDflT(I+IZP).6E. BOUfl
-------
* PROBE ERROR CODE: ', 15)
END
                         134

-------
        SUBROUTINE BOUMH£
C T 	
c 1 Program :
c 1 Module :
c 1 Function:
c 1
c 1
c —
c — data
c —
BOULD. REL
BOUMHE. FOR
CHECKS WIND SPEED ftND TEMPERflTURE TO DETERMINE
flPPLICflTION RflNBE. SETS FLflGS TO TURN ON PUMPS


common block

. 	 +
1
1
IF IN 1
IF NEEDED 1
1



        COMMON/BOULD/BOUDftT(60),BOUfl(£5),BOUB(25),BDflTfi(60), BOUT(60),
        *NflRRflY, BCONftV<£), BTMPflV(£),BPRSflV(2),NPL, NPR,NBT1, NBT£, NBC1,
        *NBC£, NBP1,NBP£,LBCF(£),LBTF(£),LBPF(£),SETPTC(£),LOCB,
        *KFBR(£), KFBP,KSBR(£),KSBP,KTMPF, KCONF, KPRSF, KINTF, KWNDF, KFFTF,
        *KPUMP(£)
c—
c—
c—     channel  switching  common block
c—
        COMMON/CHflN/IBCONB,IBCOO,IBFCI, IBVFI, IBVFO, IBTCM, IBREFR,
        *IBWS, IBMPR, IBPPR, IBPNIC,MBCON(7), NBCON, MBTMP(10),
        *NBTMP, MBPMP <2),NBPMP,MBPRS(7),NBPRS, MBFFT(£), NBFFT,
        *MBCONR(3),NBCONR
c—
c—     data checking common block
c—
        COMMON/CONDCL/WINDMX,TEMPMN,BCONL, BCONH, BCONRFJ3), BRI<3),
        *BVOLTS, Bfll,BTMPRF,BCONIN,BflVETP(£),BTMPHZ,RflNL,RflNH,BFTDftC(4)
c—
c—     diagnostic  block
c—
        LOBICftL*1 LEVEL1,LEVELS,LEVEL3,LEVEL4
        INTEGER**  IlfiREfl,I£flREft
        COMMON /DIflG/LEVEL1<10),LEVEL£<10), LEVELS<10),LEVEL4(10),
        *LTERM, ITERM, ftTIMES,BTIMES,IftDPOK,IfiDPEK,IPHONE, ILDTR, IHDTR,
        *IIflREfi(4),I£flREfl(4),SYSTM1,SYSDflT,JBDIO,JBDPGM,JBDS1, JBDS£,
        *JBDCH1,JBDCHE,JBDCTL,JBDERR,JBDflL,JBTMP,JBWND,JBCON,JBPRS, JBFFT,
        *JBERR, JBMflH, JBPMP,JBSTfl,JBTIM,JBDK1, JBSLP,JBPKC, JBINT,
        *JBRTL, JBCHN,JBRLL,JBWRT,JBRET,JBRED,JBBIT, JBFfiL, JBDISK,JBTT,
        *JBECON,JBEINT,JBETMP,JBEFFT,JBEDflL,JBEHND, JBEfiDD,JBESHT, JBRUN,
        *JBOVR,JBWflIT,JBSLEP
c	
c—
c—     dimensioning  for routine
c—
c—     SET  - array  to hold Boudatt?) for  set point check
c—     ITftB - array  which  holds  probe status information for range check
c—            if LCBF matches a number in  this array probe is bad
c—            each probe may  have  different  numbers in this array
c—            that is probe  1 will differ  from probe £ and probe 3
c	
                                    135

-------
         DIMENSION  SET(£),ITflB<£, 4)
 c—
 c—      array  is filled  out  in  order  itab(l,l),  itab(£,l),  itab(l,£), etc
 c—
         DflTfl  ITflB/1,1,3,3, 5,5, 7, 7/
 c—
 c—      bg  diagnostic  byte
 c—
         CflLL  IPOKED  (JBDSl,JBMflH+l)
 c—
 c—      timing  failure traceback
 c—
         CflLL SCOPY C  BOUMH£', LEVELS)
         CflLL SCOPY C      ',LEVELS)

 c—      temporary  diagnostics for debugging
 c—
 D        CflLL PUTSTR(LTERM, ' LOCflTION:  ','0')
 D        CflLL PUTSTR(LTERM,LEVEL1,'  ')
 D        CflLL PUTSTR(LTERM, LEVELS,'  ')
 D        CflLL PUTSTR(LTERM, LEVELS,'  ')
 c—
 c—      store average  values and flags  in  array  locations
 c—
         DO  30, J=1,NPL
         BOUDflT(J+40>=LBCF(J)     !LOC<41,4£)
         BOUDflT(J+4£)=LBPF(J)     !LOC(43,44)
         BOUDflT(J+46)=BCONflV < J)   !LOC(47,48)
 SO       BOUDflT(J+48)=BPRSflV(J)   !LOC(49,50)
 c—
 c—      store current  system date and time
 c—
         BOUDflT(36)=SYSTM1
         BOUDflT(37)=SYSDflT
 c—
 c—      boudat(60)  is  used in ace file  for how many times thru
 c—
         BOUDflT(60)=1.
 c—
 c—      keep current staus of plot and  main  pump
 c—
         KSBP=KFBP
 c—
 c—      keep track of relay current status for future  use
 c—      also set pumps to be on to -1   use  KPUMP  flag
 c—      this will turn current pumps on to off
 c—
         DO  110,LP=1,NBPMP
         KPUMP(LP)=-1     !do not turn on if negative
 110      KSBR(LP)=KFBR(LP)
c—
c—      check wind  speed
                                   136

-------
c—
        IF  (BOUDftT(£5).LE.WINDMX)  GOTO  IB
        WRITE (LTERM, ££0) BOLJDflT (£5), WINDMX
        IWIND=1  Iwind too strong

c—     check temperature
c—
18      IF  (BOUDftT(10).GE. TEMPMN)  60TO  19
        WRITE(LTERM,£30) BOUDflT(10),TEMPMN
        ITEMP=1
19      IF  (IWIND. EQ.0.0ND. ITEMP.EQ.0)  GOTO  35
c—
c—     log wind or temp out of range on terminal
c—
        IF  (IWIND.EQ.1) WRITE  (LTERM,») 'Wind
        *speed exceeds maximum',BOUDOT(£5)
        IF  (ITEMP.EQ. 1) WRITE  (LTERM,*) 'Temperature  below rninimun',
        *BOUDflT(£5)
c—
        RETURN
c—
c	
c—
c—     set points are set in boudat.for
c—
c—     SET(l)=BOUDflT(RflNL)
c—     SET(£)=BOUDflT(RANH)

35      SET(l)=BOUDflT(RflNL)
        SET(£)=BOUDfiT(RflNH)
c—
c—     see if any pumps need to be turned on
c—
        LOCB=0   Iflag to tell if any pumps need on
c—
        DO  11,LP=1,NBPMP
c—
c—
c—     check to see if we should really turn pumps on
c—     are probes bad?
c—
        DO  16,ITftl=l,NPL
        DO  16, ITfi£=l,4  '
16      IF  (LBCF(ITftl).NE. ITflBdTfll, ITfl£)) GOTO 14
        WRITE (LTERM, £10)  ITfil, LBCF, ITftBdTflBl, ITflB£)
c—
c—     check ave against set point
c—
14      IF  (SET(LP).GE.SETPTC(LP)) GOTO 11
c—
c—     inc counter for plot pump relay status -
c—
                                    137

-------
        LQCB=LOCB+1
c—
c—     pump to be turned on in is stored  in KPUMP  array
c—
        KPUMP(LP)=MBPMP
-------
SUBROUTINE BOUMHT
'
c
c
c
c
c
c
Program :
Module :
Funct i on :



c *• 	
c —
c — data
c —
BOULD. REL
BOUMHT. FOR
CflLCULflTES flVERflGE TEMPERflTURES FOR CONDUCTIVITY
MEflSUREMENTS. IF TEMPERflTURE ERROR FLflG SET MflKES RLL
flVERflGE TEMPS = £0 c


common block

        COMMON/BOULD/BOUDflT(60),BOUfl(£5),BOUB<£5),BDftTfl(60), BOUT(60),
        #NflRRflY,BCONflV(£),BTMPflV(£),BPRSflV(£),NPL, NPR,NBT1, NBT£, NBC1,

        *KFBR(£), KFBP, KSBR(£), KSBP, KTMPF, KCONF, KPRSF, KIIMTF, KWNDF, KFFTF,
        *KPUMP(£)
c—
c—     data checking common block
c—
        COMMON/CONDCL/WINDMX,TEMPMN,BCONL,BCONH,BCONRF(3), BRI(3),
        *BVOLTS, Bfll,BTMPRF, BCONIN,BflVETP(£),BTMPHZ,RflNL,RflNH, BFTDflC(4)
c—
c—     diagnostic  block
c—
        LOBICflL*1 LEVEL1,LEVEL£,LEVELS, LEVEL4
        INTEGER*4 IlflREfl,I£flREfl
        COMMON  /DIfl6/LEVELl(10),LEVEL£(10), LEVEL3(10), LEVEL4(i0),
        *LTERM, ITERM,flTIMES,BTIMES,IflDPOK,IflDPEK,IPHONE, ILDTR, IHDTR,
        *IIflREfl(4),ISflREfl(4), SYSTM1,SYSDflT,JBDIO,JBDPGM, JBDS1, JBDS£,
        *JBDCH1,JBDCH£, JBDCTL,JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
        *JBERR, JBMflH,JBPMP,JBSTfl,JBTIM,JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL, JBCHN,JBRLL,JBWRT,JBRET,JBRED,JBBIT, JBFflL, JBDISK, JBTT,
        *JBECON, JBEINT, JBETMP, JBEFFT, JBEDAL, JBEHND, JBEflDD, JBESHT, JBRUN,
        *JBOVR, JBWflIT,JBSLEP
c—
c—     dimension for this section
c—      JTLOC= location  to add to temperature readings to get proper
c—       value for testing to see if they are in range
c—
        DIMENSION JTLOC(6)
        DflTfl JTLOC/1,£,£,3,3, I/
c—
c—     set bg  diagnostics
c—
        CflLL IPOKEB (JBDSl,JBMflH+£)
c—
c—     timing  failure traceback
c—
        CflLL SCOPY  C BOUMHT', LEVEL£)
        CflLL SCOPY  C       ',LEVELS)
c—
                                    139

-------
 c —      tempory  diagnostics  for  debugging
 c —
 D        CftLL  PUTSTR (LTERM, '  LOCflTION:  ','0')
 D        CALL  PUTSTR (LTERM, LEVEL!,'  ')
 D        CftLL  PUTSTR(LTERM, LEVELS', '  ')
 D        CfiLL  PUTSTR(LTERM, LEVELS,'  ')
 c ---- __ — ----- — -------------------------- — — —
 c —
 c —      calculate  average for temperatures
 c —
 c —      init  flags  for out of range
 c —
         DO  9,JH=1,NPL
         BTMPftV(JH)=0.
 9        LBTF(JH)=0
 c —
 c —      check to see if temp error flag set
 c —      on  board failure make  ave temp =£0C
 c —
         IF  (KTMPF.LE. 0) GOTO 8
         WRITE (LTERM, *> 'Temperature module problem' , SYSDflT, SYSTM1
 c —
 c —      tell  which  error
 c —
         IF  (KTMPF.GE. 2) GOTO 7
         WRITE (LTERM,*) 'Deviation of reference' , BOUDftTd )
         GOTO  8
 7        IF  (KTMPF.EQ.£) WRITE (LTERM,*) 'fill probes  0. -  board  failure'
         IF  (KTMPF.EQ. 3) WRITE (LTERM,*) 'Lockup of temperature  probe'
         IF  (KTMPF.EQ. 4) WRITE (LTERM,*) 'Possible lockup  of
         *temperature module.  Ref is' , BOUDflTd )
         GOTO  £01
 c —
 c —      sum numbers
 c —
 c —
 c —      check to see if any out  of range
 c —      do this by number of plots and number off probes
 c —
 c —
 8        DO 10 J=1,NPL   ! PLOTS

 c —      IZ.  is where in the data array to store number
 c— -      this  is done this way so if more data and/or  sensors are added
 c —     the array locations would automatically be corrected
 c —
         IF (J. EQ. 1)  IZT=NBT1-1
         IF (J. EQ. £)  IZT=NBT£-1
c —
c —     check to see if readings fall within the specified range
c —
                                   140

-------
c-
c-
c-
c-
c-
c-
c-
c-
c-

D
D
D
c—
c—
c—
c—
c—
c—
10
c—
c—
c—
c—
11
c—
c—
c—
c—
n^_
the number 7  is  used for  the temperature  range  because
        5 y- range = 0.05  *100 degrees  (-50  to 50  degrees  c) =  5  des
        probe accurate to 1 degree c                          1  des
        an extra degree for drift                             1  des

                                                              7  des
DO 10 1=1,5,2
WRITE (LTERM,*) ' BOUDftT(JTLOC< D+IZT)' , BOUDflT(JTLOC< I) + IZT)
WRITE (LTERM,*) 'BOUDflT(JTLOC(1 + 1)+IZT>-7',BOUDftT(JTLOC(1+D+IZT).
WRITE (LTERM,*) » BOUDfiT(JTLOC( 1 + 1 ) + IZT) +7' ,BOUDflT (JTLOC (I+D + IZT).
IF ( (BOUDftT (JTLOC (I) + IZT). LT. BOUDflT(JTLOC( I + D+IZT) -7. )
    .OR. (BOUDflT(JTLOC £ branch 	 tell that there is a problem!!

WRITE (LTERM,£11) IPROBE,LBTF(IT)
                                   141

-------
        IF  =BftVETP
13      CONTINUE
c—
c—     store average values and flags in array  locations
c—
£04     DO 30, J=1,NPL
        BOUDflT(J+38)=LBTF(J)    !LOG(39,40)
30      BOUDflT(J+44)=BTMPfiV(J)  !LOG(45,46)
        RETURN
c—
c—     temp flag error
c—
£01     DO £02,1=1,NPL
        LBTF(I)=£56     !error with module
£0£     BTMPflV(I)=BftVETP(I)
        BOTO £04

c—     format statements

£11     FORMflT C  PLOT',I£,'  HflS',I£,'  TEMPERflTURE PROBES
        *OUT OF RftNGE')
        END
                                   142

-------
        SUBROUTINE  BOUOSC
C 1 	
c 1 Program
c 1 Module
c 1 Function
c 1
c —
c — data
c —
: BOULD. REL
: BOUOSC. FOR
REflDS flND VERIFY OPERflTION OF OSCILLflTOR


common block

	 +
\
1
1
1



        COMMON/BOULD/BOUDflT(60),BOUfl(£5),BOUB(£5),BDflTfl(60), BOUT(60),
        *NflRRflY,BCONftV(£),BTMPftV(£),BPRSflV(£),NPL,NPR,NBT1, NBT£, NBC1,
        *NBC£,NBP1,NBP£,LBCF(2),LBTF(£),LBPF(£), SETPTC(£), LOCB,
        *KFBR<£),KFBP,KSBR(£),KSBP,KTMPF,KCONF,KPRSF,KINTF,KWNDF,KFFTF,
        *KPUMP(£>
c—
c—     channel  switching  common block
c—
        COMMON/CHflN/IBCONB,IBCOO,IBFCI,IBVFI,IBVFO,IBTCM,IBREFR,
        *IBWS, IBMPR, IBPPR, IBPNIC,MBCON(7),JMBCON, MBTMP( 10),
        *NBTMP, MBPMP(2),NBPMP,MBPRS(7),NBPRS,MBFFT(£), NBFFT,
        *MBCONR(3),NBCONR
c—
c—     data checking  common block
c—
        COMMON/CONDCL/WINDMX,TEMPMN,BCONL,BCONH,BCONRF(3), BRI(3),
        *BVOLTS, BftI,BTMPRF,BCONIN,BflVETP(£),BTMPH2,RflNL,RftNH, BFTDflC(4)
c—
c—     control  character  common block
c—
        COMMON  /CONTRL/Lft,LB,LC,LR,LDLE,LQU,LLflS, LTftCT, LLfiCT, LTftC,
        *LLfiC,LI,LF, LCR,LLF,ITRH1,ITRM1,ITRS1,ITRT1,ITRT£,ITRT3
c—
c—     diagnostic  block
        LOSICfiL*! LEVEL1,LEVEL£,LEVELS, LEVEL4
        INTEBER*4 IlftREfl,I£AREft
        COMMON /DIflB/LEVELK10),LEVEL£(10),LEVEL3(10),LEVEL4(10),
        *LTERM,ITERM,flTIMES,BTIMES,IflDPOK,IflDPEK,IPHONE,ILDTR, IHDTR,
        *IIflREfl(4),I£flREfl(4), SYSTM1,SYSDflT,JBDIO,JBDPGM,JBDS1,JBDS2,
        *JBDCH1,JBDCH£, JBDCTL,JBDERR,JBDOL, JBTMP, JBWND,JBCON, JBPRS, JBFFT,
        *JBERR, JBMflH, JBPMP,JBSTfl,JBTIM,JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL,JBCHN,JBRLL,JBWRT,JBRET,JBRED,JBBIT,JBFflL, JBDISK,JBTT,
        *JBECON, JBEINT, JBETMP,JBEFFT,JBEDflL,JBEHND,JBEflDD,JBESHT,JBRUN,
        *JBOVR,JBWflIT,JBSLEP
c—

c—
c—     initialize  error  flag
c—
c—
c—     bg program  diagnostics
                                    143

-------
c—
        CflLL  IPOKEB(JBDS1,JBCON+1)
c—
c—     timing  failure traceback
c—
        CflLL  SCOPY  C BOUOSC',LEVELS)
        CALL  SCOPY  C       ',LEVELS)
c—
c—     temporary diagnostics for  debugging
c—
D       CftLL  PUTSTR(LTERM,' LOCflTION:  ','0')
D       CftLL  PUTSTR(LIERM, LEVEL1,'  ')
D       CflLL  PUTSTR(LTERM, LEVELS,'  »)
D       CftLL  PUTSTR(LTERM,LEVELS,'  »)
c—
c—
        KCONF=0 !init error flag
        KPRSF=0 !init error flag
        LOCB=11  !array locator for  boudat  array
        ITRY=0   linit try  counter for  valid reading
c—
c—     check oscillator
c—
100     CflLL  RLLTI(MFLflE)        Isets  conditions  so channels can be closed
        IF  (MFLflG. EQ. 1) 60 TO 100
c—
c—     close voltage to frequency  converter  input  and  test error flag
c—
        CflLL BOUCHN (IBFCI,MFLflG)
        IF  (MFLflB.EQ. 1) GO TO 100
c—
c—     close conductance oscillator output
c—
        CflLL BOUCHN (IBCOO,MFLflG)
        IF  (MFLflG.EQ.1) GO TO 100
c—
c—     close channels
c—
        CflLL RET(MFflLG) !tells scanner all commands have been sent
        IF  (MFLflG.EQ.1) GO TO 100
c—
        CflLL RTLLI(MFLflG)        Isets  conditions  so data can be received
        IF  (MFLflG.EQ.1) GO TO 100
c—
        CflLL WRITE(BOUDftT(LOCB), MFLflG)   !converts data  to real*4 number
        IF  (MFLflG.EQ. 1) GO TO 100
c—
c—     convert to hz
c—
D       WRITE (LTERM,*) 'BOUOSC REflDING' , BOUDflT(LOCB)
        BOUDflT(LOCB)=BOUDflT(LOCB)* 1000.
c—
                                    144

-------
c—
c—     reading too high ????
c—
1S0     IF (BOUDflT(LOCB). 6T. 900.
        * .flND. BOUDflT(LOCB). LT.££00.)
        *   GOTO 109
        ITRY=ITRY+1
        TYPE *,'OSCILLflTOR OUT OF RflNGE  ',BOUDflT(LOCB)
        IF (ITRY.LE. 5) GOTO 100
        GOTO 140
c—
c—     oscillator reads square wave  picking up both  positive and
c—     negative pulses on occasion.
c—     this causes the reading to  be twice what  it should  be.
c—
109     IF (BOUDflT(LOCB).GT.1800.AND.
        *  BOUDflT(LOCB).LT.££00.) BOUDflT(LOCB)=BOUDftT(LOCB)/£.
c—
c	    check osciilator range  if error  set flag
c—      check to see if in 50V. on  each  side of reference
c—       reference =  1kHz or  1000Hz
c—
        RETURN

c—     error reporting
c—
140     IPOK=(IPEEKB(JBDERR»+JBECON
        CflLL IPOKEB(JBDERR,IPOK)
        KCONF=1
        RETURN
        END
                                   145

-------
        SUBROUTINE BOUPDC(IEQUIP)
c + 	
c
n
C
c
C H
C
c
c
c
c
c
c
Program
Module
Function

(. 	 . 	
NOTE:



: BOULD. REL
: BOUPDC. FOR
: READS dac TO CHECK SYNC AND IF NEED REESTABLISHES SYNC


Bit codes are explained in BOUDflT.FOR


1
1
1

1
1
1
error codes '



C f 	
c —
c — data
c —
0 - normal
3 - sync problem


common block

1
1
1



        COMMON/BOULD/BOUDflT<60), BOUfl<£5) ,BQUB(£5),BDfiTfi(60),BOUT(60),
        *NflRRflY,BCONAV<£), BTMPflV(£), BPRSflV <£), NPL, NPR, NBT1,NBT£, NBCi,
        *NBC£,NBP1,NBP£, LBCF(£), LBTF(£), LBPF(£), SETPTC(£),LOCB,
        *KFBR(£),KFBP,KSBR(£), KSBP, KTMPF, KCONF, KPRSF, KINTF,KWNDF,KFFTF,
        *KPUMP<£)
c—
c—     channel switching common block
c—
        COMMON/CHAN/IBCONB, IBCOO, IBFCI, IBVFI, IBVFD, IBTCM,IBREFR,
        *IBWS, IBMPR, IBPPR, IBPNIC,MBCON(7), NBCON, MBTMPU0),
        «NBTMP,MBPMP <2),NBPMP,MBPRS(7), NBPRS, MBFFT(£),NBFFT,
        *MBCONR(3),NBCONR
c—
c—     data checking common block
c—
        COMMQN/CONDCL/WINDMX, TEMPMN, BCONL, BCONH, BCONRF(3), BRI(3),
        *BVOLTS,Bfll,BTMPRF, BCONIN,BflVETP(£), BTMPHZ,RflNL,RflNH,BFTDfiC(4)
c—
c—     control character common block
c—
        COMMON /CONTRL/Lfl, LB, LC, LR, LDLE, LQU, LLfiS, LTftCT, LLfiCT,LTflC,
        *LLflC,LI, LF, LCR,LLF, ITRH1, ITRM1, ITRS1, ITRT1,ITRT2, ITRT3
c—
c—     diagnostic block
c—
        L06ICflL*l LEVEL1,LEVEL£,LEVELS,LEVEL4
        INTE6ER*4 IlfiREfi,I£ftREft
        COMMON /DIflG/LEVELK10),LEVEL£(10),LEVEL3(10),LEVEL4(10),
        *LTERM, ITERM, flTIMES,BTIMES, IftDPOK, IflDPEK, IPHONE, ILDTR, IHDTR,
        *IlflREfl<4),I£flREfl(4), SYSTMl,SYSDflT, JBDIO, JBDPGM, JBDS1, JBDS£,
        * JBDCH1,JBDCH2, JBDCTL, JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
        *JBERR, JBMflH, JBPMP, JBSTfl, JBTIM, JBDK1, JBSLP,JBPKC,JBINT,
        *JBRTL,JBCHN, JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFflL, JBDISK,JBTT,
        *JBECON,JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD, JBESHT,JBRUN,
                                    146

-------
        *JBOVR, JBWflIT, JBSLEP
c —
c —     dimensioning and common  for" this  routine
c —
c —
c —
c —     bits common
c —
        COMMON/BITS/IBIT(16), IWORD
c —
c —
        REftl_*4 LflBEL(4, 3)
        DflTft LflBEL/' Plot' , ' Plot ' , ' Plot' , ' Prim' ,
        *' 1 r' , ' £ r' , ' pum' , ' ary  ' ,
        *'elay' ,'elay', 'p    ' , ' pump' /
c —
        DflTfl IQTIMl/10/IQTIM£/£0/
c —
        IEQUIP=0         linit  error flag
        ISYNC=0          I test  for sync  of  plot  pump
c —
c —     diagnostic  information
c —
c —     bg diagnostics
c —
        CftLL I PQKEB ( JBDS1 , JBPMP+ 1 )
c —
c —     timing failure traceback diagnostics
c —
        CALL SCOPY  (»  BOUPDC' , LEVELED
        CftLL SCOPY  C      ', LEVELS)

c —     temporary diagnostics
c —
D       CftLL PUTSTR(LTERM, '  LOCATION: ','0')
D       CftLL PUTSTR(LTERM, LEVEL 1,'  ')
D       CftLL PUTSTR(LTERM, LEVELS,'  ')
D       CftLL PUTSTR(LTERM, LEVELS,'  ')
c —
Q  _ --- ___._ -- _ - ___.. -- __. __—   _
        LOCB=27
19      ITRY=0  linit  zero check
c —
c —     start control  sequence
c —
£0      CflLL RLLTI(MFLftS)        ! set conditions so channels  can  be  closed
        IF (MFLflB. EQ. 1) SO TO  £0
c —
c —     close frequency counter  input
c —
                                   147

-------
        CftLL BOUCHN  (IBFCI,MFLflG)
        IF  (MFLflG. EG. 1)  60  TO  £0
c—
c—     close  voltage frequency  input
c—
        CftLL BOUCHN  (IBVFI,MFLftS)
        IF  (MFLflS.EQ.1)  60  TO  £0
c—
c—     close  voltage/frequency  output
c—
        CflLL BOUCHN  (IBVFO,MFLflG)
        IF  (MFLfl6.EQ.1)  60  TO  £0
c—
c—     close  DRC  converter
c—
        CftLL BOUCHN  (IBPNIC,MFLflS)
        IF  (MFLflG. EQ. 1)  60  TO  £0
c—
c—     finish control sequence
c—
        CflLL RET(MFLflG)  !tells scanner  all  commands have been sent
        IF  (MFLflG.EQ. 1)  60  TO  £0
c—
        CflLL RTLLI(MFLflG)        Isets conditions so data can be received
        IF  (MFLfl6. EQ. 1)  60  TO  £0
c—
        CflLL WRITE(BOUDflT(LOCB),MFLfl6)   !converts data to real*4 number
        IF  (MFLfl6.EQ. 1)  60  TO  £0
c—•
c—     check  for  zero condition
c-—     a zero may not be a  zero but a  bad  reading ckeck and see
c—
        ITRY=ITRY+1
        IF  (ITRY.LE.5 . flND.BOUDflT(LOCB)  . EQ.  0.)  GOTO £0
c—-
c—     check  to see if  in  proper range
c—     if  not go  back and  get reading  again
c—
        IF  (BOUDflT(LOCB) . LT.  0.0 .OR.
        * BOUDflT(LOCB) .GT.100.0) GOTO  19
        IF  (BOUDflT(LOCB) . EQ.  0.0) GOTO 999
c—
c—     convert reading
c—
c—
        CflLC = (BFTDflC(l)-BOUDflT(LOCB))/BFTDflC(£)
        IWORD=CflLC
        ZHOLD=DIM(CflLC,FLOflT(IWORD))
        IF  (ZHOLD.GE.0.5) IWORD=IWORD+1
c—
D       WRITE  (LTERM,*)  'BOUPDC  flFTER CflLC', BOUDflT(LOCB),BFTDflC(1),
D       *BFTDflC(£),IWORD
                                   148

-------
        CflLL BOUBIT
D       WRITE(LTERM, 8(30) KFBP, (IBIT(K),K=16, 1,-1), BOUDflT(LOCB)
c—
c—     out put results for  debug
c—
c—     check to see  if any  problems  with  the  readings
c—
c—     is purnp status correct
c—
        IF     Imake  dac  - to show sync error
c—
c—     if more then  IQTIM2  time log  error and  return try to take care ofs
c—
        IF 
-------
        ILOC=IBPPR
        flSSIGN 19 TO IBR
        GOTO £01
c —
c —     check to see if any manual operation! !
c —
900     DO 901 1=3,6
901     IF (IBIT(I).EQ. 1) GOTO 905
        GOTO 30
c —
c —     some pumps on tell which ones
c —
905     WRITE (LTERM, *) ' BOUPDC - Manual operation status'
        DO 907 1=1,4
907     IF (IBIT(I+£).EQ. 1) WRITE (LTERM, 908)  (LflBELd, J), J=l, 3)
c —
c —     normal return
c —
30      IEQUIP=0
        RETURN

c —     channel switching routine
c —
£01     CflLL RLLTI (MFLflG)
        IF (MFLflG. EQ. 1) GOTO £01
        CflLL BOUCHN ( I LOG, MFLflG )
        IF (MFLflG. EQ. 1) GOTO £01
        CflLL RET  (MFLflG)         !now close channel
        IF (MFLflG. EQ. 1) GOTO £01
        CflLL ISLEEP(0, 0,0,5)    Igive time to stablize if needed
        WRITE (LTERM,*) 'BOUPDC - CHflNNEL TOGBLED' , ILOC
        GOTO IBR
c —
c —     dac error
c —
999     WRITE (LTERM,*) 'BOUPDC - DflC ERROR' ,BOUDflT(LOCB)
        WRITE (LTERM,*) 'BOUPDC - DftC SHOULD NOT  BE  ZERO.'
        RETURN
c —
c —     error with sync
c —
950     WRITE (LTERM,*) 'BOUPDC error in sync timing - trying  to
        *turn pumps off
c —
c —     set pumps sattus to off (0)
c —
        ISYNC=0
        KFBP=0
        GOTO 19
                        format statements
                                   150

-------
cl
Q^«.— — — — —_ _—.«.____...______..____—-—— — — —— — __—__—____ _______.___._.
800     FORMAT (X,'BOUPDC Pump flag', 3x,13,3X,'BITS',3X,16I£,
        * X, ' DftC', F5. £)
908     FORMAT (X, 3fl4)
D9000   FORMfiT (X, 5X, 'DflC' , E12.5, 5X, 15, FIB. 0, 5X, F10. 0, 5X,  10A1)
        END
                                    151

-------
        SUBROUTINE BQUPDF(IEQUIP)
c + 	
c 1 Program
c 1 Module
c 1 Function
c 1
c 1
c 1
c 1
c 1
c + 	
c —
c — data
c —
: BOULD. REL
: BOUPDF. FOR
: READS dac TO CHECK SYNC OND IF NEED REESTABLISHES SYNC
THIS ROUTINE IS SIMILflR TO boupdc. f or EXCEPT IT
CONTINUOUSLY TRIES TO REESTABLISH SYNC flND HflS GREflTER
TIMING DELflYS. IF SYNC CflN NOT BE REESTABLISHED IT TRIES
OPEN PILL PUMPS
L
common block
        COMMON/BOULD/BOUDflT(60) , BOUfl<£5) , BOUB<£5> ,BDflTfl<60) , BOUT (60) ,
        *NflRRflY, BCONflV(S) , BTMPftV(£) , BPRSflV (£) , NPL, NPR, NBT1 , NBT£, NBC1,
        #NBC£, NBP1, NBP£, LBCF (£) , LBTF (£) , LBPF (£) , SETPTC (£) , LOCB,
        *KFBR (£) , KFBP, KSBR <£) , KSBP, KTMPF, KCONF, KPRSF, KINTF, KWNDF, KFFTF,
        *KPUMP<£)
c —
c —     channel switching common block
c--
        COMMON/CHflN/IBCONB, IBCOO, IBFCI, IBVFI, IBVFO, IBTCM, IBREFR,
        *IBWS, IBMPR, IBPPR, IBPNIC,MBCON<7), NBCON, MBTMP< 10) ,
        *NBTMP, MBPMP <2> , NBPMP, MBPRS(7) , NBPRS, MBFFT (£) , NBFFT,
        *MBCONR(3),NBCONR
c- —
c — •     data checking common block
c —
        COMMON/CONDCL/WINDMX, TEMPMN, BCONL, BCONH, BCONRFO) , BRI (3) ,
        *BVOLTS, Bfll , BTMPRF, BCONIN, BflVETP (£) , BTMPHZ, RflNL, RfiNH, BFTD
c-
c-
c-
                                                    NRFO) , BRI (3) ,
                                                    RflNL, RfiNH, BFTDflC (4)

        control character common  block

        COMMON /CONTRL/Lfl, LB, LC, LR, LDLE, LQU, LLflS, LTftCT, LLfiCT, LTOC,
        *LLflC,LI,LF, LCR,LLF, ITRH1, ITRM1, ITRS1, ITRT1, ITRT£, ITRT3
c —
c —     diagnostic  block
c —
        LOBICftL*! LEVEL1, LEVEL£, LEVELS, LEVEL4
        INTEGERS IlflREfl, I£fiREfi
        COMMON /DIflG/LEVELl(10), LEVEL£(10), LEVEL3<10), LEVEL4(10),
        *LTERM, ITERM, flTIMES,BTIMES, IADPOK, IflDPEK, IPHONE, ILDTR, IHDTR,
        *I IflREfl (4) , I£flREfl (4) , SYSTM1, SYSDflT, JBDIO, JBDPGM, JBDS1 , JBDS£,
        *JBDCH1, JBDCH£, JBDCTL, JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
        *JBERR, JBMflH, JBPMP, JBSTfl, JBTIM, JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL, JBCHN, JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFPL, JBDISK, JBTT,
        *JBECON, JBEINT, JBETMP, JBEFFT, JBEDfiL, JBEHND, JBEflDD, JBESHT, JBRUN,
        *JBOVR, JBWflIT, JBSLEP
c ------- — — — ------ — — _ ----- _ ______ _____ _____ ___ __ __ __ ___ __ _ __ ___ _______
c —
c —     dimensioning and common for this routine
                                   152

-------
c—
c	
c—
c—     common block  for boubits
c—
        COMMON/BITS/IBIT(16), IWORD
        REflL*4 LflBEL<4, 3)
        DflTfl LflBEL/'Prirn', 'Plot','Plot', 'Plot',
        *'ary ','  pum', ' 1  r','  £ r',
        *'pump','p   ','elay','elay'/
c—
        IEQUIP=0         linit  error  flag
        ISYNC=0  Itest  for  sync of plot  pump
c—
c—     diagnostic information
c—
c—     bg diagnostics
c—
        CflLL IPOKEB(JBDS1,JBPMP+1)
c—
c—     timing failure traceback diagnostics

        CflLL SCOPY C  BOUPDC',LEVELS)
       . CflLL SCOPY C       ',LEVELS)
c—
c—     temporary  diagnostics
c—
D       CflLL PUTSTR(LIERM,'  LOCflTION: ','0')
D       CflLL PUTSTRtLTERM,LEVEL1,' ')
D       CflLL PUTSTR(LTERM,LEVEL£,' ')
D       CflLL PUTSTR
-------
        CflLL  BOUCHN  (IBVFO,MFLflS)
        IF  (MFLflB. EQ. 1)  60  TO  £0
c—
c—     close DflC  converter
c—
        CflLL  BOUCHN  (IBPNIC,MFLfiS)
        IF  (MFLflB.EQ. 1)  60  TO  £0
c—
c—     finish control sequence
c—
        CftLL  RET(MFLfl6)  !tells scanner  all  commands have been sent
        IF  (MFLflB.EQ.1)  60  TO  £0
c—
        CflLL  RTLLI(MFLflS)        Isets conditions so data can be received
        IF  (MFLflB.EQ. 1)  60  TO  £0
c—
        CflLL  WRITE(TEST, MFLflB)   !converts data to real*4 number
        IF  (MFLfl6.EQ.1)  60  TO  £0
c—
c—     check for  zero condition
c—     a zero may not be a zero but a  bad  reading ckeck and see
c—
        ITRY=ITRY+1
        IF  (ITRY.LE.5 .flND.TEST  . EQ. 0.)  BOTO £0
c—
c—     convert form kHz to Hz (/1000.)
c—
        IF  (TEST.EQ. 0) BOTO 333
        TEST=1./TEST
333     TEST=TEST/1000.
c—
c—     check to see if  in  proper range
c—     if not go back and  get reading  again
c—
        IF  (TEST .LT. 0.0 .OR. TEST . GT. 100.0)  BOTO 19
        IF  (TEST .EQ. 0.0)  BOTO  999

c—     convert reading
c—
        IWORD = (BFTDflC(l)-TEST)/BFTDflC<£)
        CflLL  BOUBIT
c—
c—     out put results  for  debug
c—
D       WRITE(LTERM,9000) TEST, IWORD, SYSTM1, SYSDflT,LEVELS
c—
c—     check to see if any  problems with the readings
c—
c—     is pump status correct
c—
        IF (KFBP .EQ. BIT(8)
        * .flND. KFBP .EQ. BIT(7))
                                   154

-------
        *   GOTO 900
c—
c—     pumps out of sync
c—
        TYPE *,'Pumps out of sync'
c—
c—     section to flip pump status
c—
c—
c—     inc sync counter
c—
37      ISYNC=ISYNC+1

c—     if  <10 go ahead and change with no warning
c—
        IF  (ISYNC.LT.10) GOTO 36
c—
c—     give sync warning if more then 10 times      set error flag also
c—
        TYPE *,'Sync problem times ',ISYNC
        IEQUIP=3
c—
c—   ,  set dac reading to negative to show error
c—
        BOUDflT(£7)=  (-1*1 WORD)  Iniake dac - to show sync error
c—
c—     if more thgen £0 time log error and return try to take care of ths
c—     in another routine
c—
        IF  (ISYNC.BT.£0) RETURN
c—
c—     was primary pump the one out of sync????
c—
36      IF  (IBIT(8) .EQ. KFBP) BOTO 35
        ILOC=IBMPR
        flSSIBN 35 TO IBR
        BOTO £01
c—
c—     was plot pump the one out of sync?????
c—
35      IF  (IBIT(7) .EQ. KFBP) BOTO 19
        ILOC=IBPPR
        fiSSIBN 19 TO IBR
        BOTO £01
c—
c—     check to see if any manual operation!!
c—
900     DO 901 1=3,6
901     IF  (IBIT(I).EQ.1)  BOTO 905
        SOTO 30
c—
c—     some pumps on tell which ones
                                   155

-------
c—
905     TYPE *,'Manual operation  status'
        DO 907 1=1,4
907     IF (IBIT(I+£).EQ.1) TYPE  908,(LflBEL(I,J),J=l,3)
c-—
c—     normal, return
c—
30      IEQUIP=0
        BOUDflT<£7)=IWORD
        RETURN
c—
c—     channel switching routine
c—
£01     CflLL RLLTI(MFLflS)
        IF (MFLflB. EQ. 1) BOTO £01
        CflLL BOUCHN(ILOG, MFLflG)
        IF (MFLflS.EQ.1) GOTO £01
        CflLL RET  (MFLflG)         !now close channel
        IF (MFLflG.EQ.1) GOTO £01
        CflLL ISLEEP(0,0,0,5)     !give time to  stablize if needed
        WRITE (LTERM,*) 'CHflNNEL TOGGLED',ILOC
        GOTO IBR
999     TYPE *,' DflC ERROR',TEST
        TYPE #,'DflC SHOULD NOT BE ZERO.'
        RETURN
c-i 	
cl
cl
cl
90S
D9000
format statements
FORMflT (X, 3fl4)
FORMflT (X,5X, 'DflC',£(El£.5,5X),F10.0,5X,F10.0,5X, 10fll)
END
1
1
1

                                   156

-------
C H
C
C
C
C
C H
C
C
C H
c—
c—
c—
SUBROUTINE BOUPFT(IEQFFT)
Program
Module
Function
NOTE:
uses
data
— — ____ 	 _ 	 ,
: BOULD. REL
: BOUPFT. FOR
: REflDS FLOW TRftNSDUCER TO VERIFY PLOT RELflYS WERE TURNED
KFBP and KFBR(Z) flag to tell if relays are to be on
common block
         COMMON/BOULD/BOUDflT(&0),BOUfl<£5>,BOUB(£5),BDflTfl(60), BOUT(60),
         *NflRRflY,BCONAV<£), BTMPAV<£),BPRSflV<£),NPL,NPR,NBT1,NBT£,NBC1,
         *NBC£,NBP1,NBP£,LBCF(£),LBTF <£),LBPF<£),SETPTC(£),LOCB,
         *KFBR(£), KFBP, KSBR(£), KSBP,KTMPF,KCONF,KPRSF,KINTF,KWNDF,KFFTF,
         *KPUMP<2)
c—
c—      channel switching common block
c—
         COMMON/CHflN/IBCONB,IBCOO, IBFCI, IBVFI, IBVFO, IBTCM, IBREFR,
         *IBWS, IBMPR, IBPPR, IBPNIC,MBCON<7), NBCON, MBTMPUeO ,
         *NBTMP, MBPMP <2),NBPMP,MBPRS(7),NBPRS, MBFFT(£), NBFFT,
         *MBCONR(3),NBCONR
c—
c—      data checking common block
c—
         COMMON/CONDCL/WINDMX,TEMPMN,BCONL,BCONH, BCONRF(3), BRI<3),
         *BVOLTS,Bfll,BTMPRF,BCONIN,BflVETP(£>,BTMPHZ,RflNL,RONH, BFTDfiC(4)
c—
c—      control character common block
c-
control  character common DIOCK

COMMON /CONTRL/Lfl,LB,LC,LR,LDLE,LQU,LLfiS, LTflCT, LLOCT, LTflC,
*LLflC, LI,LF,LCR,LLF,ITRH1,ITRM1,ITRS1,ITRT1,ITRT£,ITRT3

diagnostic  block
c-
c-
c-
LOBICflL*! LEVEL1,LEVELS,LEVELS, LEVEL4
INTE6ER*4 IlflRER,I£flREft
COMMON /DIflG/LEVELl(10). LEVEL£(10). LE
        l_UO!LrHI_'*l  UC.VC.U1, UCVC.UC., l_C.vtL-O, l_tvt.l_-r
        INTE6ER*4  IlflRER,I£flREft
        COMMON  /DIfle/LEVELK10),LEVEL£(l(3),LEVEL3(10),LEVEL4(liZi),
        *LTERM, ITERM, flTIMES,BTIMES,IfiDPOK,IflDPEK,IPHONE, ILDTR, IHI
        *IlflREfl(4),I£flREfl(4),SYSTMl,SYSDflT,JBDIO,JBDPGM, JBDS1,JBI
        ». Wbnmi^  *^-.r\i-n i^s vr*r*.r**rt  Tr%T\^Pin  TT"iT\/M  TP»Tur"« Tni lhir\ mr^nhl  TF»r"iI
                                                     JBhHL, JBUlbK, JBI I ,
                                                     JBEflDD,JBESHT, JBRUN,
c—
c—     diagnostic information
c—
c—     bg diagnostics
                                     157

-------
 c—
         CflLL IPOKEB(JBDS1,JBPMP+2)
 c—
 c—      timing  failure traceback diagnostics
 c—
         CflLL SCOPY ('  BOUPFT', LEVELS)
         CflLL SCOPY ('       ',LEVELS)
 c—
 c—      temporary  diagnostics
 c—
 D        CflLL PUTSTR(LTERM, '  LOCflTION:  ','0')
 D        CflLL PUTSTR(LTERM,LEVEL1,'  ')
 D        CflLL PUTSTR(LTERM,LEVEL£,'  ')
 D        CflLL PUTSTRtLTERM,LEVELS,'  ')
 c—

 c—
         DO  30, L=1,NBFFT
         ITRY=0   linit  zero check
 c—
 c—      are pumps  supposed  to be on ?  if not skip

         IF  
-------
c—     check for zero condition
c—     a zero may not be a zero but a bad reading ckeck and see
c—     in this section no zero's should be read therefore an error
c—     has occurred
c—
        ITRY=ITRY+1
        IF (ITRY. I_E. 5 .flND.TEST . EQ. 0. ) GOTO £0
c—
c—     check for reading if not 0. relays on properly
c—     no conversion to freq.    reading in time period as
c—     we do not care what it is only that it is > 0.
c—     a 0.  means the relay did not turn on properly.
c—
        IF (TEST.NE.0) GOTO 30
c—
c—     channel switching routine
c—
        WRITE  'ERROR ON RELflY CLOSING - CHflNNEL', ILOC,SYSTM1, SYT
£01     COLL RLLTI(MFLflG)
        IF (MFLflG. EQ.l)  GOTO £01
        COLL BOUCHN(ILOG, MFLflG)
        IF (MFLflG.EQ. 1)  GOTO £01
        CfiLL RET         !close channels
        ITRY=0   linit time to try 0 reading
        GOTO £0  Irecheck reading
c—
c—
c—
30      CONTINUE
c—
        RETURN
c—
c—     error section
c—
150     IEQFFT=1
        WRITE (LTERM,*)  'FLOW RELflY PROBLEM',ILOC, SYSTMl,SYSDflT
        RETURN
        END

        SUBROUTINE BOUPKC
C T-
c 1
c 1
c 1
c 1
T-
c —
c —
c —
Program :
Module :
Function:


diagnost

BOULD. REL
BOUPKC. FOR
RESET DIAGNOSTIC BITS TO 0


ic block

1
1
1
1



        LOGICfiL*! LEVEL1,LEVEL£, LEVELS, LEVEL4
        INTEGER*^ IlflREfl,I£flREfl
        COMMON /DIflG/LEVELK10),LEVEL£(10),LEVEL3(10),LEVEL4<10),
                                   159

-------
        *LTERM,ITERM, flTIMES,BTIMES, IADPOK, IflDPEK,IPHONE, ILDTR, IHDTR,
        *IIflREfl(4),I£flREfl(4), SYSTM1, SYSDflT, JBDIO, JBDPGM, JBDS1, JBDS2,
        #JBDCH1,JBDCH2,JBDCTL,JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS,JBFFT,
        *JBERR, JBMflH, JBPMP, JBSTfl, JBTIM, JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL, JBCHN,JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFflL, JBDISK,JBTT,
        *JBECON,JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD,JBESHT,JBRUN,
        *JBOVR, JBWflIT,JBSLEP
c—
        CflLL IPOKEB  (JBDS1,JBPKC)
c—
c—     byte JBDIO used for output determination  and FG/BS
c—     interaction so  it does not get  reset
c—
c—     byte JBDPBM is  used to see if the fg  program
c—     is still running and does not get reset
c—
c—     byte defined by JBDCH2 is the override byte
c—     this allows the program to execute even though  all  error flags tel
c—     it to enter the shut down mode
c—
        CflLL IPOKEB (JBDS1,0)
        CflLL IPOKEB (JBDS£,0>
        CflLL IPOKEB (JBDCH1,0)
        CflLL IPOKEB (JBDCTL,8)
        CflLL IPOKEB (JBDERR, 0)
        RETURN
        END
                                   160

-------
        SUBROUTINE  BOUPMP
c +
c I  Program  :     BOULD. REL
                                                                           I
                                                                           I
c
c
c
r*
1 Module :
1 Function:
1
BOUPMP. FOR
TURNS PUMPS ON

c
c
c
data common block
        •WINBUC, NBF 1 , NBHC, l_El,r \
        *KFBR(£),KFBP,KSBR<£)
        jtUDI 1MB f&\
c—
c—     channel  switching common block
c—
        COMMON/CHflN/IBCONB,IBCOO, IBFCI, IBVFI, IBVFO, IBTCM, IBREFR,
        *IBWS,IBMPR, IBPPR,IBPNIC,MBCON<7), NBCON, MBTMP<10),
        *NBTMP, MBPMP(2),NBPMP,MBPRS(7),NBPRS, MBFFT(2), NBFFT,
        *MBCONR(3>,NBCONR
c—
c—     control  character common block
c—
        COMMON /CONTRL/Lfl,LB,LC,LR,LDLE,LQU,LLRS, LTOCT, LLfiCT, LTftC,
        *LLflC,LI,LF,LCR,LLF,ITRH1,ITRM1,ITRS1,ITRT1,ITRTS, ITRT3
c—
c—     diagnostic  block
c—
        LOBICflL*! LEVEL1,LEVELS,LEVEL3, LEVEL4
        INTEBER*4 IlOREfl,I£flREfi
        COMMON /DIflB/LEVELK10), LEVEL£(li3), LEVEL3(10), LEVEL4(10),
        *LTERM, ITERM, flTIMES,BTIMES, IftDPOK, IflDPEK, IPHONE, ILDTR,  IHDTR,
        * IIfiREft(4),I£flREfl(4),SYSTM1,SYSDflT,JBDIO,JBDP6M, JBDS1,  JBDS£,
        *JBDCH1,JBDCHE, JBDCTL,JBDERR,JBDflL,JBTMP,JBWND,JBCON,JBPRS,JBFFT,
        *JBERR, JBMflH,JBPMP,JBSTfi,JBTIM,JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL, JBCHN, JBRLL,JBWRT,JBRET,JBRED, JBBIT, JBFfiL, JBDISK,JBTT,
        *JBECON,JBEINT,JBETMP,JBEFFT,JBEDflL,JBEHND, JBEflDD,JBESHT, JBRUN,
        *JBOVR,JBWflIT,JBSLEP
c—
        DIMENSION ITMP(£)
c—

c—
c—     bg diagnostics
c—
        CALL IPOKEB (JBDS1,JBPMP)

c—     timing failure traceback
c—
        CALL SCOPY  C   BOUPMP', LEVEL£)
                                    161

-------
        CflLL SCOPY  ('       ',LEVELS)
c—
c—     teporary diagnostics  for debugging
c—
D       CflLL PUTSTR(LTERM,' LOCATION: ','0')
D       CflLL PUTSTR(LTERM, LEVEL!,'  ')
D       CflLL PUTSTR(LTERM,LEVELS,'  ')
D       CflLL PUTSTR(LTERM,LEVEL3,'  ')
c—
c	
c—
c—     if purnp status error  flag set, skip this section
c—
        IF (KINTF.GT.0) BOTO  9
c—
c—     temp hold incase of handshake error
c—
        ITMP(1)=KFBRU)
        ITMP(£)=KFBR(£)
c—
c—
        KCNT=LOCB       !number on stored in LOCB determined  in BGUMHE
c—
c++++++++++++++++++++++++++++++++++++++++++++++++++-n-+++++++++++++++++-t
c—
c—     which pumps need to be turned on
c—
c—
c—     KCNT tells how many pumps need to be turned on
c—     if 0 then no pumps need to be on
c—     if 1 then branch to some pumps need on
c—
        IF (KCNT.NE.0) SOTO 5£

c—
c—     pump decision section
c—

c—
c—
c—     no pumps need be on
c—
C+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*
C	
c—     what is current staus of plot and main  purnp
c—     1 on; then turn off
c—     0 off; leave off  branch to data storeage area
c—
£1      IF. (KFBP.EQ. 0) BOTO 41
c—
c—     start sequence to turn purnp off
c—     remember this is set  up on a flip/flop  chip which must  be
                                   162

-------
c—     written to to turn the pump off
c—
£0      COLL RLLTI(MFLflG)        !set scanner to close channels
        IF (MFLflG.EQ.1) GOTO £0
        COLL BOUCHNdBMPR, MFLflB)         Imain  pump relay
        IF (MFLflG.EQ.1) SOTO £0
        CflLL BOUCHN(IBPPR, MFLflG)         Iplot  pump relay
        IF (MFLflG.EQ.1) GOTO £0
c—
c—     store current staus of main and  plot pumps
c—
c—
c—     determine which plot valve relays are  on and turn off
c—
30      DO 40,L=i,NBPMP
c—
c—     determine if that plot valve relay is  on
c—     if 8;off   - branch
c—     if l;on  - turn off
c—
        IF (KFBR(L).EQ.0> GOTO 40
        CflLL BOUCHN(MBPMP(L),MFLflB)      Iplot  valve relay
        IF (MFLflG.EQ.1) GOTO £0
        KFBR(L)=0       !set flag
        BOUDOT(£9+L)=KFBR(L)     !store in array
40      CONTINUE

c—     now close channels
c-
        CflLL RET(MFLflG)
        IF (MFLflG.EQ.0) GOTO 41
        KFBR(1)=ITMP(1) !put back to status before handshake error
        KFBR(£)=ITMP(2)
        GOTO £0
c—
c—     reset pump flags to off  (0)
c—
41      KFBP=0
c—
c—     store current staus
c—
        BOUDflT(£6)=KFBP
        RETURN
c++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++H
c—
c—     some pumps need be on
c—
c—
c—
c—     check to see if any change in status (for all relays) is needed
c—     if no —>  return
c—     if yes —) change status
                                   163

-------
5£      KP=0     linit  flag  for return
c—
        DO 53,I=1,NBPMP
        IF  0 relay needs
1 <0 relay now on
1 >0 relay now on




in each state

to be off now off
to be on now off
needs to be off
needs to be on

        IF  (KFBR(KCP). EQ.0. flND. KPUMP (KCP).LT. 0)  GOTO 440         Heave  be
        IF  (KFBR(KCP).EQ. 0.flND. KPUMP(KCP).GT.0)  GOTO 65          Iturn on
        IF  (KFBR(KCP).EQ. 1.flND. KPUMP(KCP).GT.0)  GOTO 440         !leave  be
        IF  (KFBR(KCP).EQ. 1.flND. KPUMP(KCP). LT. 0)  GOTO 65          Iturn off
        TYPE *,'ERROR BOUPMP SHOULD NOT  BE HERE'
        BOTO 440
c—
c—     write to flip/flop chip
c—
65      CALL BOUCHN(KPUMP(KCP), MFLflG)    Iplot  valve relay
        IF  (MFLflG. EQ. 1) GOTO 50
                                    164

-------
c—
c—     if kpump  <8 not to be on if on turn off
c—               >0 to be on

        IF (KPUMP(KCP).LT.0) 60TO 67
c—
c—     set pump  flags to on by making them =1
c—     remember: KFBP flag for main and plot pumps is
c—     = to 1 if any plot valve on.
c—     get system date and time purnp turned on
c—
        KFBR(KCP)=1
        BOUDflT(29+KCP)=KFBR
-------
        SUBROUTINE BOUPRS
c +	
c  I Program  :     BOULD.REL
c  I Module   :     BOUPRS.FOR
c  I Function:     REflDS  THE HOMEMftDE CONDUCTIVITY PROBES
c  I
C H	~~   ———     ______   —
C	
c—     data common block
c—
        COMMON/BOULD/BOUDflT(60), BOUfl(£5), BOUB(£5), BDATfl(60), BOUT(60),
        *NflRRflY,BCONflV(£),BTMPAV(£),BPRSflV(£),NPL, NPR,NBT1,NBT2,NBC1,
        *NBC£,NBP1,NBPS,LBCF(£), LBTF(£), LBPF(2), SETPTC(£),LOCB,
        *KFBR(£),KFBP,KSBR(£),KSBP,KTMPF, KCONF, KPRSF, KINTF,KWNDF,KFFTF,
        *KPUMP(£)
c—
c—     channel switching common block
c—
        COMMON/CHflN/IBCONB, IBCOO, IBFCI, IBVFI, IBVFO, IBTCM,IBREFR,
        *IBWS,IBMPR, IBPPR, IBPNIC,MBCON(7), NBCON, MBTMP(10),
        *NBTMP,MBPMP<£),NBPMP,MBPRS(7), NBPRS, MBFFT(£), NBFFT,
        *MBCONR(3),NBCONR
c—
c—     data checking common block
c—
        COMMON/CONDCL/WINDMX, TEMPMN, BCONL, BCONH,BCONRF(3),BRI(3),
        *BVOLTS,Bfll,BTMPRF, BCONIN, BflVETP(£), BTMPHZ, RflNL,RflNH,BFTDflC(4)
c—
c—     control character common block
c—
        COMMON /CONTRL/Lfl, LB, LC, LR, LDLE, LQU, LLOS, LTftCT,LLfiCT,LTflC,
        *LLflC,LI,LF, LCR,LLF, ITRH1, ITRM1, ITRS1,ITRT1,ITRT£,ITRT3
c—
c—     diagnostic  block
c—
        LOGICAL*!  LEVEL 1,LEVEL£,LEVELS,LEVEL4
        INTEGERS  IlftREfl, I£flREfl
        COMMON /DIflG/LEVEL 1(10), LEVEL£(10), LEVEL3(18), LEVEL4 (10),
        *LTERM,ITERM, ATIMES,BTIMES, IflDPOK, IflDPEK,IPHONE,ILDTR,IHDTR,
        *IlAREfl(4),I£AREA(4),SYSTM1,SYSDAT, JBDIO,JBDPGM, JBDS1,JBDS£,
        *JBDCH1,JBDCH2, JBDCTL,JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS,JBFFT,
        *JBERR, JBMAH, JBPMP, JBSTft, JBTIM, JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL,JBCHN, JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFflL, JBDISK, JBTT,
        *JBECON,JBEINT,JBETMP,JBEFFT, JBEDflL,JBEHND, JBEflDD,JBESHT,JBRUN,
        *JBOVR,JBWflIT,JBSLEP
c—

c—
c—
c—     bg program  diagnostics
c—
        CflLL IPOKEBUBDS1, JBPRS)
                                   166

-------
c—
c—     timing failure traceback
c—
        CflLL SCOPY  C BOUPRS',LEVELS)
        COLL SCOPY  C       ',LEVELS)
c—
c—     temporary diagnostics for debugging
c—
D       COLL PUTSTR(LTERM, ' LOCflTION:  ','0')
D       CfiLL PUTSTFULTERM,LEVEL1,'  ')
D       CflLL PUTSTR(LTERM, LEVELS,'  ')
D       CftLL PUTSTR(LTERM,LEVEL3,'  ')
c—

c—
c—             channel switching section stats  here
c—             see  boudat.for  for  channel assignments
c—

c—
        DO 30, L=1,NBPRS
c—
c—     determine which ave temp to use
c—
        IF (L .LE.1) BTMP=BOUDflT
-------
        IF  (MFLflG. EQ. 1) BO TO £0
c—
c—     close conductance bridge
c—
        CftLL BOUCHN    0.8).
c—
        IF  (L.NE.1)   GO TO 333
        IF  ((BOUDflT(LOCB).GT. (1. £*BCONRF(LTEST))).OR. (BOUDftT(LOCB).LT.
         (0.8*BCONRF(LTEST)))) GOTO 60
c—
c—
c—     do conductivity calculations
c—      1 volt = 10 Khz
c—       divide by  10 to get reading back into volts
c—     conduct ivity= cornduct ivity+ teperature  correction
c—       temp correction =C (Ref. ternp. ) -  ( (ave temp)*cond. correct ion)*10]
c—             *1000 to convert to micro/Siemens
c—
333     TMP=BOUDflT(LOCB)/(10. *BRI(LTEST)*BVOLTS)
                                    168

-------
        BOUDfiT (LOCB) =TMP* (1+ (BTMPRF-BTMP)*BCONIN)*10. E+06
c—
c—
D       WRITE (LTERM,*) Wfl, WB, BOUDflT(LOCB), LOCB,LTEST,BCONRF(LTEST)
        GOTO 30
40      WRITE (LTERM,41) L
41      FORMflT 
-------
         SUBROUTINE BOUSLP
c  +	
c  I Program  :     BOULD.REL
c  I Module   :     BOUSLP.FOR
c  I Function:     DETERMINES WflIT PERIOD BETWENN DflTfl SflMPLINB
c  I
c  +	
c—
c—      diagnostic block
c—
         LOBICflL*!  LEVEL1,LEVEL2,LEVELS,LEVEL4
         INTE6ER*4 IlfiREfl,ISflREfl
         COMMON  /DIflG/LEVELl(10),LEVEL£(10),LEVEL3(10),LEVEL4<10>,
         *LTERM,ITERM, flTIMES,BTIMES, IflDPOK, IflDPEK, IPHONE,ILDTR,IHDTR,
         *IIftREfl (4), Ic'flRER (4), SYSTM1,SYSDfiT, JBDIO, JBDPBM, JBDS1, JBDS£,
         *JBDCH1,JBDCH2, JBDCTL,JBDERR, JBDftL, JBTMP, JBWND, JBCON, JBPRS,JBFFT,
         *JBERR,JBMflH, JBPMP, JBSTfl, JBTIM, JBDK1, JBSLP, JBPKC, JBINT,
         *JBRTL,JBCHN,JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFftL, JBDISK,JBTT,
         *JBECON,JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD,JBESHT,JBRUN,
         *JBOVR, JBWOIT,JBSLEP
c—
c—      file  information block
c—
         COMMON/FILE/BOUDEV,MflBLK<4), MBBLK(4),MCBLK(4),MDBLK (4),
         *MEBLK(4), MFBLK(4), M6BLK(4), MHBLK(4), MIBLK(4), MJBLK(4),MKBLK(4),
         *MLBLK(4),MMBLK(4), MNBLK(4), MOBLK<4), MPBLK(4), MQBLK(4),MRBLK (4),
         *MSBLK(4),
         *MflBLKL,MflBLKW, MBBLKL,MBBLKW, MCBLKL,
         *MCBLKW,MDBLKL, MDBLKW, MEBLKL, MEBLKW, MFBLKL,MFBLKW, M6BLKL,
         *M6BLKW,MHBLKL, MHBLKW, MIBLKL, MIBLKW, MJBLKL, MJBLKW,MKBLKL,
         *MKBLKW,MLBLKL,MLBLKW, MMBLKL, MMBLKW, MNBLKL,MNBLKW, MOBLKL,
         *MDBLKW,MPBLKL, MPBLKW, MQBLKL, MQBLKW, MRBLKL, MRBLKW, MSBLKL,MSBLKW
c—
c—      main program  sleep  block
c—
         COMMON/WRIT/IBPOLH, IBPOLM, IBPOLS, IBPOLT, IBCC, IBCH,IBCM,
         *IBCS,IBCT
c—
c—
c—
         DIMENSION  DftYS(12),ZWRITE(£:)
         DflTfl DfiYS/31. ,£8. ,31., 30. ,31., 30. ,31., 31., 30.,
         *31. ,30.,31./
c—

c—      array locations for time  and  date of next run
c—      these values  are calculated  from the system date and time
c—      ZWIRTE(l)=time
c--      ZWRITE(£)=date
Q		__-.___	.___;	
C	
c—      bg diagnostics
                                    170

-------
c—
        CALL IPOKEB(JBDS1, JBSLP)
c—
c—     timing failure traceback
c—
        CflLL SCOPY C  BOUSLP', LEVEL3)
c—
c—     temporary diagnostics for debugging
c—
D       CALL PUTSTR(LTERM, ' LOCATION: ', ' 0» )
D       COLL PUTSTR(LTERM, LEVEL1,' ')
D       CfiLL PUTSTR(LTERM, LEVELS,' ')
D       CALL PUTSTR*100. >+FLOAT(IBPOLM)
        TIME=TIMflDD(TMP,CURTIM, IFLA6)
c—
c—     is this a new day ? IFLAB=1

        DATE=SYSDAT
        IF (IFLA6. EQ. 0) GOTO  12
        TIME=TIME-2400.
        CALL BOUDYR(SYSDftT,DATE)
c—
c—
c—
le      ZWRITEU)=TIME
        ZWRITE(£)=DATE
c—
c—     write to disk file                                          '
c—
        CftLL BOURED  (MJBLK,.ZWRITE, MJBLKW/2, MJBLKW, 0,' WR' ,' BO', LERR)
        IF (LERR.NE. 0) GOTO £0
        IBCH=IBPOLH
        IBCM=IBPOLM
        IBCS=IBPOLS
        IBCT=IBPOLT
        RETURN
c—
c—     error on write
c—
£0      WRITE (LTERM,*) 'SLP-EW MJBLK'
        RETURN
        END
                                   171

-------
        SUBROUTINE BOUSTft
c + 	
c 1 Program
c 1 Module
c 1 Function
c 1
c —
c — data
c —

: BOULD. REL
: BOUSTfl. FOR
: OUTPUTS STfiTUS


common block




INFORMflTION TO DESIGNATED DEVICE




        COMMON/BOULD/BOUDflT (60) , BOUfl (£5) , BOUB (£5) , BDflTft (60) , BOUT (60) ,
        *NflRRflY, BCONflV ( £) , BTMPfiV (£ ) , BPRSflV (£ ) , NPL, NPR, NBT1 , NBT£, NBC 1 ,
        *NBC£, NBP1 , NBP£, LBCF (£) , LBTF (£) , LBPF (£) , SETPTC (£) , LOCB,
        #KFBR (£) , KFBP, KSBR (£) , KSBP, KTMPF, KCONF, KPRSF, KINTF, KWNDF, KFFTF,
        *KPUMP(£)
c —
c —     data checking common  block
c —
        COMMON/CONDCL/WINDMX, TEMPMN, BCONL, BCONH, BCONRF(S) , BRI (3) ,
        *BVOLTS, Bfll , BTMPRF, BCONIN, BWETP (£) , BTMPHZ, RflNL, RflNH, BFTDflC (4 )
c —
c —     diagnostic block
c —
        LOBICflL*!  LEVEL 1, LEVELS, LEVELS, LEVEL4
        INTEGER**  IlfiREfl, I£flREfl
        COMMON  /DIfl6/LEVELl(10), LEVEL£(10), LEVEL3(10), LEVEL4(10),
        *LTERM, ITERM, flTIMES,BTIMES, IflDPOK, IflDPEK, I PHONE, ILDTR, IHDTR,
        fcllflREfl (4) , I£flRER (4) , SYSTMi, SYSDflT, JBDIO, JBDPGM, JBDS1, JBDS£,
        *JBDCH1, JBDCHS, JBDCTL, JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
        *JBERR, JBMflH, JBPMP, JBSTfi, JBTIM, JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL, JBCHN, JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFflL, JBDISK, JBTT,
        *JBECON, JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD, JBESHT, JBRUN,
        *JBOVR, JBWflIT, JBSLEP
c —
c—     0 <> 0 {> 0 <> <> <> <> <> <> <> <> <> {> <> <> <> <>  <> <> <>  <> <> {> {> <> <> <> <> <> <> <>
c —
c —     dimension  labels and  arrays
c —

        DIMENSION  XLfiBEL(3) , YLRBEU3) , ZLfiBEL (3) ,
        *QLflBEL (3) , RLflBEL (3) , ULflBEL (3) , VLflBEL (3) ,
        *STftT(£),MLOC(£, 1 1) , flLflBEL(3), BLflBEL(S)
        LOGICflL*!  TLflBEL(8),DLflBEL<9)
c —
c —     data for labels
c —
        DflTfl XLftBEL/'TEMP','ERflT','URE ' /YLflBEL/
        *'COND','UCTI','VITY'/ZLflBEL/'COMM' ,'.  CO',
        *'ND  '/ZON/'ON   ' /ZOFF/' OFF ' /QLflBEL/' PLOT',
        *' STfl','TUS '/RLflBEL/' SET  ',' POINT', 'T   '/
        *DEPl/'30cm'/ULfiBEL/' WIND' ,'SPEE','D   ' /
        *WLflBEL/»flIR '/VLflBEL/' FLOW','  RflT' , ' E    '/
                                   172

-------
        *flLflBEL/'COND', '.  RE',' flD.  '/BLflBEL/'DIFF','EREN',
        *'CE  '/
c—
c—     MLOC array  is  used  to point  to the proper locqation of the BOUDflT
c—     array to allow the  data output to use a do loop for ease of forrnag
c—     see boudat.dat for  locations of boudat array.
c—
        DflTfl MLOC/2,6,3,7,4,8, 1£, 15, 13, 16, 14, 17, 19, ££, £0, £3, £1, £4,
        *5,9,£8,£9/
c—
c—     temp output to detect errors
c—
c—
c—     bg diagnostics
c—
        CflLL IPOKEB  (JBDSl,JBSTfl)
c—
c—     timing failure traceback
c—
        CflLL SCOPY  C  BOUSTfl', LEVELS)
c—
c—     get date and time to  be output with data
c—
        CflLL TIME  (TLflBEL)
        CflLL DflTE(DLflBEL)
c—
c—     write header

        WRITE (LTERM,9)          !FORMFEED
        WRITE (LTERM,10) BTIMES
c—
c—     initialize  pump staus flag  to  "off"
c—     then determine if pumps were on
c—
        DO 101,I=1,NPL
        STflT(I)=ZOFF
101     IF (BOUDflT(£9+1).EQ.1.)  STflT(I)=ZON     !LOC 30,31
c—
c—     output wind speed and air temperature
c—
        WRITE (LTERM,40) DLftBEL,TLflBEL
        WRITE (LTERM,£9) ULflBEL,BOUDflT(£5)       1WIND SPEED
        WRITE (LTERM,£8) WLflBEL,XLflBEL,BOUDflT(10)        IfllR  TEMP
        WRITE (LTERM,11)
        DO 100,L=l,£
100     WRITE (LTERM,1£) L
        WRITE (LTERM,15)
c—
c—     set pump status and output ave temp, cond,  cornrn. cond
c—     along with the setpoint
c—
        WRITE (LTERM,16) XLflBEL,BOUDflT(45),BOUDflT(46)
                                   173

-------
c—
c—
c—
£6
£5
        WRITE  (LTERM,16)  ALflBEL,BOUDAT
        WRITE  (LTERM,16)  RLflBEL,SETPTC
        *BOUDAT(RflNH)-SETPTC(£)
        WRITE  (LTERM,17) QLflBEL,STAT<1),
output data for both  plots
DO £5,1=1,NPL
LM=0     [INITIALIZE ARRAY  SUBSCRIPT FOR OUTPUT
WRITE (LTERM,£0)  I
DO £6 L=1,NPR
WRITE (LTERM,£1)  L
CONTINUE
WRITE (LTERM,15)
WRITE (LTERM,£7)  XLABEL, BOUDAT(MLOC(I, LM+1)),BOUDftT(MLOC(I,LM+£)),
*BOUDAT(MLOC(I,LM+3))    !LOC  (£-4)  (6-8)
WRITE (LTERM,£7)  YLABEL, BOUDAT(MLOC(I, LM+4)),BOUDflT(MLOC(I,LM+5)),
*BOUDAT(MLOC(I,LM+6))    !LOC  (1S-14)  (15-17)
WRITE (LTERM,£7)  ZLflBEL,BOUDAT(MLOC(I, LM+7)),BOUDftT(MLOC(I,LM+8)),
*BOUDAT(MLOC(I,LM+9))    !LOC  (19-E1)  (££-£4)
WRITE (LTERM,£8)  XLABEL,DEP1,BOUDAT(MLOC(I,LM+10))       !LOC  (5,9)
WRITE (LTERM,£9)  VLABEL, BOUDAT(MLOC(I, LM+11)>    !LOC (£8,£9)
CONTINUE
WRITE (LTERM,9)          !FORMFEED
RETURN
c —
c —
c —
c —
9
10
11
1£
15
16
17
£0
£1
£7
£8
£9
40


format
FORMfiT
FORMflT
FORMftT
FORMflT
FORMflT
FORMflT
FORMflT
FORMflT
FORMflT
FORMflT
FORMflT
FORMflT
FORMflT
END

statements
(1H1)
(T30, ' Boulder Status Information' ,F10. 0/)
(//,' Average Readings',*)
(T£0, 'Plot: ', 11, $)
(/, ' ' )
(X, 3A4, T33, F10. £, T56, F10. £)
(X, 3A4,T38, fl4, T61,A4)
(//, ' Plot ',11,' Readings',*)
(T13, 'Location: ',!!,*)
(X, 3A4,T£7, F10. £, T48, F10. £, T69, F10. £)
(X, 4A4,T£7,F10.£)
(X,3A4,T£7, F10.£)
(' Date: ',9A1,/, ' Time: ',8A1,//)

                                   174

-------
        SUBROUTINE  BOUTIM
c +	+
c I  Program  :    BOULD.REL                                                I
c I  Module   :    BOUTIM.FOR                                               I
c I  Function:    CALCULATES THE RMOUNT TIME EflCH PUMP WfiS ON              i
c I                                                                         I
c +	+
c—
c—     data common block
c—
        COMMON/BOULD/BOUDflT(60),BOUfl(£5),BOUB(£5),BDflTfl(60), BOUT(60),
        *NflRRftY,BCONflV(£),BTMPftV(£),BPRSflV(£),NPL, NPR, NBT1, NBT2, NBC1,
        *NBC£,NBP1,NBP2,LBCF(£),LBTF(2),LBPF(£),SETPTC(£),LOCB,
        *KFBR(£), KFBP, KSBR(£), KSBP,KTMPF, KCONF,KPRSF,KINTF,KWNDF, KFFTF,
        *KPUMP(£)
c—
c—     diagnostic  block
c—
        LOGICfiL*1 LEVEL1,LEVEL£,LEVEL3, LEVEL4
        INTE6ER*4  IlftREfi,I£flREfl
        COMMON  /DIftB/LEVELl(10), LEVEL£(10>, LEVEL3U0), LEVEL4UIZO,
        *LTERM, ITERM, ATIMES,BTIMES,IflDPOK,IflDPEK,IPHONE,ILDTR, IHDTR,
        *IlftREfl(4),I£flREfl(4), SYSTMl,SYSDflT,JBDIO,JBDPGM, JBDS1, JBDS£,
        fcJBDCHl,JBDCH£,JBDCTL,JBDERR,JBDflL,JBTMP,JBWND, JBCON, JBPRS, JBFFT,
        *JBERR, JBMflH,JBPMP,JBSTfl,JBTIM,JBDKi, JBSLP, JBPKC, JBINT,
        *JBRTL, JBCHN, JBRLL,JBWRT,JBRET,JBRED, JBBIT, JBFflL, JBDISK, JBTT,
        «JBECON,JBEINT,JBETMP,JBEFFT,JBEDflL,JBEHND, JBEflDD, JBESHT, JBRUN,
        *JBOVR,JBWflIT,JBSLEP
c—

c—     subroutine  calls:
c—      DflTEI  - converts a REflL*4 date into 3 REflL#4 variables
c—       which  are year,month,day
c—      TDflTE  - returns the difference in days between two dates
c—
Q—_——___._ ___ _^ __———_ ^ _———«.^ _____ ^ _—_ _.—_____-_ — _.———.-.—_—_ __—,—__ ________^_^
c—
        DIMENSION XTIME(£)       !£ FOR NUMBER PLOTS
c—
c—     bg diagnostics
c—
        CALL IPOKEB(JBDS1, JBTIM)
c—
c—     timinf  failure traceback
c—
        COLL SCOPY  C   BOUTIM', LEVELS)
        CflLL SCOPY  C        ',LEVELS)
c—
c—     temporary diagnostics  for  debugging
c—
D       COLL PUTSTR(LTERM,'  LOCflTION:  ','0')
D       COLL PUTSTR(LTERM,LEVEL1,'  ')
                                   175

-------
D
D
c—
c—
c—
c—
c—
CH
c-
c-
c-
c-
9

£
D
D
CH
c-
c-
c-
c-
c-

c-
c-
c-

c-
c-
c-

c-
c-
c-
c—
c—
c—
C+H
10
D
c—
c—
c—
 CflLL PUTSTR(LTERM,LEVELS,'  ')
 CALL PUTSTR(LTERM, LEVELS,'  ')

 determine if there was an  initialisation failure
 if so skip to return and note this failure

 IF (KINTF.LE.8) BOTO 9
 WRITE (LTERM,*) 'Boulder time section skipped
 *due to kintf flag set'
 RETURN
H-+++++H
 calculate time pumps were  on
 init back to zero

 XHRS=0.
 DO £,1=1,NPL
 XTIME(I)=0.
 WRITE (LTERM,*) ' BOUTIM', KSBP, KSBRd ), KSBR<£),
 *KFBP,KFBR(1), KFBR(£)
 if main pump was off no need to determine time on

 past  and present off

 IF (KSBP. EQ. 0.0ND.KFBP. EQ. 0) RETURN

 past  on   present off

 IF (KSBP.EQ. l.OND.KFBP. EQ. 0) GOTO  10

 past  and present on

 IF (KSBP. EQ. l.OND.KFBP. EQ. 1) BOTO  10

 past  off   present on

 IF (KSBP. EQ.0.0ND.KFBP. EQ. 1) BOTO  30
H++++++++++-H-+++++++++++++++-H

 determine time pumps were on

H-+H-+++++++H-++H
 DO 11,L=1,NPL
 WRITE (LTERM,*)  'PUMPS ON', L, KFBR(L), KSBR(L)

 was plot relay on the time before?

 IF (KFBR(L).EQ.0) BOTO 113
                                    176

-------
c—
c—     determine time punip was on
c—
        CflLL DflTEI  (BOUDflT(33+L),fl,B,C)
        CflLL DftTEI  (SYSDflT,D, E,F)
        CflLL TDflTEdFIX(fl), IFIX(B), IFIX(C), IFIX(D), IFIX(E), I FIX (F), I DRY)
        XHRS=IDflY*24
        XTIME(L)=TIMDIF(SYSTM1,BOUDflT(31+L))
        XTIME(L)=XHRS+XTIME(L)
D       WRITE  (LTERM,*) 'XTIME',L,XTIME(L)
c—
c—     is relay on this time ?
c—
113     IF (KFBR(L).EQ. 1)  GOTO 11£
        BOUDftT(50+L)=XTIME(L)
        BOUDflT(54+L)=SYSTMi
        BOUDRT(56+L)=SYSDflT
        GOTO 11
c—
c—     reset time  on
c—
112     BOUDftT<31+L)=0
        BOUDflT(33+L)=0
11      CONTINUE
        RETURN
c—
c—     set new system date and time  for  calculations
c—
30      DO 31,L=1,NPL
D       WRITE  (LTERM,*) 'PAST ON  PRESENT  OFF'
c—
c—     if pump now off branch
c—
        IF (KFBR(L).EQ.0)  GOTO 31
c—
c—     pump on set new date and  time
c—
        BOUDflT(31+L)=SYSTM1
        BOUDflT(33+L)=SYSDflT
31      CONTINUE
        RETURN
        END
                                   177

-------
SUBROUTINE BOUTMP
c + 	
c 1 Program : BOULD. REL
c 1 Module : BOUTMP. FOR
c 1 Function: REflDS TEMPERATURE MODULE
c 1
c + 	
c + 	
c 1 NOTE:
c 1
c 1 ktrapf=l reference ternp out of range
c 1 ktrnpf=£ module failure?
c 1 ktrnpf=3 module lockup
c + 	
c —
c — data common block
c —

1
1
1
i










        COMMON/BOULD/BOUDflT(60), BOUfl(£5),BOUB(£5),BDflTfl(60), BOUT(60),
        *NflRRflY,BCONflV(S), BTMPflV(£), BPRSflV(£), NPL, NPR,NBT1,NBT£,NBC1,
        *NBC£,NBP1,NBP£, LBCF(£), LBTF(£), LBPF(£), SETPTC(£),LOCB,
        *KFBR(£), KFBP, KSBR(£), KSBP, KTMPF, KCONF, KPRSF, KINTF,KWNDF,KFFTF,
        *KPUMP(£)
c—
c—     channel switching common block
c—
        COMMON/CHfiN/IBCONB, IBCOO, IBFCI, IBVFI, IBVFO,IBTCM,IBREFR,
        *IBWS, IBMPR, IBPPR, IBPNIC,MBCON(7), NBCON, MBTMP(10),
        *NBTMP,MBPMP(£),NBPMP, MBPRS(7), NBPRS, MBFFT(£), NBFFT,
        *MBCONR(3),NBCONR
c—
c—     data checking common  block
c—
        COMMON/CONDCL/WINDMX, TEMPMN, BCONL, BCONH, BCONRF(3), BRI(3),
        *BVOLTS,Bfll,BTMPRF, BCONIN,BflVETP(£), BTMPHZ,RflNL,RfiNH,BFTDAC(4)
c—
c—     control character common block
c—
        COMMON /CONTRL/Lfl, LB, LC, LR, LDLE, LQU, LLflS, LTftCT, LLflCT,LTflC,
        *LLflC,LI,LF,LCR,LLF, ITRH1, ITRM1, ITRS1,ITRT1,ITRTS,ITRT3
c—
c—     diagnostic block
c—
        L06ICflL*l LEVEL1,LEVEL£,LEVELS,LEVEL4
        INTESER*4 IlfiREfi,I£flREfi
        COMMON /DIflB/LEVELK10), LEVEL£(10), LEVEL3(10), LEVEL4Q0),
        *LTERM, ITERM, ATIMES,BTIMEB, IflDPOK, IflDPEK,IPHONE, ILDTR,IHDTR,
        *IlfiREfl(4),I£AREfl(4),SYSTMl,SYSDflT,JBDIO,JBDPGM, JBDS1,JBDS£,
        *JBDCH1,JBDCHE, JBDCTL, JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS,JBFFT,
        *JBERR, JBMflH, JBPMP,JBSTfi, JBTIM, JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL,JBCHN, JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFflL, JBDISK,JBTT,
        *JBECON,JBEINT, JBETMP, JBEFFT, JBEDAL, JBEHND, JBEflDD,JBESHT,JBRUN,
     .   *JBOVR, JBWflIT,JBSLEP
                                   178

-------
c—
c————	——	——	—	____	_—_	
c—
c—
c—
c—     ITMPF is an error flag which  is set when  there  is an  error  with te
c—     temperature module,  initialize to zero each time called
c—
        KTMPF=0 linit flag
c—
c—     diagnostics section
c—
        COLL IPOKEB(JBDS1, JBTMP)
        CflLL SCOPY  C BOUTMP',LEVELS)
        COLL SCOPY  C      ',LEVELS)
D       CALL PUTSTR(LTERM,'  LOCATION: ','0')
D       COLL PUTSTRtLTERM, LEVEL1,' ')
D       COLL PUTSTR(LTERM, LEVELE,» ')
D       CftLL PUTSTRtLTERM, LEVELS,' ')
£__
c—     read temperature and check for equipment  failure
c—
        ILOCK=0         !for lockup check
        IZERO=0         !for module check
c—
        DO 38, L=1,NBTMP
        ITRY=0  linit zero read counter
        LOCB=L  !array location for boudat
c	
c—     start control sequence
c—
£0      CflLL RLLTI(MFLflG)       !set conditions so channels can be  closed
        IF (MFLflG.EQ.1) GO TO £0
c—
c—     close voltage to frequency counter input
c—
        CflLL BOUCHN  (IBFCI,MFLftG)
        IF (MFLflG.EQ.1) GO TO £0
c—

c—     close voltage frequency output

        CflLL BOUCHN  (IBVFO,MFLflG)
        IF (MFLflG.EQ.1) GO TO £0
c—
c—     close voltage frequency input
c—
        CflLL BOUCHN  (IBVFI,MFLflG)
        IF (MFLflG. EQ. 1) GO TO £0
c—
c—
c—     close temperature conversion module
                                   179

-------
c—
        CflLL BOUCHN  (IBTCM,MFLflS)
        IF  (MFLflG.EQ.1)  SO  TO  £0
c—
c—     close temperature sensor  for  plot
c—
        CflLL BOUCHN  (MBTMP(L),MFLflB)
        IF  (MFLflG. EQ.1)  GO  TO  £0
c—
        CflLL RET(MFLAG)  !tells scanner  all  commands have been sent
        IF  (MFLflG.EQ. 1)  GO  TO  £0
c—
        CflLL ISLEEP  (0,0,1,0)    Igive time  for  sensors to =
c—
        CflLL RTLLI(MFLflG)        Isets conditions  so data can be received
        IF  (MFLflG.EQ. 1)  GO  TO  £0
c—
        CflLL WRITE(BOUDflT(LOCB), MFLflG)   !converts data to real*4 number
        IF  (MFLflG.EQ. 1)  GO  TO  £0
D       WRITE (LTERM,*)  'BOUTMP ' ,BOUDflT(LOCB),LOCB
c—
c—     end control sequence

c—
c—     if conductivities and  other temperature are 0  also
c—     scanner is malfunctioning
c—     calculate temperatures for all  columns
c—
c—     check for zero condition
c—     a zero may not be a zero but a  bad  reading  ckeck and see
c—
        ITRY=ITRY+1
        IF  (ITRY.LE. 5
           .flND.BOUDflT(LOCB) .EQ. 0.)
               GOTO £0
        IF  (BOUDflT(LOCB).EQ. 0.
           .flND.  ITRY .6T.5)
               WRITE  (LTERM, £££) LOCB,BOUDflT(LOCB)
        IF  (BOUDflT(LOCB).LT. 100.) GOTO  £00
        ILOCK=ILOCK+1
        WRITE (LTERM,*)  'BOUTMP - lockup probe  ',LOCB
£00     IF  (BOUDflT(LOCB).NE.0.) GOTO 334
c—
c—     set zero counter for module check
c—
        IZERO=IZERO+1
c—
c—     do calculations
c—     Equation:
c—
c—     degree c = (Cdata/10.3  + constant)/©. 1
c—
                                   180

-------
c—             where data is in Khz
c—
c—     BOUfl array holds temperature constant
c—     0.1  -> 100 millivolts per degree centigrade
c—     10. -> 10 Khz = Ivolt
c—
334     BOUDflT(LOCB)=((BOUDflT
-------
SUBROUTINE BOUWND
£ + _ _
c 1 Program
c 1 Module
c 1 Function
c 1
c + 	
c —
c —
c — data
c —
: BOULD. REL
: BOUWND. FOR
: REflDS WIND SPEED MODULE
common block

1
1
1
1

        COMMON/BOULD/BOUDflT<60), BOUfl<£5>, BOUB<£5),BDflTA(60),BOUT<60>,
        *NflRRflY,BCONftV <£), BTMPftV(£ >, BPRSflV(£), NPL, NPR,NBTi,NBT£,NBC1,
        *NBC£,NBP1,NBP£, LBCF(£), LBTF(£), LBPF<£), SETPTC(£),LOCB,
        *KFBR<£),KFBP,KSBR<£), KSBP, KTMPF, KCONF, KPRSF,KINTF,KWNDF,KFFTF,
        *KPUMP<£)
c—
c—     channel  switching  common block
c—
        COMMON/CHQN/IBCONB,IBCOO, IBFCI, IBVFI, IBVFO,IBTCM,IBREFR,
        *IBWS,IBMPR, IBPPR, IBPNIC,MBCON(7), NBCON,MBTMP(10),
        *NBTMP,MBPMP(2),NBPMP,MBPRS(7), NBPRS, MBFFT(£), NBFFT,
        *MBCONR(3),NBCONR

c—     data checking  common block
c—
        COMMON/CONDCL/WINDMX, TEMPMN, BCONL, BCONH, BCONRF(3), BRI(3),
        *BVOLTS,Bfll, BTMPRF, BCONIN, BflVETP(£), BTMPHZ, RflNL,RflNH,BFTDflC(4)
c—
c-—     control  character  common block
c—
        COMMON /CONTRL/Lfl, LB, LC, LR, LDLE, LQU, LLfiS, LTACT, LLftCT,LTfiC,
        *LLflC,LI,LF,LCR,LLF, ITRH1, ITRM1, ITRS1, ITRT1, ITRT£, ITRT3
c—
c—     diagnostic  block
c—
        LOGICflL*1 LEVEL1, LEVEL£, LEVELS, LEVEL4
        INTE6ER*4 IlfiREfl,IfiflREfl
        COMMON /DIfiG/LEVELl(10),LEVEL£(ll3),LEVEL3(10),LEVEL4(10),
        *LTERM,ITERM, flTIMES,BTIMES, IflDPOK, IflDPEK,IPHONE, ILDTR, IHDTR,
        *I IflREfl (4), I£flREfl (4), SYSTM1, SYSDflT, JBDIO, JBJDPGM, JBDS1, JBDS£,
        *JBDCH1,JBDCHS,JBDCTL,JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS,JBFFT,
        *JBERR,JBMflH, JBPMP, JBSTfl, JBTIM, JBDK1, JBSLP, JBPKC,  JBINT,
        *JBRTL,JBCHN, JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFfiL,  JBDISK,JBTT,
        #JBECON,JBEINT, JBETMP, JBEFFT, JBEDftL, JBEHND, JBEflDD,JBESHT, JBRUN,
        *JBOVR, JBWflIT, JBSLEP
c	
c—
c—     diariostic section
c—
        KWNDF=0  linit  flag
c—
                                    182

-------
c—     bg program diagnostics
c—
        CftLL IPOKEB(JBDS1, JBWND)
c—
c—     timing failure traceback
c—
        COLL SCOPY <' BOUWND', LEVELS)
        COLL SCOPY C       ',LEVELS)
c—
c—     tempory diagnostics for debugging
c—
D       CftLL PUTSTR
-------
c—
        CflLL RTLLI(MFLflG)        Isets  conditions so data can be received
        IF  (MFLflG.EQ.1)  SO  TO £0
c—
        CflLL WRITE(BOUDflT(LOCB),MFLfl6)   !converts data to real*4 number
        IF  (MFLflB.EQ.1)  SO  TO £0
c—
c—     check for  zero condition
c—     a zero may not be a zero but a  bad  reading ckeck and see
c—
        ITRY=ITRY+1
        IF  (ITRY.LE. 5 .OND.BOUDflT(LOCB)  . EQ.  0.)  60TO £0
c—
c—     do calculations  for wind speed
c-—
c—     calculations:
c—      ClkHz=10rnph3  reading is in mega Hz  so  it  is converted to kHz by
c—      divideby 100. which yields mph  .This is  converted  to Km/hr
c—      by multiplying  by 1.609
c—
c—     divide by 100 because 10kHz = 100rnph  or  lkHz=10mph
c—     1.609 to convert to Km/hr
c—
333     BOUDftT(LOCB) = (BOUDflT(LOCB)/100. )*1.609   Iresult  in  Km/hr
c—
c—
D       WRITE (LTERM,9000) BOUDflT(LOCB), LOCB,LEVELS
D9000   FORMflT (X,5X, ' REflDING',E1£. 5,5X, 'LOG', 15, 10A1)
30      CONTINUE
        RETURN
        END
                                   184

-------
        SUBROUTINE BOUBIT
C 1
c
c
c
c
c
C "1
C
C '
c—
c—
c—
Program :
Module :
Funct i on :


in array

diagnost

BOULD. REL
BOULBIT. FOR
converts integer to binary bit equivalent for
status of DflC and system configuration

ibit(16) ibit(l)=bit 0 ibit(16)=bit 15

ic block

1
1
determininl
1
1
1



        LOGICflL*! LEVEL1,LEVELS,LEVELS,LEVEL4
        INTEBER*4 IlftREft,ISflREft
        COMMON /DIflG/LEVELl(10),LEVEL£(10),LEv1EL3<10),LEVEL4(10>,
        *LTERM, ITERM,flTIMES,BTIMES,IflDPOK,IflDPEK,IPHONE, ILDTR, IHDTR,
        * IIflREfl(4),I£flREfl(4),SYSTM1,SYSDflT,JBDIO,JBDPGM, JBDS1, JBDS2,
        *JBDCH1,JBDCH2,JBDCTL,JBDERR,JBDflL,JBTMP,JBWND,JBCON, JBPRS, JBFFT,
        *JBERR, JBMflH, JBPMP,JBSTfl,JBTIM,JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL,JBCHN,JBRLL,JBWRT,JBRET,JBRED, JBBIT, JBFfiL, JBDISK, JBTT,
        *JBECON, JBEIIMT, JBETMP, JBEFFT, JBEDftL, JBEHND, JBEftDD, JBESHT, JBRUN,
        *JBOVR, JBWflIT,JBSLEP
c—
c—     base address  common block
c—
        COMMON/PROCES/IflD103,IftDl£3,ITM03, ITM23
c—
c—     bits common
c—
        COMMON/BITS/IBIT(16), IWORD
c—
        DIMENSION KBIT(16)

c—
c	
c—
c—     set diagnostic byte fo bg program
c—
        CflLL IPOKEB (JBDS£,JBBIT)
c—
c—     temporary diagnostics  for debugging
c—
D       COLL PUTSTR(LTERM,' LOCflTION:  ','8')
D       CflLL PUTSTR(LTERM,LEVEL1,'  ')
D       CftLL PUTSTR(LTERM, LEVELS,'  ')
D       CflLL PUTSTR
-------
c—
c—       if negative,  set  sign  bit  and take absolute value
c—
         IF  (IWORD  .LT. 0)  KBIT(l) = 1
         IF  (IWORD  .EQ. -32767)  GOTO 330
         IWORD =  IflBS(IWORD)
c—
c—       derive  binary equivalent
c—
         DO  10 INDEX =  16,1,-1
          KBIT(INDEX)  = MOD,4(X,4I1»
c—
c—      convert to DEC format for DftC
c—
         DO 200,1=1,16
208      IBIT(I)=KBIT(17-I)
D        TYPE 400,(J,IBIT(J),J=16, 1,-1)
D400     FORMflT (X,  !£,'»>», £X, 13)
c—
c—      we're done
c—
         RETURN
        END
                                   186

-------
        SUBROUTINE BOUCHNdJK, MFLflB)
C T 	
c 1 Program :
c 1 Module :
c 1 Function:
c 1
c 1
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c-
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —
c —



BOULD. REL 1
BOUCHN. FOR 1
SENDS THE DESIRED DECIMAL CHANNEL NUMBER TO THE SCANNER 1
flFTER CONVERTING IT TO TWO DISTINCT OCTAL NUMBERS 1
1

definition of variables in this subroutine

UK -
MFLflB
JBIJK
LCH -
LCD -
I LCD -

decimal channel number
- error flag if handshake problem
- channel designation set to bg program for diagnostics
decade designation octal number for scanner
channel designation octal number for scanner
handshake counter for decade designation
ILCH - handshake counter for channel designation

NOTE:
octal
decade
decade
decade

Each number is converted form a decimal to two different
numbers. The first octal number tells the scanner in which
the channel is. The second number is the channel in that
. For example, decimal channel 3£ would be broken down into
3 and channel £. This will cause channel 32 to be closed on
the scanner.


sequence: input (3£) -> convert C3] C£] ->



send C3D -> send C23 -> 32 closed


control characters


        COMMON  /CONTRL/Lfl,LB,LC,LR,LDLE,LQU,LLflS, LTflCT, LLflCT, LTfiC,
        *LLflC,LI,LF, LCR,LLF,ITRH1,ITRM1,ITRS1,ITRT1,ITRTS,ITRT3
c—
c—     diagnostic  block
c—
        LOBICflL*! LEVEL1,LEVEL£,LEVELS, LEVEL4
        INTE6ER*4 IlflRER,I£ftREO
        COMMON  /DIflS/LEVELl(10),LEVEL£(10),LEVEL3(10),LEVEL4(10),
        *LTERM, ITERM,flTIMES,BTIMES,IflDPOK, IflDPEK,IPHONE, ILDTR,  IHDTR,
        *IIflREfl(4),ISflREfl(4), SYSTM1,SYSDflT,JBDIO,JBDPGM, JBDS1,  JBDS2,
        *JBDCH1,JBDCH2, JBDCTL,JBDERR, JBDfiL,JBTMP, JBWND, JBCON, JBPRS, JBFFT,
        *JBERR, JBMflH,JBPMP,JBSTfl,JBTIM,JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL,JBCHN,JBRLL,JBWRT,JBRET, JBRED, JBBIT, JBFflL, JBDISK, JBTT,
        *JBECON,JBEINT, JBETMP,JBEFFT, JBEDflL,JBEHND, JBEflDD,JBESHT, JBRUN,
        *JBOVR, JBWflIT,JBSLEP

c—
        MFLflB=0 linit flag
                                    137

-------
c—
c—
c—
        CflLL IPOKED(JBDS£,JBCHN)
c—
c—
c—
        CflLL SCDPY  <' BOUCHN', LEVELS)
c—
c—
c—
D       CflLL PUTSTFKLTERM, ' LOCflTION: ', ' 0')
D       CflLL PUTSTFULTERM,LEVEL1,' ')
D       CflLL PUTSTR(LTERM,LEVELS,' ')
D       CflLL PUTSTR(LTERM, LEVELS,' ')
D       WRITE (LTERM,*) ' CHflNNEL', UK
c—
c—     converts integer to two different octal numbers
c—     from 0-7
c—
11      LCH=IJK
        JBIJK=IJK
        CflLL IPOKEB  (JBDCH1,JBIJK)      [poke number at designated  address
        LCD=LCH/10
        LCH=LCH-(LCD*10)
c—
c—     convert from integer*£ decimal to octal value equivalent
c—
c—
c—
        LCD=LCD+4B      iconvert low order  to octal
        LCH=LCH+48      !convert high order to octal
        CflLL IPOKE  (IflDPOK,LCD)  !poke number at designated address
        CflLL ISLEEP  
-------
c—
c—     error on handshaking
12      MFLflB=l !set handshaking error flag
        IPOK=(IPEEKB(JBDERR))+JBEHND
        CfiLL IPOKEB(JBDERR,IPOK)
        RETURN
        END
                                   189

-------
         SUBROUTINE  TDflTE (KYYR, KYMON, KYDflY, KZYR, KZMON, KZDflY, KXDflY)
c  +	
c
c
Q
c
C -1
c
c
c
c
c
c
c
c
Program :
Module :
Function:

i 	
KYYR
KYMON
KYDflY
KZYR
KZMON
KZDflY
KXDflY
BOULD. REL
BOUDTC. FOR
DETERMINE DIFFERENCE BETWEEN TWO DOTES


- year first date
- month first date
- day first date
- year second date
- month second date
- day second date
- number of days difference between two values
c — dimension number of months and the number of days in that month
c —
'
        DIMENSION KDRYSU2)
        DflTfl KDflYS/31, £8, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 /
c—
c—     initialze day differences
c—
        KXDRY=0.

c—     make integer assignments for  the months  for  the different  dates
c—     math done in intergers to save storage space
c—
        N1=KYMON
        N£=KZMON
c—
c—     are years the same?
c—     if not branch and calculate difference
c—     if the same continue
c—
        IF (KZYR. NE. KYYR) GOTO 150
  H-++++H
C	
c—     same year
c—
CH
c—
c—     index is used in computed goto to tell where to go  after year is
c—     checked to see if it was a leap  year
c—     fl is a temporary variable used in leap year  calculations
c—
        INDEX=1
        fl=KYYR
c—
c—     check for leap year if so use £9 days  for FEB.
c—
        GOTO 180
                                   190

-------
c—
c—     determine how many months difference ther is  •
c—     if <1  branch and do calculation
c—     if >  1 sum months up
c—
£00     IF ((KZMON-KYMON).LE. 1) GOTO 90  !<= 1MONTH DIFF
c—
c—     month calculations
c—     do calculations from first month +1
c—     to second month -1
c—     for example: if months were May and December you would want to
c—     do the month calculations for the period of June 1 to November 30
c—
        DO 100,L=N1 + 1,N2-1      !>1 MONTH TOTflL KDOYS
100     KXDflY=KXDflY+KDftYS(L)
c—
c—     calculations for days between months or days in same month
c—
90      IF ((KYMON-KZMON).NE. 0) KXDflY=KXDflY+(KDAYS(Nl)-KYDflY)   !1 MONTH
        IF ( (KYMON-KZMON).EQ. 0) KXDflY=KXDflY-KKZDftY-KYDflY)       ISflMEMONH
        IF ((KYMON-KZMON). EQ. 0) GOTO 300
c—
c—     add this number of days to difference
c—
        KXDflY=KZDOY+KXDflY
c—
c—     return
c—
        GOTO 300
c—
c—     years different  so more calculations need done
c—
c—     make year assignments to integer variables
c—     set index for computed "GOTO" which checks for leap year
c—
150     N1Y=KYYR
        N£Y=KZYR
        INDEX=a
        fl=KYYR
c—
c—     go check for leap year
c—
        GOTO 180
c—
c—     determine days until end of month
c—
110     KXDflY=(KDftYS(KYMON)-KYDAY)+KXDPY
c—
c—     if month is December you don't need to sum to end of year
c—
        IF (KYMON.EQ. 1£. ) GOTO 103
c—
                                   191

-------
c—     determine days until end of year
c—
        DO 101,L=Nl + l,i£
        M=L
101     KXDflY=KXDftY+KDftYS(L)
c—
c—     set conditions for leap year check
c—
103     INDEX=3
        A=KZYR
c—
c—     check for leap year
c—
        GOTO 180
c—
c—     is second month January if so you don't need to summ  form  beginnig
c—     of year
c,—
££0     IF (KZMON.EQ.1.)  BOTO 104
c—
c—     sum from begining of year
c—
        DO 10£,L=1,(N2-1)
        M=L
10£     KXDflY=KXDflY+KDflYS(L)
c—
c—     add days form beginning of month to diff total
c—
104     KXDflY=KXDflY+KZDftY
c—
c—     if years gt  1 go summ days in years
c—     leap years are calculated also
c—
        IF ((KZYR-KYYR).6T. 1) GOTO 175
c—
c—     ret urn
c—
        BOTO 300
c—
c—     determine if leap year if so use 366 and not 365 days for  total
c—     days in the year
c—
175     DO £01,K=N1Y+1,N£Y-1
        YR=K
        JYR=YR
        YR=YR/4.
        JYR=JYR/4
        IF (JYR.EQ.YR)  KXDflY=KXDflY+366.
        IF (JYR.NE.YR)  KXDflY=KXDflY+365.
£01     CONTINUE
c—
c—     zzzzz
                                   192

-------
c—
300     RETURN
c—
c—     leap year correction for months
c—     determine if years are exacty divisible by 4 with no remainder
c—     if so this is a leap year and February has £9 days
c—
180     YR=fi
        JYR=YR
        YR=YR/4.
        JYR=JYR/4
        KDflYS(£)=£8
        IF (JYR.EQ. YR) KDflYS<£>=£9
c—
c—     zzzzz
c—
        GOTO  (£00,110,££0) INDEX
        END
                                    193

-------
        SUBROUTINE DflTEI  
        RETURN
        END
                                  194

-------
        SUBROUTINE BOUDYR(DOLD,DNEW)
c   Program :    BOULD.REL
c   Module  :    BOUDYR. FOR
c   Function:    RETURNS NEXT DflY OF THE YEflR
c
c +	
c    NOTE:
c       returns the next day of the year
c         ex: 830££3 —>  830££4
c             830331 —>  830401
c
c   DOLD old date
c   DNEW next date
c
c       Dates are stored as real*4 values in the data files
c        so all dates heave been converted to real*4 .
c
c        Format: yr;month;day
c           830££3. is  0£/£3/83 in Julian form
c
c             83 = yr  0£ = month   £3 = day
c

c—
        DIMENSION DflYS<1£)
        DflTfl DflYS/31.,£8.,31.,30.,31.,30.,31.,31., 30, ,
        #31.,30. ,31. /
c—
        DNEW=0.
        DNEW=DOLD+1.
c—
c—     check to see if valid date
c—
        XYR=(DNEW/10000. )
        LM=XYR
        XYR=LM
        XMON=«DNEW-
-------
c—
c—     > than days in month correct  days  and  month  and year
c—
5£      IF  (XDflY. GT.DflYS(XMON)) GOTO  10
c—
c—     construct new date
c—
5       DNEW=(XYR*10000. )+
-------
c—
190     ICHflNT=IBETC()
        IF  (ICHANT.LT.0> GOTO  10
c—
c—     find file specified  if not  there  go  to  error  section
c—
        LLOOK=LOOKUP 
-------
         SUBROUTINE BOURED(LFILE, flRRflY, LflR, LWORDS, LBLK, LSTflT, LOP,LERR)
c •
c
c
c
C H
C
c
p
c
c
c
c
c
i. 	
Program :
Module :
Function:

LFILE
LWORDS
flRRflY
LflR
LBLK
LSTflT
LOP
c 1 LERR
c 1
c + 	
c —
__ 	 ____ 	 — 	 — — 	 ; 	 — 	 1
BOULD. REL
BOURED. FOR
REflDS OR WRITES DflTfl TO THE SPECIFIED DISK FILE

file name (i*£ array)
length of array in words (i*£)
array to store or write information 
'OP' , 'CL' , 'BO' leave open, close only, open/close (i*£)
error flag (i*£)


c — diagnostic block
c —

        L06ICflL*l  LEVEL1, LEVELS,LEVELS,LEVEL4
        INTEGER*4  IlflREfl,ISflREfl
        COMMON  /DlflG/LEVELKlfl), LEVELSU8), LEVEL3(18), LEVEL4(10),
        *LTERM, ITERM, flTIMES,BTIMES, IflDPOK,.IflDPEK, IPHONE, ILDTR, IHDTR,
        *IIflREfl(4),I£flREfl <4), SYSTM1, SYSDflT,JBDIO, JBDPGM,JBDS1,JBDS£,
        *JBDCH1,JBDCH£, JBDCTL,JBDERR, JBDflL, JBTMP, JBWND, JBCON,JBPRS,JBFFT,
        *JBERR, JBMflH, JBPMP, JBSTfl, JBTIM, JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL,JBCHN,JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFflL, JBDISK, JBTT,
        *JBECON,JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD, JBESHT,JBRUN,
        *JBOVR, JBWflIT,JBSLEP
c—
c—     dimensions
c—
        DIMENSION  LFILE(4),flRRflY(LflR)
c—
c-—     if block to  be  read <  0 return —>  invalid record number
c—
        IF (LBLK.LT.0)  RETURN
c—
c—     set error  flag  to  .false.
c—
        LERR=.FflLSE.     UNITIflLIZE  ERROR FLOS
c—
c—     bg program diagnostic  trace
c—
        CflLL IPOKEB(JBDS£,JBRED)
c—
c—     if "close" go to  close  section
c—
        IF (LOP.EQ. 'CL')  GOTO  150
c—
c—     get channel  and check  for  errors
                                    198

-------
c—
1£      WRITE  (LTERM,*)  'RED-R'
        LERR=-3  IREfiD ERROR
        GOTO 15
Q ——
c—     error on write
c~™
13      WRITE  (LTERM,*)  'RED-W'
        LERR=-4
15      IF  (LCOND.EQ.-1)  WRITE  (LTERM,#)  'RW1'
        IF  (LCOND.EQ.-£)  WRITE  (LTERM,*)  ' RW£'
        IF  (LCOND.EQ.-3)  WRITE  (LTERM,*)  ' RW3'
        GOTO £00
        END
                                    199

-------
        SUBROUTINE RET(IFLflG)
c + 	
c 1 Program :
c 1 Module :
c 1 Function:
c 1
c + 	
c- —
c — common
c —

BOULD. REL
BOURET.FOR
POKES fl CflRRIflGE RETURN ("015)


block for control characters




TO CLOSE CHftNNELS




        COMMON  /CONTRL/Lfl, LB, LC, LR, LDLE, LQU, LLftS, LTOCT, LLflCT, LTflC,
        *LLflC,LI,LF, LCR,LLF, ITRHi, ITRM1, ITRS1, ITRT1, ITRT£, ITRT3
c —
C' —
c —     diagnostic  block
c —
        LOG I CAL* 1 LEVEL 1 , LEVELS , LEVELS, LEVEL4
        INTE6ER*4 IlflREfl, I£flREfi
        COMMON  /DIflG/LEVELl (Id) , LEVEL£(10) , LEVELS (10) , LEVEL4Q0),
        *LTERM, ITERM, flTIMES, BTIMES, IftDPOK, IflDPEK, IPHONE, ILDTR, IHDTR,
        *IlflREfl (4) , I£flREfl (4) , SYSTM1, SYSDflT, JBDIO, JBDP6M, JBDS1 , JBDS£,
        *JBDCH1 , JBDCH2, JBDCTL, JBDERR, JBDflL, JBTMP, JBWND, JBCON, JBPRS, JBFFT,
        *JBERR, JBMflH, JBPMP, JBSTfl, JBTIM, JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL, JBCHN, JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFflL, JBDISK, JBTT,
        *JBECON, JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD, JBESHT, JBRUN,
        *JBOVR, JBWflIT, JBSLEP
c —
c —     diagnostics  to tell  bg progarm  where  you are
c —
        CflLL IPOKEB  (JBDS2, JBRET)
c —
c —     diagnostic traceback for  timing  failure
c —
        CflLL SCOPY  C RET   ', LEVELS)
c —
c —     tempory diagnostics  for debugging
c —
D       CflLL PUTSTR(LTERM, '  LOCfiTION: ','8')
D       CfiLL PUTSTRtLTERM, LEVEL 1,'  ')
D       CflLL PUTSTR(LTERM, LEVEL2,'  ')
D       COLL PUTSTRtLTERM, LEVELS,'  ')
c —
c —     set error flag to  0
c —
        IFLflS = 0
        IRETC=0 ! counter  for number  of times  thru
c —
c —     start control sequence and control diagnostic  declarations
c —
£00     CflLL IPOKEB  (JBDCTL,  30)          ICflRRIflBE  RETURN
        CfiLL IPOKE (IflDPOK,LCR)          ICflRRIflGE  RETURN
        CflLL I SLEEP  (ITRHI, ITRM1, ITRS1, ITRT£)
                                    200

-------
        IRETC=IRETO1
        IF (IRETC. ST. 10) SOTO
        IF «IPEEK  
-------
        SUBROUTINE RLLTI(IFLAG)
C H
C
C
c
C H
C
C
C
C
c
c
c
c
c
c
c
c
c
c
c
h 	 	 	 : 	 1
Program : BOULD. REL
Module : BOURLL.FOR
Function: SETS CONDITIONS SO SCflNNER CHflNNELS CflN BE CLOSED
definitions used

iflag= error flag


ILFflIL= times to
ILFC= counter for
ILFfl= counter for
ILQU= counter for
in this subroutine

for handshaking



problem


go thru subroutine before reporting problem
interface clear
(LC echo LF)
attention set (Lfl echo LF)
unlisten (LQU)
ILTflCT= counter for talk addresses
ILLflS= counter for listen address
ILC= counter for

NTIMES= times to
c
•C + — — — — — — — —
c —
c — control character
c —
channel closing

allow handshaking


common block


controller (LTflCT)
scanner (LLflS)
(LC)

problems in subsections




        COMMON  /CONTRL/Lfl,LB,LC, LR, LDLE, LQU, LLflS, LTflCT,LLflCT,LTflC,
        *LLflC,LI,LF,LCR,LLF, ITRH1, ITRM1,ITRS1,ITRT1,ITRT2,ITRT3
c—
c—     diagnostic  block
c—
        L06ICflL*l LEVEL1,LEVELS,LEVELS,LEVEL4
        INTEGER*4 IlflREfl,ISflREfl
        COMMON  /DIflG/LEVELl (10), LEVELEU0), LEVEL3(1I3), LEVEL4Q8),
        *LTERM, ITERM, flTIMES,BTIMES, IflDPOK, IflDPEK,IPHONE, ILDTR,  IHDTR,
        *IIflREfl(4),I£flREfl(4), SYSTM1, SYSDflT,JBDIO, JBDPGM, JBDS1,JBDSS,
        *JBDCH1,JBDCHE, JBDCTL, JBDERR, JBDflL, JBTMP, JBWND,JBCON,JBPRS,JBFFT,
        *JBERR, JBMflH, JBPMP,JBSTfl, JBTIM, JBDK1, JBSLP,JBPKC,JBINT,
        *JBRTL,JBCHN,JBRLL,JBWRT,JBRET, JBRED, JBBIT, JBFflL,JBDISK,JBTT,
        *JBECON,JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD, JBESHT, JBRUN,
        *JBOVR, JBWflIT,JBSLEP
c—
c—     tell bg program where  you are
c—
        CftLL IPOKEB  (JBDS£,JBRLL)
c—
c—     set handshaking lirniter
c—

        NTIMES=10       !LIMIT HflNDSHflKING  ERRORS
c—
                                   202

-------
c —     tell internal dignostics where you are  in case of failure
c —
        CftLL SCOPY  C RLLT I', LEVELS)
c —
c —     temporary diagnostics for debugging
£ — —
D       CflLL PUTSTR(LTERM,' LOCATION: ','0')
D       CftLL PUTSTRtLTERM, LEVEL 1,'   ')
D       CflLL PUTSTR(LTERM, LEVEL2, »   »)
D       CflLL PUTSTR(LTERM, LEVEL3,'   ')
£ — —
c —     set error flag to 0 and initialze flag counter
c —
        IFLflS=0
        ILFflIL=0
c —
c —     keep track  of subroutine errors
C""~
1       ILFflIL=ILFflIL+l
        IF  (ILFfllL.GT. £0) GOTO £00
c —
c —     initial handshake control values
c —






c —
c —
c —
101
ILFC=0
ILFfl=0
ILQU=0
ILTflCT=0
ILLflS=0
ILC=0

interface








clear

CflLL IPOKEB 
-------
c—
102
c—

c—
103
c—
c—
c—
104
c—
c—
c—
105
c—
c—
c—
c—
c—
c—
106
CflLL  IPOKEB  (JBDCTL,£2)          IDLE
CflLL  IPOKE  (IflDPOK,LDLE)
CflLL  ISLEEP  (ITRH1.,ITRM1,ITRS1, ITRT1)
CflLL  IPOKEB  (JBDCTL,£3)          Ifl
CflLL  IPOKE  (IflDPOK,Lfl)           Ifl
CflLL  ISLEEP  (ITRH1,ITRM1,ITRS1, ITRT2)
ILFfl=ILFfl+l
IF(ILFfl.ST.NTIMES)  60  TO  1
IFdPEEK  (IflDPEK).NE.LF)  BO TO 10£

unlisten

CflLL  IPOKEB  (JBDCTL,£4)  I?
CflLL  IPOKE  (IflDPOK,LQU)  I?
CflLL  ISLEEP  
CflLL  IPOKE  (IflDPOK,LTflCT)
CflLL  ISLEEP  (ITRH1,ITRM1,ITRS1,ITRT2)
ILTflCT=ILflCT+l
IF(ILTflCT.ST.NTIMES) 60 TO  1
IFdPEEK  (IflDPEK).NE. LTflCT)  BO TO  104

listen address scanner

CflLL  IPOKEB  (JBDCTL,£6)        .  I)
CflLL  IPOKE  (IflDPOK,LLflS)
CflLL  ISLEEP  (ITRH1,ITRM1,ITRS1,ITRT2)
ILLflS=ILLflS+l
IFdLLflS. ST. NTIMES)  SO TO 1
IFdPEEK  (IflDPEK).NE. LLflS)  SO  TO 105
attention clear
                                         IDLE
CftLL IPOKEB  (JBDCTL,£7)
CflLL IPOKE (IflDPOK,LDLE)
CflLL ISLEEP  (ITRH1,ITRM1,ITRS1,ITRT1)
CflLL IPOKEB  (JBDCTL,£8)          !B
CflLL IPOKE (IflDPOK,LB)           !B
CflLL ISLEEP  (ITRH1,ITRM1,ITRS1, ITRTS)

close following channels

CflLL IPOKEB  (JBDCTL,£9)          !C
CflLL IPOKE (IflDPOK,LC)           !C
CflLL ISLEEP  (ITRH1,ITRM1,ITRS1,ITRT2)
                                                 IDLE
                                                 ITEST HflNDSHflKE FOR F
                                                 I TEST HflNDSHflKE FOR ?
                                                 ITEST HflNDSHftKE FOR >
                                                 I)
                                                 ITEST  HflNDSHflKE FOR )
                                                 IDLE
                                   204

-------
        ILC=ILO1
        IFdLC.GT. NTIMES) BO TO 1
        IFdPEEK   SO TO 106       ITEST HflNDSHftKE FOR C
        RETURN

c—     set error flag
c—
800     IFLfiS=0
        RETURN
c—
        END
                                   205

-------
        SUBROUTINE  RTLLI(IFLflG)
c + 	
c
C
c
c
C H
C
C
C
C
c
c
c
c
c
c
c
c
c
c
c
c
c
c
Program :
Module :
Funct ion:

i 	 _____ 	

BOULD. REL
BOURTL. FOR
SET CONDITIONS SO MEASUREMENT SYSTEM SEND DftTfl
	 	 	 	 	 	 	 	 	 	 	 	 	 	 — 	 — — — — 	 — —

definitions for this subroutine


counters for control characters
this limits the amount of handshaking

ILflFflL=
ILI= LI

counter for number of times subroutine executed with prob
counter
ILA1= first Lfl counter
ILfl£= second La counter
ILQU1=
ILQU£=
ILTflCT=
ILLTflC=
ILLflCT=

NTIMES=

c •*•
c —
c- — control
c —
COMMON
first LQU counter
second LQU counter
LTftCT counter
LLTflC counter
LLftCT counter

number of times to let handshaking problem occur before ac
is taken

character common block

/CONTRL/Lfl, LB, LC, LR, LDLE, LQU, LLflS, LTfiCT, LLOCT, LTflC,
*LLflC, LI,LF, LCR,LLF, ITRH1, ITRM1, ITRS1, ITRT1, ITRT£, ITRT3
c —

c — diagnostic block
c —

        LOBICflL*! LEVEL1,LEVELS,LEVELS,LEVEL4
        INTE6ER#4 IlOREfl,ISftREO
        COMMON /DIflB/LEVELl(10),LEVEL£(10),LEVEL3(10),LEVEL4(10),
        *LTERM,ITERM,flTIMES,BTIMES, IftDPOK, IflDPEK,IPHONE,ILDTR,IHDTR,
        *IIflREfl(4),I£flREfl <4), SYSTMl, SYSDflT, JBDIO, JBDP6M,JBDS1,JBDS£,
        *JBDCH1,JBDCH2, JBDCTL,JBDERR, JBDflL, JBTMP, JBWND, JBCON,JBPRS,JBFFT,
        *JBERR,JBMPH,JBPMP,JBSTfl, JBTIM, JBDK1, JBSLP, JBPKC,JBINT,
        *JBRTL, JBCHN, JBRLL, JBWRT, JBRET, JBRED, JBBIT, JBFflL,JBDISK,JBTT,
        *JBECON,JBEINT, JBETMP, JBEFFT, JBEDflL, JBEHND, JBEflDD, JBESHT,JBRUN,
        *JBOVR, JBWflIT,JBSLEP
c—
c—     initialize  error flag
c—
        IFLflB=0
c—
c—     set diagnostics as to where  you are
c__
        COLL IPOKEB(JBDS£,JBRTL)
                                   206

-------
c—
c—     initialize hanshaking counter for error flag
c—     this is number of times to  let problem occur  in each subsection
c—     before action is taken
c—
        NTIMES=10       !LIMIT HflNDSHKINB ERRORS
c~~
c—     diagnostics for program failure
c—
        CflLL SCOPY (' RTLLI',LEVELS)
c—
c—     temporary traceback for debugging
c—
D       COLL PUTSTRtLTERM,' LOCflTION: ','0')
D       CftLL PUTSTR(LIERM, LEVEL1,'  ')
D       COLL PUTSTR(LTERM,LEVEL£,'  ')
D       CftLL PUTSTR(LTERM,LEVELS,'  ')
c—
c—     counters for handshaking  problems
c—

        ILflFflL=0
999     ILI=8   .'COUNTER FOR HflNDSHflKINB PROBLEMS
        ILfll=0
        ILQU1=0
        ILQU£=0
        ILTflCT=0
        ILLTflC=0
        ILLftCT=0
        ILfl£=0
c—
c—  •   if more than 20 times thru  set error flag
c—
        ILflFflL=ILflFflL-H
        IF (ILflFflL.BE.£0) BOTO £00

c—
c—     remote set
c—
        CflLL IPOKEB  (JBDCTL, 1)          IDLE
        CflLL IPOKE UflDPOK,LDLE)                IDLE
        CALL ISLEEP (ITRH1, ITRM1,  ITRS1, ITRT1)
        CflLL IPOKEB  (JBDCTL, £)          !R
        CflLL IPOKE (IflDPOK,LR)          !R
        CflLL ISLEEP (ITRH1,ITRM1,ITRS1, ITRT2)
c—
c—     attention set
c—
101     CflLL IPOKEB (JBDCTL,3)          IDLE
        CflLL IPOKE (IflDPOK,LDLE)                IDLE
        CflLL ISLEEP (ITRH1,ITRM1,ITRS1, ITRT1)
        CflLL IPOKEB (JBDCTL, 4)          !fl
                                   207

-------
        CflLL  IPOKE  ( IflDPOK, Lfl)           Ifl
        CALL  ISLEEP (ITRH1, ITRM1, ITRS1, ITRT2)
        ILfll=ILfll+l
        IF  (ILfll.GT. NTIMES)  60  TO 999    .'LIMIT flMOUNT OF HflNDSHflKING
        IF  (IPEEK  (lADPEK).NE.LF)  BO TO  101              .'TEST HflND SHAKE F
c —
c —     un list en
c —
10£     CflLL  IPOKEB 
        CflLL  IPOKE  ( IflDPOK, LTflCT)                !>
        CflLL  ISLEEP (ITRH1,ITRM1,ITRS1, ITRT2)
        ILTflCT=ILTflCT+l
        IF  (ILTflCT.GT.NTIMES) GO  TO 999  ILIMIT flMOUNT OF HflNDSHflKING
        IF  < IPEEK  (IflDPEK).NE.LTflCT) GO  TO 103          ITEST HflNDSHflKE F>
c —
c —     listen address counter
c —
104     CflLL  IPOKEB (JBDCTL,?)           !*
        CflLL  IPOKE  ( IflDPOK, LLflC)                 I*
        CflLL  ISLEEP (ITRH1,ITRM1,ITRS1, ITRTE)
        ILLflC=ILLflC+i
        IF  (ILLflC.GT.NTIMES)  GO TO 999   ILIMIT ftMOUNT OF HflNDSHfiKING
        IF  (IPEEK  (IflDPEK).NE.LLflC) 60 TO  104            ITEST HflNDSHflKE F*

c —     attention clear
c —
        CflLL  IPOKEB (JBDCTL, 8)           IDLE
        CflLL  IPOKE  ( IflDPOK, LDLE)                 IDLE
        CflLL  ISLEEP (ITRH1,ITRM1,ITRS1,ITRT1)
        CflLL  IPOKEB (JBDCTL, 9)           IB
        CflLL  IPOKE  ( IflDPOK, LB)           IB
        CflLL  ISLEEP (ITRH1,ITRM1,ITRS1, ITRT2)
c —
c —     send  initiate
c —
105     CflLL  IPOKEB (JBDCTL, 10)          II
        CflLL  IPOKE  (IflDPOK, LI)           II
        CflLL  ISLEEP  (ITRH1,ITRM1,ITRS1, ITRTS)
        IF (ILI.GT.NTIMES) GO TO 999     ILIMIT flMOUNT OF HflNDSHflKING
        IF (IPEEK (IflDPEK).NE.LI) GO TO  105              ITEST  HflNDSHflKE FI
c —
c —     attention set
                                    208

-------
c—
107     CALL IPOKEB  (JBDCTL, 11)          IDLE
        CflLL IPOKE  (IflDPOK,LDLE)                 IDLE
        CflLL ISLEEP  (ITRH1,ITRM1,ITRS1, ITRT1)
        CflLL IPOKEB  (JBDCTL, 12)          .'ft
        CflLL IPOKE  (IflDPOK, Lfl)           !fl
        CflLL ISLEEP  (ITRH1,ITRM1,ITRS1, ITRT2)
        ILfl£=ILfl£+l
        IF  (ILfl£. BT.NTIMES)  60 TO 999    ILIMIT flMOUNT  OF  HflNDSHflKING
        IF  (IPEEK  (IflDPEK).NE.LF) BO TO  107              ITEST  HflNDSHflKE FF
c—
c—     unlisten
c—
108     CflLL IPOKEB  (JBDCTL, 13)          I?
        CflLL IPOKE  (IflDPOK,LQU)          I?
        CflLL ISLEEP  (ITRH1,ITRM1,ITRS1,ITRT2)
        ILQU£=ILQU£+1
        IF  (ILQU£.GT. NTIMES) 60  TO 999   .'LIMIT ftMOUNT  OF  HflNDSHflKING
        IF  (IPEEK  (IflDPEK).NE.LQU) GO TO 188             ITEST  HflND SHflKE  ?
c—
c—     talk address counter
c—
109     CflLL IPOKEB  (JBDCTL,14)          !J
        CflLL IPOKE  (IflDPOK,LTflC)                 !J
        CflLL ISLEEP  (ITRH1,ITRM1,ITRS1, ITRTS)
        ILLTflC=ILLTflC+l
        IF  (ILLTflC.ST.NTIMES) 60 TO 999  ILIMIT flMOUNT  OF  HflNDSHflKING
        IF  (IPEEK  (IflDPEK).NE.LTftC) 60 TO 109            ITEST  HflNDSHflKE FJ

c—     listen address controller
c—
110     CflLL IPOKEB  (JBDCTL,15)          !>
        CflLL IPOKE  (IflDPOK,LLflCT)                !>
        CflLL ISLEEP  (ITRH1,ITRM1,ITRS1,ITRT£)
        ILLflCT=ILLflCT+l
        IF  (ILLflCT.6T.NTIMES) 60 TO 999  ILIMIT flMOUNT  OF  HflNDSHflKINB
        IF  (IPEEK  (IflDPEKKNE.LLflCT) GO  TO 110           ITEST  HflNDSHflKE F>
c—
c—     attention clear
c—
        CflLL IPOKEB  (JBDCTL,16)          IDLE
        CflLL IPOKE (IflDPOK,LDLE)                 IDLE
        CflLL ISLEEP  (ITRH1,ITRM1,ITRS1,ITRT1)
        CflLL IPOKEB  (JBDCTL,17)          IB
        CflLL IPOKE (IflDPOK,LB)           IB
        CflLL ISLEEP  (ITRH1,ITRM1,ITRS1,ITRT£)
        RETURN
c—
c—     set error flag
c—
£00     IFLflG=l
        RETURN
                                   209

-------
END
                         210

-------
SUBROUTINE WRITE(SUM,IFLflG)
(J 1
c
c
c
c
r^ 4
Program :
Module :
Function:
L 	
BOULD. REL
BOUWRT. FOR
REflDS DflTft FROM MEASUREMENT
A REftL*4 NUMBER


SYSTEM fiND CONVERTS IT TO

definitions of values used  in this section

IVflLUE  - array to store peek values  in
VflLUE   - array to store converted data values  in
NQ      - number of times to peek and  poke
SUM     - resultant data value after  all conversions
EXP     - location of period in string reurned  with HP  5300  syste
c
c
c
c
c
c
c
c
c +	
c—
'c—     diagnostic  block
c—
        LOGICflL«1 LEVEL1,LEVELS,LEVELS, LEVEL4
        INTEGER** IlflREfl,ISftREft
        COMMON  /DIflG/LEVEL1(10), LEVELS(10), LEVELS(10), LEVEL4(10),
        *LTERM, ITERM, flTIMES,BTIMES,IftDPOK, IflDPEK,IPHONE, ILDTR, IHDTR,
        *IIflREfl(4),ISflREfl(4),SYSTM1,SYSDflT,JBDIO,JBDPGM, JBDS1, JBDSS,
        *JBDCH1,JBDCHS, JBDCTL,JBDERR,JBDflL,JBTMP,JBWND,JBCON,JBPRS, JBFFT,
        *JBERR, JBMflH,JBPMP,JBSTfl,JBTIM,JBDK1, JBSLP, JBPKC, JBINT,
        *JBRTL, JBCHN, JBRLL,JBWRT,JBRET,JBRED, JBBIT, JBFflL, JBDISK, JBTT,
        *JBECON,JBEINT,JBETMP,JBEFFT,JBEDflL,JBEHND,JBEftDD, JBESHT, JBRUN,
        #JBOVR, JBWflIT,JBSLEP
c—
c—     dimensioning  and  data declarations for subroutine

        DIMENSION IVflLUE(17),VftLUE(17)
        DflTft NQ/17/EXP/7./
        CflLL ISLEEP (0,0,0,15)
        J=0.    !counter  for  conversion to real
        SUM=0.0 linitalize  sum
        IFLflG=0 UNITflLIZE  ERROR FLfiG
c—
c—     diagnostics to tell  bg program where you are
c—
        CftLL IPOKEB (JBDSS,JBWRT)
c—
c—     diagnostic  traceback  for timing failure
c—
        CflLL SCOPY  C WRITE',LEVELS)
c—
c—     temporary diagnostics
c—
D       CftLL PUTSTR(LTERM, ' LOCATION:  ','0')
D       CftLL PUTSTRtLTERM, LEVEL1,'  ')
D       CflLL PUTSTR(LTERM, LEVELS,'  ')
                            211

-------
D        CALL  PUTSTR(LTERM,LEVELS,'  ')
c—
c—      get the  data
c—
         DO £80 1=1,NQ
         COLL  ISLEEP (0,0,0,7)
         IVflLUE(I)=IPEEK(IflDPEK)
£00      CflLL  IPOKE  (IflDPOK,IVflLUE(I))
c—
c	
c—      following calculations dependent  upon set up of measuring system
c—      at remote site,  in this  case we are returning data in Khz
C~~"          —~" ~"~ ~" ———————  —    — —   —  ——    —    —— — ———
c—
c—      check for validity
c—      if not valid return error  flag
c—
c—      location £   =  F
c—      location 7   =
c—      location 13 = E
c—      location 16 = carriage return
C'—      location 17 = linefeed
c—
c—      this  is  defined  in measuring system manual  for frequency operation
C'—      if these values are not  in  there  appropriate places an communicats
c—      error has occurred  and the  value  needs to be resent
c--
D        WRITE (LTERM,39) (IVflLUEtI),1=1,17)
         IF (IVflLUE(£).NE. 70  .flND.  IVflLUE(7)  . NE.  46
         * .AND.  IVflLUE(13)  .NE.   69  .flND.  IVflLUE(16)  .NE.  13
         * .flND.  IVflLUEt17)  .NE.   10)  GOTO  £01
c—
c—
c—      is it less  than 0  or gt  9
c—      decimal  48  = 0
c-—      decimal  57  = 9
c—
         DO 101 IZ=£, 1£
         IF (IVflLUE(IZ) .LT.  48 . XOR. IVflLUE(IZ)  .ST.  57 )  BOTO 101
         J=J+i
         VflLUE(J)=IVflLUE(IZ)-48
         SUM=SUM+(VflLUE
101      CONTINUE
c—
c—      convert to  fregquency
c—
         SUM=SUM/100.
D        WRITE(LTERM,#) 'SUM  OUT  NORMflL', SUM,IFLflG
         RETURN
c—
c—      handshake error
c—
                                   212

-------
£01     IFLflB=l
D       WRITE(LTERM,*) 'SUM OUT ERROR', SUM,IFLflG
D       WRITE  (LTERM,39)  
-------
          APPENDIX II



MONITORING PROGRAM SOURCE CODE
             214

-------
        PROBRflM BOURST
c+	+
cl Program  :  BOURST.FOR                                                  I
cl Module   :  BOURST. FOR                                                  I
cl Function:  MOIN DRIVER  FOR  RESTftRT PROGRflM                            I
cl            BYTE LOCflTIONS ORE  CHECKED IN THIS ROUTINE                 I
jmi™^^^^ ^^_B»H.W^>w^^_>flKBM^
        EQUIVflLENCE  (STRING(l), CMD)
c—
c—     label storage
c—
        REfll_*4 MflIN(35),OUTPUT<£),SECONDS),STftT<5),ZTIME<£)   .
        DIMENSION LSI(5),LS£(35),LS3(8), KL(8), ZOVER(£),MZBLK(4),
        *MCBLK(4),flREfl(8)
c—
c—     data for time file read
c—
        DflTO MZBLK/3RBOU, 3RBPO,3RLLD, 3RDflT/LfiR/£/LWORDS/4/

c—     data for staus bytes retention
c—
        DflTfl MCBLK/3RBOU,3RBAV, 3RE£4, 3RDflT/LCfiR/8/
        *LCWORD/16/
c—
c—     data for main subroutine
c—
        DflTfl LS£/0, 10, 11, 1£, 13, 14, 15, £0, 30, 40, 41, 50, 60, 61, 78,
        #71,80, 81, 8£, 90, 100,110, 1£0,1£1, 130,140,150, 151, £50, 91,
        *9£, 93, 3*0/
c—
                                    215

-------
c—     data for secondary subroutine
c-
c-
        DflTfl LS3/0, 10, £0, 30, 40, 50, 60, 70/
c—     program execution status
        DflTfl LSI/0, 1,10, £0,30, /IWflIT/0/IHOLD/0/
c—

c—
c—     data for base for peekeb
c—
        DflTfl IBflSE/"170/
c—
c—     data for main subroutine
c—
        DflTfl MfllN(l)/'    '/MflIN(£)/'DIflL'/MflIN(3)/'TIME'/
        *MflIN(4)/'NUMB'/MflIN(5)/'LOOK'/MflIN<6)/'TEST'/
        *MflIN(7)/'flTCH' /MflIN(8)/'TEMP'/MflINO)/'WIND' /
        *MflIN(10)/'COND'/MflINhorizontal    MV—>vertical
c—     data
c—
        DflTfl MHH1/1/MHHE/35/MHH3/65/MVH1/9/MVHE/11/MVH3/J3/
        *MHD1/11/MHD£/44/MHD3/75/MVD1/9/MVD£/11/MVD3/13/
        *MVH4/5/MVH5/7/MHH4/l/MHH5/35/MHH6/65/
        *MHD4/7/MHD5/45/MHD6/70/
c—
c—     data for override

c—
c—     override byye and ouput data device
c—
                                   216

-------
        DflTfl JBDCH£/"175/JBRUN/l/JBDIO/"170/JBTT/10/JBDISK/0/
        DflTfl ZOVER/' ON ',' OFF'/
        DflTfl OUTPUT/'DISK     ','TERMINflL'/
c—
c—     phone information  for  problems
c—
        DflTfl IPH0,IPH£/"£0146,"110176/
c—
c—     set jsw bits
c—
        COLL SCCfl(IflBORT)        !INHIBIT  CONTROL  C
        TYPE 1,£7       Imake  sure  in flNSI mode
        CflLL IPOKE  ("044, "101130)
        CflLL ISLEEP  (0,0,1,0)
c—
c—     init wait — screen wait for sleep mode
c—      and put  location  labels on screen
c—
        CfiLL BOURED(MCBLK,RREfl,LCflR,LCWORD, 0,'RE' ,' BO', IERR)
        DO 999,L=1,8
        IL=L-1
        ILOOK=IBflSE+IL
999     CflLL IPOKEBdLOOK, IFIX(flREfl(L)))
4       CflLL BOUHDR
        IWflIT=0
c—
c—     time of next run

        CflLL BOURED(MZBLK,ZTIME,LflR,LWORDS, 0,' RE' ,' BO' , IERR)
        COLL VTHVP(MVH4,MHD5)
        TYPE 400,ZTIME(1)         Itime of  execution
        CflLL VTHVP(MVH5,MHD5)
        TYPE 401,ZTIME(2)         Idate for execution
c—
c—     look at bytes
c—
5       DO 7,L=1,8
        IL=L-1
        ILOOK=IBflSE+IL
7       KL(L)=IPEEKB(ILOOK)
c—
c—     ckeck to see if fg in sleep mode
c—      or if failure occurred
c—
c—     £50 timing failure
c—     1£8 equipment failure
c—
        IF (KL(3).EQ.£50.0R.
        *   KL(8).6E.1£8)  GOTO 441
        IF (KL(£) .EQ.LS1(5).RND. IWfllT. EQ. 1)  GOTO 310
        IF (KL(£).NE. LSK5).flND. IWflIT.ED.1)  60TO 4
c—
                                   217

-------
c—     get time and date  and  put  on  screen
c—
        TIME=SYSTIM(DflTE)
        COLL VTHVP(MVH4,MHD4)
        TYPE 408,TIME
        CflLL VTHVP(MVH5, MHD4)
        TYPE 401,DATE
c—
c—     output device
c—
        COLL VTHVP(MVD1,MHD1)
        IF  (KL(l).EQ.8) TYPE 30, OUTPUT(l)
        IF  (KL(l).EQ.10) TYPE 30, OUTPUT(2)
c—
c—     status byte  (date, run wait,sleep)
c—
        CflLL VTHVP(MVD1,MHD£)
        DO 35, 1 = 1,5
35      IF  (KL(£).EQ.LSI(I)) TYPE 30,STflT(I)
c—
c—     main sub
c—
        CflLL VTHVP(MVD£,MHD1)
        DO 31,LK=1,30
31      IF  (KL(3).EQ.LS2(LK)) TYPE  30,MflIN
-------
        TYPE 6,KL(8)
c—
c—     check to seee  if  sleep  mode
c—
        IF  (KL(£).EQ.LSK5).flND.  IWRIT.EQ. 0)  GOTO 300
c—
c—     has a character been  typed ?
c—
        CflLL VTHVP<£4,10+1)
310     ICHflR=ITTINR()
        IF  (ICHflR.LT.0) GOTO  5
c—
c—     check for ctrl u
c—
        IF  (ICHflR. EQ.-21. OR. ICHflR . EQ. 127)  BOTO £00
c—
c—     check for contrl  c       abort  —>  inhibit
c—
        IF  (ICHflR.EQ.3) GOTO  700
c—
c—     location of character in string
c—
102     IQ=IQ+1
        STRING(IQ)=ICHflR
c—
c—     output character
c—
        LK=ITTOUR(ICHflR)
c—
c—     check for 'return' or max 38 characters
c—
        IF  (ICHflR. EQ. 10. OR. IQ.EQ.38)  GOTO  101   IBRflNCH  ON  LF
        GO TO 5
c—
c—     put null byte at  end
c—
101     STRING(IQ-1)="000        !PUT NULL BYTE  flT  END (flSCIZ CODE)
        IQ=0
c—
c—     check to see what was typed
c—
        IF (STRING(D.EQ.  "000) GOTO 39
        IF (SCOMPC EXIT', STRING). EQ.0) GOTO 40
        IF (SCOMPC QUIT', STRING). EQ.0) GOTO 40
        IF (SCOMPC OVERRIDE',  STRING). EQ.0) GOTO 41
        IF (SCOMPC TERMINAL',  STRING). EQ.0) GOTO 4£
        IF (SCOMPC DISK', STRING). EQ.0) GOTO 43
        IF (SCOMPCSTflTUS', STRING). EQ.0) GOTO 49
        IF (SCOMPC REFRESH', STRING). EQ.0)  GOTO  4
        IF (SCOMPC HELP', STRING). EQ.0) GOTO 160
        IF (SCOMPC HELP/WflIT', STRING). EQ.0) GOTO 161
        IF (SCOMPC STflRT',STRIN6).EQ. 0) CftLL BOUFLL(5)
                                   219

-------
c—
c—     no command  tell them so
c—
        CALL VTHVP(£4,1)
        TYPE 301,"007    IRING BELL  IF ERROR
        60 TO 5
c—
c—     set override byte on if off  or   if on  set  off
c—
41      IF (KL(6).EQ.1) CflLL IPOKEB(JBDCH£,0)
        IF (KL(6).NE.1) CflLL IPOKEB(JBDCH£,JBRUN)

        GO TO £00
c—
c—     help file
c—
161     IHOLD=1
160     CftLL BOUHLP(IHOLD)
        GOTO 4
c—
c—     reinit string to nulls
c—
£00     DO £01,1=1,39
£01     STRING(I)="000
        IQ=0
        IF (ICHflR. EQ.£1. OR. ICHflR. EQ. 1£7)  GOTO 39       Jclear  screen or. ctu
        GOTO 5
c—
c—     output to disk
c—
43      CflLL IPOKEB (JBDIO,JBDISK)
        GOTO £00
c—
c—     output to terminal
c—
4£      CftLL IPOKEB(JBDIO, JBTT)
        GOTO £00
c—
c—     if nothing typed erase line and leave screen  clear
c—
39      CflLL vTHVP<££,1)
        CflLL VTED CE')
        GO TO 5
c—
c—     read disk for information
c—
c—     sleep mode clear screen
c—
300     CflLL ISLEEP (0,0,10,0)
        CflLL VTHVP(£3,1)
        CflLL VTEDCB' )
        CflLL ISLEEP(0,0,0,5)
                                    220

-------
         IWflIT=l
         GOTO  5
c—
c—      reset wait  flag for status
c—
49       DO  150,1=1,39
150      STRIIMG(I) = "000
         IF  (IWfllT.EQ. 0) GOTO 5
         BOTO  4
c—
c—      tell  them  program can not be aborted
c—
700      COLL  VTERSE
         TYPE  *,'This program cannot be aborted by ctrl C.'
         TYPE  *,'If  you need help type "HELP".'
         CflLL  ISLEEP(0,0,£, 0)
c—
c—      purge buffer so there are not multiple prints
c—
70£      ICHflR=ITTINR()
         IF  (ICHflR. GT. 0) GOTO 70£
         GOTO  4
c—
c—      exit  , set  margins,and erase screen
c—
40       COLL  VTERSE
         IF  (SCOMP('EXIT',STRING).EQ.0)  GOTO 441
         TYPE  *,'ENTER QUIT  CODE'
         CflLL  GETSTR(5,STRING, 10, IERR)
         IF  (SCOMP('WZ3£',STRING). NE.0)  GOTO 4
441      CflLL VTERSE
         DO  1000,1 = 1,8
1000     flREfl(I)=KL(I)
         IF  (KL(3).EQ.250) flREfl(3)=-250.
         IF  (KL(8).GE. 1£8) flREfl(8)=flREfl<8)*.001  ICONVERT LT 0
         CflLL BOURED(MCBLK,flREfl,LCflR,LCWORD, 0, 'WR',' BO' , IERR)
         CflLL VTTBM(1,£4)
         IF  
         IF  (CMD.EQ.'EXIT')  CflLL SETCMDC@BFILE' )
         CflLL EXIT

c—      format statements
c	
1        FORMflT ('*•, 1A1,' <')
6        FORMflT (15)
30       FORMflT (X,fl4)
44       FORMflT (X, fl4)
151      FORMflT (X,'NEXT EXECUTION',10X,'TIME:  ', F5. 0,5X,' DflTE:  ',F7.0)
301      FORMflT (X, fll,'TRY flGflIN')
400      FORMflT (X, F5. 0)
401      FORMflT (X,F7. 0)
                                    221

-------
END
                         222

-------
        SUBROUTINE BOUHDR
cl Program :  BOURST. FOR
cl Module  :  BOUHDR. FOR
cl Function:  PRINTS HEflDER flND LflBELS FOR SCREEN
c+
c —
c —     common for horizontal and vertical positioning of output
c —
        COMMON /SPflCE/ MHH1,MHH£,MHH3,MVH1,MVH£, MVH3,
        *MHD 1 , MHD£, MHD3, MVD 1 , MVD£, MVD3, MVH4, MVH5, MHH4, MHH5, MHH6,
        *MHD4, MHD5, MHD6
        COLL VTERSE
c —
c—     SET MARGINS
c —
        CflLL VTTBM<££, £4)
c —
c —     highlite function code
c —
        CflLL VTSGR CD', 1,1,1)

c —     boulder status label  double high
c —
        CflLL VTHVP (1,8)
        CflLL VTDHLT
        TYPE 45
        CflLL VTHVP (2,8)
        CflLL VTDHLB
        TYPE 45
c —
c —     turn all screen attributes off
c —
        CflLL VTSGR CO', 1,1,1)

c —     reverse image for labels
c —
        CflLL VTSGR PR', 1,1,1)
c —
c —     put on labels
c —
        CflLL VTHVP (MVH4, MHH4)
        TYPE *, 'Time:'
        CflLL VTHVP (MVH4,MHH5)
        TYPE *, 'Run Time:'
        CflLL VTHVP 
-------
        CALL VTHVP(MVH1,MHH£)
        TYPE *,'Status:'
        CflLL VTHVP
-------
        SUBROUTINE BOUFLL(MM)
U'l
c
c
c
CH
C
c
c
c
c
c
c
CH
c-
c-
c-
Program : BOURST
Module : BOUFLL
Function: EXITS
NOTE:
err=l
err=£
err=5
.FOR
.FOR
BOURST flND RESflTRTS THE FOREBROUND PROBRflM
timing failure
equipment failure
start foreground
i
common for horizontal and vertical positioning of output
        COMMON /SPflCE/ MHH1,MHH£,MHH3,MVH1,MVH£,MVH3,
        *MHD1,MHD2,MHD3,MVD1,MVD£,MVD3,MVH4,MVH5,MHH4, MHH5, MHH6,
        *MHD4,MHD5,MHD6
c—
c—     reset jsw bits
c—
        CflLL IPOKE ("044,"000)
c—
c—     restart foreground
c—
                IF (MM.EQ.5) GOTO 400

c—
c—     exit and restart foreground and  background
c—
c—
c—     set screen attributes
c—
401     CflLL VTSGR C R','I','B1,0)
c—
c—     main program failure
c—
        CflLL VTHVP(MVH3+£,MHH1>
        CflLL VTDHLT
        TYPE 10
        CflLL VTDHLB
        TYPE 10
c—
c—     output specific problem
c—
        CflLL VTHVP(MVH3+4,MHH1)
        CflLL VTDHLT
        IF (MM.EQ. 1)  TYPE 11
        IF (MM.EQ.£)  TYPE 12
                                   225

-------
        CftLL VTDHLB
        IF  (MM.EQ.1) TYPE  11
        IF  (MM.EQ.£) TYPE  12
c—
c—     clear screen attributes  and  sound  bell  as to exiting
c—
        COLL VTS6R  CO',0,0,8)
£00     DO  100,1=1,15
100     COLL ITTOUR<"007>
c—
c—     wait 1 minute and make sure  foreground  exits properly
c—
        CflLL ISI_EEP(0, 1,0,0)
c—
c—
c—     exit and start restrt command file
c—
400     CPLL SETCMDCeRESTRT')
        COLL EXIT
        RETURN

c—
c—     format statements
c—

10      FORMOT (X,'MOIN PROGROM FAILURE')
11      FORMOT (X,'TIMING FfllLURE'>
1£      FORMOT (X,'EQUIPMENT FfllLURE')
        END
                                   226

-------
        SUBROUTINE BOUHLP(IHOLD)
c+	
c\ Program :  BOURST.FOR
c\ Module  :  BOUHLP.FOR
cl Function:  HELP FILE
• I	,-_ ,	r-j -i __|	    	—_ _1_ _TL •— 1	"HIM	I	—	—	_L	i- -I	I-
        LOGICRL*! LflNS
c—
c—     highlite and underline  function code
c—
        CflLL VTERSE
        CALL VTWID<13S)
        COLL VTSGR  C U',' I',' R', 1)
c—
c—     boulder status label  double high
c—
        CflLL VTHVP(1,£0)
        CflLL VTDWL
        TYPE 45
c—
c—     turn all screen attributes  off
c—
        CflLL VTSGR CO', 1,1,1)
c—
c—     label command section
c—
        CflLL VTSGR CR','I', 1,1)
        CflLL VTHVP(3, 17)
        TYPE *,'   COMMflNDS  '
        CftLL VTSGR CO', 0,0,8)
c—
c—     reverse image for  labels
c—
        CflLL VTSGR  CR',1, 1,1)
c—
c—     put on labels
c—
        CflLL VTHVP(5, 1)
        TYPE *,' DISK      '
        CflLL VTHVP(6, 1)
        TYPE *,' EXIT      '
        CflLL VTHVP<7, 1)
        TYPE *,' HELP      '
        CflLL VTHVP(8, 1)
        TYPE #,' HELP/WflIT'
        CflLL VTHVPO, 1)
        TYPE *,' OVERRIDE  '
        CflLL VTHVPU0,1)
        TYPE *,' QUIT      '
        CflLL VTHVP(11,1)
        TYPE *,' REFRESH   '
                                    227

-------
        CALL  VTHVP
-------
        CflLL VTHVP<11,&6)
        TYPE *,' OVERRIDE:'
        COLL VTHVP(1£,66)
        TYPE #,' RUN DflTE:'
        CflLL VTHVP(13,66)
        TYPE *, ' RUN TIME:'
        CflLL VTHVP(14,66)
        TYPE *, ' SEC SUB:  '
        CflLL VTHVP(15,66)
        TYPE *, ' STflTUS:   '
        CflLL VTHVP(16,66)
        TYPE *,' TIME:     '
c—
c—     put on definitions
c—
        CflLL VTSBRCO', 0,0,0)
        CflLL VTHVP(5, 79)
        TYPE #,'Last channel  closed'
        CflLL VTHVP(6,79)
        TYPE *, 'System date  (r*4)'
        CflLL VTHVP(7,79)
        TYPE *, 'Major error code  (see BOUDflT.FOR)'
        CflLL VTHVP(8,79)
        TYPE *,'Secondary  subroutine location'
        CflLL VTHVP(9, 79)
        TYPE *,'Main subroutine functioning'
        CflLL VTHVP(10,79)
        TYPE *,'Output device'
        CflLL VTHVP(11,79)
        TYPE *, 'Override failure due to equipment problems'
        CflLL VTHVP<1£,79)
        TYPE *,'Next date  program  is to run'
        CflLL VTHVP(13,79)
        TYPE *,'Next time  program  is to run'
        CflLL VTHVP(14,79)
        TYPE *,'Control subroutine  functioning'
        CflLL VTHVP<15,79)
        TYPE *, ' mode of operation  (wait, sleep, run,date failure)'
        CflLL VTHVP(16,79)
        TYPE *,'system time  (r*4)'
n_m
        IF (IHOLD.EQ. 1) GOTO  1000
        CflLL ISLEEP(0,0,£0,0)
        CflLL VTWID(80)
        RETURN
1000    IHOLD=0
        CflLL VTHvP<23,1)
        TYPE 500
500     FORMflT (X,'To exit hit "RETURN".  No checking is
        * taking place!'*)
        flCCEPT 501,LflNS
        CflLL VTWID<80)
                                   229

-------
RETURN
c 	
c —
c —
c —
45
501
format staements
FORMAT (X,' Status
FORMAT (Ifil)
END

Help File ')
                          230

-------
        APPENDIX III



FILE MANAGEMENT SOURCE CODES
            231

-------
        PROGRflM BOUFIM
c
c
c
c
c
c
c
c
c
c
/•*
H 	
1 Program :
1 Module :
1 Function:
1
1
1 nfile
1 loc i;
1 ir is
1 ic is

BOUFIL
BOUFIM
MflIN DRIVER FOR FILE MflNIPULflTION


is the number of files
; first line output is on
the row number
the column number
1
        LOGICflL*! FILE(£0),STR(4)
        COMMON /FILE/FILE
        LOGICflL #1 flNS,flNSl,OUTP(13), IDflTO), ITIM(8), LERR,KERR
        INTEGERS MflBLK(14, 4), MflBLKL(14), MftBLKWt14),LflBLK(4),MZBLK (4)
        DIMENSION DflTfl(60),MLOC(10),AREfl(8)
        COMMON /LOCflT/ NFILE, LOC, IR,1C,LIMIT
        COMMON /DflTfl/flNS,flNSl,OUTP,  IDflT, ITIM,LERR,KERR,
        *MflBLK,MflBLKL,MflBLKW, LflBLK,  DflTfl, MLOC, I FILE
        EQUIVflLENCE /3RBOU/MflBLK(7, £)/3RBRV/
         MflBLK(7,3)/3REWR/MflBLK(7,4)/3RDOT/
         MflBLK(8, !)/3RBOU/MflBLK(8,£)/3RBflV/
         MflBLK(8,3)/3REMN/MRBLK(8, 4)/SRDflT/
         MflBLK(9,1)/3RBOU/MflBLK(9, £)/SRBflV/
         MflBLK(9,3)/3REMR/MflBLK(9,4)/3RDflT/
         MflBLK(10,1)/SRBOU/MflBLK(10, £)/3RBPO/
         MflBLK(10, 3)/3RLLD/MflBLK(10,4)/3RDRT/
         MflBLK(11,1)/3RBOU/MflBLK(11, £)/3RBRC/
                                   232

-------
         MflBLK(11,3)/3RKUP/MRBLK(11,4)/3RDRT/
         MflBLK(IS,1)/3RBOU/MftBLK(!£,£)/SRBflL/
         MflBLK(12, 3)/3RLRD/MflBLK(1£, 4)/3RDflT/
         MflBLK(13,1)/3RBOU/MABLK(13,£)/3RBflL/
         MflBLK(13,3)/3RLRC/MRBLK(13,4)/3RDRT/
         MflBLK(14,1)/3RBOU/MPBLK(14,£)/3RBST/
         MPBLK(14, 3)/3RflTS/MftBLK(14, 4)/SRDflT/
c—
c—     define file lengths
c—
        DflTfl MflBLKL/1,1,1,90, 1,7,1,30, 1, 1,1, £00, 1, I/
c—
c—     define word lengths of files
c—
        DflTfi MflBLKW/l£0, 1£0,16,1£0,£,1£0,£,1£0,£, 4, 1£0, 1£0,£, 1£0/
c—

c—
c—     status file name
c—
        DflTfl MZBLK/3RBOU,3RBflV,3RE£4,3RDflT/LCflR/8/LCWORD/16/
        DftTfl NFILE/14/LOC/4/IJ/40/
        DflTft IBftSE/"170/PflSWRD/'WZ3£'/
c—
c—     set no ctrl c
c—
        CflLL SCCfl(IflBORT)
c—
c—     pokeb current staus bytes
c—
        CflLL BOURED(MZBLK,flREfl,LCflR,LCWORD,0,'RE',' BO', IERR)
95      DO 97,L=1,8
        IL=L-1
        ILOOK=IBflSE+IL
97      CflLL IPOKEBdLOOK, IFIX(flREfl(L)))
c—
c—     ass output device
c—
        CflLL flSSIGN (£,FILE)
c—
c—     get date and time
c—
        CflLL DflTE(IDflT)
        CflLL TIME(ITIM)
c—
        IC=IJ-H8
c—
        LIMIT=NFILE+LOC         !NO.FILES  +LOCflTION OF FIRST LINE FOR EXIT
c—
C—     PRINT SCREEN WITH FILE NflMES
c—
31      IFLflB=0  IREINIT FLflB
                                    233

-------
        IR=3
        CflLL VTERSE
        CflLL VTHVP( 1,1)
        CflLL vTS6R('R','I',0,0)
        TYPE *,' Type  "RETURN"  until  file  found.
        *Then type function code.  C H for  help 3  '
        CflLL VTSGRCO', 0,0,8)
        CflLL FILELB      !PUT LflBELS ON SCREEN
        CflLL VTHVP(LOC, 1)
c—
c—     convert from radix 50 format
c—
        DO 12, L=1,NFILE
        DO 11,LK=1,4
11      LflBLK(LK)=MRBLK(L, LK)
c—
        CflLL R50ftSC(12, LflBLK,OUTP)
        CflLL VTHVP(L+IR,IJ)
c—
1£      TYPE 2,L,(OUTP(I), 1 = 1,1£)
£       FORMflT (X,12,' ' ,3fll, ' :', 5fll,'.',3ftl)
c—
c-—     put exit on screen
c—
        CflLL VTHVP
-------
c—     -£ because need to back up one line for last increment at line £0
c—         and one more for next increment at line £0
c—
98      IR=REflL+LOC-£
c—
c—     goto last line and erase to end
c—
        CflLL VTHVPdTR, 1C)
        CflLL VTELCE' )
        CflLL VTHVP.dR, 1C)
        GOTO £0
99      IF (flNS .EQ.'H') BOTO 1£0        IHELP FILE
        IF (flNS .EQ.'P') BOTO 30         !ON P BET FILE
        IF (flNS.EQ.'SM BOTO 30          !ON S REflD FILE BUT ONLY WRITE POT
        IF (flNS.EQ.'I') BOTO 30          !ON W WRITE TO FILE
        IF (flNS.EQ.'C') BOTO 1£0         ICREATE NEW FILE
        IF (flNS.EQ.'R') BOTO 30          !screen read of one record
        IF (flNS.EQ.'QM BOTO 1000        Iquit
        IF (flNS.EQ.'EM SOTO 1000        lexit and start BQURST
        IF (flNS.EQ.'D') BOTO 30          IDUMP DATfl FOR INFORM
        IF ( flNS.EQ. 0) BOTO £0   .'ON SPflCE BRflNCH DOWN ONE LINE
        BO TO 31         ISOMETHINB ELSE  TYPED REPflINT SCREEN
c—
C—     THIS IS THE FILE
c—
30      CflLL CLRBOT
        IF (IR.EQ.LIMIT) SOTO 1000
        IFILE=IR-3       !3 FOR IR IS 4 FIRST TIME THROUBH
c—
C—     CONVERT FROM RflDIX 50
c—
        DO 111,LK=1,4
111     LflBLK(LK)=MftBLK(IFILE,LK)
        CflLL R50flSC(1£, LflBLK, OUTP)
        IF (flNS.EQ.'R') BOTO 1£0         !skip verification can get out ofy
        CflLL VTHVP (£1,10)
c—
C—     VERIFY FILE NflME
c—
        TYPE 3£, (OUTP(I),1 = 1, IS)
3£      FORMflT  C IS THIS THE FILE YOU WflNT ? ',3fll,':',6fll,'.',
        *3fli,'   CY/N: ',*)
        flCCEPT l,flNSl
c—
C—     NOT PROPER FILE CYCLE BflCK TO SEflRCH
c—
        CflLL CLRLIN
        CflLL CLRBOT
        IF (ANS1.EQ. *Y>) BOTO 1£0
        BOTO £0
c—
C—     CORRECT FILE REflD IT
                                   235

-------
c—
1£0      IF  (flNS  .EQ.  'P')  COLL  REflDF(IFLflG)
         IF  (flNS.EQ. 'HM  CflLL  BHELP(IFLflG)
         IF  (flNS.EQ. MM  CflLL  WRITE(IFLflG)
         IF  (flNS  .ED.'SM CflLL PflRTL(IFLflG)
         IF  (flNS.EQ.'CM  CflLL  NEWDSK(IFLflB)
         IF  (flNS.EQ.'DM  CflLL  BOUFID(IFLflB)
         IF  (flNS.EQ.'RM  CflLL  SCRNRD(IFLflB)
         IF  (IFLflS.EQ.1)  GOTO  31
         GOTO £0
1000     CflLL VTERSE
         IF  (flNS  .NE.  'Q' ) GOTO 999
         CflLL VTERSE
         TYPE *,'ENTER QUIT CODE'
         CflLL IPOKE("044,"10000)
         ftCCEPT 101,CODE
101      FORMflT (fl4)
         CflLL IPOKE("044,"000)
         IF  (CODE.NE. PflSWRD) GOTO 31
         CflLL VTERSE
999      CflLL CLOSE(£)
5        DO 7,L=1,8
         IL=L-1
         ILOOK=IBflSE+IL
7        flREfl(L)=IPEEKB(ILOOK)
        CflLL BOURED(MZBLK, flREfl, LCflR, LCWORD, 0, ' WR' ,' BO' ,IERR)
         IF  (flNS.EQ.'E'
        *    .OR. IR. EQ. LIMIT)
        *       CflLL SETCMD('@BSTRTM
        CflLL EXIT
1        FORMflT (Ifll)
3       FORMflT (4X,'EXITM
        END
                                   236

-------
        SUBROUTINE  CLRLIN
P____«___--— ———_—--.___.....__-_____..___-.______.____
C-      THIS PROGRflM  CLEflRS THE END OF THE LINE
        COMMON  /LOCflT/ NFILE, LOG, IR, 1C, LIMIT
        CALL  VTHVPdR, IC-1)      IBflCK UP ON SPflCE
        COLL  VTEL('E')   lERfiSE TO END OF LINE
        RETURN
        END
                                     237

-------
        SUBROUTINE CLRBOT
c	
c-      clears bottom of screen
c	
        COLL VTHVP <£0,1)
        CflLL VIED ('EM  lERflSE TO END OF DISPLflY
        RETURN
        END
                                 238

-------
        SUBROUTINE SCRNRD(IFLflG)
u
C
C
C
C
c
r
1
I
1
1
1
4—
Program :
Module :
Function:



BOUFIL
BOUFIS
ROUTINE
SCREEN




TO




MODIFY
DRIVEN






DfiTft IN fi DflTfi FILE
ENTRY




	 K
1
1
1
1
1

c—
        L06ICOL *1 ftNS,flNSl,OUTP<13), IDflTO), ITIMO), LERR, KERR
        INTEGERS MflBLK (14,4), MflBLKL (14), MRBLKW(14), LflBLK (4)
        DIMENSION DftTfl(60>,MLOC<10)
        COMMON /LOCRT/ NFILE,LOG,IR,1C, LIMIT
        COMMON /DftWflNS,flNSl,OUTP,IDfiT,ITIM,LERR,KERR,
        *MflBLK,MflBLKL,MflBLKW,LftBLK,DflTfl,MLOC,I FILE
c—
        LOBICflL*! STRING(6)
c—
c—•
c—     password for write
c—
        DflTfi PflSWRD/'WZ3£'/
c—
c—     offset for screen orgin that is the first vertical line to start n
c—
        DflTfi IOFST/3/
c—
        RECORD=0         linit record to zero for each file read
        IFLftG=0 UNIT FLOG
        IWC=0   linit write code to off
        IWORDS=MflBLKW(IFILE)
        ILEN=MflBLKW(IFILE)/2
        IEND=MfiBLKL(IFILE)
        LSTftT='RE'
        IOP='BO'
100     CflLL VTERSE
44      DO 42  1=1,60
4£      DftTfl(I)=0.
        CflLL VTHVPU,!)
        WRITE  (7, £06) (OUTP(JK),JK-1,1£)
c—
c—     if only one record display  it
c—
        IF (IEND.NE. 1) GOTO 110
        RECORD=IEND
        GOTO 111
C—
110     CflLL CLRBOT
        TYPE *,'Record:  '
c—
c—     get record number or command
c—
                                   239

-------
        CflLL VTHVP(£0, 10)
        CflLL 6ETSTR  (5,STRIN6,5,IERR)
c—
c—     exit on record 0 or ' e'
c—
        IF  (STRING(l).EQ.'E'
        * .OR.STRING(l).EQ.'e'
        *  .OR. STRING (1). EQ.'0')
        *    GOTO 1000
c—
c—     increment one record on  return
c—
        IF  (STRING(D.NE. 0 ) GOTO 300
         RECORD=RECORD+1
         GOTO 10
c—
c—     convert to number
c—
300     CflLL CONVRT(RECORD, IREflL, STRING)
        IF  (IREflL.EQ..TRUE.) GOTO 10
c—
c—     branch on command
c—
        IF  (STRING(l).EQ. 'R' ) ICW=0      Iturn off  write  function
        IF  (STRING(l).EQ. 'R' ) GOTO 110   !branch  back  to  question
        IF  (STRING(D.NE. »W ) GOTO 500
c—
c—     check to see if they know password
c—
        IF  (ICW.EQ.0) GOTO £5
c—
c—     tell them that write function is alreay  enabled
c—
        CflLL VTHVP(£3,1)
        CflLL VTSGRC I','R',0, 0)
        TYPE 507,"007
        CflLL VTSGR CO', 0,0,0)
        CflLL ISLEEP  (0,0, £,0)
        GOTO 110
10      IF  (RECORD .LT.0 .OR. RECORD.GT.IEND) GOTO 500
111     CflLL VTHVP(1,£5)
        TYPE 11,RECORD,IEND
        IBLK=RECORD-1
c—
        CflLL BOURED(LflBLK,DflTfl, ILEN, IWORDS, IBLK, LSTflT, IOP,LERR)
        IF  (LERR.NE. 0) GOTO £01
c—
c—
c—
        IHOR=3
        WERT=1
        DO £10,ML=1,ILEN
                                   240

-------
                CflLL VTHVPdHOR, I VERT)
                WRITE  (7, £05)  (ML, DflTfl(ML))
                WERT=IVERT+16
                IF  (IVERT.LE.70) GOTO £10
                IVERT=1
                IHOR=IHOR-H
£10     CONTINUE
        IF  (ICW.EQ. 0)  GOTO 110
c—
c—     section to  allow screen  writing
c—
310     CflLL CLRBOT
        IVERT=1
        TYPE *,'Location: '
        CflLL VTHVP(£0,1£)
        flCCEPT 31£,XLOC
31£     FORMflT (F10.0)
        IF  (XLOC .LT.  0. .OR. XLOC .GT. ILEN) GOTO 310
        IF  (XLOC.EQ.0) GOTO 350
        IXLOC=XLOC
c—
c—     calculate screen coordinates
c—
        IHOR=((IXLOC-1)/5)+IOFST
c—
c—     get value
c—
        CflLL VTHVP(£0,30)
        TYPE *,'Value: '
        COLL VTHVP(£0,40)
        flCCEPT 31£,DflTfl(XLOC)
c—
c—     display new value
C—     values 16 and  15 have to do with the spacing in format statement 5
c—     5 is from the number of values on one line of the screen ie. 5
c—
        IVERT=((XLOC-((IHQR-IOFST)*5))#16)-15
        CflLL VTHVPdHOR, IVERT)
        WRITE  (7, £05)  IXLOC,DflTfl(IXLOC)
        GOTO 310
350     CflLL BOURED(LflBLK,DflTfl,ILEN,IWORDS, IBLK,' WR', IOP, LERR)
        IF  (LERR.NE.0) GOTO £01
        GOTO 110
1000    IFLflG=l
        RETURN
£01     CflLL VTERSE
        CflLL VTSGR('B','R','I',0)
        TYPE £0£,7,
-------
c —
c —
c —
500
c—
c—
c—
£5
        error on record number

        CflLL VTHVP(£3, 1)
        CALL VTSGR(T,'R',0, 0)
        TYPE 50£, "007
        CflLL VTSSR CO', 0,0,0)
        CflLL ISLEEP  (0,0, £,0)
        BOTO 110

        write protection determination
        CflLL VTHVP(£1,1)
        TYPE 30
        CflLL IPOKE  ("44,"10000)
        flCCEPT 101,CODE
        CflLL IPOKE  ("044,"000)
        IF (CODE. NE. PflSWRD) BOTO 505
        ICW=1
        BOTO 110
505     CflLL VTHVP(£3,1)
        CflLL VTSSR C I','R', 0,0)
        TYPE 506,"007
        CflLL VTS6R CO', 0,0,0)
        CflLL ISLEEP (0,0,£,0)
        BOTO 110
c—
c—format statements
c—
11      FORMflT (X,'Record:',F4.0,£X,'of, 14, £0X,'"E"  to  exit')
30      FORMflT (//' Enter write code to  proceed' )
101     FORMflT (04)
£0£     FORMflT (X,Ifll,'Error on read or  write  for   ',
£05
£06
50£
506
507
        FORMflT <»+', !£,'->  ',F10.£)
        FORMflT (X, 'FILE: ' , 3fll, ' :' , 6fll, ' . ' , 3fll )
        FORMflT (X, Ifll, 'No such record')
        FORMflT (X, Ifll, 'Illegal Password -  write not enabled.')
        FORMflT (X, Ifll, 'Write option already enabled.')
        END
                                   242

-------
        SUBROUTINE REflDFdFLRG)
C +	+
C I  Program : BOUFIL                                                 I
C I  Module  : BOUFIR                                                 I
C. I  Function: OUTPUTS flLL NONBLANK RECORDS OF fl DflTfl FILE TO OUTPUT  I
C I            DEVICE                                                 I
C +	:	+
c—
c—     sub to read disk
c—
        LOSICflL *1 ftNS,flNSl,OUTP(13),IDflT(9),ITIM(B), LERR,KERR
        INTEGER*£ MftBLK (14,4),MftBLKH 14),MflBLKW(14), LflBLK(4)
        DIMENSION DflTfl(60),MLOC(10)
        COMMON /LOCflT/ NFILE,LOC,IR,1C, LIMIT
        COMMON /DflTfl/flNS,flNSl,OUTP,IDflT,ITIM,LERR,KERR,
        *MflBLK, MflBLKL,MflBLKW, LftBLK, DflTfl, MLOC,IFILE
C—
C~
        IWORDS=MflBLKW(IFILE)
        ILEN=MOBLKW(IFILE)/S
        IBEBIN=1
        IEND=MfiBLKL(IFILE)
        LSTfiT='RE'
        IOP='BO'
        ITOT=0  .'NUMBER OF BLftNK RECORDS IN ft FILE
        IFLftG=0
79      COLL CLRBOT
        COLL VTHVP(£I3,1)
        IF  (IEND .EQ.1) SOT0.50
        TYPE 70
70      FORMfiT (X,'REOD OLL RECORDS  ?  CY/N] '*)
        ftCCEPT 71,KERR
71      FORMfiT (Ifll)
        IF  (KERR. EQ. ' Y» ) GOTO 50
        CflLL CLRBOT
        TYPE 7£
7£      FORMflT (X,'FIRST RECORD: '*)
        flCCEPT 73,BEGIN
73      FORMfiT (F4.0)
        TYPE 74
74      FORMflT 
-------
c—
c—
        DO £80,IBLOCK=IBEBIN, IEND
        IBLK=IBLOCK-1    !BLOCK  0  FIRST RECORD
        COLL BOURED(LflBLK, DflTfl, ILEN, I WORDS, IBLK, LSTflT, IOP,LERR)
        IF (LERR.NE.O) GOTO £01
        IZERO=0  ITEST FOR  BLflNK RECORDS
        DO 43, 1 = 1, ILEN
43      IF (DflTfl(I).EQ. 0)  IZERO=IZERO+1
        IF (IZERO.EQ. ILEN) ITOT=ITOT+1
        IF (IZERO.EQ. ILEN) BOTO 64
c—
c—
c—
        WRITE  (£,£06) (OUTP(JK),JK=1, 12),IBLK+1, IEND,IDflT,ITIM
£06     FORMflT  (//,X,'FILE: ',3fll,':', 6fll,'.', 3fll, 4X,'RECORD',13,
        *' OF',I3,5X, 'DftTE: ', 9fll,4X,' TIME:  »,8fll)
        WRITE  (£,£05) (ML, DftTfl(ML),ML=1, ILEN)
£05     FORMAT  (5(X, 13,'—> ',F10.£))
44      DO 4£  1=1,60
4£      DftT«(I>=0.
£00     CONTINUE
        BOTO 65
64      COLL VTHVP  (££,10)
        TYPE *,' BLflNK RECORD REflD  NUMBER', IBLOCK
        CflLL ISLEEP (0,0,£,0)
65      CflLL VTSBR  CO', 0,0,0)
        CflLL CLRBOT
        CflLL CLRLIN  .
        RETURN
£01     CflLL VTERSE
        CflLL VTS6R('B','R',»I',0)
        TYPE £0£,7,(OUTP(KL),KL=1, 12)    IRINS  BELL
£02     FORMflT (X,lfll,'ERROR ON REflD FOR   ' 3fll,' :•,6fll,'.',3fll)
        CflLL ISLEEP (0,0,5,0)
        CflLL VTSSR  CO', 0,0,0)
        IFLflB=l !ERR ON REflD
        RETURN
        END
                                   244

-------
        SUBROUTINE BOUFID(IFLflS)
C +	
C I  Program : BOUFIL
C I  Module  : BOUFID
C I  Function: OUTPUTS PILL NONBLflNK  RECORDS TO  OUTPUT DEVICE
C I
  C4.___	
  T         _____—__	___	_	__	_	_______	____.
c—
        LOBICftL *1 flNS,flNSl,OUTP(13), IDflT(9), ITIM(8), LERR,KERR
        INTE6ER*£ MflBLK(14,4),MRBLKL(14),MflBLKW<14), LflBLK(4)
        DIMENSION DflTfl(60),MLOC(10)
        COMMON /LOCflT/ NFILE,LOG,IR, 1C, LIMIT
        COMMON /DflTft/flNS,flNSl,OUTP, IDflT, ITIM,LERR,KERR,
        *MftBLK, MflBLKL,MflBLKW,LflBLK,DflTfl,MLOC,IFILE
C~
C—
        IWORDS=MflBLKW(IFILE)
        ILEN=MPBLKW(IFILE)/£
        IBE6IN=1
        IEND=MftBLKL(IFILE)
        LSTftT='RE'
        IOP='BO'
        ITOT=0   !NUMBER  OF BLflNK  RECORDS IN ft  FILE
        IFLfi6=0
79      COLL CLRBOT
50      CflLL VTHVP  (IR,IC+4)
        CflLL VTSBR('R','I',0,0)
        TYPE *,'FILE BEING REflD'
c—
C--     NOW REfiD THE FILE
c—

        WRITE  (2,£86)  (OUTP(JK),JK=1,1£),IDflT,ITIM
£06     FORMfiT 
-------
        GOTO 65
64      CflLL VTHVP (££,10)
        TYPE *,'  BLflNK RECORD REflD  NUMBER', IBLOCK
        CflLL I SLEEP (0,0,£,0)
65      COLL VTSGR CO', 0,0,0)
        CflLL CLRBOT
        CflLL CLRLIN
        RETURN
£01     CflLL VTERSE
        CflLL VTSSR('B»,'R','I',0)
        TYPE £0£,7,(OUTP(KL),KL=1, 1£)    1RING BELL
£0£     FORMflT (X,Ifli,'ERROR ON REflD FOR  ' 3fll,':' ,6fll, '.',3fll)
        CflLL ISLEEP (0,0,5,0)
        CflLL VTSBR CO', 0,0,0)
        IFLflG=l !ERR  ON REflD
        RETURN
        END
                                  246

-------
        SUBROUTINE BHELP(IFLAG)
C +~~~	————	—	—————-——.—«___	..—_..—,	—.—f
C I  Program : BOUFIL                                                 I
C I  Module  : BOUFIH                                                 I
C I  Function: HELP FILE FOR BOUFIL FILE MANflGEMENT SYSTEM            I
C I                                                                   I
c +	
C-
        L06ICAL*! FILE(£0)
        COMMON /FILE/FILE
        LOGICAL*! LANS, IEQUC4)
        EQUIVALENCE  (FILE(1), IEQU<1))
        IFLAG=1
        COLL VTERSE
        CPLL VTSGRCR','I',0,0)
        CflLL VTHVP<1,£0)
        TYPE 10
10      FORMflT 
-------
        CflLL VTHVP<23,£5)
        TYPE 500
500     FORMflT (X,'To exit hit "RETURN".')
        CflLL VTSGR CO', 0,0,0)
        flCCEPT 501,LflNS
501     FORMflT (1-fll)
        RETURN
        END
                                  248

-------
        SUBROUTINE WRITE(IFLflG)
u
C
C
C
C
r
1 Program :
1 Module :
1 Function:
1
+ — — —
BOUFIL
BOUFIW
INITIflLIZES flLL FILE RECORDS TO BLONK


	 1-
1
1
1
1

c—
        LOBICflL *1 flNS,flNSl,OUTP(13), IDflTO), ITIM(8), LERR, KERR
        INTEGER*£ MflBLK(14,4),MflBLKL(14),MflBLKW<14), LflBLK(4)
        DIMENSION -DflTfl(60),MLOC(10)
        COMMON /LOCflT/ NFILE,LOG,IR,1C,LIMIT
        COMMON /DflTfl/flNS,flNSl,OUTP,IDOT,ITIM,LERR,KERR,
        *MflBLK,MflBLKL,MftBLKW,LflBLK,DflTfl,MLOC, IFILE
c—
c—
c—
        IFT_flG=0  !INIT FLOG
        COLL VTHVP(20, 1)
£5      TYPE 30
30      FORMflT (//' ENTER COPY CODE TO PROCEED')
        COLL i POKE  (" 44," i mm)
        ftCCEPT 101,CODE
        CftLL IPOKE  ("044,"000)
        IF  (CODE.NE.'WZ3S') 60TO  500
101     FORMflT (fl4)
        CflLL CLRBOT
50      CftLL VTHVP  (IR,IC+4)
        COLL VTSGR('R','I',0,0)
        TYPE *,'FILE INITIOLIZflTION'
c—
C--     NOW REftD  THE FILE
c—
        IWORDS=MfiBLKW(IFILE)
        ILEN=MABLKW(IFILE)/£
        IBEGIN=1
        IEND=MflBLKL(IFILE)
        LSTOT='WR'
        IOP='BO'
44      DO 42 1=1,60
4£      DOTfl(I)=0.
c—
        DO 200,IBLOCK=IBEGIN, IEND
        IBLK=IBLOCK-1   !BLOCK 0  FIRST RECORD
        COLL BOURED
-------
        CflLL ISLEEP  (0, 0,£,0)
        CftLL VTSGR CO', 8,0,0)
        CflLL CLRBOT
        CflLL CLRLIN
        RETURN
£01     CftLL VTERSE
        CflLL VTS6R('B','R','I',0)
        TYPE 20£,7,(OUTP(KL),KL=1, 1£)    1RINS BELL
£02     FORMflT (X,Ifll,'ERROR ON WRITE FOR  '3fll,' :', fcfll,'.',3fli)
        CflLL ISLEEP  (0,0,5,8)
        CflLL VTSGR CO', 0,0,0)
        IFLflG=l !ERR ON REflD
        RETURN
500     IFLflG=l
        CflLL CLRBOT
        TYPE 555,"007
        FORMflT(X,lfll,'INVflLID ID')
        CflLL ISLEEP  (0,0, £,0)
        IFLflG=i
        RETURN
        END
                                  250

-------
SUBROUTINE PftRTL (IFLflG)
r +- _ _ 	 	 	
C 1 Program : BQUFIL
C 1 Module : BOUFIP
C 1 Function: RERDS flND OUTPUTS ONLY SPECIFIC
C 1 OF ft FILE
C 1
C4_ _____ _
c —

1
1
SECTIONS OF EftCH RECORD 1
1
1

c—
        LQGICflL *1 RNS,flNSl,OUTP(13),IDRT(9),ITIM(8),LERR,KERR
        INTEBER*£ MflBLK(14,4),MRBLKL(14),MRBLKW(14), LftBLK(4)
        DIMENSION DRTfi(60),MLOC(10)
        COMMON /LDCRT/ NFILE,LOC,IR,1C,LIMIT
        COMMON /DftTfl/RNS,RNSl,OUTP,IDftT,ITIM,LERR,KERR,
        *MflBLK,MRBLKL,MflBLKW,LflBLK,DflTfl, MLOC,I FILE
c—

c—
        IFLftG=0 UNIT FLOG
c—
c—     file information

        IWORDS=MfiBLKW(IFILE)
        ILEN=MflBLKW(IFILE)/£
        IBEGIN=1
        IEND=MflBLKL(IFILE)
        LSTftT='RE'
        IOP='BO'
        CflLL CLRBOT
c—
c—     get number of locations
c—
57      TYPE 55
55      FORMAT  ('  Number of  locations: ',$)
        ftCCEPT 56, DONE
        IF  (DONE.EQ.0) GOTO 66
        IF  (DONE.GT.10) GOTO 57
        IDONE=DONE
        CflLL VTHVP(£0,1)
        CflLL VTEDCE' )
        DO 59,KL=1,1DONE
70      CRLL CLRBOT
        TYPE 60, KL,IDONE
        flCCEPT 56, DONE
        IF  (DONE.EQ.0.) GOTO 70
        IF  (DONE.GT. ILEN) GOTO 70
59      MLOC(KL)=DONE
        COLL CLRBOT
50      CflLL VTHVP  (IR,IC+4)
        CflLL VTSGR('R','I',0, 0)
        TYPE *,'File being read'
                                    251

-------
c—
c—     output  locations  read  at  top
c—
        WRITE  (£,72)  "014, (MLOC(K), K=l,IDONE)
c—
c—
c—     now read the  file
c—
        DO £00,IBLOCK=IBEGIN, IEND
        IBLK=IBLOCK-1    !BLOCK 0  FIRST RECORD
        COLL BOURED(LflBLK, DflTfl, ILEN, IWORDS, IBLK, LSTflT, IOP,LERR)
        IF (LERR.NE. 0)  GOTO  £01
        IZERO=0  ITEST FOR BLflNK  RECORDS
        DO 43,1=1,ILEN
43      IF (DflTfl(I).EQ. 0)  IZERO=IZERO+1
        IF (IZERO.EQ.ILEN) GOTO 65
c—
c—
c—
51      WRITE  (£,£07)  (DflTfl(MLOC(KL)), KL=1,IDONE)
44      DO 4£  1=1,60
4£      DflTfl (I )=0.
£00     CONTINUE
        GOTO 66
65      CflLL VTHVP  (££,10)
        TYPE *,' Blank  records read   number:  ',IBLOCK
        CflLL I SLEEP  (0,0,£,0)
66      CflLL VTSGR  CO', 0,0,0)
        CflLL CLRBOT
        CflLL CLRLIN
        RETURN
£01     CflLL VTERSE
        CflLL VTSGR('B','R','I',0)
        TYPE £0£,7,(OUTP(KL),KL=1,1£)    IRING BELL
        CflLL ISLEEP  (0,0,5,0)
        CflLL VTSGR  CO', 0,0,0)
        IFLflG=l  !ERR ON REflD
        RETURN
p	  ...___..	j_i LI_ • _-. j_ --- -  	i_r T— -n	1_	ITT --1I	I	   — —	 - -	T-I	 j... -mi 	 MI -n i
c—
c—     format statements
c—
^         -                 	 ,_,		TM_L—__ -mM-J III -TT-M _   I	I ¥T —	 ~  	     	
56      FORMflT  (F5.0)
60      FORMflT C Location:',I£, X,»of',X, I£, X,' !',X,$)
7£      FORMflT  (IflI,/,'Locations  read  ',10I4,//)
£07     FORMflT  (X,10F10.fi)
£0£     FORMflT  (X,lfll,'ERROR ON REflD FOR   ' 3fll,' :' ,6fll, '.' ,3fll)
        END
                                   252

-------
        SUBROUTINE NEWDSK(IFLflS)
C +	+
C I  Program : BOUFIL                                                 I
C I  Module  : BOUFIN                                                 I
C I  Function: THIS PR06ROM CREflTES ft FILE OF SPECIFIED LENGTH        I
C I            ftND NUMBER OF WORDS AS SPECIFIED.                      I
C I                                                                   I



c—     dimension statements
c—
        DIMENSION DftTfl(l£5>
        INTESER*£ DBLK(4),CBLK(4>
        REflL*4 IDNflM
        LOGICflL*! FILE<12),DEV(4),ftNSW(6), QUEST(4)
c—
c—     data statements
c—
c—     array initialization of values
c—
        DflTfl DRTfl/125*0./CBLK/4*0/DEV/4*"000/
c—
c—     set flag so screen repainted
c—
        IFLfl6=l
c—
c—     make sure plenty of queue elements
c—
        CflLL IQSET(5)   IMflKE SURE THEIR ORE ENOU6H QUEUE ELEMENTS
c—
c—     start program with explaination
c—
        CflLL VTERSE
        CflLL VTHVPU,!)
        TYPE 308
400     IBLK=0  '.SET INITIflL BLOCK NUMBER TO 0
c—
c—     get device name and convert to radix 50
c—
        CflLL VTHVP<5, 1)
        CflLL VTEDCE' )
        TYPE 301
        TYPE 30£
        CflLL BETSTR (7,DEV,4)
        IF (DEV(1).EQ.0)  BOTO 899        IHflVE TO BET DEVICE
        CflLL IRflD50 (4,DEV,IDNflM)
c—
c—     check to see if loaded
c—
        CflLL IDSTflT (IDNflM,CBLK)         IMflKE SURE DEVICE HflNDLER IS LOftDD
        IF (CBLK(3).EQ. 0)GO TO 500
                                   253

-------
c—
c—     get file name
c—
315     TYPE 306
        COLL SETSTR <7,flNSW,6)
        IF (flNSW(l).EQ. 0) GOTO 899
c—
c—     assign device naem to file name
c—
        DO 385,1=1,3
305     FILE(I)=DEV(I)
c—
c—     get 6 character file name
c—
        DO 307,1=1,6
        J=I+3
307     FILE(J)=flNSW
-------
csee if such a file already exists,  if so stop, if not proceed
c—
        ITEST=LOOKUP(ICHflN,DBLK)
        IFdTEST.EQ. NBLOCK)BO TO 505
c—
c—     create a file, associate it with channel ichan, call it the name
c—      refered to in dlbk, and make it nblock long

c—     if a problem  (abnormal return) arises stop the program
c—      failure may be due to trying to enter an existing
c—       file
c—
        ITEST=IENTER  BO TO 400
        IF(SCOMP('Y»,QUEST, IVflL).EQ.0) SO TO 400
c—
c—     done then exit
c—
1000    RETURN
c—
c—     error on write
c—
900     TYPE *,'ERROR ON WRITE'
                                    255

-------
        GOTO 899
c —
c —     no free channels
c —
901     TYPE *,'NO CHflNNELS flVfllLftBLE'
        GOTO 899
c—
c —     device handler error

500     I TEST= I FETCH ( I DNflM )
        IF(ITEST.EQ.0> GO TO 315
        IFdTEST.EQ. 1) TYPE 501
        IF(ITEST.EQ.£> TYPE 50£
        IF (ITEST.EQ.3)  TYPE 503
        TYPE «, 'ERROR LOftDING DEVICE HflNDLER'
        GOTO 899
c —
c —     file already exists with that structure
C' —
505     TYPE 506
        GO TO 899
c —
c —     error on file entry file may already exist
c- —     but with different structure
c —
510     IF 
-------
501     FORMATC DEVICE NAME SPECIFIED DOES NOT EXIST')
502     FORMAT  <' NOT ENOUGH MEMOREY TO LOAD HANDLER')
503     FORMAT  (' NO HflNDLER EXISTS ON THE SYSTEM DEVICE')
506     FORMAT  (/,' A FILE BY THAT NAME AND SIZE ALREADY  EXISTS.',/
        1» ENTER A NEW FILE NAME.')
511     FORMAT  (' FILE NAME OR CHANNEL ALREflDY  IN USE')
51£     FORMATC NOT ENOUGH FREE  SPACE EXISTS')
513     FORMAT  (' DEVICE ALREADY  IN USE')
514     FORMAT  (' FILE SEQUENCE NUMBER ALREADY  IN USE')
515     FORMAT  (' ENTER A NEW FILE NAME WHEN REQUESTED')
        END
                                    257

-------
SUBROUTINE  FILELB
L + 	
C 1 Program : BOUFIL
C 1 Module : BOUFIF
C 1 Function: LIST FUNCTIONS OF FILES ON SCREEN
C 1
1
1
1
1
COMMON /LOCflT/ NFILE,LOG,IR,1C,LIMIT
CflLL VTHVP  (LOG,1)
CflLL vTSGR<'R','U',0,0)
TYPE *,' Most current reading
TYPE *,' flccumulator  for  hourly average
TYPE *,' Status  bytes for BOURST
TYPE *,' Daily average
TYPE *,' Record  number for daily average
TYPE *,'
TYPE
TYPE *
*,'
  Data from previous 7 days
  Record number for previous 7 days
'  Previous 30 days
TYPE *,' Record number for previous 30 days  '
TYPE *,' Next time program is to run          '
TYPE *,' Backup for current reading           '
TYPE *,' Last £00 readings                    '
TYPE *,' Record number for last £00 readings  '
TYPE *, ' Setpoints and timers                 '
CflLL VTSBRCO', 0,0,0)
RETURN
END
                          258

-------
        SUBROUTINE CONVRKREflLNO, IREftL, STRING)
C +
C   Program  5 BOUFIL
C   Module   : CONVRT
C   Function: ROUTINE TO CONVERT  LOGICftL*! STRING TO REfiL*4
C
C         real no    is the real number returned   character not number
c-
c-      — make number equal to specified array  location
c-      — for example location 5 would yield number 1  "5-4=1"
c_      — the first four locations are for the  special characters  and  "®
c-
15      flNUM(I)=L-4
                                   259

-------
c-
c-      — check to see  if ' +'  is  in  first array  location  only
c-
        IF  (STRINB(l).EQ. IM(1)> SIBN =.1
        IF  (I.NE. l.ftND.STRING  RETURN
c-
c-      — check for '-',in first  array  location  only
c-      —  sign is made to be  -.1 instead of -1. because  the  minus  sign
c-      — always occupies the  first  array location of the string  and  this
c-      — compinsate for something other than a  number  in that  location.
c-
        IF  (STRING < I ).EQ. IM<2)> SIGN=-. 1
        IF  (I.NE. l.flND. STRING ( I ).EQ. IM(2»  RETURN
c-
c-      — check for '.' in array, if none branch
c—
        IF  (STRING ( I ).NE. IM<3)> GOTO £5
c-
c-      — has this been the only occurance  of a  ' . ' if  no ->  return to  prm
c-
        IF  (IPDT.EQ. .TRUE. ) RETURN
c-
c-      — make pointer equal to location of the  '.'
c-
        IPD=I
c-
c-      • — set flag to show that a '.' was detected
c-
        IPDT=.TRUE.
£5      GOTO 10
c-
c-      — now that the testing is over with lets see what the number reals
c—
£6      1=1-1   Itake away one for loc null byte
        IREflL=. TRUE.     Ithis is a real number
c-
c-
c-
        IF  (IPD.EQ. 0)  IPD=I+1   !put '.' at end of number
        EXP=IPD ! location of ' . ' forconversion by power of 18.
        flML=l   ! start  with location 1 and raise to highest power
        DO 100 M=1,I
c-
c-      this step ignores the first  three values in the IM array
c-      that is the following symbols '+ - .'
c-
        IF  (flNUM(M).LT. 0. )  GOTO 100
c-
c-
        DREfiL=DREfiL+ (flNUM (M) * ( 1 0. *# ( EXP-flML) ) )
                                   260

-------
c-
100     CONTINUE
        DREfll_=DREflL*SIGN
        REflLNO=DREflL
        RETURN
        END
                                  261

-------
 APPENDIX IV



VIDEO CONTROL
  262

-------
        SUBROUTINE VTDHLB
cl Program :  BOURST,BOUFIL
cl Module  :  VTHDLB.FOR
cl Function:  CflUSES BOTTOM HflLF OF LINE TO BE DOUBLE HIGH
c+	
C-      MUST BE USED WITH VTDHLB TO SET TOP HflLF
C-      THE SflME SEQUENCE MUST BE SENT TO BOTH SUBROUTINES
C-      COMMflND SEQUENCE IS:
C-       ESC  4
C-      ESC=ESCflPE       C OCTflL 33  ("33) OR DECIMflL £73
m
10      TYPE 100,"33
100     FORMftT  C$',fll,' 4')
        RETURN
        END
                                    263

-------
        SUBROUTINE VTDHLT
c+	
cl Program :  BOURST,BOUFIL
cl Module  :  VTDHLT. FOR
cl Function:  CflUSES TOP HfiLF OF LINE TO BE DOUBLE HIGH

C-
C-      MUST BE USED WITH VTDHLB TO SET BOTTOM HflLF
C-      THE SOME SEQUENCE MUST BE SENT TO BOTH SUBROUTINES
C-      COMMflND SEQUENCE IS:
C-       ESC  3
C-      ESC=ESCflPE      [ OCTflL 33 ("33)  OR DECIMflL £73
C-
10      TYPE 100,"33
100     FORMflT C$',fll,'  3')
        RETURN
        END
                                  264

-------
        SUBROUTINE VTEDC IVflLUE)
cl Program :  BOURST.FOR                                                  I
cl Module  :  VIED. FOR                                                    I
cl Function:  ROUTINE TO ERflSE SECTIONS OF SCREEN DISPLftY                 I
C-      COMMflND SEQUENCE  IS:
C-      ESC  C PS J
C-      WHERE PS IS  ONE OF  THE  FOLLOWING
C-      0 ERflSE FROM ACTIVE POSITION  TO END  OF DISPLflY
C-      1 ERflSE FROM BEGINNING  OF  DISPLftY  TO ACTIVE  POSITION
C-      £ ERflSE flLL  OF DISPLflY
C-      THE  FOLLOW INF VflLUES  WILL  BE  USED  TO DESIBNflTE PS
C-      'E'  (END) FOR 0 DECIMflL 69
C-      'B'  (BEGINNING) FOR 1   DECIMflL 66
C-      'fl'  (ftLL) FOR £          DECIMflL 65
C-      EXflMPLE FORMflT: CflLL  VTEL  ('fl')
C-
        IF  (IVflLUE. EQ. 69) TYPE  10, "33,0
        IF  ( IVflLUE. EQ. 66) TYPE  10, "33, 1
        IF  < IVflLUE. EQ. 65) TYPE  10, "33, £
10      FORMflT  C*',fll,' C',I1,' J')
        RETURN
        END
                                    265

-------
        SUBROUTINE VTERSE
c+	
cl Program :   BOURST.FOR
cl Module  :   VTERSE.FOR
cl Function:   ERflSES SCREEN ftND RETURNS TO HOME POSITION
c+
C-
C-      ERfiSE SCREEN ftND RETURNS TO HOME POSITION
C-      COMMflND SEQUENCE IS:
C-       ESC  C;H -RETURN TO HOME POSITION
C-      ESC C£J -ERflSE flLL OF SCREEN
C-      ESC=ESCflPE      C OCTAL 33 ("33> OR DECIMflL £73
10      TYPE  100, "33, "133, "073, "110, "33, "133, "06£,"
100     FORMfiT C$',8fll)
        RETURN
        END
                                   266

-------
        SUBROUTINE VTHVP
-------
        SUBROUTINE VTSGRdVflLl, IVflL£, IVflL3, IVflL4)

cl Program :  BOURST.FOR                                                   I
cl Module  :  VTSGR.FOR                                                    I
cl Function:  SELECTS TYPE OF GRflPHIC  RENDITION (REVERSE VIDEO, UNDERLINE)I
CH	''
c-
C-      SELECT GRflPHIC RENDITION
C-      COMMflND SEQUENCE IS:
C-      ESC [ PS m
C-      WHERE PS IS ONE OF THE FOLLOWING
C-      '0' FOR flLL flTRIBUTES OFF - DECIMflL  79
C-      'I' FOR BOLD OR INCREflSED INTENSITY  - DECIMflL  73
C-      'U' FOR UNDESCORE - DECIMflL 85
C-      'B' FOR BLINK - DECIMflL 66
C-      'R' FOR NEGflTIVE OR REVERSE IMflGE -  DECIMflL 8£
C-      FORMflT IS CflLL VTS6RC I',' B',,) OR CflLL VTSGRC 0',,, )
C-      CflN HflVE UP TO 4 flTTRIBUTES flT ONE TIME
C-
        TYPE 10,"33,0
        IF (IVflLl.EQ.79) TYPE 10,"33,0
        IF (IVflLl.EQ.79) GOTO 1000
        IF (IVflLl.EQ.73) TYPE 10,"33,1
        IF (IVflLl.EQ.85) TYPE 10,"33,4
        IF (IVflLl.EQ.66) TYPE 10,"33,5
        IF (IVflLl.EQ.82) TYPE 10,"33,7
        IF (IVflL£.EQ.73) TYPE 10,"33,1
        IF (IVflL£.EQ.85) TYPE 10,"33,4
        IF (IVflL2.EQ.66) TYPE 10,"33,5
        IF (IVflL£.EQ.8£) TYPE 10,"33,7
        IF (IVflL3.EQ.73) TYPE 10,"33,1
        IF (IVflLS.EQ.85) TYPE 10,"33,4
        IF (IVflLS.EQ.66) TYPE 10,"33,5
        IF (IVflLS.EQ.82) TYPE 10,"33,7
        IF (IVflL4.EQ.73) TYPE 10,"33,1
        IF (IVflL4.EQ.85) TYPE 10, "33,4
        IF (IVftL4.EQ. 66) TYPE 10,"33,5
        IF (IVflL4.EQ.8£) TYPE 10, "33,7
10      FORMflT 0*',fll,'[',Il,'m')
1000    RETURN
        END
                                   268

-------
        SUBROUTINE VTTBM  (ITOP, IBOT)
cl Program :  BOURST. FOR                                                  I
cl Module  :  VTTBM. FOR                                                   I
cl Function:  SET TOP flND BOTTOM MftRBINS OF SCREEN                        I
c+ ----------------------------------------------------------------------- 4
C-
C-      SET TOP flND BOTTOM MflRBINS
C-      COMMflND SEQUENCE IS:
C-      ESC [ PT;PB r
C-      WHERE PT = TOP MflRBIN flND PB  = BOTTOM  MftRBIN
C-      WHERE ITOP=PT     IBOT=PB
C-      flNY INTEGER MflY BE USED FOR  ITOP OR IBOT
C-      SCREEN SIZE IS £4 LINES
C-      IBOT MUST BE BREflTER THRN ITOP
C-      EXflMPLE FORMflT: CflLL VTTBM (10, 15)
C-      THIS WOULD SET THE MflRGINS OR SCROLLING REGION  flS  LINE  10-LINE  15
C-
        IF  (ITOP. ST. £4) ITOP=£3
        IF  (ITOP.LT. 1)  ITOP=1
        IF  (IBOT. GT. £4) IBOT=£4
        IF  (IBOT.LE. 1)  IBOT=£
        IF  (IBOT. LE. ITOP)  IBOT=ITOP+1
        IF  (ITOP. LT. 10. flND. IBOT. LT. 10) TYPE  10, "33, ITOP, IBOT
        IF  ( ITOP. LT. 10. flND. IBOT. BE. 10) TYPE 50, "33, ITOP, IBOT
        IF  (ITOP. GE. 10. flND. IBOT. BE. 10) TYPE 60, "33, ITOP, IBOT
10      FORMflT  ('*', fll, 'C',11,' ;',!!, 'r')
50      FORMflT  C*',fll,' C',I1,' ;',!£, 'r')
60      FORMflT  ('*', fll, '[',!£,' ?',!£, 'r')
        RETURN
        END
                                    269

-------
        SUBROUTINE VTWID
-------
SUBROUTINE VTDWL
c I  Program :
cl  Module  :
c I  Function:
c+	
c—
c—
c—
c—
c—
c—
c—
c—
c—
c—
c—
10
100
      BOURST.FOR
      VTDWL.FOR
      SET DOUBLE WIDTH LINE
command sequence is:
 ESC  6
ESC = escape     C octal 33  ("33) or decimal £73

format
COLL VTDWL
TYPE *,'text'

causes "text" to be double  width

TYPE 100,"33
FORMflT C*',fll,» 6')
RETURN
END
                            271

-------
        SUBROUTINE VTEL (IVflLUE)
C  I Program  : BOUFIL
C  I Module   : VTEL
C  I Function: ERflSES SECTION OF SCREEN LINES
C  I
C-      COMMflND SEQUENCE IS:
C-
C-      ESC  C PS K
C-
C-      WHERE PS IS ONE OF THE FOLLOWING
C-
C-      0 ERflSE FROM flCTIVE POSITION TO END OF LINE
C-      1 ERflSE FROM BEGINNING OF LINE TO flCTIVE POSITION
C-      £ ERfiSE flLL OF LINE
C-
C-      THE FOLLOWING VflLUES WILL BE USED TO DESIGNflTE PS
C-
C-      '£'   (END)  FOR 8 DECIMflL 69
C-      'B'   (BEGINNING) FOR 1   DECIMflL 66
C-      'fl»   (flLL)  FOR £         DECIMflL 65
C—
C-      EXflMPLE FORMflT: CflLL VTEL Cfl')
C-
        IF (IVflLUE. EQ. 69)  TYPE 10, "33, 0
        IF ( IVflLUE. EQ. 66)  TYPE 10, "33, 1
        IF ( IVflLUE. EQ. 65)  TYPE 10, "33, £
10      FORMflT C*',fll,' [',11, 'KM
        RETURN
        END
                                   272

-------
   APPENDIX V



LINKAGE MAP FILES
     273

-------
RT-11 LINK  V06.01D     Load Map        Won £8-Nov-B3 08:43:19
BOULD . REL      Title:  BOULD   Ident:  FORV02
Section  ftddr   Size    Blobal  Value   Global  Value   Global  Value
   BBS.   000000
 $OHflND  001000 000106
 *OTfiBL
 OTS*I
001106 000776
002104 022052
(RW, I,
$USRSW
*NLCHN
$WflSIZ
(RW, I,
$OVRH
*ODF1
(RW, D,
(RW, I,
$*OTSI
$CVTCB
CLC*
$DI
CIF*
CIL$
$CVTID
$IC
CFI*
SCO*
DCO*
flDF*MS
$ODR
SUF$MS
$SBR
DIF$IS
$DVR
MUF*IS
$MLR
$SETOP
ASSIGN
BLE$
BGE*
BLT*
*CLOSE
CMF*MS
CMF$SS
CMF$MI
CMF$PP
CMF$SP
CMF$IM
ICI$
ICO$
END$
$ERR
*IOEXI
$ERRTB
$FCHNL
$GETFI
GBL, PBS,
000000
000006
000152
GBL, REL,
001002
001102
GBL, REL,
LCL, REL,
002104
002120
002132
002142
002160
002172
002200
002212
002230
003256
003276
004246
004270
004326
004350
004374
004414
004440
004460
004742
007162
007630
007642
007652
007720
010526
010562
010600
010626
010646
010672
010736
011140
011534
011576
011702
012066
015740
017752
OVR)
*RF2fll
*HRDWR
*LRECL
CON)
OfREflD
*ODF2
OVR)
CON)
*CVTDB
$CVTCI
CID$
*CVTFB
CLF*
CLI$
CCI*
$ID
$IR
FCO$
flDF*IS
$flDDF
SUF*IS
*SUBF
DIF$MS
*DIVF
MUF*MS
*MULF
*OTI
**SET
NMI*1M
BEQ$
BRA$
Cfll$
CLOSE
CMF*IS
*CMR
CMF*II
CMF$MP
CMF$PM
CMF*SM
*ECI
DIM
ERR$
*OPNER
$EOL
$ERRS
*FIO
IDftTE

000000
000010
000210

001024
001104


002104
002120
002142
002146
00S 160
002176
002212
002212
002230
003264
004220
004256
004300
004336
004362
004402
004426
004446
004516
006550
007606
007632
007644
007662
010476
1910542
010562
010610
010632
010656
010676
010752
011336
011546
011620
011750
012173
016602
020010

.VIR
*SYSV$


0*DONE



*CVTDI
CIC$
CLD$
*CVTFI
$RI
*CVTIC
GDI*
*CVTIF
RCI$
ECO*
flDF*PS
flDF$SS
SUF*PS
SUF*SS
DIF*PS
DIF$SS
MUF*PS
MUF$SS
*$OTI
*INITI
NMI$1I
BBT$
BNE$
CflL*
CMF$PS
*CMPF
CMF$PI
CMF$SI
CMF$IP
CMF*MM
OCI*
OCO*
*DUMPL
$END
*CHKER
EOL*
EXIT
*$FIO
IFW$

000002
000012


001036



002104
002132
002142
002146
002160
002200
002212
002216
002242
003270
004234
004270
004314
004350
004366
004414
004432
004460
004520
007044
007620
007640
007650
007670
010522
010550
010574
010614
010642
010662
010730
011132
011406
011560
011656
011752
015734
016606
020122
                                   274

-------
OTS*P
SYS* I
024156 000054
024232 001176
USER*I
*CODE
OTS*0

SYS*0
025430 000000
025430 002416
030046 001066

031134 000374
*IFW
ILW*
*TVS
MOI*RM
MOI$SS
MOI*Sfl
REL*
MOI*MS
MOI*0S
MOI$1S
ICI*S
ICI*fl
DCI$P
MOL*Sfl
MOL*Mfl
MOL*MP
MOL*Pfl
MOL*IP
TSL*I
RET*L
RET*
*EOFIL
THRD*
*STP
*OTIS
*TflI
TflQ*
*TflP
TflF*
*TVL
TVD*
*TVQ
TVI*
WRINT
SVL*IP
SVL*MP
(RW, D,
(RW, I,
*CMPLT
*DIV60
I PEEK
I POKED
ISCHED
*GVflL
$TIME1
(RW, I,
(RW, I,
**OTSC
PUTSTR
(RW, I,
**OTSO
(RW, I,
020126
020240
0203GB
021204
021216
021226
021232
021246
021262
021276
021320
021332
021346
021360
021400
021416
021440
021462
021502
022024
022040
022470
022702
022712
023062
023204
023220
023226
023242
023464
023500
023506
023522
023720
024136
024152
GBL, REL,
LCL, REL,
024232
024440
024556
024612
024734
025052
025202
LCL, REL,
LCL, REL,
025430
027554
LCL, REL,
030046
LCL, REL,
*$IFW
*ILW
MOI$RS
MOI*RP
MOL*SS
MOI$IS
MOI*IM
MOI*MM
MOI*0M
MOI$1M
ICI*M
DC I$S
DCItfl
MOL$MS
MOL*SP
MOL*PM
MOL*IM
TSL*S
TSL*P
RET*F
*PUTBL
$EOF2
$STPS
F00$
$*OTIS
TflL*
*TflQ
TflD$
*TflF
TVF*
*TVD
TVP$
*TVI
SflL*IP
SVL*SP

OVR)
CON)
CVTTIM
6TIM
I POKE
IQSET
ISLEEP
LEN
*TIME*
CON)
CON)
TIMDIF

CON)
*OPEN
CON)
020132
020244
021200
021210
021216
021232
021236
021252
021266
021304
021324
021336
021350
021364
021404
021426
021446
021472
021510
022030
022074
022504
022704
022716
023064
023212
023220
023234
023242
023472
023500
023514
023522
024130
024140



024350
024504
024566
024622
025006
025070
025314


026714


030046

IFW*$
TVS$
MOL$RS
MOI$Rfl
MOI$SM
MOL*IS
MOI$Ifl
MOI$Mfi
MOI$0fl
MOI*1A
ICI*P
DCI$M
MOL$SM
MOL$MM
MOL$PP
MOL*PS
MOL*Ifi
TSL*M
$PUTRE
RET* I
*SETBL
SflVRB*
STP*
*EXIT
Tfll*
*TflL
TflP*
*TfiD
TVL*
*TVF
TVQ*
*TVP
*WflIT
SflL*SP
SflL*MP



*DIVTK
ICMKT
IPEEKB
ITIMER
I SPY
SCOPY



SYSTIM




020170
020364
021200
021212
021222
021232
021242
021256
021272
021312
021330
021342
021354
021374
021412
021434
021454
021476
021516
022036
022304
022524
022712
022736
023204
023212
023226
023234
023464
023472
023506
023514
023656
024132
024146



024412
024524
024576
024720
025046
025106



027354




                                  275

-------
$DflTflP
OTS*D
OTS$S

SYS*S

*DflTfl
USER*D
. ****.
BOULD
CHflN
CONDCL
CONTRL
DIflG
FILE
NUMBER
PROCES
TIMER
WflIT
BITS
Segment
Over 1 ay
OTS*I
SYS* I
USER$I
*CQDE

OTS$0
SYS*0
$DRTfiP
OTS$D
OTS$S
SYS*S
*DflTfl
USER*D
Segment
Overlay
OTS*I
SYS* I
USER* I
*CODE

OTS*0
SYS*0
*DflTflP
OTS*D
OTS*S
SYS*S
*DflTA
USER$D
Segment
031530
03£516
03£5£4

03£5£6

03£53£
03£640
032640
03£640
0346£4
034764
035120
035 17£
03547£
036042
036070
036100
036120
036142
size =
region
036206
036206
036206
036206

0374£6
0374£6
037426
040302
040302
040302
040302
040334
size =
region
036206
036206
036206
036206

0374£0
0374E0
0374£0
037616
037616
037616
037616
037644
size =
000766
000006
000002

000004

000106
000000
000000
001764
000140
000134
000052
000300
000350
000026
000010
000020
000022
000042
036204
000001
000000
000000
000000
001220

000000
000000
000654
000000
000000
000000
00003S
000000
002126
000001
000000
000000
000000
00121£

000000
000000
000176
000000
000000
000000
000026
000000
001436
(RW, D,

-------
Overlay region
 OTS*I   036206
 SYS*I   036206
 USER*I  036206
 *CODE   036206
 OTS*0
 SYS*0
 *DflTflP
 OTS*D
 OTS*S
 SYS*S
 *DftTfl
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 037702
 037702
 037702
 040400
 040400
 040400
 040400
 040524
 size =
region
 036206
 036206
 USER*I  036542
 *CODE   036542
 OTS*0
 SYS*0
 *DflTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTfl
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 USER*I
 *CODE

 OTS*0
 SYS*0
 *DftTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTfl
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 USER*i
 037366
 037366
 037366
 040006
 040006
 040006
 040006
 040040
 size =
region
 036206
 036206
 036206
 036206

 037742
 037742
 037742
 040436
 040436
 040436
 040436
 040522
 size =
region
 036206
 036206
 036206
000001 Segment 000003
000000    (RW,I,LCL, REL,
000000    (RW,I,LCL, REL,
000000    (RW,I,LCL, REL,
001474    (RW,I,LCL, REL,
        BOUDACe 036206
000000    (RW,I,LCL, REL,
000000    (RW,I,LCL, REL,
000476    (RW,D,LCL, REL,
000000    (RW, D,LCL,REL,
000000    (RW,D,LCL, REL,
000000    (RW,D,LCL, REL,
000124    (RW,D,LCL, REL,
000000    (RW,D,LCL, REL,
002316 =  615.   words
000001 Segment 000004
000000    (RW,I,LCL, REL,
000334    (RW,I,LCL, REL,
        MTflTCH  036206
        MTPRNT  036342
        MTOUT   036364
000000    (RW,I,LCL,REL,
000624    (RW,I,LCL, REL,
        DIflLT @ 036542
000000    (RW, I,LCL,REL,
000000    (RW,I,LCL,REL,
000420    (RW,D,LCL, REL,
000000    (RW,D,LCL, REL,
000000    (RW,D,LCL, REL,
000000    (RW,D,LCL,REL,
000032    (RW,D,LCL, REL,
000000    (RW,D,LCL,REL,
001632 =461.   words
000001 Segment 000005
000000    (RW,I,LCL, REL,
000000    (RW,I,LCL, REL,
000000    (RW,I,LCL,REL,
001534    (RW,I,LCL, REL,
        BOUDK1® 036206
000000    (RW,I,LCL, REL,
000000    (RW,I,LCL, REL,
000474    (RW,D,LCL, REL,
000000    (RW,D,LCL, REL,
000000    (RW,D,LCL, REL,
000000    (RW,D,LCL,REL,
000064    (RW,D,LCL,REL,
000000    (RW,D,LCL, REL,
002314 =  614.   words
000001 Segment 000006
000000    (RW,I,LCL, REL,
000000    (RW,I,LCL,REL,
000000    (RW,I,LCL, REL,
CON)
CON)
CON)
CON)

CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
 MTGET   036214  MTSTflT  036326
 MTDTCH  036350  MTRCTO  036356
 MTIN    036372  MTSET   036400
CON)
CON)

CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)

CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
                                    277

-------
*CODE    036206  00£314
OTS$0
SYS*0
*DflTflP
OTS*D
OTS*S
SYS*S
*DflTft
USER*D
Segment
Overlay
OTS$I
SYS$I
USER*I
$CODE
OTS*0
SYS*0
*DflTflP
OTS*D
OTS*S
SYS*S
*DRTfl
USER$D
Segment
Overlay
OTS*I
SYS$I
USER*I
$CODE
OTS*0
SYS*0
*DflTftP
OTS$D
OTS*S
SYS$S
*DftTft
USER*D
Segment
Overlay
OTS*I
SYS* I
USER* I
*CODE
0A05££
0405££
0405££
041402
041402
041402
041402
041470
size =
region
036206
036206
036206
036206
036712
036712
036712
037344
037344
037344
037344
037356
size =
region
036206
036206
036206
036206
037370
037370
037370
040276
040276
040276
040276
040330
size =
region
036206
036206
036222
036222
000000
000000
000660
000000
000000
000000
000066
000000
003262
000001
000000
000000
000000
000504
000000
000000
000432
000000
000000
000000
000012
000000
001150
000001
000000
000000
000000
001162
000000
000000
000706
000000
000000
000000
000032
000000
002122
000001
000000
000014
000000
000530
OTS*0   036752 000000
SYS*0   036752 000000
*DATflP  036752 000666
OTS*D   037640 000000
   (RW,I,LCL, REL,
 BOUDK2@ 036206
   (RW,I,LCL, REL,
   (RW, I,LCL, REL,
   (RW, D,LCL, REL,
   (RW,D,LCL, REL,
   (RW,D,LCL, REL,
   (RW,D,LCL, REL,
   (RW,D,LCL, REL,
   (RW,D,LCL, REL,
= 857.   words
Segment 000007
   (RW,I,LCL,REL,
   (RW,I,LCL,REL,
   (RW,I,LCL,REL,
   (RW,I,LCL, REL,
 BOUER1C- 036206
   (RW,I,LCL, REL,
   (RW,I,LCL, REL,
   (RW,D,LCL, REL,
   (RW,D,LCL, REL,
   (RW,D,LCL, REL,
   (RW,D,LCL, REL,
   
-------
 OTS$S
 SYS*S
 *DflTfl
 USfcR*D
 Seprnent
Overlay
 OTS*I
 SYS* I
 USER*I
 *CODE

 OTS*0
 SYS*0
 *DflTBP
 OTS*D
 OTS*S
 SYS*S
 *DftTO
 USER$D
 Segment
Over1ay
 OTS*I
 SYS* I

 USER*I
 *CODE

 OTS*0
 SYS*0
 *DflTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTA
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 USER*I
 *CODE

 OTS*0
 SYS*0
 *DflTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTfl
 USER*D
 Segment
Overlay
 037640
 037640
 037640
 037650
 size =
repion
 036206
 036206
 036206
 036206

 036732
 036732
 036732
 037052
 037052
 037052
 037052
 037070
 size =
region
 036206
 036206
036326
036326 000702
       000000
       000000
       000010
       080000
       001442
       000001
       000000
       000000
       000000
       000524

       000000
       000000
       000120
       000000
       000000
       000080
       000016
       000000
       000662
       000001
       000000
       000120
 037230
.037230
 037230
 040222
 040222
 040222
 040222
 040262
 size =
region
 036206
 036206
 036206
 036206

 037136
 037136
 037136
 037516
 037516
 037516
 037516
 037550
 size =
region
       000000
       000000
       000772
       000000
       000000
       000000
       000040
       000000
       002054
       000001
       000000
       000000
       000000
       000730

       000000
       000000
       000360
       000000
       000000
       000000
       000032
       000000
       001342
       000001
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, RfcL,
= 401.   words
Segment 080012
  (RW,I,LCL,REL,
  (RW, I,LCL, REL,
  (RW,I,LCL, REL,
  (RW,I,LCL,REL,
 BOUFFTC" 036206
  (RW, I,LCL, REL,
  (RW, I,LCL, REL,
  (RW,D,LCL, REL,
  (RW, D,LCL, REL,
  (RW, D,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
=217.   words
Segment 000013
  (RW, I, LCL, REL,
  (RW, I, LCL,REL,
 IDSTflT  036206
  (RW, I,LCL, REL,
  (RW, I,LCL,REL,
 BOUINie 036326
  (RW,"l,LCL, REL,
  (RW, I,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
= 534.   words
Segment 000014
  (RW, I, LCL,REL,
  (RW, I, LCL, REL,
  (RW, I,LCL, REL,
  (RW,I,LCL,REL,
 BOUIN£C« 036206
  (RW, I,LCL, REL,
  (RW, I,LCL, REL,
  
-------
 OTS*I   036206
 SYS*I   036206
 USER*I  036206
 *CODE   036206
 OTS*0
 SYS*0
 *DflTflP
 OTS$D
 OTS$S
 SYS*S
 *DflTfl
 USER$D
 Segment
Overlay
 OTS*I
 SYS* I
 USER*I
 *CODE

 OTS*0
 SYS*0
 *DflTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTR
 USER*D
 •Segment
Overlay
 OTS*I
 SYS* I
 USER*I
 *CODE

 OTS*0
 SYS*0
 *DflTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTfi
 USER*D
 Segment
Over1ay
 OTS*I
 SYS* I
 USER*I
 *CODE

 OTS*0
 SYS*0
 036644
 036644
 036644
 037040
 037040
 037040
 037040
 037426
 size =
region
 036206
 036206
 036206
 036206

 037602
 037602
 037602
 040030
 040030
 040030
 040030
 040106
 size =
region
 036206
 036206
 036206
 036206

 037646
 037646
 037646
 040162
 040162
 040162
 040162
 040276
 size =
region
 036206
 036206
 036206
 036206

 037170
 037170
000000

000000
000000

000436


000000
000000

000174
000000
000000
000000

000366
000000

001220
000001
000000
000000
000000

001374


000000
000000

000226
000000
000000
000000

000056
000000

001700
000001
000000
000000
000000

001440


000000
000000

000314
000000
000000
000000

000114
000000

002070
000001
000000
000000
000000

000762


000000
000000
   (RW, I,LCL, REL,CON)
   (RW,I,LCL,REL,CON)
   (RW, I,LCL, REL,CON)
   (RW, I,LCL,REL,CON)
 BOUIN3& 036206
   (RW,I,LCL, REL,CON)
   (RW,I,LCL,REL,CON)
   (RW,D,LCL, REL, CON)
   (RW,D,LCL, REL, CON)
   (RW,D,LCL,REL,CON)
   (RW,D,LCL, REL, CON)
   (RW,D,LCL, REL, CON)
   (RW,D,LCL, REL, CON)
= 328.   words
Segment 000016
   (RW,I,LCL, REL,CON)
   (RW,I,LCL, REL,CON)
   (RW, I,LCL, REL,CON)
   (RW, I,LCL, REL,CON)
 BOUMH1C" 036206
   (RW, I,LCL,REL,CON)
   (RW,I,LCL,REL,CON)
   (RW,D,LCL, REL, CON)
   (RW,D,LCL, REL, CON)
   (RW,D,LCL, REL, CON)
   (RW,D,LCL, REL, CON)
   (RW,D,LCL, REL, CON)
   (RW,D,LCL, REL, CON)
= 480.   words
Segment 000017
   (RW, I, LCL, REL,CON)
   (RW, ,LCL, REL,CON)
   (RW, ,LCL,REL,CON)
 (RW, ,LCL,REL,CON)
 (RW, ,LCL,REL,CON)
BOUMH2G 036206
 (RW, ,LCL,REL,CON)
 (RW, ,LCL,REL,CON)
 (RW,D,LCL, REL, CON)
 
-------
 *DflTflP
 OTS$D
 OTS$S
 SYS*S
 *DATfl
 USER*D
 Segment
Over1ay
 OTS*I
 SYS* I
 USER*I
 $CODE
 037170
 037340
 037340
 037340
 037340
 037362
 size =
region
 036206
 036206
 036206
 036206
000150
000000
000000
000022
000000

001154
000001
000000

000000

000000

001556
OTS*0
SYS$0
*DflTflP
OTS*D
OTS*S
SYS*S
*DflTfl
USER*D
Segment
Overlay
OTS*I
SYS* I
USER* I
*CODE
037764 000000
037764 000000
037764 000372
040356 000000
040356 000000
040356 000000
040356 000106
040464 000000
size = 002256
region 000001
036206 000000
036206 000000
036206 000000
036206 001754
 OTS*0
 SYS*0
 *DflTOP
 OTS*D
 OTS*S
 SYS*S
 *DATfi
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 USER*I
 *CODE

 OTB*0
 SYS*0
 *DflTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTfi
 USER*D
 Segment
 040162
 040162
 040162
 040760
 040760
 040760
 040760
 041120
 size =
region
 036206
 036206
 036206
 036206

 037044
 037044
 037044
 037252
 037252
 037252
 037252
 037304
 size =
000000
000000

000576
000000
000000

000000

000140
000000

002712
000001
000000
000000
000000

000636


000000
000000

000206
000000

000000
000000

000032
000000

001076
   (RW,D,LCL, REL,CON)
   
   (RW, I,LCL, REL.CON)
   
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL.CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
= 287.   words
                                   281

-------
Overlay region
 OTS*I   036286
 SYS*I   036206
 USER*I  036206
 $CODE   036206
 OTS*0
 SYS*0
 *DflTAP
 OTS*D
 OTS*S
 SYS*S
 $DflTfl
 USER*D
 Segment
Overlay
 OTS*I
 SYS$I
 USER*I
 *CODE

 OTS*0
 SYS*0
 *DftTflP
 OTS*D
 OTS$S
 SYS*S
 $DflTfl
 USER$D
 Segment
Overlay
 OTS*I
 SYS$I
 USER*I
 $CODE

 OTS*0
 SYS*0
 *DflTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTft
 USER*D
 Segment
Overlay
 OTS*I
 SYS*I
 USER*I
 *CODE
 036274
 036274
 036274
 036352
 036352
 036352
 036352
 036352
 size =
region
 036206
 036206
 036206
 036206

 037554
 037554
 037554
 037776
 037776
 037776
 037776
 040032
 size =
region
 036206
 036206
 036206
 036206

 037664
 037664
 037664
 040104
 040104
 040104
 040104
 040140
 size =
region
 036206
 036206
 036206
 036206
 000001

 000000
 000000
 000000

 000066


 000000
 000000

 000056
 000000
 000000
 000000
 000000
 000000

 000144
 000001
 000000
 000000
 000000

 001346
000000
000222
000000
000000
000000

000034
000000

001624
,000001
000000
000000

000000
001456


000000
000000

000220
000000
000000
000000

000034
000000

001732
000001
000000
000000
000000

000742
 OTS$0   037150 000000
Segment 000024
   (RW,I,LCL, REL,CON)
   (RW,I,LCL, REL,CON)
   (RW,I,LCL, REL,CON)
   (RW, I,LCL, REL,CON)
 BOUPKCC" 036206
   (RW,I,LCL, REL,CON)
   (RW,I,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL.CON)
   (RW,D,LCL, REL,CON)
   (RW, D,LCL, REL,CON)
= 50.    words
Segment 000025
   (RW,I,LCL, REL,CON)
   (RW,I,LCL, REL,CON)
   (RW, I,LCL, REL,CON)
   (RW,I,LCL, REL,CON)
 BOUPMPC" 036206
   (RW, I,LCL, REL.CON)
   (RW,I,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   
-------
SYS$0
$DflTOP
OTS*D
OTS*S
SYS*S
$DflTfl
USER4D
Segment
Overlay
OTS$I
SYS* I
USERS I
*CODE
OTS$0
SYS*0
$DflTflP
OTS*D
OTS*S
SYS*S
*DflTfi
USER*D
Segment
Overlay
OTS*I
SYS$I
USER$I
*CODE
OTS*0
SYS*0
*DftTflP
OTS*D
OTS*S
SYS*S
*DflTfl
USER*D
Segment
Overlay
OTS*I
SYS$I
USER*I
$CODE
OTS*0
SYS$0
*DftTflP
OTS*D
OTS*S
SYS*S
837150
037150
0373 1£
037312
037312
037312
037462
size =
region
036206
036444
036606
036606
041064
041064
041064
041472
041472
041472
041472
042016
size =
region
036206
036206
036206
036206
037500
037500
037500
037672
037672
037672
037672
037770
size =
region
036206
036206
036206
036206
037500
037500
037500
037740
037740
037740
000000
000142
000000
000000
000000
000150
000000
001254
000001
000236
000142
000000
002256
000000
000000
000406
000000
000000
000000
000324
000000
003610
000001
000000
000000
000000
001272
000000
000000
000172
000000
000000
000000
000076
000000
001562
000001
000000
000000
000000
001272
000000
000000
000240
000000
000000
000000
   (RW,I,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   
-------
 *DflTfl
 USER*D
 Segment
Overlay
 OTS$I
 SYS* I
 USER*I
 $CODE

 OTS*0
 SYS*0
 *DflTAP
 OTS*D
 OTS*S
 SYS*S
 *DflTft
 USER*D
 Segment
Overlay
 OTS$I
 SYS* I
 USER*I
 *CODE

 OTS*0
 SYS*0
 *DflTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTfl
 USER$D
 Segment
Overlay
 OTS$I
 SYS* I
 USER*I
 *CODE

 OTS*0
 SYS*0
 *DflTAP
 OTS*D
 OTS*S
 SYS*S
 *DflTfl
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 USER$I
 037740
 037762
 size =
region
 036206
 036206
 036206
 036206

 036654
 036654
 036654
 036766
 036766
 036766
 036766
 036776
 size =
region
 042020
 042020
 042020
 042020

 042450
 042450
 042450
 042470
 042470
 042470
 042470
 042550
 size =
region
 042020
 042020
 042020
 042020

 042354
 042354
 042354
 042462
 042462
 042462
 042462
 042502
 size =
region
 042020
 042020
 042020
000022
000000

001554

000001
000000

000000
000000
000446


000000
000000

000112
000000
000000
000000
000010
000000

000570
000002
000000

000000
000000

000430


000000
000000

000020
000000
000000
000000

000060
000000
000530
000002
000000
000000
000000

000334


000000
000000
000106
000000
000000

000000
000020
000000

000462
000002
000000
000000

000000
   (RW,D,LCL, REL,CON)
   (RW, D,LCL, REL,CON)
=  438.   words
Segment 000033
   (RW, I,LCL, REL,CON)
   (RW,I,LCL, REL,CON)
   (RW,I,LCL, REL.CON)
   (RW, I,LCL, REL,CON)
 BOUWND@ 036206
   (RW, I,LCL, REL,CON>
   (RW,I,LCL,REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON>
   (RW, D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REI_,CON)
   (RW,D,LCL, REL,CON>
=  188.   words
Segment 000034
   (RW, I,LCL, REL,CON)
   (RW,I,LCL,REL,CON)
   (RW, I,LCL, REL,CON)
   (RW, I,LCL, REL.CON)
 BOUBIT8 042020
   (RW, I,LCL, REL,CON)
   (RW, I,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
=  172.   words
Segment 000035
   (RW, I,LCL, REL,CON)
   (RW,I,LCL,REL,CON)
   (RW,I,LCL, REL,CON)
   (RW, I,LCL, REL,CON)
 BOUCHNC" 042020
   (RW,I,LCL, REL,CON)
   (RW,I,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW, D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW, D,LCL, REL,COW)
   (RW,D,LCL, REL.CON)
   (RW,D,LCL, REL,CON)
=  153.   words
Segment 000036
   (RW,I,LCL, REL,CON)
   (RW,I,LCL, REL,CON)
   (RW,I,LCL, REL,CON)
                                   284

-------
*CODE
042020
001414
(RW, I,
LCL, REL,
CON)
TDftTE § 042020
OTS*0
SYS*0
*DflTflP
OTS*D
OTS*S
SYS*S
*DflTfl
USER*D
Segment
Overlay
OTS*I
SYS* I
USER*I
*CODE
043434
043434
043434
043450
043450
043450
043450
043572
size =
region
042020
042020
042020
042020
000000
000000
000014
000000
000000
000000
000122
000000
001552
000002
000000
000000
000000
000352
(RW, I,
(RW, I,
(RW, D,
(RW, D,
(RW, D,
(RW, D,
(RW, D,
(RW, D,
= 437.
Segment
(RW, I,
(RW, I,
(RW, I,
(RW, I,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
words
000037
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)


CON)
CON)
CON)
CON)
DOTE I (? 042020
OTS*0
SYS*0
*DflTflP
OTS*D
OTS*S
SYS*S
*DflTfl
USER$D
Segment
Overlay
OTS*I
SYS* I
USER* I
*CODE
042372
042372
042372
042406
042406
042406
042406
042436
size =
region
042020
042020
042020
042020
000000
000000
000014
000000
000000
000000
000030
000000
000416
000002
000000
000000
000000
001136
(RW, I,
(RW, I,
(RW,D,
(RW, D,
(RW, D,
(RW, D,
(RW, D,
(RW, D,
= 135.
Segment
(RW, I,
(RW, I,
(RW, I,
(RW, I,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
words
000040
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)


CON)
CON)
CON)
CON)
BOUDYRC" 042020
OTS*0
SYS*0
*DflTfiP
OTS*D
OTS*S
SYS*S
*DflTO
USER$D
'Segment
Over 1 ay
OTS*I
SYS* I





USER*I
*CODE

043156
043156
043156
043172
043172
043172
043172
043306
size =
region
042020
042020





042430
042430

000000
000000
000014
000000
000000
000000
000114
000000
001266
000002
000000
000410





000000
001000

(RW, I,
(RW, I,
(RW, D,
(RW, D,
(RW, D,
(RW,D,
(RW, D,
(RW, D,
= 347.
Segment
(RW, I,
(RW, I,
CLOSEC
IBETC
I REftDC
IWRITW
LOOKUP
(RW, I,
(RW, I,
BOUREDC"
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
words
000041
LCL, REL,
LCL, REL,
042020
042130
042214
042266
042346
LCL, REL,
LCL, REL,
042430
CON)
CON).
CON)
CON)
CON)
CON)
CON)
CON)


CON)
CON)
ICLI
IREl
4REi
IWR

CON)
CON)

      ICLOSE  042020   IFREEC  042070
             042202   IREflDW  042210
             042220   IWRITE  042260
      IWRITC  042272   *WRITE  042276
285

-------
 OTS*0
 SYS$0
 *DflTflP
 OTS$D
 OTS$S
 SYS$S
 *DflTfl
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 USER*I
 $CODE

 OTS*0
 SYS*0
 *DftTflP
 OTS*D
 OTS$S
 SYS*S
 *DflTfl
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 USER*I
 *CODE

 OTS*0
 SYS*0
 *DflTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTfi
 USER*D
 Segment
Over1ay
 OTS*I
 SYS* I
 USER*I
 *CODE

 OTS*0
 SYS*0
 *DftTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTfl
 043430
 043430
 043430
 043556
 043556
 043556
 043556
 043604
 size =
region
 042020
 042020
 042020
 042020

 042152
 04-2152
 042152
 042242
 042242
 042242
 042242
 042246
 size =
region
 042020
 042020
 042020
 042020

 043064
 043064
 043064
 043402
 043402
 043402
 043402
 043426
 size =
region
 042020
 042020
 042020
 042020

 043406
 043406
 043406
 043776
 043776
 043776
 043776
000000

000000

000126
000000
000000
000000

000026
000000

001564
000002
000000
000000
000000

000132


000000
000000

000070
000000
000000
000000

000004
000000

000226
000002
000000

000000
000000

001044


000000
000000

000316
000000
000000
000000

000024
000000

001406
000002
000000

000000
000000
001366


000000
000000

000370
000000
000000
000000

000030
   (RW,I,LCL, REL.CON)
   (RW,I,LCL, REL,CON)
   (RW,D,LCL, REL.CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON>
   (RW, D,LCL, REL.CON)
= 442.   words
Segment 000042
   (RW,I,LCL, REL,CON)
   (RW,I,LCL, REL,CON)
   (RW,I,LCL, REL,CON)
   (RW,I,LCL, REL.CON)
 RET   @ 042020
   (RW, I,LCL, REL,CON)
   (RW, I,LCL, REL,CON)
   (RW,D,LCL, REL.CON)
   (RW,D,LCL, REL.CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL.CON)
   (RW, D,LCL, REL,CON)
= 75.    words
Segment 000043
   (RW,I,LCL,REL,CON)
   (RW,I,LCL, REL,CON)
   (RW, I,LCL, REL,CON)
   (RW,I,LCL, REL,CON)
 RLLTI @ 042020
   (RW, I,LCL, REL,CON)
   (RW, I,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW, D,LCL,.REL,CON)
   (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
= 387.   words
Segment 000044
   (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
 RTLLI G> 042020
  (RW, I,LCL, REL.CON)
  (RW, I,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL.COIM)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
                                   286

-------
 USER$D  044025
 Segment size  =
Overlay region
 OTB$I
                000000
                002006
                000002
                000604
                                                 042024  EXP
                                                 042450  XFF*
  (RW,D,LCL,REL,CON)
= 515.   words
Segment 000045
  (RW,I,LCL,REL,CON)
 ALQG10  042020  flLOG
 *FCflLL  042432  *XFF
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
 WRITE @ 042624
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
= 496.   words
Transfer address =  025430,  High limit  = 044024 = 9226.   words
                                                                 042206
                                                                 042462
SYS* I
USER*I
*CODE
OTS*0
SYS*0
*DflTfiP
OTS*D
OTS*S
SYS*S
*DftTfi
USER*D
Segment
042624 000000
042624 000000
042624 000632
043456 000000
043456 000000
043456 000110
043566 000000
043566 000000
043566 000000
043566 000172
043760 000000
size = 001740
                                     287

-------
RT-11 LINK  V06.01D     Load Map        Mon l£-Sep-83 07:59:14
BOURST.SflV      Title:  BOURST  Ident:  FORV02
Section  flddr   Size    Global  Value   Blobal  Value   Global  Value
   BBS.   000000 001000
 *OHflND  001000 000106
 «OTPBL  001106 000266
 OTS*I   001374 020136
(RW, I,
$USRSW
*NLCHN
*WflSIZ
(RW, I,
*OVRH
*ODF1
(RW, D,
(RW, I,
**OTSI
*CVTCB
CLC*
*DI
GIF*
CIL*
$CVTID
$IC
CFI*
BCD*
DCO*
fiDF*MS
*ODR
SUF*MS
$SBR
MUF*IS
$MLR
$SETOP
*CLOSE
CMF$IS
*CMR
CMF*II
CMF*MP
CMF$PM
CMF$SM
$ECI
$DUMPL
*IOEXI
$ERRTB
$FCHNL
I DOTE
**IFW
$ILW
*PUTRE
$EDFIL
THRD*
$STP
$OTIS
*TVL
GBL, BBS,
000000
000006
000152
GBL, REL,
001002
001102
GBL, REL,
LCL, REL,
001374
001410
001422
001432
001450
001462
001470
001502
001520
002546
002566
003536
003560
003616
003640
003664
003704
004166
006406
007204
007£24
007252
007274
007320
007340
007414
010000
010210
010374
014246
01 6260
016402
016514
017450
020352
020564
020574
020744
021066
OVR)
*RF2fll
$HRDWR
*LRECL
CON)
0$READ
*ODF2
OVR)
CON)
*CVTDB
$CVTCI
CID*
$CVTFB
CLF*
CLI*
CCI*
$ID
*IR
FCO$
ODF$IS
*flDDF
SUFSIS
$SUBF
MUF*MS
*MULF
*OTI
$*SET
CMF*PS
*CMPF
CMF*PI
CMF*SI
CMF*IP
CMF$MM
OCI$
OCO$
*OPNER
*EOL
*ERRS
*FIO
IFW*
IFW$$
TVS*
$PUTBL
$EOF2
$STPS
F00$
**OTIS
TVF*

000000
000010
000210

001024
001104


001374
001410
001432
001436
001450
001466
001502
001502
001520
002554
003510
003546
003570
003626
003652
003672
003742
005774
007164
007212
007236
007256
007304
007324
007372
007574
010126
010256
010501
015110
016372
016440
016634
017756
020366
020566
020600
020746
021074

.VIR
*SYSV*


0*DONE



*CVTDI
CIC*
CLD*
*CVTFI
*RI
*CVTIC
GDI*
$CVTIF
RCI*
ECO*
ADF*PS
ftDF*SS
SUF*PS
SUF*SS
MUF*PS
MUF*SS
**OTI
*INITI
CMF*MS
CMF*SS
CMF*MI
CMF*PP
CMF*SP
CMF*IM
ICI*
ICO*
*CHKER
EOL*
EXIT
**FIO
*IFW
ILW$
*TVS
*6ETBL
SAVRG*
STP*
*EXIT
TVL*
*TVF

000002
000012


001036



001374
001422
001432
001436
001450
001470
001502
001506
001532
002560
003524
003560
003604
003640
003656
003704
003744
006270
007170
007224
007242
007270
007310
007334
007400
007602
010164
010260
014242
015114
016376
016510
016636
020166
020406
020574
020620
021066
021074
                                  288

-------
 OTS*P   0£153£ 000054
 SYS*I   0£1606 0006££
 USER*I  022430 000000
 *CODE   022430 003604

 OTS*0   0£6£34 001066

 SYS*0   027322 000000
 *DftTfiP  0£73££ 001£6£
 OTS*D   030604 000006

 OTS*S   030612 0001302

 SYS$S   030614 000004
 *DftTfl
 USER*D
 .*$*$.
 SPflCE
 Segment
Overlay
 OTS*I
 SYS* I
 USER*I
 *CODE

 OTS*0
 SYS*0
 *DfiTOP
 OTS*D
 OTS*S
 SYS*S
 *DflTfl
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 USER*!
 *CODE
 030620
 031634
 031634
 031634
 size -
region
 031706
 031706
 031706
 031706

 032614
 032614
 032614
 033260
 033260
 033260
 033260
 033260
 size =
region
 031706
 031706
 031706
 031706
001014
000000

000000
000050
031704

000001
000000
000000
000000

000706


000000

000000
000444
000000

000000
000000
000000

000000

001352
000001
000000
000000
000000

000440
 OTS*0   032346 000000
 TVD*    0£110£
 *TVQ    0£1110
 TVI*    0£11£4
 *VRINT  0£13££
  (RW,D,BBL, REL,
  (RW, I,LCL, REL,
 CVTTIM  0£1606
 BUM    0£174£
 IPEEKB  0££00£
 ISPY    0££066
 ITTOUR  0££1£0
 SCOMP   0££17£
  (RW, I,LCL, REL,
  (RW,I,LCL,REL,
 **OTSC  0££430
  (RW, I,LCL,REL,
 **OTSO  0£6£34
  .(RW, I,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
 NHCLN*  030610
  (RW,D,LCL, REL,
 *flOTS   03061£
  (RW,D,LCL, REL,
 *SYSLB  030614
  (RW,D,LCL, REL,
  (RW,D,LCL,REL,
  (RW,D,6BL, REL,
  (RW,D,BBL, REL,
= 66£6.   words
Segment 000001
  (RW, I,LCL, REL,,
  (RW, I,LCL,REL,I
  (RW, I,LCL, REL,I
  (RW, I,LCL, REL,I
 BOUHDRC- 031706
  (RW, I, LCL,REL,
  (RW, I,LCL,REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
  (RW,D,LCL, REL,
= 373.   words
Segment 000002
  (RW, I,LCL,REL,i
  (RW,I,LCL, REL,I
  (RW, I,LCL, REL,I
  (RW, I,LCL, REL,I
 BOUFLL© 031706
  (RW, I,LCL, REL,
 *TVD
 TVP*
 *TVI

OVR)
CON)
 *DIVTK
 IPEEK
 IPOKEB
 *SVflL
 SCCfl
 SETCMD
CON)
CON)
 SYSTIM
CON)
 *OPEN
CON)
CON)
CON)

CON)

CON)
 *LOCK
CON)
CON)
OVR)
OVR)
                                                 0£110£  TVQ*    0E1110
                                                 021116  *TVP    021116
                                                 0£1124  *WfiIT   0£1£60
                                                 021650
                                                 0£176£
                                                 022016
                                                 02£07£
                                                 02£134
                                                 022262
                                         026034

                                         0£6£34
                                                 *DIV60
                                                 I POKE
                                                 ISLEEP
                                                 ITTINR
                                                 ISCOMP
                                                 *TIME*
                                                 0£1676
                                                 0£177£
                                                 022026
                                                 022110
                                                 02£17£
                                                 02£314
                                                 030616  *CRflSH  030617
CON)
CON)
CON)
CON)

CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)

CON)
                                    289

-------
SYS$0 032346000000 (RW, I,LCL, REL,CON)
$DPTflP 032346000232 (RW, D,LCL, REL,CON)
OTS$D 032600000000 
-------
OTS*0
SYS$0
*DflTflP
OTS*D
OTS$S
SYS*S
*DflTR
USER*D
Segment
Overlay
OTS*I
SYS$I
USER*I
$CODE
OTS*0
SYS$0
*DflTflP
OTS*D
OTS*S
SYS$S
*DflTfl
USER*D
Segment
Overlay
OTStI
SYS* I
USER* I
*CODE
OTS*0
SYS*0
*DflTflP
OTS*D
OTS*S
SYS*S
*DflTfl
USER*D
Segment
Overlay
OTS*I
SYS* I
USER*I
*CODE
OTB*0
SYS*0
*DflTflP
OTS*D
OTS*S
SYS*S
*DflTfl
040104
040104
040104
040132
040132
040132
040132
040132
size =
region
040044
040044
040044
040044
040104
040104
040104
040132
040132
040132
040132
040132
size =
region
040044
040044
040044
040044
040244
040244
040244
040302
040302
040302
040302
040304
size =
region
040044
040044
040044
040044
040174
040174
040174
040230
040230
040230
040230
000000
000000
000026
000000
000000
000000
000000
000000
000066
000002
000000
000000
000000
000040
000000
000000
000026
000000
000000
000000
000000
000000
000066
000002
000000
000000
000000
000200
000000
000000
000036
000000
000000
000000
000002
000000
000240
000002
000000
000000
000000
000130
000000
000000
000034
000000
000000
000000
000000
  (RW, I,LCL, REL,CON)
  (RW, I,LCL, REL,CON)
  (RW, D,LCL, REL,CON)
  (RW,D,LCL,REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
= 27.    words
Segment 000006
  (RW,I,LCL, REL,CON)
  (RW,I,LCL,REL,CON)
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
 VTDHLTC- 040044
  (RW,I,LCL, REL.CON)
  (RW,I,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  
-------
 USER*D
 Segment
Overlay
 OTS$I
 SYS$I
 USER$I
 $CODE

 OTS$0
 SYS$0
 $DflTflP
 OTS*D
 OTS$S
 SYS*S
 $DRTfl
 USER*D
 Segment
Overlay
 OTS$I
 SYS$I
 USER$I
 *CODE

 OTS$0
 SYS$0
 *DflTflP
 OTS$D
 OTS*S
 SYS$S
 *DRTft
 USER$D
 Segment
Overlay
 OTS$I
 SYS$I
 USER*I
 *CODE

 OTS$0
 SYS$0
 $DflTflP
 OTS$D
 OTB$S
 SYS$S
 $DftTfl
 USER*D
 Segment
Overlay
 OTS$I
 SYS$I
 USER$I
 *CODE
 040230
 size =
region
 040044
 040044
 040044
 040044

 041034
 041034
 041034
 041202
 041202
 041202
 041202
 041206
 size =
region
 040044
 040044
 040044
 040044

 041400
 041400
 041400
 041440
 041440
 041440
 041440
 041450
 size =
region
 040044
 040044
 040044
 040044

 040500
 040500
 040500
 040572
 040572
 040572
 040572
 040576
 size =
region
 040044
 040044
 040044
 040044
000000

000164
000002
000000
000000
000000

000770


000000
000000

000146
000000
000000
000000

000004
000000
001142
000002
000000
000000
000000

001334


000000
000000

000040
000000
000000
000000

000010
000000

001404
000002
000000
000000
000000

000434


000000
000000

000072
000000
000000
000000

000004
000000

000532
000002
000000
000000
000000

000114
  (RW,D,LCL, REL,CON)
= 58.    nords
Segment 000011
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
  (RW,I,LCL,REL,CON)
 VTHVP @ 040044
  (RW,I,LCL,REL,CON)
  (RW,I,LCL,REL,CON)
  (RW,D,LCL, REL.CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
- 305.   words
Segment 000012
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
  (RW, I,LCL, REL,CON)
 VTS6R C- 040044
  (RW,I,LCL, REL,CON)
  (RW,I,LCL,REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL,REL,CON)
  (RW,D,LCL, REL.CON)
= 386.   words
Segment 000013
  (RW,I,LCL, REL,CON)
  (RW, ,LCL,REL.CON)
  •~"  ,LCL,REL,CON)
       ,LCL,REL,CON)
       @ 040044
       ,LCL, REL,CON)
  (RW, ,LCL,REL,CON)
  (RW,D,LCL, REL, CON)
  (RW,D,LCL, REL, CON)
  (RW,D,LCL, REL, CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL, CON)
= 173.   words
Segment 000014
  (RW,I,LCL, REL,CON)
  (RW,I,LCL,REL,CON)
  (RW,I,LCL, REL,CON)
  (RW, I,LCL, REL,CON)
 (RW,
 (RW,
VTTBM
 (RW,
 (RW,
                                   292

-------
OTStO
SYS*0
*DflTflP
OTS$D
OTS*S
SYS$S
*DfiTfi
USER*D
Segment
Overlay
OTS*I
SYS* I
USER$I
$CODE
OTS*0
SYS*0
$DOTflP
OTS*D
OTS*S
SYS*S
$DflTfi
USER*D
Segment
040160
040160
040160
040£££
040£££
040£££
040£££
040££4
size =
region
040044
040044
040044
040044
040104
040104
040104
040132
040132
040132
040132
040132
size =
000000
000000
000042
000000
000000
000000
00000£
000000
000160
000002
000000
000000
000000
000040
000000
000000
000026
000000
000000
000000
000000
000000
000066
                         VTWID @ 040044
                          (RW,I,LCL,REL,CON)
                          (RW,I,LCL,REL,CON)
                          (RW,D,LCL, REL,CON)
                          (RW,D,LCL, REL,CON)
                          (RW,D,LCL,REL,CON)
                          
                          (RW,D,LCL,REL,CON)
                          (RW,D,LCL, REI_,CON)
                        = 56.     words
                        Segment 000015
                          (RW, I,LCL,REL,CON)
                          (RW,I,LCL, REL,CON)
                          (RW,I.LCL,REL.CON)
                          (RW, I,LCL,REL,GON)
                         VTDWL <•> 040044
                          (RW, I,LCL, REL,CON)
                          (RW,I,LCL, REL,CON)
                          (RW,D,LCL,REL.CON)
                          (RW,D,LCL, REL,CON>
                          (RW,D,LCL, REL,CON)
                          (RW,D,LCL, REL,CON)
                          
-------
RT-11 LINK  V06.01D     Load Map        Wed £8-Sep-83 08:06:00
BOUFIL.SftV      Title:  BOUFIM  Ident:  FORV0£
Section  ftddr   Size   •Global  Value   Global  Value   Global  Value
   flBS.   000000 001000
 $OHftND  001000 008106
 *OTABL
 OTS*I
001106 000336
001444 0££7££
(RW, I,
$USRSW
*NLCHN
*WASIZ
(RW, I,
$OVRH
$ODF1
(RW, D,
(RW, I,
**OTSI
$CVTCB
CLC*
$01
GIF*
CIL*
$CVTID
$IC
CFI*
BCD*
DCO*
ADF*MS
*ADR
SUF*MS
*SBR
MUF*IS
*MLR
*SETOP
ABB
NMI*1I
B6T*
BNE$
CftL*
CMF*PS
$CMPF
CMF*PI
CMF$SI
CMF$IP
CMF$MM
OCI*
OCO$
*DUMPL
*END
*CHKER
EOL*
EXIT
**FIO
*TTYIN
ADI*SM
GBL, flBS,
000000
000006
000152
GBL, REL,
001002
001102
GBL, REL,
LCL, REL,
001444
001460
00147£
001502
001520
001532
001540
001552
001570
002616
002636
003606
003630
003666
003710
003734
003754
004236
006456
00713E
007 15£
007 16£
007£0£
010034
010062
010106
0101£6
010154
010174
010242
010444
011106
011 £60
011356
011452
015434
016306
017564
017730
OVR)
*RF£fll
$HRDWR
$LRECL
CON)
0$READ
*ODF£
OVR)-
CON)
$CVTDB
*CVTCI
CID$
*CVTFB
CLF$
CLI$
CCI*
$ID
*IR
FCO*
flDF*IS
*flDDF
SUF*IS
$SUBF
MUF$MS
*MULF
*OTI
$$SET
ASSIGN
BLE*
BSE*
BLT*
*CLOSE
CMF*MS
CMF*SS
CMF*MI
CMF*PP
CMF*SP
CMF*IM
ICI$
ICO*
END*
*ERR
*IOEXI
*ERRTB
*FCHNL
*BETFI
ftDI$SS
ADI*IS

000000
000010
000210

001024
001104


001444
001460
001502
001506
001520
001536
001552
001552
001570
002624
003560
003616
003640
003676
0037££
00374£
004012
006044
006474
007 14£
007154
007164
007£3£
010040
010074
01011£
010140
010160
010284
010250
010452
011234
011£76
011402
011566
015440
01745£
017720
017734

.VIR
*SYSV*


0*DONE



*CVTDI
CIC*
CLD*
*CVTFI
*RI
*CVTIC
GDI*
*CVTIF
RCI*
ECO*
fiDF*PS
flDF*SS
BUF*PS
SUF*SS
MUF*PS
MUF*SS
**OTI
*INITI
NMI$1M
BEQ*
BRA*
Cfll*
CLOSE
CMF*IS
*CMR
CMF*II
CMF*MP
CMF*PM
CMF*SM
*ECI
DATE
ERR*
*OPNER
*EOL
*ERRS
*FIO
*6ETRE
flDUSfi
ODI*IO

000002
000012


001036



001444
00147£
001502
001506
001520
001540
001552
001556
001602
002630
003574
003630
003654
003710
0037£6
003754
004014
006340
007120
007144
007156
007174
010010
010054
010074
010122
010144
010170
010210
010264
010650
011246
011320
011450
011673
Q1630£
017510
0177£4
017740
                                   294

-------
OTS*P   024366 000054
SYS*I   024442 001240
fiDI*IM
flDI*MM
*IFR
IFW*
IFW**
TVS*
MOL*SS
MOI$IS
MOI*IM
MOI$MM
MOI*0M
MOI$1M
ICI$M
DCI$S
DCI*ft
CMI*MP
CMI$PI
MOI$SP
MOI*PS
MOI*0P
MOL$SR
MOL*Mfl
MOL*MP
MOL*Pfl
MOL*IP
NPI*1I
RET*L
RET$
*EOFIL
THRD*
$STP
$OTIS
*TflI
TflQ*
*TflP
TflF*
$TVL
TVD*
*TVQ
TVI*
WRINT
SVL*IP
SVL*MP
(RW, D,
(RW, I,
CLOSED
*DIV60
I PEEK
I POKES
tBVflL
IWRITC
R500SC
017744
017760
020102
020162
020230
020424
021240
021254
021260
021274
021310
021326
021346
021360
021372
021406
021430
021446
021470
021512
021534
021554
02157S
021614
021636
021670
022234
022250
022700
023112
023122
023272
023414
023430
023436
023452
023674
023710
023716
023732
024130
024346
024362
SBL, REL,
LCL, REL,
024442
024540
024716
024752
025026
025056
025214
flDI*MS
IDftTE
$*IFR
$IFW
ILW*
$TVS
MOI*SM
MOL$IS
MOI*Ifi
MOI$Mft
MOI$0fl
MOI*1A
ICI$P
DCI$M
CMI*IP
CMI$PP
CMI*PM
MOI*PP
MOI*PM
MOI$1P
MOL*MS
MOL*SP
MOL$PM
MOL*IM
NMI*1P
NPI*1M
RET*F
*PUTBL
*EOF2
*STPS
F00$
$*OTIS
TfiL*
*TOQ
TflD*
*TfiF
TVF*
*TVD
TVP*
*TVI
SflL*IP
SVL*SP

OVR)
CON)
ICLOSE
IFREEC
IPOKE
ISLEEP
IWRITE
$WRITE
SETCMD
017750
017764
020106
020166
020300
020426
021244
021254
021264
021300
021314
021334
021352
021364
021376
021416
021436
021454
021476
021520
021540
021560
021682
021622
021646
021704
022240
022304
022714
023114
023126
023274
023422
023430
023444
023452
023702
023710
023724
023732
024340
024350



024442
024604
024726
024762
025044
025062
025334
ftDI$Mfl
IFR$
IFR**
**IFW
*ILW
MOI*SS
MOI*Sfl
REL*
MOI*MS
MOI$0S
MOI*1S
ICI*S
ICI*fl
DCI*P
CMI*SP
CMI*PS
MOI*IP
MOI$MP
MOI$Pfi
MOL*SM
MOL$MM
MOL*PP
MOL*PS
MOL$Ift
NPI*1P
*PUTRE
RET* I
*GETBL
SflVRG*
STP*
*EXIT
Tfll*
*TflL
TflP*
*TfiD
TVL*
*TVF
TVQ*
*TVP
*WflIT
SfiL*SP
SflL*MP



$DIVTK
IGETC
IPEEKB
I SPY
IWRITW
LOOKUP
TIMOSC
017754
020076
020140
020172
020304
021240
021250
021254
021270
021304
021320
021342
021354
021370
021400
0214E2
021444
021460
021504
021530
021550
021566
021610
021630
021664
021726
022246
022514
022734
023122
023146
023414
023422
023436
023444
023674
023702
023716
023724
024066
024342
024356



024512
024644
024736
025022
025052
025132
025366
                                  295

-------

USER* I
*CODE


OTS*0

SYS*0
*DflTflP
OTS*D

OTS*S

SYS*S

*DflTP
USER*D
. *$$*.
FILE
LOCflT
DATft
Segment
Overlay
OTS*I
SYS* I
USER* I
*CODE

OTS*0
SYS*0
*DRTflP
OTS*D
OTS*S
SYS*S
*DflTfl
USER*D
Segment
Overlay
OTS*I
SYS* I
USER* I
*CODE

OTS*0
SYS*0
*DflTflP
OTS*D
OTS*S
SYS*S
*DfiTP
USER*D
Segment

025702
025702


030400

031466
031466
032450

032456

032460

032464
032644
032644
032644
032670
032702
size =
region
033634
033634
033634
033634

037312
037312
037312
040452
040452
040452
040452
040562
size =
region
033634
033634
033634
033634

035352
035352
035352
036174
036174
036174
036174
036266
size =

000000
002476


001066

000000
000762
000006

000002

000004

000160
000000
000000
000024
000012
000730
033632
000001
000000
000000
000000
003456

000000
000000
001140
000000
000000
000000
000110
000000
004726
000001
000000
000000
000000
001516

000000
000000
000622
000000
000000
000000
000072
000000
002432
TIME
(RW, I,
(RW, I,
**OTSC
SETSTR
(RW, I,
*$OTSO
(RW, I,
(RW,D,
(RW,D,
NHCLN*
(RW,D,
*flOTS
(RW, D,
*SYSLB
(RW, D,
(RW, D,
(RW,D,
(RW,D,
(RW,D,
(RW, D,
= 7117.
Segment
(RW, I,
(RW, ,
(RW, ,
(RW, ,
SCRNRDG
(RW, ,
(RW, ,
(RW,D,
(RW,D,
(RW,D,
(RW,D,
(RW, D,
(RW, D,
= 1259.
Segment
(RW, I,
(RW, I,
(RW, I,
(RW, I,
REflDF @
(RW, I,
(RW, I,
(RW,D,
(RW,D,
(RW, D,
(RW,D,
(RW, D,
(RW, D,
= 653.
025466
LCL, REL,
LCL, REL,
025702
030170
LCL, REL,
030400
LCL, REL,
LCL, REL,
LCL, REL,
032454
LCL, REL,
032456
LCL, REL,
032460
LCL, REL,
LCL, REL,
GBL, REL,
GBL, REL,
GBL, REL,
GBL, REL,
words
000001
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
033634
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
words
000002
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
033634
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
LCL, REL,
words
*TIME
CON)
CON)
CLRLI

CON)
*OPEN
CON)
CON)
CON)

CON)

CON)
*LOCK
CON)
CON)
OVR)
OVR)
OVR)
OVR)


CON)
CON)
CON)
CON)

CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)


CON)
CON)
CON)
CON)

CON)
CON)
CON)
CON)
CON)
CON)
CON)
CON)

                             025644
     CLRLIN  030102  CLRBOT  030142
             030400
             032462  *CRfiSH  032463
296

-------
Overlay region
 OTS*I   033634
 SYS$I   033634
 USER*I  033634
 *CODE   833634
 OTS*0
 SYS*0
 *DflTftP
 OTS*D
 OTS*S
 SYS*S
 *DflTfl
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 USER$I
 *CODE

 OTS*0
 SYS*0
 *DflTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTfl
 USER$D
 Segment
Overlay
 OTS*I
 SYS* I
 USER*I
 *CODE

 OTS*0
 SYS*0
 *DftTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTO
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 USER*I
 *CODE
 034654
 034654
 034654
 035312
 035312
 035312
 035312
 035366
 size =
region
 033634
 033634
 033634
 033634

 034376
 034376
 034376
 035716
 035716
 035716
 035716
 035724
 size =
region
 033634
 033634
 033634
 033634

 034576
 034576
 034576
 035270
 035270
 035270
 035270
 035332
 size =
region
 033634
 033634
 033634
 033634
000001
000000
000000
000000

001020


000000

000000
000436
000000

000000
000000

000054
000000

001532
000001
000000
000000

000000

000542


000000
000000

001320
000000

000000
000000

000006
000000

002070
000001
000000
000000

000000

000742


000000
000000

000472
000000
000000
000000

000042
000000

001476
000001
000000
000000
000000

001360
Segment 000003
  
  (RW,I,LCL,REL,CON>
  (RW,I,LCL,REL,CON)
  (RW,I,LCL, REL,CON)
 BHELP § 033634
  (RW,I,LCL,REL,CON)
  (RW,I,LCL, REL,CON)
  (RW,D,LCL,REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
= 540.   words
  \ RW j J, f __ j , .__T
 WRITE @ 033634
  (RW, I, LCL, REL,CON)
  (RW, I, LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  
-------
 SYS$0
 *DftTftP
 OTS*D
 OTS*S
 SYS*S
 *DflTft
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 035214
 035214
 03573S
 035732
 035732
 035732
 036012
 size =
region
 033634
 033634
000000

000516
000000

000000
000000

000060
000000

002156
000001
000000

000610
  (RW,I,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  
-------
 SYS*I   04£736 000000
 USER*I  04£736 000000
 *CODE   04£736 001166
OTS*0
SYS*0
*DflTflP
OTS*D
OTS*S
SYS*S
*DftTfl
USER*D
Segment
Overlay
OTS*I
SYS* I
USER* I
*CODE
0441 £4 000000
044124 000000
0441 £4 000020
044144 000000
044144 000000
044144 000000
044144 000456
0446££ 000000
size = 003330
region 00000£
041£7£ 000000
041272 000000
041 £72 000000
041272 000040
 OTS*0
 SYS*0
 *DflTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTfl
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 USER*I
 *COOE

 OTS*0
 SYS*0
 *DflTflP
 OTS*D
 OTS*S
 SYS*S
 *DflTfi
 USER*D
 Segment
Overlay
 OTS*I
 SYS* I
 USER*I
 *CODE
 041332
 04133£
 041332
 041360
 041360
 041360
 041360
 041360
 size =
region
 041£7£
 041£7£
 041£7£
 041£7£

 04133£
 041332
 041332
 041360
 041360
 041360
 041360
 041360
 size =
region
 041£7£
 041£7£
 041£7£
 041£7£
000000
000000

000026
000000
000000

000000
000000
000000

000066
000002

000000
000000
000000

000040


000000
000000
000026
000000
000000
000000

000000
000000
000066

000002
000000

000000
000000
000200
 *MULD   04£374  MUD*SS  042406  *MLD
 *FCfll_L  04£4££  *XFD    04£440  XFD*
 $XDF    04£504  XDF*    04£516  *XDD
 XDD*    04£54£
  (RW, I,LCL, REL.CON)
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
 CONVRTd" 04£736
  (RW,I,LCL, REL.CON)
  (RW,I,LCL, REL,CON)
  (RW,D,LCL, RE1_,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL.CON)
  (RW, D,LCL, REL,CON)
  (RW,D,LCL,REL.CON)
  (RW,D.LCL,REL.CON)
= 876.    words
Segment 00001£
  (RW, I,LCL, REL,CON)
  (RW,I,LCL, REL.CON)
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
 VTDHLB  041272
  (RW, I,LCL, REL,CON)
  (RW,I,LCL, REL.CON)
  (RW,D,LCL, REL,CON>
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL,REL,CON)
= 27.    words
Segment 000013
  (RW, I,LCL, REL.CON)
  (RW, I,LCL, REL,CON)
  (RW, I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
 VTDHLT  04127£
  (RW,I,LCL, REL,CON)
  (RW, I.LCL, REL,COIM)
  (RW,D,LCL, REL.CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
= 27.    words
Segment 000014
  (RW,I,LCL,REL.CON)
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL.CON)
                                                                 042406
                                                                 042452
                                                                 042530
                                    299

-------
OTS*0
SYS*0
*DfiTflP
OTS$D
OTS$S
SYS$S
*DflTfl
USER*D
Segment
Overlay
OTS*I
SYS* I
USER*I
$CODE
OTS*0
SYS*0
*DflTflP
OTS*D
OTS$S
SYS*S
*DflTfl
USER*D
Segment
Overlay
OTS*I
SYS* I
USER* I
*CODE
OTS*0
SYS*0
*DflTflP
OTS*D
OTS*S
SYS*S
*DflTfl
USER*D
Segment
Overlay
OTS*I
SYS* I
USER*I
*CODE
OTS*0
SYS*0
*DflTflP
OTS*D
OTS*S
SYS*S
041472
041472
041472
041530
041530
041530
041530
041532
size =
region
041272
041272
041272
041272
041472
041472
041472
041530
041530
041530
041530
041532
size =
region
041272
041272
041272
041272
041422
041422
041422
041456
041456
041456
041456
041456
size =
region
041272
041272
041272
041272
042262
042262
042262
042430
042430
042430
000000
000000
000036
000000
000000
000000
000002
000000
000240
000002
000000
000000
000000
000200
000000
000000
000036
000000
000000
000000
000002
000000
000240
000002
000000
000000
000000
000130
000000
000000
000034
000000
000000
000000
000000
000000
000164
000002
000000
000000
000000
000770
000000
000000
000146
000000
000000
000000
 VTED  & 041272
   (RW,I,LCL, REL,CON)
   (RW,I,LCL, REL.CON)
   (RW,D,LCL, REL,CQN)
   (RW,D,LCL, REL.CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW, D,LCL, REL,CON)
= 80.    words
Segment 000015
   (RLJ. T. I PI . RFI
   I r\W« 1 j L>»j ,.—— 7
 VTEL  § 041S72
   (RW,I.LCL, REL,CON)
   (RW,I,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL,CON)
   (RW,D,LCL, REL.CON)
   (RW,D,LCL, REL.CON)
   (RW, D,LCL, REL.CON)
= 80.    words
Segment 000016
   / m i * i r*t  nr*i
  \ r\Wj A • L___ . —__
 VTERSE@ 041272
  (RW, I,LCL, REL.CON)
  (RW, I,LCL, REL,CON)
  (RW, D,LCL, REL,CON)
  (RW,D,LCL, REL.CON)
  (RW,D,LCL, REL.CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL.CON)
  (RW, D,LCL, REL.CON)
= 58.    words
Segment 000017
  (RW,I,LCL, REL.CON)
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL.CON)
 VTHVP § 041272
  (RW, I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
  (RW,D,LCL, REL.CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
             300

-------
*DflTfl
USER*D
Segment
Overlay
OTS*I
SYS* I
USER*I
*CODE
OTS*0
SYS*0
*DflTflP
OTS*D
OTS*S
SYS*S
*DftTfl
USER*D
Segment
Overlay
OTS*I
SYS* I
042430
042434
size =
region
041272
041272
041272
041272
042626
042626
042626
042666
042666
042666
042666
042676
size =
region
041272
041272
000004
000000
001142
000002
000000
000000
000000
001334
000000
000000
000040
000000
000000
000000
000010
000000
001404
000002
000000
000056
 USER*I  041350
 *CODE   041350
 OTS*0
 SYS*0
 *DATOP
 OTS*D
 OTS*S
 SYS*S
 *DflTfl
 USER$D
 DIflG
 Segment
042350
042350
042350
042476
042476
042476
042476
042524
042524
size =
000000

001000


000000

000000

000126
000000
000000
000000

000026
000000

000300
001532
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL.CON)
- 305.    words
Segment 000020
  (RW,I,LCL, REL,CON)
  (RW,I,LCL,REL,CON)
  (RW,I,LCL,REL,CON)
  (RW,I,LCL,REL,CON)
 VTSGR (? 041272
  (RW,I,LCL, REL,CON)
  (RW, I,LCL, REL,CON)
  (RW,D,LCL, REL.CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW,D,LCL, REL,CON)
  (RW, D,LCL, REL,CON)
= 386.    words
Segment 000021
  (RW,I,LCL, REL,CON)
  (RW,I,LCL, REL,CON)
 IREflD   041272   IREflDW   041300  IREfiDC  041304
 *READ   041310
  (RW,I,LCL,REL,CON)
  (RW,I,LCL,REL,CON)
 BOUREDC- 041350
  (RW,I,LCL,REL,CON)
  (RW,I,LCL,REL,CON)
  
-------
         APPENDIX VI



COMMAND FILES TO BUILD SYSTEM
            302

-------
I  4-	
  I      File:     TIMLIB.COM
  I      Function: Command file to build timlib.obj from libtim. for
  I                  library resident on SY:
  I
FORT/NOLINE/OBJ:OUP:  INP-.LIBTIM
LIB/CREflTE SY:TIMLIB  OUP:LIBTIM
                                      303

-------
! 1
1
1
1
1
aBOULDF
aBOULDL
File: BOULDfl.COM
Function: Command file build BOULD. REL on device BOUi
BOULDF. COM compiles fortran programs
BOULDL. COM links compiled file into a task file



1
1
1
1
1


304

-------
1
1
!
i
i
i
j
i
SI
i
i
4. 	
1
1
1
i



ET TT



File: BOULDF. COM
Function: Command file to fortran source codes for BOULD. REL



set terminal echo off

QUIET

main subroutines

1
1
1







FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJsOUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/QBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
INP:BOULDM. FOR
INP:BOUCHK.FOR
INP:BOUCHN.FOR
INP:BOUCON.FOR
INP:BOUDPC.FOR
INP:BOUDflL.FOR
INP:BOUDflT.FOR
INP:BOUDK1.FOR
INP:BOUDK£.FOR
INP:BOUER1.FOR
INP:BOUER£.FOR
INP:BOUFflL.FOR
INP:BOUFFT.FOR
INP:BOUIN1.FOR
INP:BOUIN£.FOR
INP:BOUIN3.FOR
INP:BOUMHT.FOR
INP:BOUMH1.FOR
INP:BOUMH£.FOR
INP:BOUOSC.FOR
INP:BOUPDC.FOR
INP:BOUPFT.FOR
INP:BOUPKC.FOR
INP:BOUPMP.FOR
INP:BOUPRS.FOR
INP:BOUSLP.FOR
INP:BOUSTfl.FOR
INP:BOUTIM.FOR
INP:BOUTMP.FOR
INP:BOUWND.FOR
        secondary subroutines
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
FORT/NOLINE/OBJ:OUP:
INP:BOUBIT.FOR
INP:BOUDTC.FOR
INP:BOUDTI.FOR
INP:BOUDYR.FOR
INP:BOURED.FOR
INP:BOURET.FOR
INP:BOURLL.FOR
                                   305

-------
FORT/NOLINE/OBJ:DUP: INP:BOURTL.FOR
FORT/NOLINE/OBJ:OUP: INP:BOUWRT. FOR


!        turn echo back on
i

SET TT NOQUIET
                                306

-------
   I     File:     BOULDL.COM
   j     Function: Command file to link object files for BOULD.REL
                   Produces foreground program
        turn off echo on terminal
 i
 SET TT QUIET

 !       create .REL file and .MRP file
 !          TIMLIB  is a library of time calculations
 i
 R LINK
 BOU:BOULD, OUP:BOULD=OUP:BOULDM,OUP:BOUDflT,SY:TIMLIB/R:400/C

 !       main subroutines

 OUP:BQUCHK/0:1/C
 DUP:BOUCON/0:1/C
 OUP:BOUDflC/0:l/C
 OUP:BOUDftL/0:l/C
 OUP:BOUDK1/0:1/C
 OUP:BOUDK£/0:i/C
 OUP:BOUER1/0:1/C
 OUP:BOUER£/Osl/C
 OUP:BOUFfiL/0!l/C
 OUP:BOUFFT/0:1/C
 OUP:BOUIN1/0:1/C
 OUP:BOUIN£/0:1/C
 OUPsBOUIN3/0:l/C
 OUP-.BOUMHl/Osl/C
 OUP:BOUMH£/0:1/C
OUP:BOUOSC/0:1/C
OUP:BOUMHT/Osl/C
OUP:BOUPDC/0:1/C
OUP:BOUPFT/0:i/C
OUP:BOUPKC/0:1/C
OUPsBOUPMP/0:l/C
 OUPsBOUPRS/0:l/C
 OUP:BOUSLP/0:1/C
 QUP:BOUSTfl/Ojl/C
 QUPiBOUTIM/Osl/C
 OUPtBOUTMP/0:l/C
 DUPsBOUWND/0:l/C
 i
 !       secondary or control subroutines

 OUPiBOUBIT/Os£/C
 OUP:BOUCHN/0:£/C
 OUPsBOUDTC/0:£/C
                                   307

-------
OUPsBOUDTI/0:£/C
OUP:BOUDYR/0:£/C
OUP:BOURED/0:£/C
OUP:BOURET/0:£/C
OUP:BOURLL/0:£/C
OUP:BOURTL/0:£/C
OUP:BOUWRT/0:£
C
                                 308

-------
  I     File:       BOURSL.COM
  I     Function:  Command file to link  BOURST routines
  I                program is linked  into  an overlay sections due to size
!  I
R LINK

!        link driver and timlib
i
BOU:BOURST,OUP!BOURST=OUP:BOURST,SY:TIMLIB/C
i
!        main subroutines
i
OUP:BOUHDR/0:1/C
OUP:BOUFLL/0:1/C
OUP:BOURED/0:1/C
OUP:BOUHLP/0:1/C

!       video handlers
i
OUP:VTDHLB/0:£/C
OUP:VTDHLT/0:£/C
OUP:VTED/0:£/C
OUP:VTERSE/0:£/C
OUP:VTHVP/0:£/C
OUPsVTSBR/0:£/C
OUP:vTTBM/0:£/C
OUP:VTWID/0:£/C
OUP:VTDWL/0:£.
C
                                     309

-------
1
1
1
1
1
1
SBOURSF
"BOURSL
File: BOURSft. COM
Function: Command file build BOURST. SflV
BOURSF. COM compiles the fortran files
BOURSL. COM links the compiled fortran programs in to
a task file



1
1
1
1
1
1


310

-------
11     File:     BOUFIft.COM
1   '     Function: Command  file  build BQUFIL.SftV
                    File management program
!  +-
i
                 BOUFIF.COM  compiles source files
                 BOUFIL.COM  links compiled files into task  file
©BOUFIF
©BOUFIL
                                   311

-------
 i  !      Faction:      ndUe to fortran files for BOURST.SflV

   l                                                      —_gii___,_
 i  i     ™—^^^     ~~
 i

 !        main driver
 i
 FORT/NOLINE/OBJ:OUP: INPsBOURST
 i

 !        paints screen with labels
 i

 FORT/NOLINE/OBJ:OUP: INP:BOUHDR
 i

 !        program failure routine
 i

 FORT/NOLINE/OBJ:OUP: INP:BOUFLL
 i

 !        disk reading section  (common with  bould.rel)
 i

 FORT/NOLINE/OBJ:OUP: INP:BOURED


 !        help file


 FORT/NOLINE/OBJ:QUP:  INP:BOUHLP
 i

 !        double  heigth line bottom


 FORT/NOLINE/OBJ:OUP:  INP:VTDHLB
 i

 !        double  heigth line top
 !

 FORT/NOLINE/OBJ.-OUP:  INP:VTDHLT
 i

 !        erase sections of display
 i

 FORT/NOLINE/OBJ:OUP:  INP:VTED


 !        erase all display and return to home
 i

 FORT/NOLINE/OBJ:OUP:  INP:VTERSE


 !        horizontal and vertical positioning
 i

 FORT/NOLINE/OBJ:OUP:  INP:VTHVP


 !        selecte grapih attributes  (reverse image etc.)


FORT/NOLINE/OBJ:OUP: INP:VTSSR


        set top and  bottom margins
                                   312

-------
FORT/NOLINE/OBJ:OUP: INP:VTTBM
i
!'       double width line
i

FORT/NOLINE/OBJ:OUP: INP:VTDWL
i
!       screen width  (80-132)
i
FORT/NOLINE/OBJ:OUP:  INP:VTWID
                                     313

-------
! 1
! 1
! 1
i i
i
R LINK
File: BOURSL.COM
Function: Command file link object modules for BOURST. SflV


1
1
1


         link driver and timlib

 BOU:BOURST,OUP:BOURST=OUP:BOURST, SY:TIMLIB/C
 i
 !        main subroutines
 i
 OUP:BOUHDR/0:1/C
 OUP:BOUFLL/0:1/C
 OUP:BOURED/0:1/C
 OUP:BOUHLP/0:1/C

 !        video handlers

 OUP:VTDHLB/0:£/C
 OUPsVTDHLT/0:£/C
 OUP:VTED/0:£/C
 OUP:VTERSE/0:£/C
 OUP:VTHVP/0;£/C
 OUP:VTSBR/0:£/C
OUP:VTTBM/0:£/C
OUP:VTWID/0:£/C
OUP:VTDWL/0:£
                                  314

-------
!  I      File:     BOUFIF.COM
!  I      Function: Command file to fortran files  for BOUFIL.SflV
Irnain driver for file maintenence
i
FORT/NOLINE/OBJ:OUP: INP:BOUFIM
i
'.reinitialization file
i
FORT/NOLINE/OBJ:OUP: INP:BOUFIW

!partial output file

FORT/NOLINE/OBJ:OUP: INP:BOUFIP

!new files created

FORT/NOLINE/OBJ:OUP: INP:BOUFIN
i
!file to read data
i
FORT/NOLINE/OBJ:OUP: INP:BOUFIR
i
Ifile header information

FORT/NOLINE/OBJ:OUP: INP:BOUFIF
i
Iread seleced records
;
FORT/NOLINE/OBJ:QUP: INP-.BOUFIS
;
Idump data for inform

FORT/NOLINE/OBJ:OUP: INP:BOllFID
i
Ihelp file
i
FQRT/NOLINE/OBJ:OUP: INP:BOUFIH
i
!asc i i convers i on
i
FORT/NOLINE/OBJ:QUP: INP:CONVRT
i
!part of vtlib
i
FORT/NOLINE/DBJ:OUP: 1NP:VTEL
                                   315

-------
    I      File:      BOUFIL.COM
    I      Function:. Command file TO link object modules for BOUFIL.SflV
    I


          link maintence  file

  R  LINK
  BOU:BOUFIL, OUP:BOUFIL=OUP:BOUFIM/C
  OUP:BOUFIS/0:1/C
  OUP:BOUFIR/0:1/C
  OUP:BOUFID/0:1/C
  OUP:BOUFIH/0:1/C
 OUP:BOUFIW/0:1/C
 OUP:BOUFIP/0:1/C
 OUP:BOUFIN/0:1/C
 OUP:BOUFIF/0:1/C
 !        flSCII  conversion to real*4
 i
 OUP:CONVRT/0:£/C

         screen handlers
 i
OUP:VTDHLB/0:£/C
OUPsVTDHLT/0:£/C
OUP:VTED/0:£/C
OUP:VTEL/0:£/C
OUP:VTERSE/0:£/C
OUP:VTHVP/0:£/C
OUP:VTS6R/0:£/C
!        file read/write file
i
OUP:BOURED/0:£
C
                                  316

-------
I  + ---------------------------------------------------------------------- +

!  I      File:     BOULD.COM                                              I
!  I      Function: Command file start boulder program                     '
!        start boulder program
i

FRUN BOU:BOULD. REL/BUFFER:£500/TERM:
                                     317

-------
 !  I      File:     RESTRT.COM
 !  I      Function:  Command file to restart boulder program
 !  I
 i  +	,	
 j
 RESET
 i
 !        close all  output  files
 i
 CLOSE

 !       start  boulder
 i

GBOULD


 •'       start status program

RU BOU:BOURST
                                 318

-------
! 1
! 1
! 1
! 1
I
File:
Functions



BFILE.COM
Command file to start BOUFIL management program
from BOURST


— — — t-
1
1
1
1

j
RU SOU:BOUFIL
                                  319

-------
   ,               — —^^p^, — —,—— — — — — — ^aa,• ..«•»»•••••i •.«.«__ *•____•«_••. _.___..___..«_ _ «..«.^«._«B^>^>

   I      File:      BSTRT.COM                                                  I
   I      Function:  Command file  to  start BOURST  management  program         I
   I                    from BOUFIL                                             I
   I                                                                            I
  \~-
RU BOU:BOURST
                                    320

-------
              APPENDIX VII



FUNCTIONS FOR TIME AND DATE CALCULATIONS
                 321

-------
 cl   Program :  BOULD.REL,BOURST, BOUFIL                                    I
 cl   Module  :  LIBTIM                                                     I
 cl   Function:  SOURCE FILES  FOR  TIME  FUNCTIONS                            I
 c+	•	•	+
 cl              System time  calculation  library                           I
 cf                                                                        '
 cl         This library converts time value  to real*4 values which can    I
 cl                     be  stored in the  disk files                         I
 cl                                                                        I
 cl           all values must  be  stored as real*4  because  of file structure!
 cl                                                                        I
 cI        function call:                                                   I
 cl                                                                        I
 cl           TIMDIF  - calcultes time differences                          I
 cl           SYSTIM  - returns system time and  date as real*4 values      I
 cl           SYSTMC  - returns decimal equivalent of  the  time             I
 cl           TIMADD  - adds two  times together                             I
 cl                                                                        I
 — ^ 	      		      		m •-_..-••••-.-	  	 ITT      	    ... _	    	-r TIM-r-r - t-
 C^         —— — «. — — —-.—.«——.«. — -——.—.-. ——— .._ — —— -._  _._«.. «._^.
        FUNCTION TIMDIF(TIMEi,TIME£)
 c—
 c—     calculates the differences in two times
 c—     put  in order  new time ,  old  time
 c—
        IF  (TIME1.LT.TIMES)  TIMEl=TIMEl+£400.
 c--
 c—     determine difference
 c—
        DIFF=TIME1-TIME£
        IDIFF=DIFF
 c~~~
 c—     calculate numer of hours
 c—
        IDIFF=(IDIFF/100)#100

 c—     calculate number of minutes
 c—
        DIFFM=DIFF-IDIFF
 c—
 c—     correct minutes for minutes  > 60
 c—
        IF  (DIFFM.BE.40. )  TIMDIF=IDIFF+(DIFFM-40.)
 c—
        IF  (DIFFM.LT.40.)  TIMDIF=IDIFF+DIFFM
        RETURN
        END

c—
c—
        FUNCTION SYSTIM(SYSDflT)
c—
                                   322

-------
c—     returns  date  and  time  as  real*4 values
c—
        INTE6ER*4  ITIME
c—
c—     get  system date  in integer  format
c—        IDl=month  ID£=day    ID3=year
c—
        COLL IDflTEdMN, IDY, IYR)
c—
c—     system date converted  to  real*4

        SYSDftT=
-------
 c—      add  hours  and  decimal  minutes
 c—
         SYSTMC=HRS+XMIN
         RETURN
         END
 £_____________________________________________________—
 c—
 c—
         FUNCTION TIMflDD(Tl,T£, IF)
 c—
 c—      add  two times  together
 c—      remember  ther are 60  minutes to an hour  and  can not  be added diry
 c—      IF flag that a new day has occurred
 r-,
 c—      set  flag to 0  no new  day
 c—
         IF=0
 c—
 c—      determine  hours
 c—
         IH1=T1/100
         IH£=T£/100
 c—
 c—      total hours
 c—
         IHT=IH1+IH£
 c—
 c—     convert minutes
 c—
         IM1=T1-(IH1*100)
         IM£=T£-(IH£*100)
 c—
 c—     total minutes
 c—
         IMT=IM1+IM£
c—
c—     is this greater than minutes in hour?
c—             yes -  inc hour and correct  minutes
c—             no  -  branch
c—
         IF (IMT.LT.60)  BOTO 10
         IHT-IHT+1
         IMT=IMT-60
 c—
c—      is this a new day?
c—             yes - correct and set flag
c—             no  -  branch

 10      IF (IHT.LT.S4)  BOTO £0
        IHT=IHT-£4
        IF=1
c—
                                   324

-------
c--     correct time
c—
£0      TIMflDD=(IHT*100)+IMT
c—
        RETURN
        END
                                  325

-------