requiredbycontract - federation of american · pdf filewalls project los alamos national ......

31
LA-10975 z Los Alamos Nal!onal Laboratory IS operated by the University of California for the Umted States Department of Energy under contract w.7405.ENG.36 DO NOT CIRCUIJX PERMANENTRETENTION REQUIRED BYCONTRACT AnImproved, Computer-Based, On-LineGammaMonitor-for m—c. z: ---- .- -.. . .- ,.,., ., .7>.,”+. - . ———. —. —..-. => )-., yy ---- .:: ~--- –—–– I LOSA I E —.— r“’- lalmlos Exchange Process Con~rol LosAlamos NationalLaboratory LosAlamos,New Mexico 87545

Upload: lydung

Post on 17-Mar-2018

223 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

LA-10975z

Los Alamos Nal!onal Laboratory IS operated by the University of California for the Umted States Department of Energy under contract w.7405.ENG.36

‘ DO NOT CIRCUIJX

PERMANENTRETENTION

REQUIREDBYCONTRACT

AnImproved,Computer-Based,On-LineGammaMonitor-for

m—c. z :---- .-

— -.. . .— -,.,., ., .7>.,”+. - .

———.—. —..-. —=>

)-., yy ---- .::

~--- –—––

I

LOSA

I

E

—.—r“’-

lalmlos

ExchangeProcessCon~rol

LosAlamos NationalLaboratoryLosAlamos,New Mexico 87545

Page 2: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

AnAftiqative Action/EqualOpportunityEmployer

This work was supportedby the US Department of Ene~, 05ce of NuclearMaterialsProduction.

EditedbyMaryJ. Mann

Thisreportwassubmittedon March12,1987.

DISCLAIMER

Tbisreportwaspreparedasanaccountofworks~nsored byanaSencyofthe UnitedStatesGovernment.NeithertheUnitedStatesGovemmentnoranyasencythereo~noranyoftheiremployecs,makesanywarmnty,expressorimplied,orassumesanylegalIiabilityorresponsibilityfortheaccuracy,completeness,oruwfulnessof anyinformation,apparatus,product,orpromsdisdoscd, orrepresentsthatitsusewouldnotinfringeprivatelyownedrights.Referencehereinto anyspeciticcommercialproduq process,orscrvicebytradenamqtrademark,manufacturer,orotberwise,doesnotnecessarilyconstituteorimplyitsendorsement,recommendation,orfavoringbytheUnitedStatesGovemmentoranyagencythertof.Theviewsandopinionsofauthorsexpressedhereindo notnecessarilystateorreflecttho~ oftheUnitedStatesGovernmentoranyagencythereof.

Page 3: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

IA-10975

UC-IOIssued:June1987

An Improved,Computer-Based,On-Line Gamma Monitorfor

PlutoniumAnion Exchange Process Control

NoahG. PopeS. FredricMarsh

1.

1--.~.:..~–.

ABOUT THIS REPORT
This official electronic version was created by scanning the best available paper or microfiche copy of the original report at a 300 dpi resolution. Original color illustrations appear as black and white images. For additional information or comments, contact: Library Without Walls Project Los Alamos National Laboratory Research Library Los Alamos, NM 87544 Phone: (505)667-4448 E-mail: [email protected]
Page 4: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

\

AN IMPROVED, COMPUTER-BASED, ON-LINE GAMMA MONITORFOR PLUTONIUM ANION EXCHANGE PROCESS CONTROL

by

Noah G. Pope and S. Fredric Marsh

ABSTRACT

An improved, low-cost, computer-based system has replaced a previ-ously developed on-line gamma monitor. Both instruments continuouslyprofile uranium, plutonium, and americium in the nitrate anion exchangeprocess used to recover and purify plutonium at the Los Alamos Pluto-nium Facility. The latest system incorporates a personal computer thatprovides full-feature multichannel analyzer (MCA) capabilities by meansof a singh+slot, plug-in integrated circuit board. In addition to control-ling all MCA functions, the computer program continuously corrects forgain shift and performs all other data processing functions. This Plu-tonium Recovery Operations Gamm a Ray Energy Spectrometer System(PROGRESS) provides on-line process operational data essential for ef-ficient operation. By identifying abnormal conditions in real time, it al-lows operators to take corrective actions promptly. The decision-makingcapability of the computer will be of increasing value as we implementautomated process-control functions in the future.

INTRODUCTION

The major aqueous process used to recover and pu-ri& plutonium at the Los Alamos Plutonium Facilityis anion exchange in nitric acid. This process is nearlyideal for separating plutonium from a wide variety ofimpure materials, as the anionic nitrate complex ofPu(IV) is more strongly sorbed thau any other com-plex ion, and few other elements show even moderatesorption from nitric acid.l

Operators at Los Alamos have traditionally fol-lowed a fixed procedure, even though feed solutionsvary over a broad range of impurity compositionsand concentrations. Before the earlier on-line gammamonitor2 became available less than two years ago,

processoperatora based most process-controldecisionson only their visual observationaand intuition.

Although the earlier version of the on-line gammamonitor significantly improved the efficiencyof thisanion exchange process, it lacked the reserve compu-tational power and flexibilityneeded to support a par-allel Los Alamos development effort directed towardthe automation of major aqueous processes.

The objective of this work was to develop a com-pact, low-cost, computer-based version of the on-linegam.ma monitor. This improved version would pro-vide sufficientreserve capability to compile real-timeprocess-controldata from a variety of monitors duringfuture automated process-controlapplications.

Page 5: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

INSTRUMENTATION AND EQUIPMENT

Gamma Detector. High-purity, coaxial germa-nium detector of =1.80-keV resolution and =15% ef-ficiency,in a horizontal integral configuration. Can-berra Industries, Meriden, Connecticut.

Bias Supply. Singl~width NIM bias supply, lownoise, Oto +5 kV.

Computer. DataCAT, IBM-compatiblepersonalcomputer, 512-K RAM, with dual floppy-diskdrives.DataCraft,Inc., Gardena,California.IncludesHARD-CARD lo-megabyte fied disk drive. Plus Develop-ment Corp., Milapitaa,California.

Multichannel Analyzer. Model PCA-2000singl~slot, plug-inboard with 2048-channelADC andmemory. Includessingle-channelanalyzer,multichan-nel scaler card, and softwarefor acquisitionand dis-play. The Nucleus,Inc., Oak Ridge, Tennessee.

Spectroscopy Amplifier. Single-width NIMspectroscopyamplifierandpileup rejecter,model 572.EG&G ORTEC, Oak Ridge, Tennessee.

NIM Bin. Model 2100bin/power supply,150 W.CanberraIndustries,Meriden,Connecticut.

Plotter. Model695PC plotter,four-pen,withRS-232-C serial interface. Houston Instruments,Austin,Texas.

Radioisotope Calibration Source. Barium-133, O.1-pCi, sealed solid source, taped to detectorto provide referencegamma energiesfor gain stabi-lization. Isotope Products Laboratories, Burbank,California.

Disk Operating System. DOS Version 2.o Orhigher. IBM Corporation, Boca Raton, Florida.

Compiler. IBM Basic Compiler, Veraion1985. IBM Corporation,Boca Raton, Florida.

SYSTEM INSTALLATION ANDOPERATION

2.01,

Although 239Puand 241Amhave ga.mma rays thatare directly suitable for passivegaroma assay, the nat-ural and depleted uranium impurities in typical LosAlamos feed materials do not. A novel and indirect

2

radiotracer technique therefore is used. The positionof any uranium impurity that passes through the an-ion exchangeprocess is traced by 237U,a minor alpha-decay daughter of 241Puthat is alwayspresent in plu-tonium processed at Los Alamos. This radiotracer

technique is detailed in a separate report.2A high-purity germanium garoma detector moni-

tors the outlet stream from the anion exchange col-umn (Fig. 1) as it flows through an existing three-quarter-inch stainless steel process pipe. The detec-tor is shielded from background radiation by a leadshield (minimum 1.5-inch thickness) that contains alining of 0.030-inch cadmium to absorb fluorescentx rays iiom lead. Another cadmium absorber is in-serted between the pipe and the detector to attenuatea major portion of the abundant 59.5-keVgamma raysfrom 241Am(Fig. 2).

The complete on-line garoma monitor system(Fig. 3) provides real-time elution profles of ameri-cium, uranium, and plutonium (Fig. 4) as these ele-ments elute from the anion exchange column. Thechanging detector signals reflect the varying com-position of the outlet stream from the anion ex-change column as (1) americium impurity elutes first,(2) uranium and other impurities elute next, andfinally (3) purified plutonium elutes after being re-duced from strongly sorbed Pu(IV) to nonsorbedPu(III). These recorded elution profiles provide datafrom which operators can optimize many process pa-rameters. The stripchart also provides a permanentrecord of the daily performance for each anion ex-change system.

COMPUTER PROGRAM SYNOPSIS

The Plutonium Recovery Operationa Gamma RayEnergy Spectrometer System (PROGRESS) programthat we developed consists of nearly 1000 lines ofBASIC code that controlsall data acquisition,process-ing, and output operationa. Softwarefor the PCA mul-tichannel analyzer plug-in card (Fig. 5), supplied byThe Nucleus,Inc., must be loaded manually before theBASIC program can be executed. The PROGRESSprogram (seeFig. 6) then controls the vendor-suppliedsoftware. (Appendix A is a detailed description of thisprogram.)

Many parameters and functions of the PCA-2OOOplug-in card can be directly accessedfrom a high-levelinterface language. BASIC was selected for this appli-cation because it is easily programmed and is capableof interfacing with assembly-languagesubroutines by

Page 6: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

Fig. 1. High-puri~

Alamos.germanium detector monitoring the outlet pipe from an anion exchange system at h

Fig. 2. Details of shielding and mounting configuration of the gamma detector.

3

Page 7: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

Fig. S. Complete on-line gamma monitor system installed under glove box.

?“ .- . — — ..:... . . . ... . .-...:,=.&- -—.. -—.— =-.. .: ..—’ ,- - - - ~,= --- . .

L.% ..- .-

-—

—.—..,

--.:+ =”.—=+-– n — -, . . . . . .,

—n, $0..-..—.

.......................●✎✎...............,......‘......

,*

Fig. 4. ~pic~ *ripchart record fromthe anionexchangeseparation proceaa.

4

Page 8: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

— -- . .- -- .-—

Fig. 5. ThePCA-21XI0singleslot,plug-in integrated circuit board that providea complete multichannel anslyzer

capability to a personal computer. (Only a single board is required; this photograph shows both sides of the single

board.)

rn

USER-DEFINED-

PARAMETER INPUT

&

-1 SYSTEM

INITIALIZATION I-i

ENERGYCALIBRATION

m+

J

SPECTRALr

PLOT PREVIOUSLYACQUISITION

~ACQUIRED DATA

A

-EQCLEAR

ACTINIDE ROI S

Fig. 6. Flow chart for major sections of the PROGRESS program.

Page 9: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

means of POKE statements and PEEK and USR func-tions. These commands allow subroutines, flags, andpointers in the PCA software to be read directly intoor out of memory locations on the PCA board. Thedetailed information required to directly access PCAsoftwareand firmwarewas obtained from The Nucleus,Inc.3’4

Microsoft Corporation’s GW-BASIC was selectedfor compatibility with the DataCAT computer. (TheDataCAT computer was selected because its construc-tion and small size make it much better suited for achemicalplant environment than are competitivecom-puters designed for officeuse.)

Vendor-suppliedsubroutines directly (1) change thecursor position, (2) update and display the spectrum,(3) calculate the region-of-interest(ROI) centroidaandnet integrals, (4) preset data acquisition times, and(5) start andstop data acquisition. Direct alteration ofmemory locations that contain logicalon-and-offbyteconfigurations accomplishescertain other operations,such as setting and clearing ROIS.

Many functions require that parameters or data beconverted from regular decimal notation to multiple-byte binary or packed binary coded decimal (BCD)format. Large portiona of several subroutines therefore consist of algorithms that accomplish theseconversions.

PROGRAM STRATEGY

High-purity germanium garoma detectors routinelyproduce high-resolution gamma peaka. Gamma spec-tral measurements of high-resolution peaks are mostreliable when the ROI is only slightly wider than thepeak being measured. Such tightly definedROIS,how-ever, leave the measurement system susceptible tolarge errora if peak positions shift during the meas-urement period. An external electronic module typi-cally is used to prevent gain-shifterrors. Such modulesautomatically sense gain shift in the analog-to-digitalconverter (ADC) and adjust as required to correct forthe detected shift. Unfortunately, the internal ADCcircuitry on a PCA-2OOOplug-in board ia inaccessibleto such external electronic gain stabilizers.

Instead, PROGRESS uses two gamma rays (oneat 81 keV and the other at 356 keV) from a 133Bacalibration source as gamma-energy reference points

for a unique software-controlled gain stabilization.PROGRESS first locates these two peaks, whichnearly bracket the gamma-energy range of intereat,and then determines the centroid for each. Baaed onthe channel positions of these two calibration peaks,ROI positiona are calculated and reset for 241Am(59.5keV), 239pu (lzgkeV), ~d zsl’u (208keV). ‘l%isrecalibration sequence is automatically repeated approximately every 35 seconds.

PROGRESS then initiates a spectrum acquisitionloop (preset for 30 seconds in our application). Updated, cumulative spectral data are displayed on thevideo screen approximately every second during theacquisition period. At the end of the acquisition pe-riod, the program interrogatea each preset ROI andcalculates the net integral for each peak. These valuesare converted to a predetermined logarithmicscaleandare output to the plotter during the subsequent dataacquisition cycle.

The PROGRESS program may be executed in ei-ther an interpretive or compiled mode. The veraioncompiled by an IBM BASIC Compiler requires approximately 35 seconds to execute a complete cycle(of which 30 seconds is data acquisition time). Thisis approximately 5 seconds less than the 40 secondsrequired to execute the interpretive veraion. An-other compiler, IBM QuickBASIC, was rejected be-cause it was incompatiblewith severalessentialBASICcommands.

The complete PROGRESS program (see AppendixB) includes numerous comment statements in thecode. Although these statements consume a smallamount of computer time in the interpretive mode,they consumeno time in the compiledmode and theyserve as a diagnostic aid to users who are unfamiliarwith the software.

ACKNOWLEDGMENTS

The authors are grateful to Dan Blankenshipof TheNucleus,Inc., for consultation concerningfirmwareac-cess and programrningstrategy, to James Dyke for hishelpful discussionsand programming suggestions,andto Randy Vaughn for assistance during the installa-tion and demonstration of the on-line monitor on aiidl-scaleplutonium process system.

6

Page 10: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

REFERENCES

1. J. P. Faris and R. F. Buchanan, “Applications ofAnion-ExchangeSpectrographic Procedures in Ni-tric Acid Medium,” U. S. Atomic Energy Commis-sion report TID-7606, pp. 185-194(1960).

2. S. F. Marah and M. C. Miller, “Plutonium Pro-cess Control Using au Advanced On-Line GammaMonitor for Uranium, Plutonium, and Ameri-cium,” LosAlamosNational Laboratory report LA-10921(May 1987).

3. NucleusPersonalComputerAnalyzerOperatingIn-structions,August 1986version,The Nucleus,Inc.,Oak Ridge, Tennessee.

4. Dan Blankenahip,The Nucleus, Inc., Oak Ridge,Tennessee,personalcommunications(1986).

7

Page 11: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

APPENDIX A. DETAILED DESCRIPTION OF PROGRAM

The PROGRESS program consistsof six major sec-tions, each of which involves supporting subrou-tines, as shown in Fig. 6.

time (Preset Time Function) is converted from sec-onds to a 3-byte binary coded decimal and exe-cuted. (4) The ROI function is set to the “ON”position.

MAJOR PROGRAM SECTIONSEnergy Calibration

User-Defined Parameters

Detailed beloware certain essentialparameters thatinitially must be definedby the user. These parameterdefinitionsare retained as default settings unless theyare intentionally changed.

Barium-133 Calibration Source. Gammapeaksat 81 keV and 356keV from the 133Baradioiso-tope calibrationsourceare usedto recalibratethe sys-tem after each cycle. The program prompts the op-erator to define the channel numbers that bracketeach of these two ROIS. These ROI settings are en-teredmanuallyin the PCA-2000mode beforeprogramexecution.

Data Acquisition Time. The data acquisitiontime must be specifiedby the operator; a time of 30seconds@ically is used.

Plotter Scale. The y-axis of the plotter repre-sentsthe log of thenet peakarea,whichtypicallyis di-vided into four decades that cover the range of 1 to10,000.The scaleassignedto the x-axis (time) is spec-ified by the operator to allow the output to be ex-pandedor contractedaccordingto the estimatedtimerequiredfor a givenprocess run. This time-scalecon-trol ia achievedby varying the center-t~center spac-ing between adjacent plotted characters in incre-ments of 0.001 inch. Default valuea are deilnedseparately.

System Initialization

After the operator initializea the system using pa-rameters selected above, the PROGRESS programcontrols the followingoperationa: (1) The blank plobter paper is scaled and advanced to the proper start-ing position. (2) The MCA display screen is ac-tivated to update and display the spectral dataand system parameters. (3) The data acquisition

ROIS for the two gamma peaks of the 133Baradioisotope calibration source, as defined in thePARAMETER INPUT section, are set and their cen-troid locations are calculated. The centroida are aa-signed gamma energy values of 80.998 keV and356.005keV, respectively. The linear relationship be-tween gamma energy and MCA location is calcu-lated as C = mE + b, where C is channel num-ber and E is energy. The slope value, m, is equalto the number of channels that separate the centroidsof the 81-keV and 356-keVpeaka divided by the en-ergy that separates them. Substitution of the chan-nel and energy values for either peak into the equa-tion will provide the value of b, the zero inter-cept.

From this equation the peak centroid positiona arecalculated for gamma energies of 59.5 keV, 129 keV,and 208keV, used to monitor 241Am, 239Pu,and 237U,respectively (Fig. 4). The number of channels to theleft and the number ofchannelsto the right of the peakcentroid that definesthe ROI for each peak are preset,based on empiricalpeak resolution values, which are afunction of the peak energy and system resolution.

Spectral Acquisition

Previously collected data are cleared by the ClearSpectral Data function. A new acquisition cyclethen is initiated by setting the START/STOP DataAcquisition function to the “ON” position. Dur-ing the new data acquisitioncycle,processeddata fromthe previous acquisition and calculation cycleare out-put to the plotter. A print bulfer in the Houston In-struments plotter allowsthese data to be quicklytrans-ferred without interference to the ongoing acquisi-tion cycle.

Two alternate function-key combinations may beused during the spectral acquisition loop. TheAlt and F1 keys may be simultaneously pressed to

8

Page 12: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

record the position of significant events with a special mark at the top of the plotter paper. simul-taneous depression of the Alt and F1O keys termi-nates the data acquisition loop and redisplays an op-tions menu. From this optiona menu the opera-tor may elect to (1) resume the measurement cy-cle in progress, (2) begin a new measurement cy-cle, or (3) exit the program and return to DOS.

If neither alternate function-key option is invoked,data acquisition continues until the flag for data ac-quisition preset time registera “OFF” or timed-outstatus.

ROI Net Integral Calculations

The net integral of each ROI is sequentially cal-culated by invoking a Net Integral Calculation func-tion within the subroutine for reading net inte-grals. This algorithm is repeated for each of the spec-ified ROIS. The ROI being processed is desig-nated by placing the MCA display cursor within thatROI.

Clear ROIs

The ROIS used to monitor 241Am, 239Pu, andZSTUme Clemedafter each acquisition cycle iS com-plete, in preparation for anew energycalibration. Pro-gmrn control then returns to the Energy Calibra-tion algorithm at the appropriate portion of the pro-gram (Fig. 6).

SUPPORTING SUBROUTINES

Set and Clear ROIS

The vendor-supplied Set and Clear ROI func-tion requires that each channel included in an ROIbe addressed and interrogated on an individual ba-sis. This time-conauming procedure requires approx-imately 0.3 second per channel, or 3 seconds for a10-channelROI. The more efficientsubroutine devel-oped in the PROGRESS program allows the ROI tobe set and cleared by manipulating a portion of mem-ory that contains an ROI “ON/OFF” flag. This sub-routine cau set or clear a 15-channelROI in less than1 second.

PEEK-ing

The BASIC language PEEK function, used inconjunction with the POKE statement, allows val-ues stored in memory locations to be read di-rectly. This subroutine allows the program to inter-rogate important memory flags and pointers, such asthe preset time or data acquisition flag and the ROIstatus flag.

Using Poke Statement to Replace Value inMemory

It can be advantageousto “trick” the PCA-2000byreplacing existing values in memory with new, moreuseful values. For example, the vendor-suppliedfunc-tion that moves the display cursor to another loca-tion must be invokedrepeatedly until the desired chan-nel location is reached. Alternatively, the value inthe memory location that contains the current cur-sor position may be replaced with the value of the de-sired new cursor position. When the PCA-2000checksfor the current cursor location, it finds this newvalue and responds by moving the cursor to the de-sired position in a single operation. This subrou-tine can save 5 to 10 seconds of processing time percycle.

POKBing

Value-smay be placed directly in selected mem-ory locations using the BASIC language POKE state-ment. Several vendor-supplied functions are in-voked by POKEing a function number into the ap-propriate memory location. These functions includeData Acquisition Start/Stop, Spectral Data Clear-ing, Single-ChannelCursor Movements,Centroid Cal-culations, and Net Integml Calculations.

Centroid Calculation

The vendor-supplied Centroid Calculation func-tion requireathat the cursor be positioned withinthe selected ROI. This subroutine directs the pro-gram to another subroutine that moves the cur-sor, as well as invokesthe centroid calculationfunc-tion. The calculated centroid value then is con-verted from packed binary coded decimal into reg-ular decimal notation for use in subsequentcalcula-tions.

9

Page 13: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

Net Integral Calculation

The vendor-supplied Integmd Calculation func-tion is invoked and read (PEEK-cd) out of mem-ory by this subroutine. The value then is con-verted from a binary number into decimal nota-tion for subsequent manipulation.

10

Page 14: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

APPENDIX B. PROGRESS: THE COMPLETE PROGRAM

10 KEY OFF20 SCREEN 0,0,030 DEF SEG40 REM50 REM60 REM70 REM80 REM90 REM100REM110REM120 REM130REM140REM150REM160REM170REM180REM190REM200 REM210 REM220 REM230 REM240 REM

ON-LINE GAMMAMONITOR FORANION EXCHANGE SEPARATION PROCESS

using the PERSONAL COMPUTER ANALYZER (PCA-2000)SYSTEMfrom THE NUCLEUS, Inc., Oak Ridge, Tennessee

programmed by

NOAH G. POPE

NUCLEAR MATERIALS PROCESSTECHNOLOGY GROUP (MST-12)RESEARCH, DEVELOPMENT, AND DEMONSTRATION SECTIONLOS ALAMOSNATIONAL LABORATORYLOS ALAMOS,NM 87545

MARCH, 1987

250 REM************************************●**********************************260 REM***********************************************************************270 REM280 REM290 REM**************************************●********************************300 REM*****************SET UP WELCOMESCREEN ●******************************310 REM********************************************************e**************320REM330CLS340COLOR 13:LOCATE3,23:PRINT”P”:COLOR1l:LOCATE 3,24:PRINT”1 utoni u m“350COLOR 13:LOCATE5,23:PRINT”R”:COLOR1l:LOCATE 5,24:PRINT”C cover y’360COLOR 13:LOCATE7,23:PRINT”O”:COLOR1l:LOCATE 7,24:PRINT”pe ra t i ons370 COLOR 13:LOCATE 9,23:PRINT”GW:COLOR11:LOCATE9,24:PRINT”a m m a“380 COLOR 13:LOCATE 11,23:PRINT’’R”:COLOR11:LOCATE11,24:PRINT”a y“390 COLOR 13:LOCATE 13,23:PRINT’’E”:COLOR11:LOCATE13,24:PRINT” n e r g y“400 COLOR 13:LOCATE 15,23:PRINT’’S’’:COLOR1I:LOCATE 15,24:PRINT” p e c t r o s c o p y“410 COLOR 13:LOCATE 17,23:PRINT”S”:COLOR11:LOCATE17,24:PRINT” y s t e m“420 COLOR 14:LOCATE19,23:PRINT”NuclearMaterials Process Technology Group MST-12”430 LOCATE 20,23:PRINT’’Research,Development and Demonstration”440 COLOR 18:LOCATE22,23:PRINT”ENTERACCESSCODE:”450 LOCATE 22,40:COLOR16:INPUT ACCESS$460 REM470 RE~lllllllllll]l]]l[]lllllllllll]l][ll[lllllllllllllllllll]l[[lllllllll480 REM490 REM ACCESSIS A STRING VARIABLE THAT CAN BE CHANGED IN THIS SECTION.500 REM510 REMllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll

Page 15: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

520 REM530 REM540 IF ACCESS$=”GAMMA”THEN 580550 BEEP:BEEP560 LOCATE 23,23:COLOR 1O:PRINT”INCORRECT-RE-ENTER CODE”570 GOTO 440580 REM590 COLOR 11600 LOCATE 23,23:PRINT” n

610 REM620 REMlllllllllllllllll[llllllllllllllllllllllllllllllilllllllllillllllll[630 REM640 REM BRANCH TO THE PARAMETER SETTING LOOP OR TO DEFAULT650 REM COLUMN MONITOR (MAIN PROGRAM BODY).660 REM670 RE~lJlllll//llllllllllllllllljl/lllllllllllllllljllllllllllll/l]/llll[l680 REM690 LOCATE 22,23:INPUT”ENTER OPTION: (1) SET PARAMETERS or (2) MONITORCOLUMN:”,CHOOSE.OPTION$700 REM710 IF CHOOSE.OPTION$=”l”THEN 780720 IF CHOOSE.0PTION$=”2”THEN 1110730 BEEP:BEEP740 LOCATE 23,23:COLOR 1O:PRINT”INCORRECT-RE-ENTER CODE”750 GOTO 690760 END770 REM780 REM**************************************●******************************790 REM**************PARAMETER !jETTING Loop ***** **************************800 REM** ********************************** ●*******************************810 CLS820 COLOR 12830 LOCATE 3,23:PRINT’P R O G R E S S Parameters”840 COLOR 14850 LOCATE 5,23:PRINT”Input values at the following prompts.”860 LOCATE 6,23:PRINT”(Defau1t values are in parentheses.)”870 COLOR 14:LOCATE 22,23:PRINT”Nuclear Materials Process Technology Group (MST-12)”880 LOCATE 23,23:PRINT”Research, Development and Demonstration”890 COLOR 10900 LOCATE 8,23:INPUT”PLOTTER PAPER ADVANCE INTERVAL (6)=”;ADVANCE.INTERVAL910 IF ADVANCE.INTERVAL=O THEN ADVANCE.INTERVAL=6920 PAPER.ADVANCE=12930 COLOR 11940 LOCATE 10,23:INPUT”PRESET TIME IN SECONDS (30)=”;PRESET.TIME950 IF PRESET.TNVIE=OTHEN PRESET.TIME=30960 COLOR 12970 LOCATE 12,23:INPUT”1ST Ba ROI LEFT SIDE in channels (338)=”;BA. I.ROISTART980 IF BA. I.ROISTART=O THEN BA.1.ROISTART=338990 LOCATE 13,23:INPUT”1ST Ba ROI RIGHT SIDE in channels (356)=”;BA.1.ROIEND1000IF BA.1.ROIEND=O THEN BA.I.ROIEND=3561010COLOR 131020LOCATE 15,23:INPUT”2ND Ba ROI LEFT SIDE in channels (1538)E”;BA.2.ROISTART1030IF BA.2.ROISTART=0 THEN BA.2.ROISTART=15381040LOCATE 16,23:INPUT”2ND Ba ROI RIGHT SIDE in channels (1557)=”;BA.2.ROIEND

Page 16: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

1050IF BA.2.ROIEND=0 THEN BA.2.ROIEND=15571060COLOR 141070”LOCATE 18,23:INPUT”D0 YOU WANT TO MAKE A CORRECTION?”;CORRECTION$1080IF CORRECTION$=”Y” OR CORRECTION$=”y” THEN 7701090REM1100GOTO 13101110REM** ******************************* ●**********************************1120REM********************* DEFAULT PARAMETERS ●***************************1130REM*********************************************************************1140REM1150REM THESE DEFAULT PARAMETERS ARE FOR A HOUSTON INSTRUMENTS PLOTTER1160REM AND FOR A SPECIFIC DETECTOR.1170REM1180ADVANCE.INTERVAL=6 ‘DETERMINES THE SPACING BETWEENDATA POINTS1190PAPER.ADVANCE=12 ‘ DETERMINES THE PLOTTER STARTING POINT1200PRESET.TIME=30 ‘ PRESET TIME (IN SECONDS)1210BA.1.ROISTART=338 ‘ LEFT SIDE OF THE 81-KcV ROI1220BA.1.ROIEND=356 ‘ RIGHT SIDE OF THE 81-KcV ROI1230BA.2.ROISTART=1538 ‘ LEFT SIDE OF THE 356-KcV ROI1240BA.2.ROIEND=1557 ‘ RIGHT SIDE OF THE 356-KcV ROI1250REM1260REM THESE PARAMETERS SHOULD BE CHANGED AT THE SOURCE CODE LEVEL1270REM IF THIS PROGRAM IS TO BE USED ON A NEWSYSTEM.1280REM1290REM*****************************************●***************************1300REM1310REM1320LPRINT “;:V3 AD PI 8,0,8,1900U “1330LPRINT “;:8,440 D 0,440 U 0,880 D 8,880 U 8,1319 D 0,1319 U 0,1759 D 8,1759U“1340REM1350ADVANCE =PAPER.ADVANCE1360REM1370REM************************************●*******************************1380REM************SET UP AND INITIALIZE PCA DISPLAY ********************1390REM***************************************●****************************1400REM1410CLS1420REM1430SCREEN 2 ‘ HIGH RESOLUTION GRAPHICS1440F=2 ‘ DISPLAY INITIALIZATION1450GOSUB 6430 ‘ GOTO POKING SUBROUTINE1460F=3 ‘ PARAMETERS UPDATE1470GOSUB 6430 ‘ GOTO POKING SUBROUTINE1480F=4 ‘ SPECTRUM UPDATE1490GOSUB 6430 ‘ GOTO POKING SUBROUTINE1500REM

MODE

ljl(j REM-* ********************************* ●*********************************1520REM*********************** SET PRESET TIME ●*************************1530REM** ********************************** ●*********************************1540REM1550REM PRESET TIME WILL BE 30 SECONDS.1560REM1570REM THE ACQUISITION PRESET TIME FUNCTION IS A1580REM 3-BYTE PACKED BINARY CODED DECIMAL.

13

Page 17: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

1590REM1600PT=PRESET.TIME1610REM1620PTl=INT(PT/10000) ‘ BCD NUMBER FOR ONES AND TENS1630PT2=INT((PT-PTl* 10000)/100) ‘ BCD NUMBER FOR HUNDREDS & THOUSANDS1640PT3=INT(PT-PT1* 1OOOO-PT2*IOO) ‘ BCD # FOR 10 THOUSANDS AND 100 1000’S1650REM1660REM1670REM CONVERT DECIMAL VALUES TO HEX.1680REM1690PTl=INT(PT1/lO) *16+INT(PT1-(INT( PTI/10)*16)*( 10/16))1700PT2=INT(PT2/10)* 16+INT(PT2-(lNT( PT2/10)”16)”(10/16))1710PT3=INT(PT3/10)* 16+INT(PT3-(INT(PT3/10)* 16)*(10/16))1720REM1730BYTE1=PT3 ‘ ASSIGN VARIABLES TO PACK BCD NUMBERS1740BYTE2=PT21750BYTE3=PTI1760REM1770F=141 ‘ ACQUISITION PRESET TIME FUNCTION NUMBER1780REM1790GOSUB 6140 ‘ GOTO SUBROUTINE TO REPLACE VALUE IN MEMORY1800REM1810F-25 ‘ PHA PRESET, ELAPSED AND REMAINING TIME DISPLAY1820REM THIS MUST BE CALLED TO COMPLETE THE TIME SELECTION.1830REM1840GOSUB 6430 ‘ GOTO POKING SUBROUTINE1850REM1860REM** ********************************** ***** ***************************187(IREM*************** END pRESET TIME SETTING **************************1880REM** *********************************** ***** **************************1890F=1581900GOSUB 59001910PRINT VALUEO,VALUEI,TOTAL1920IF VALUEO=l THEN 19701930F=391940GOSUB 65201950GOTO 18901960REM1970REM** ************************************ ●****************************81980REM******************* SET BA ROIS ●**********************************

1990REM** ********************************** ***** ***************************2000 REM2010 REM2020 REM2030REM BA.I.ROISTART, BA.1.ROIEND, BA.2.ROISTART, AND BA.2.ROIEND2040 REM ARE DEFINED IN THE PARAMETERS LOOP OR IN THE DEFAULT SECTION,2050 REM2060 REM THE REST OF THE ROI SETTINGS ARE DEPENDENT ON THESE TWO ROIS.2070 REM THEY SHOULD BRACKET THE Ba-133 81-KeV AND 356-KcV PEAKS.2080 REM2090REM THE ENERGY CALIBRATION PERFORMED WITH THESE PEAKS2100 REM IS USED TO CALCULATE THE CHANNEL # FOR THE REMAINING ROIs.2110 REM2120 REM

14

Page 18: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

2130 ROISTART=BA.1.ROISTART:ROIEND=BA.I.ROI END ‘Ba-1332140 REM2150 GOSUB 5620 ‘ GOTO THE SET ROI SUBROUTINE2160 REM2170 ROISTART=BA.2.ROISTART:RC)IEND=BA.2eRoI END ‘Ba-1332180 REM2190 GOSUB 5620 ‘ GOTO THE SET ROI SUBROUTINE2200 REM2210 REM2220 REM

80.998KcV PEA]

356.005KeV PE1

223o RAW** ********************************* ●*******************************

2240 REM******************** END SET Ba ROI.S●******************************2250 REM********************************************************************2260REM2270 REM2280REM*******************************************************************2290 REM****************** CALCULATE Ba CENTROIDS ●*************************2300REM********************************************************************2310REM2320 REM2330 REM GOTO.BA.1 AND GOT0.BA,2 ARE VARIABLES THAT CALCULATE234023502360237023802390240024102420243024402450246024702480249025002510252025302540255025602570

REM THEMIDPOINTSOFTHE TWOBaROIs.REMREM THE CURSOR MUSTBEINSIDE AN ROIBEFORE THECENTROIDREM CANBECALCULATED.REMGOTO.BA.l=INT(((BA.l.ROIEND-BA.l.ROISTART)/2)+BA.I.ROISTART)GoTo.BA.2=INT(((BA.2.RoIEND-BA.2.RoIsTART)/2)+BA.2.RoIsTART)REMREMREM THE FOLLOWING STATEMENTS DETERMINE THE VALUES OFTHIREM 2-BYTE BINARY NUMBERS THAT INDICATE THE CURRENTREM CHANNEL NUMBEROFTHE CURSOR.REMREMIF GOTO.BA.I>256THEN GOSUB 7840IF GOT0.BA.1<256THEN GOSUB 7880IF GOT0.BA.1=256THEN GOSUB 7920REMREMREMREMGOSUB6720 ‘GOTOTHE READCENTROID SUBROUTINEREMBACENT1=C ‘ CHANNEL NUMBER OF THE FIRST Ba CENTROID

2580 REM2590 REM2600 IF GOTO.BA.2<1280 THEN GOSUB 7960 ‘BYTE1=GOT0.BA.2 - 1024AND BYTE22610 IF GOTO.BA.2>1280 AND GOTO.BA.2<1536 THEN GOSUB 8010 ‘BYTE1=GOTOJBYTE2=52620 IF GOTO.BA.2>1536 THEN GOSUB 8060 ‘BYTEI=GOTO.BA.2 - 1536AND BYTE:2630 REM2640 GOSUB 6720 ‘ GOTO THE READ CENTROID SUBROUTINE2650 REM

15

Page 19: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

26602670268026902700271027202730274027502760277027802790280028102820283028402850286028702880289029002910292029302940295029602970298029903000301030203030304030503060307030803090310031103120

BACENT2=C ‘ CHANNEL NUMBER OF THE SECOND Ba CENTROIDREMREMDELTAENERGY=275.017 ‘ 356.005KeV -80.998 KeV = 275.017KeVREMDELTACHANNEL=BACENT2 -BACENT1 ‘ DIFF IN CHANNELS BETWEEN TWO CENTROIDSREMREMRE~llll]llll]lljlllllllllllllllllllllllllljllllllllll]llllllllllllllllllREMREM CALCULATE ENERGY CALIBRATIONREMRE~]l]lllllllllllllll]l]l]]]l\lll]]ll]ll]llllllllll]l]]]]]]]]]]]]]]]]l]lREMREMREM ENERGY CALIBRATION EQUATION:REMREM Y = mX + bREMREM orREMREM CHANNEL NUMBER = (SLOPE)(ENERGY OF PEAK) + YINTERCEPTREMREMREM CALCULATE THE SLOPEREMSLOPE=DELTACHANNEL/DELTAENERGYREMREM CALCULATE THE YINTERCEPTREMYINTERCEPT=BACENT2-(SLOPE*356.005)REMREM CALCULATE THE CHANNEL NUMBERS OF ALL THE CENTROIDS.REMAMSTR=INT(SLOPE* 56.784+YINTERCEPT) ‘ LEFT SIDE OF Am ROIAMEND=INT(SLOPE*61 .084+YINTERCEPT) ‘ RIGHT SIDE OF Am ROIREMPUSTR=INT(SLOPE* 127.447+YINTERCEPT) ‘ LEFT SIDE OF 1st PU ROIPUEND=INT(SLOPE* 130.887+YINTERCEPT) ‘ RIGHT SIDE OF 1st pu ROIREMUSTR=INT(SLOPE*205 .505+YINTERCEPT) ‘ LEFT SIDE U ROIUEND=INT(SLOPE*209.59 I+YINTERCEPT) ‘ RIGHT SIDE OF U ROIREMPU2STR=INT(SLOPE*41 0.796+YINTERCEPT) ‘ LEFT SIDE OF 2nd Pu ROIPU2END=INT(SLOPE*41 5.798+YINTERCEPT) ‘ RIGHT SIDE OF 2nd PU ROIREMREM

3130REM** ********************************** ●*******************************3140REM***************** SET REGIONS OF INTEREST ●*********************3150 REM***************** PARAMETERS ●*********************3160REM** ************************************* ●****************************3170 REM3180 REM3190 REM SET FIRST ROI ABOUT Am-241 59.5-KeV PEAK.

16

Page 20: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

32003210322032303240325032603270328032903300331033203330334033503360337033803390340034103420343034403450346034703480349035003510352035303540355035603570

REMROISTART=AMSTR:ROIEND= AMENDREMGOSUB 5620 ‘ GOTO THE SET ROI SUBROUTINEREMREMREM SET SECOND ROI ABOUT Pu-239 129.3-KeV PEAK.REMROISTART=PUSTR: ROIEND=PUENDREMGOSUB 5620 ‘ GOTO THE SET ROI SUBROUTINEREMREMREM SET THIRD ROI ABOUT U-237 208-KeV PEAK.REMROISTART=USTR:ROIEND=UENDREMGOSUB 5620 ‘ GOTO THE SET ROI SUBROUTINEREMREMREM SET FOURTH ROI ABOUT Pu-239 414-KeV PEAK.REM‘ROISTART=PU2STR: ROIEND=PU2ENDREM‘GOSUB 37700 ‘ GOTO THE SET ROI SUBROUTINEREMREMREM** ********************************* ●********************************REM****************** END SET ROI PARAMETERS ●*********************REM** ****************************** ●***********************************REMREMRED@*********** ********************* ●**********************************REM*******************START DATA ACQUISITION ***********************REM*************************************●******************************REMREMF=6 ‘ ERASE SPECTRAL DATA

3580 REM3590GOSUB 6540 ‘ GOTO POKING SUBROUTINE3600 REM3610 REM3620BEEP3630REM3640 F=5 ‘ DATA ACQUISITION START/STOP3650REM3660GOSUB 6430 ‘ GOTO POKING SUBROUTINE3670368036903700371037203730

REhiREMReef* *******************************●***********************************REM***********************pLOTTING Loop *****************************RE~*******************************************************************DEFSEGADVANCE=ADVANCE+ADVANCEINTERVAL

17

Page 21: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

3740 IF AM241=0 THEN AM241=13750 IF PU241=0 THEN PU241=I3760 IF U237=0 THEN U237=I3770 AM241ADJ=INT(LOG( AM241/PRESET.TIME)*200)3780 PU241ADJ=INT(LOG(PU241 /PRESET.TIME)*200)3790 U237ADJ=INT(LOG( U237/PRESET.TIME)*200)3800 IF AM241ADJ<1 THEN AM241ADJ=I3810IF PU241ADJ<1 THEN PU241ADJ=13820 IF U237ADJ<1 THEN U237ADJ=13830 REM** ****************************************** ●**********************e*3840 REM HOUSTON INSTRUMENTS MODEL #695 PLOTTER SUBROUTINE3850 REM3860LPRINT “;: A PI”+STR$(ADVANCE)+”,’+STR$(AM241ADJ)+”S12 A “3870 LPRINT “;: A P2”+STR$(ADVANCE) +”,”+STR$(PU241ADJ)+”S12 P y3880LpRINT “;: A P3”+STR$(ADVANCE)+N,”+STR$(U237ADJ)+”S12 U—y3890IF TRIGGER=l THEN LPRINT “;: A P3”+STR$(ADVANCE)+”,I 885”+”S12l—”3900 LPRINT “;: “+STR$(ADVANCE+ 1000)+”,”+STR$(U237ADJ)3910 REM3920TRIGGER=O3930 REM3940 REM3950 REM3960 REM3970 F=3 ‘ PARAMETERS UPDATE FUNCTION3980 REM3990GOSUB 6430 ‘ GOTO POKING SUBROUTINE4000 REM4010 INTERUPT$=INKEY$4020 REM4030 IF INTERUPT$=CHR$(0)+CHR$(l 13) THEN 8390 ‘GOTO MENU4040 REM4050 IF INTERUPT$=CHR$(0) +CHR$(1O4) THEN TRIGGER=l4060 REM4070IF TRIGGER= I THEN SOUND 4000,24080 REM4090 REM BEGIN CHECKING LOOP FOR DATA ACQUISITION FLAG ON/OFF.4100 REM4110 F-4 ‘ SPECTRUM UPDATE FUNCTION4120 REM4130 GOSUB 6430 ‘ GOTO POKING SUBROUTINE4140 REM4150 REM4160 REM4170 F=140 ‘ CHECK ACQUISITION FLAG FOR PRESET TIME-OUT4180 REM4190 GOSUB 5910 ‘ GOTO PEEKING SUBROUTINE4200 REM4210 IF VALUEO=O THEN 3970 ‘ A VALUE OF “O”MEANS SYSTEM IS ACQUIRING DATA4220 REM4230 CLS4240 REM4250 REM4260 REM** ********************************* ●********************************4270 REM******************** END DATA ACQUISITION ************************

18

Page 22: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

4280 RE~*******************************************************************4290REM4300REM4310 REM*******************************************************************4320REM********* MOVEINTOROISAND CALcIJLATE NET INTEGRAL ●*************4330 REM********************************************************************4340REM4350REM4360REM CALCAMCENT, CALCPUCENT, CALCUCENT andCALCPU2CENT ARE4370REM VARIABLES USEDTOENTER EACHROI4380REM TO CALCULATEEACHNET INTEGRAL.4390REM4400REM4410REM4420REM GOTOCHANNEL #COLCAMCENT, Am-241 PEAK 59.5KeV4430REM4440 CALCAMCENT=INT(SLOPE*59.5+YINTERCEPT) ‘CALCCHANNELFOR 59.5KcV4450REM4460REM44701FCALCAMCENT<256 THENGOSUB 814044801FCALCAMCENT=256 THENGOSUB816044901FCALCAMCENT>256 THENGOSUB81804500REM451OGOSUB768O ‘GOTONET INTEGRAL READING SUBROUTINE4520REM4530 AM241.TOTALNET ‘Am-241 IS THE NETINTEGRALVALUE FORTHATROI4540REM4550REM4560REM4570REM GOTO CHANNEL #CALCPUCENT, Pu-239 PEAK 129.3KeV4580 REM4590 CALCPUCENT=INT(SLOPE* 129.3+YINTERCEPT) ‘ CALC CHANNEL # FOR 129.3KeV4600 REM4610 IF CALCPUCENT<512 THEN GOSUB 82004620 IF CALCPUCENT=512 THEN GOSUB 82204630 IF CALCPUCENT>512 THEN GOSUB 82404640 REM4650 GOSUB 7680 ‘ GOTO NET INTEGRAL READING SUBROUTINE4660 REM4670 PU239=TOTALNET ‘ Pu-239 IS THE NET INTEGRAL VALUE FOR THAT ROI4680 REM4690 REM4700 REM4710 REM GOTO CHANNEL #CALCUCENT, U-237 PEAK, 208.0KcV4720 REM4730 CALCUCENT=INT(SLOPE*208 +YINTERCEPT) ‘ CALC CHANNEL NUMBER FOR 208 KeV4740 REM4750IF CALCUCENT<768 THEN GOSUB 82604760 IF CALCUCENT=768 THEN GOSUB 82804770 IF CALCUCENT>768 THEN GOSUB 83004780 REM4790GOSUB 7680 ‘ GOTO THE NET INTEGRAL READING SUBROUTINE4800 REM4810 U237=TOTALNET ‘ U-237 IS THE NET INTEGRAL VALUE

19

Page 23: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

4820 REM4830 REM4840 REM4850 GOTO 49904860 REM4870 REM GOTO CHANNEL #CALCPU2CENT, Pu-239 PEAK, 413.7KeV4880 REM4890 CALCPU2CENT=INT(SLOPE*413.7+YINTERCEPT) ‘ CALC CHANNEL # FOR 413.7KeV4900 REM4910 IF CALCPU2CENT<1792 THEN GOSUB 83204920 IF CALCPU2CENT=1792 THEN GOSUB 83404930 IF CALCPU2CENT>1792 THEN GOSUB 83604940REM4950 REM4960 GOSUB 7680 ‘ GOTO THE NET INTEGRAL READING SUBROUTINE4970 REM4980 PU239N02=TOTALNET ‘ PU-239N02 IS THE NET INTEGRAL VALUE4990 REM5000 REM50]o REM** ********************************** ***** ***************************5020REM************** cLEAR ROI’S AND RETURN TO THE **********************5030 REM***************** BEGINNING OF THE PROGRAM *************************5040REM** ********************************** ●*******************************5050 REM5060 REM5070 REM5080 ROICLEARSTR=AMSTR-l: ROICLEAREND=AMEN D+l ‘ CLEAR Am ROI5090REM5100 GOSUB 5760 ‘ GOTO ROI CLEAR SUBROUTINE5110 REM5120 REM5130 ROICLEARSTR==PUSTR-l:ROICLEAREND=PUEND+1 ‘ CLEAR pu ROI5140 REM5150 GOSUB 5760 ‘ GOTO ROI CLEAR SUBROUTINE5160 REM5170 REM5180 ROICLEARSTR=USTR-I:ROICLEAREND=UEND+1 ‘ CLEAR U ROI5190 REM5200 GOSUB 5760 ‘ GOTO ROI CLEAR SUBROUTINE5210 REM5220 REM5230‘ROICLEARSTR=PU2STR-I:ROICLEAREND=PU2END+l ‘ CLEAR 2nd PU SUBROUTINE5240 REM5250 ‘GOSUB38900 ‘ GOTO ROI CLEAR SUBROUTINE5260REM5270 REM5280 CLS5290 REM5300 REMllllll[lllllllllllllllllllll[[[llllllllllllllllllllllllllllllllllll5310 REM5320 GOTO 2280 ‘ RETURNS TO THE SET Ba SUBROUTINE5330 REM5340 REMlllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll5350 REM

20

Page 24: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

53605370538053905400541054205430544054505460547054805490550055105520553055405550556055705580559056005610562056305640565056605670568056905700571057205730574057505760577057805790580058105820>

REMREMREMREMREMREM END MAIN BODY OF PROGRAMREM END MAIN BODY OF PROGRAMREM END MAIN BODY OF PROGRAMREMREMREMREMREMRE~MWWNumNNNVuWMmWmNnnNWWwHWuWMnNm"""""""""""""""""""""""""""""""""""W""REm""""W"WW"""W""n"N""""WW"""WNNm""WW""""""""""""""""""""""""ww"""""REMREM BEGIN SECTION CONTAININGREM ALLSUBROUTINESIN PROGRAMREMRE~nnmumnmNWnWWNmmRnmWmNwm""""""""m"""""""""""""""""""""""""""""""""""""RE~nnNnNNNNWWWwnNNmWWamW*wWHn"NH"Hm-nm"nH"""""n"""""""""""""""""""""""REMREM*******************************************************************Red@****************SET REGIONS OF INTEREST **********************REM***************** SUBROUTINE **********************REM********************************************************************DEFSEG=&HEOOOFOR I=ROISTARTTOROIENDROI=PEEK(I*4 +3)IF ROI>127 THEN 5680ROI=ROI+128POKE (I*4+3),ROINEXTIREM*****************e*************************************************REM****************END SET ROI SUBROUTINE ●**********************REM*******************************************************************RETURNREM**********************************************************************REM*********************CLEAR ALL Rok SUBROUTINE ●********************

RE~*********************************************************************REMDEFSEG=&HEOOOFOR ROICLEAR=ROICLEARSTR TOROICLEARENDROI=PEEK(ROICLEAR*4+3)IF ROI<128 THEN 5830ROI=ROI-128POKE(ROICLEAR*4+3).ROI

5830NEXT’ROICLEAR ‘-5840REM5850REM**********************************************************************5860 REM**********************************************************************5870RETURN5880REM**********************************************************************5890REil@********************* PEEKING SUBROUTINE ●*************************

21

Page 25: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

5900 REM** ******************************** ●***********************************5910 REM5920 REM5930 REM5940 DEFsEG=&Ho5950 PCAOFFSET=PEEK(&H3C9)*2S6 +PEEK(&H3C8)5960 PCASEG=PEEK(&H3CB)*256 +PEEK(&H3CA)5970 PCAFUNN= PCAOFFSET+35980DEFSEG=PCASEG5990 DEFUSR=PCAOFFSET6000POKE PCAFUNN,F6010 X=USR(O)6020 PARMOFFSET=PEEK(PCAFUNN+2)*256 +PEEK(PCAFUNN+l)6030 PARMSEG=PEEK(PCAFUNN+4)*256 + PEEK(PCAFUNN+3)6040 DEF SEG=PARMSEG6050 VALUEO=PEEK(PARMOFFSET)6060 VALUE 1=(PEEK(PARMOFFSET+ 1))*2566070TOTAL=VALUEO+VALUE16080RETURN6090 REM6100 REM** ************************************ ***** ***************************6110 REM******************** END pEEKING SUBROUTINE ●***********************6120 REM** **************************************** ●***************************6130 REM6140 REM6150 REM** ************************************** ●*****************************6160 REM**************** SUBRC)UTINE TO REpLAcE VALUE IN MEMORY ●**************6170 REM********************** USING THE pOKE FUNcTION *********************6180 REM** ************************************ ●*******************************6190 REM6200 REM6210 REM SUBROUTINE TO REPLACE VALUE IN MEMORY OFFSET6220REM USING THE POKE FUNCTION6230 REM6240 REM6250 DEF SEG=&HO6260 PCAOFFSET=PEEK(&H3C9)*256 + PEEK(&H3C8)6270 PCASEG=PEEK(&H3 CB)*256 +PEEK(&H3CA) s6280 PCAFUNN= PCAOFFSET+36290 DEF SEG=PCASEG6300 DEF USR=PCAOFFSET6310 POKE PCAFUNN,F6320 X=USR(O)6330 PARMOFFSET=PEEK( PCAFUNN+2)*256 +PEEK(PCAFUNN+l)6340 PARMSEG=PEEK(PCAFUNN+4)*256 + PEEK(PCAFUNN+3)6350 DEF SEG=PARMSEG6360 VALUEO=PEEK(PARMOFFSET)6370 VALUE 1=(PEEK(PARMOFFSET+ 1))*2566380TOTAL=VALUEO+VALUEI6390 POKE PARMOFFSET,BYTEI6400 POKE (PARMOFFSET+1),BYTE26410 POKE (PARMOFFSET+2),BYTE36420 RETURN6430 REM

22

Page 26: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

6440RE~*********************************************************************6450 Red@************* END SUBROUTINE TO REpLAcE MEMORY VALUE ●*****e*********6460 REM*********************************************************************6470REM6480REM6490REM6500 REM**********************e********e*************************************6510 REM*********************** POKING Subroutine ●**************************6520 RE~********************************************************************6530 REM6540REM6550 DEFSEG=&H06560 PCAOFFSET=PEEK(&H3C9)*256 +PEEK(&H3C8)6570 PCASEG=PEEK(&H3CB)*256 +PEEK(&H3CA)6580 PCAFUNN= PCAOFFSET+36590 DEFSEG=PCASEG6600 DEFUSR=PCAOFFSET661OPOKEPCAFUNN,F6620 X=USR(0)6630RETURN6640REM665OREM*******************************************************************6660 REM********************* END POKING Subroutine ●***********************667OREM*******************************************************************6680REM6690REM6700REM6710REM6720 REM*******************************************************************6730 REh@*************** READ CENTRC)ID Subroutine ●************************674OREhi********************************************************************6750REM6760REM6770DEFSEG6780 F=1556790 GOSUB 61406800 F=34681OGOSUB643O6820 F=156830 GOSUB 65506840REM6850 F=1696860 DEFsEG=&Ho6870 PCAOFFSETY=PEEK(&H3C9)*256 +PEEK(&H3C8)6880 PCASEG=PEEK(&H3CB)*256 +PEEK(&H3CA)6890 PCAFUNN= PCAOFFSET+36900 DEFSEG=PCASEG6910DEF USR=PCAOFFSET6920POKEPCAFUNN,F6930X=USR(0)6940 PARMOFFSET=PEEK(PCAFUNN+2)*256 +PEEK(PCAFUNN+l)6950 PARMSEG=PEEK(PCAFUNN+4)*256 +PEEK(PCAFUNN+3)6960 DEFSEG=PARMSEG6970 A=PARMOFFSET

23

Page 27: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

6980 C1=PEEK(A)6990 CIU=INT(C1/16)7000CIL=C1-(CIU*16)7010REM7020 REM7030C2=PEEK(A+1)7040C2U=INT(C2/16)7050C2L=C2-(C2U*16)7060 REM7070REM7080C3=PEEK(A+2)7090C3U=INT(C3/16)7100C3L=C3-(C3U*16)7110 REM7120REM7130 C4=PEEK(A+3)7140C4U=INT(C4/16)7150 C4L=C4-(C4U*16)7160 REM7170 REM7180C5=PEEK(A+4)7190C5U=INT(C5/16)7200 C5LUC5-(C5U*16)7210 REM7220 REM CM=CENTROID MANTISSA7230 REM7240CM=CIL+CIU*10+C2L* 1OO+C2U*1000+C3L*10000+C3U* IOOOOO!+C4L*1000OOO!+C4U*1E+07+C5L*10000-oooo#7250 REM7260REM CE=CENTROID EXPONENT7270CE=PEEK(A+5)7280 C=CM/(10”(9-CE))7290RETURN7300 REM7310 REM** ****************************************** ************************7320 REM************* END CENTROID READING subroutine ********************7330RAW** ********************************** ●******************************7340REM7350REM** ************************************ ●*****************************7360 REM************ NET INTEGRAL READING SUBROUTINE ●********************7370 REM********************************************************************7380 REM7390 F-157400GOSUB 65307410DEFsEG=&Ho7420 PCAOFFSET=PEEK(&H3C9)*256 +PEEK(&H3C8)7430 PCASEG=PEEK(&H3CB)*256 +PEEK(&H3CA)7440PCAFUNN= PCAOFFSET+37450 DEFSEG=PCASEG7460 DEFUSR=PCAOFFSET7470POKEPCAFUNN,1667480 X=USR(0)7490 PARMOFFSET=PEEK(PCAFUNN+2)*256 +PEEK(PCAFUNN+l)7500 PARMSEG=PEEK(PCAFUNN+4)*256 +PEEK(PCAFUNN+3)7510 DEFSEG=PARMSEG7520 NETO=PEEK(PARMOFFSET)7530 NET1=(PEEK(PARMOFFSET+ 1))*256

24

Page 28: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

7540NET2=(PEEK(PARMOFFSET+2))*65536!7550NET3=(PEEK(PARMOFFSET+ 3))*16772216#7560TOTALNET=NETO+NETI +NET2+NET37570 REM7580 REM7590 F=1677600GOSUB 59007610 IF VALUEO>O THEN TOTALNET=O7620RETURN7630 REM7640RED@*********** ********************** ●********************************7650REM*************** END NET INTEGRAL READING SUbrOUtine ●************7660REM** ************************************ ***** ************************7670 REM7680REM7690 REW*************e****************************************************7700 REM**************** BRANCHING SUBROUTINE FC)R READING ●****************7710REIvP************************ NET INTEGRALs ***************************7720 RE~******************************************************************7730REM7740 REM7750 F=1557760 GOSUB 61407770 F=347780 GOSUB 64307790GOSUB 7340 ‘BRANCHESTOTHENET INTEGRAL READING SUBROUTINE7800REM781OREM7820REM7830RETURN7840 BYTE1=GOT0.BA.I -2567850 BYTE2=17860BYTE3=07870RETURN7880 BYTE1=GOT0.BA.17890 BYTE2=07900 BYTE3=07910RETURN7920 BYTE1=2557930 BYTE2=07940BYTE3=07950RETURN7960REM7970 BYTE1=GOT0.BA.2 - 10247980 BYTE2=47990 BYTE3=08000RETURN801OREM8020BYTE1=GOT0.BA.2- 12808030BYTE2=58040 BYTE3=08050RETURN8060REM8070BYTEI=GOT0.BA.2-15368080 BYTE2=68090BYTE3=0

25

Page 29: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

PROGRESS continued

8100RETURN8110 REM8120 REM BREAK INTO BYTE-SIZE PIECES.8130 REM8140 BYTE1=CALCAMCENT:BYTE2=O:BYTE3=08150RETURN8160 BYTE I=O:BYTE2=I:BYTE3=08170RETURN8180BYTE I=CALCAMCENT-256:BYTE2= I:BYTE3=08190RETURN8200BYTE1=CALCPUCENT-256:BYTE2=1:BYTE3=08210RETURN8220BYTE1=O:BYTE2=2:BYTE3=08230RETURN8240 BYTE1=CALCPUCENT-512:BYTE2=2:BYTE3=08250RETURN8260 BYTE1=CALCUCENT-512: BYTE2=2:BYTE3=08270RETURN8280 BYTE 1=O:BYTE2=3:BYTE3=08290RETURN8300 BYTEI=CALCUCENT-768 :BYTE2=3:BYTE3=08310RETURN8320BYTE1=CALCPU2CENT-1 536:BYTE2=6:BYTE3=08330RETURN8340 BYTE1=O:BYTE2=7 :BYTE3=08350RETURN8360 BYTE1=CALCPU2CENT-I 792:BYTE2=7:BYTE3=08370RETURN8380 REM8390REM INTERRUPT LOOP AND MENU.8400 REM8410 CLS8420SCREEN 0,0,08430COLOR 13:LOCATE 3,23:PRINT”P”:COLOR 1l:LOCATE 3,24:PRINT” 1u t o n i u m“8440COLOR 13:LOCATE 4,23:PRINT”R’’:COLOR 1I:LOCATE 4,24:PRINT” e c o v e r y“8450 COLOR 13:LOCATE 5,23:PRINT”O”:COLOR 1I:LOCATE 5,24:PRINT” P e r a t i o n s8460COLOR 13:LOCATE 6,23:PRINT”G’’:COLOR 11:LOCATE 6,24:PRINT” a m m a“8470COLOR 13:LOCATE 7,23:PRINT”R”:COLOR 11:LOCATE 7,24:PRINT” a y“8480COLOR 13:LOCATE 8,23:PRINT”E”:COLOR 11:LOCATE 8,24:PRINT” n e r g y“8490COLOR 13:LOCATE 9,23:PRINT’’S”:COLOR 11:LOCATE 9,24:PRINT” P e c t r o s c o P Y“8500COLOR 13:LOCATE 10,23:PRINT”S”:COLOR 11:LOCATE 10,24:PRINT” y s t e m“8510COLOR 14:LOCATE 12,23:PRINT”Nuclear Materials Process Technology Group MST-12”8520 LOCATE 13,23:PRINT”Research, Development and Demonstration”8530COLOR 10:LOCATE 17,23:PRINT’’(1) RESUME CURRENT PROCESS MEASUREMENT”8540COLOR 10:LOCATE 18,23:PRINT’’(2) START NEW PROCESS MEASUREMENT”8550COLOR IO:LOCATE 19,23:PRINT’’(3) QUIT AND RETURN TO DOS”8560COLOR 11:LOCATE 21,23:INPUT’’ENTER OPTION:”,NEXT.OPTION8570ON NEXT.OPTION GOTO 1380,330,85908580 IF NEXT.0PTION>3 OR NEXT.OPTION<I THEN 86208590 CLS8600 LOCATE 10,23:COLOR 11:PRINT” TYPE SYSTEM TO RETURN TO DOS”8610END8620SOUND 500,5:LOCATE 22,23:PRINT”INCORRECT OPTION. PLEASE RE-ENTER RESPONSE”8630GOTO 8530

26

Page 30: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

NTISPage Range Prim Code

wll.025 A020260S0 A03051.075 A04076.100 A05101-12s A06126.150 A07

Printed in the t.kited Stttes of AmetimAvtilable from

NmionaJ Technical Information ServiceUS Depwtment of Commerce

5285 Pod Royal RoadSpringfield,VA 22161

Microflchc (AO1)

Page RangeNTIS

P1’kt Cede Page RangeNTIS

Price Cm&NTIS

Page Rmnge Price Cede

1s1.17s176.200201.225226.2502S1.275276.300

A08A09A1OAllA12A13

301.325326.3sO351.375376400401.423426450

A14A15A16A17A18A19

4s147s A20476.500 A21501.s25 A22526.550 A23551-575 A24S76.600 A25M1l.up” A99

“Contact NTSS for ● price quote.

Page 31: REQUIREDBYCONTRACT - Federation of American · PDF fileWalls Project Los Alamos National ... byte binary or packed binary coded decimal (BCD) ... converter (ADC) and adjust as required

. .-3

L.,.,

‘.=. . .—

b~kllinos