.V‘IA- .‘ “(a A); outnv ‘ Farinw’VKt é . . muun. .s . . £3 .3)... 'K I .$;.-un.u.uh..zvu.... _ ”33”-... ‘. .CMDb ‘14.} i‘rL-gn Q 2 o | In I ‘I‘ti‘o \ Pvt Isu‘ Ho| l \1. ‘I. U. u. 1 t A ‘t o . Jvflnwnl4fl. .- .uflflmfifimflfll Argohluu .. f‘.fn.§8 IBM! qlpcfltgmwlufll;o . LSIIubulli' . V ‘ ’1- .“ ¢ vi It'- 'I ’ ,. n Lam!“ o‘$v.a§ifltfil.§1h Alkali. . “It . . o! .‘ . . t. o‘hfi‘ .. .o H. ~ 1 < 1 3v! . . v . I .u; . v . 0!» 1'3. It'v ' 1| ‘1'; I‘Itlii (f. I!’ ll Oo‘Jlov .0..t| (IO‘DV|I)K‘ U\. \s I .II’ 4"... ‘Jntrvj‘jjtdl..nn‘h.m|pf ‘Iv'. ‘ Ibl‘li TUNE” 9‘1. . IHIDNJAI. .H(\v.?‘(t‘«‘.v \ . I ttr‘fll‘ué‘tal.0o}.A..nnl.O’.|l|I!J In OI: . ~ . . ‘ ll", -0 III I III-Ill." ,i iifit’l‘l.‘ 0'41. luv” \h? J’,“hlu,l.lr ‘1’ \AI go‘t l {gf . ul: - Iv {film ‘3'”: 5-..-..‘1” dlll:‘\r‘v’lllupu.l.lflao \‘VI‘ if: o. .3911 :0 1 l . ‘DA "gfi‘t’n'ti 0,}.IU I.) - siiltlf I, .I i . o LIBRARY Michigan State University This is to certify that the dissertation entitled IMPROVING THE EFFICIENCY OF DATA COLLECTION FOR MASS SPECTROMETRY/MASS SPECTROMETRY presented by Michael Joseph Kristo has been accepted towards fulfillment of the requirements for Ph.D. demm Chemistry (Zn-f % fig Major professor Date September 9, 1987 MS U i: an Affirmative Action/Equal Opportunity Institution 0-12771 MSU LIBRARIES n RETURNING MATERIALS: Place in book drop to remove this checkout from your record. FINES will be charged if book is returned after the date stamped below. IMPROVING THE EFFICIENCY OF DATA COLLECTION FOR MASS SPECTROMETRY/MASS SPECTROMETRY By Michael Joseph Kristo A DISSERTATION Submitted to Michigan State University in partial fulfill-ant of the requirements for the degree of DOCTOR OF PHILOSOPHY Depart-eat of Cheniatry 1987 Copyright by MICHAEL JOSEPH IRISTO 1987 ABSTRACT IMPROVING THE EFFICIENCY OF DATA COLLECTION FOR MASS SPECTROMETRY/MASS SPECTROMETRY By Michael Joseph Kristo The development of triple quadrupole mass spectrometry (TOMS) has led to the widespread acceptance of mass spectrometry/mass spectrometry (MS/MS) as a useful analytical technidue. This dissertation explores improvements to the TOMS instrument and new types of TOMS experiments which improve the efficiency of data collection. These improvements in TOMS fall into four categories: improving the speed of computer control, improving the accuracy and speed of data reduction, improving the accuracy and dynamic range of ion current measurements, and improving the detection of collisionally assisted reaction (CAR) products. The speed of computer control has been improved with the development of two control systems, a multi- microprocessor control system and a system based on a high- speed FORTH processor. Both systems achieved faster scan speeds and greater amounts of signal averaging than conventional control systems. The task of reducing sequential intensity data to position/intensity pairs for each peak in the mass spectrum (peak-finding) is especially difficult in MS/MS, because of the increased dynamic range, the variable resolution, and Michael Joseph Kristo the varied peak shapes. However, several key features were found to increase the reliability of peak-finding algorithms for MS/MS. The speed of peak-finding was increased substantially with the design and implementation of a programmable electronic peak-finder. Simultaneous acquisition of analog and ion-counting data with a dual output continuous dynode ion multiplier was implemented. This dual mode control system achieves the full dynamic range available in MS/MS (10°) and provides absolute ion intensities. This system corrects errors in ion-counting due to pulse overlap and eliminates the effect of variations in multiplier gain with ionic species. A method of trapping ions and varying their average residence time in the central quadrupole of a TOMS instrument has been developed and characterized. Lengthening the residence time in the collision chamber increases the yield of stable CAR products and allows the observation of many products not seen in conventional CAR. ACKNOWLEDGMENTS I would like to thank Professor Chris Enke for his guidance on this project, as well as the freedom and support needed to bring it to fruition. I would also like to thank Professor Victoria McGuffin for the outstanding job that she did for me as second reader. I further acknowledge the challenging members of my committee- Professors David Fisher, Jack Watson, and William Reusch. Here also, I would like to acknowledge the help and guidance of my fathers in faith, Drs. Bruce Newcome and Carl Myerholtz. Their moral support and technical expertise helped me during the darkest days. Bruce was especially key to the finishing of the multiprocessor, the design of the hardware peak-finder, and the initial design of many of the instrument interfaces for the Novix control system. I would not have made it this far, though, without the help of my other friends and cohorts- Keiji Asano (the Ace- Man), Pete Palmer (Beware the Dwarvesl), Dan Sheffield (who is responsible for several drawings in this dissertation), Mike Nawrocki, and Chris Marsh, and the few women in my life, especially Karen Reeves who helped me make it through the past several months intact mentally (relatively). The good times that we shared helped make the bad times a little iii more bearable. I would especially like to thank my parents for their help and support. I also acknowledge the initial guidance of Dr. Frank Swicker of Christian Brothers High School, Memphis; the Chemistry electronics and machine shops; Marty Rabb, the departmental electrical engineer; El Azteco Restaurants, purveyors of fine food at reasonable prices; Charles Moore, for his genius in inventing the FORTH language; the proprietors of Paul Revere’s Tavern, home of the Big Mick; the Pepsi and Coca Cola bottlers of America, Coke Adds Life It’s the Real Thing; the makers of fine alcoholic beverages the world over; Domino’s Pizza ; and the many others behind the scenes who must remain nameless. Thank our Gracious Lord That’s Over. (Also for rain, sea, and much summer thunder.) iv TABLE OF CONTENTS LIST OF TABLES LIST OF FIGURES CHAPTER 1. A MULTIMICROPROCESSOR CONTROL SYSTEM FOR A TRIPLE OUADRUPOLE MASS SPECTROMETER 1. Background The Triple Quadrupole Mass Spectrometer Scan Modes Prototype TOMS Instrument Computer Control of the TOMS Instrument The Advantages of Multiprocessing TOMS Multiprocessor Controller 2. Completion of the Multimicroprocessor Control System Making the Multiprocessor System Work Improvement in Scanning Speed Troubleshooting a Multiprocessor System New Features 3. Conclusion CHAPTER 2. CONTROL OF A TRIPLE OUADRUPOLE MASS SPECTROMETER WITH A NOVIX FORTH PROCESSOR 1. Introduction 2. The Novix Approach History of Computer Architectures NC4000 Architecture 3. System Description Hardware Software 4. Results CHAPTER 3. A FAST, RELIABLE SOFTWARE PEAK-FINDING ROUTINE FOR MS/MS l. Peak-finding 2. Instrumentation and Software 3. The Algorithm Looking for a New Peak Updating the Maximum Peak Termination Further Notes on the Algorithm Comparison With Other Real-Time Algorithms Algorithm Testing Algorithm Performance Algorithm Speed . Conclusion <1th viii ix 38 38 41 41 43 46 46 62 64 83 83 91 92 93 95 96 98 100 103 105 114 114 CHAPTER 4. HARDWARE PEAK-FINDING FOR RELIABILITY AND INCREASED SCAN RATES 1. Introduction 2. The Hardware Peak-Finder Concept Hardware Design 3. The Microcode Compiler Design Goals The Software 4. Results Processing Speed Improvements in Scan Speed and Signal Averaging 5. Conclusion CHAPTER 5. DUAL-MODE DETECTION FOR HIGH PERFORMANCE ION CURRENT MEASUREMENT AND EXTENDED DYNAMIC RANGE IN MS/MS 1. Introduction 2. System Description Analog Processing Ion Counting Protection Grid Logic Data Handling Dual-mode Scanning Dual-mode Software 3. Pulse Overlap Correction and Analog Calibration 4. Results 5. Conclusion CHAPTER 6. A TRAP-AND-PULSE ALGORITHM FOR DETECTION OF COLLISIONALLY ASSISTED REACTION PRODUCTS 1. Introduction 2. Experimental Instrumentation Computer System Chemicals Used Ion/Molecule Reactions Instrumental Conditions for Ion Trapping The Trap-and-Pulse Experiment Investigation of the Trap-and-Pulse Process The Trap and Pulse Algorithm and Software Considerations 6. Results 00-50) CHAPTER 7. SUGGESTION FOR FUTURE WORK APPENDIX A. FORTH CODE FOR LINKED SCANS APPENDIX B. FORTH CODE FOR REAL-TIME GRAPHICS APPENDIX C. PAL SPECIFICATIONS FOR NOVIX INTERFACE vi 117 117 118 118 121 130 130 133 137 137 139 141 143 143 147 147 149 152 154 155 155 156 159 170 173 173 175 175 175 176 176 178 178 184 203 207 214 218 224 226 APPENDIX APPENDIX APPENDIX APPENDIX APPENDIX APPENDIX FORTH FORTH FORTH FORTH FORTH FORTH CODE CODE CODE CODE CODE CODE FOR FOR FOR FOR FOR FOR PEAR-FINDING ALGORITHM ALGORITHM TESTING MICROCODE COMPILER AMD9513 COUNTER DUAL-MODE SCANNING REACTION SCANS vii 227 230 231 240 242 247 LIST OF TABLES TABLE PAGE 1.1 TOMS devices and their mnemonic names 3 1.2 Advantages of Distributed Processing Systems 14 1.3 Multimicroprocessor Scanning Functions 29 1.4 Multibus-I Scanning Functions 29 2.1 Benefits of a Fast MS/MS Control System 41 2.2 Multibus-I Scanning Functions 65 2.3 Multimicroprocessor Scanning Functions 65 2.4 Novix Control System Scanning Functions 66 3.1 Variables for Kristo Algorithm and MSSIN 105 3.2 COMPARISON OF TWO REAL-TIME PEAK-FINDING ALGORITHMS- Starting from Threshold 107 3.3 COMPARISON OF TWO REAL-TIME PEAK-FINDING ALGORITHMS- Coming Off a Large Peak 109 3.4 -COMPARISON OF TWO REAL-TIME PEAK-FINDING ALGORITHMS- After a Large Intensity Spike 111 3.5 COMPARISON OF TWO REAL-TIME PEAK-FINDING ALGORITHMS- After a Small Intensity Spike 113 3.6 Timing Information 114 4.1 Novix Control System Scanning Functions Without Peak-Finder 140 4.2 Novix Control System Scanning Functions With Hardware Peak-Finder 140 6.1 Typical conditions for Ion-Trapping in the Center Quadrupole of the TOMS 178 6.2 Ion/Molecule Products of the Reaction Between the Methyl Cation and Acetone 182 6.3 Dependence of Ion Loss on Collision Gas Pressure . 191 viii u... F l l 1 Hen-hooter- l 1 2 2 N NM N (DDQ O) can NNN O 0 HH y—l LIST OF FIGURES IGURE The TOMS Instrument TOMS MS/MS Scan Modes Multiprocessor Topologies Timing Relationships for a SWEEP Timing Relationships for a NSCAN Relative price and performance characteristics of several computing systems. Block diagram of the NC4000 showing the separate data paths to main memory, its data stack, and its return stack. Block diagram of the NC4000 which shows the direct control that the latched instruction exercises over the ALU and registers. Schematic of the L-Bus Interface. Schematic of the interface to the intelligent data acquisition circuit. Schematic of the interface to the hardware peak-finder circuit described in Chapter 4. Schematic of the rate synchronization circuit. Schematic of the softknobs interface. Schematic of the parallel port for uploading data to a host minicomputer. Schematic of the pulse-counting circuit. Schematic of the interface between the NC4000 and the rest of the mass spectrometer control circuits. Unaveraged mass sweeps of m/z 28 (N2’) and m/z 69, 131, and 331 from PFR taken at 2000 AMU/S with the multiamp circuit. Unaveraged mass sweeps of m/z 28 (Nz*) and m/z 69, 131, and 331 from PFK taken at 1000 AMU/S with the multiamp circuit. Unaveraged mass sweeps of m/z 28 (N2‘) and m/z 69, 131, and 331 from PFH taken at 500 AMU/S with the multiamp circuit. Unaveraged mass sweeps of m/z 28 (N2‘) and m/z 69, 131, and 331 from PFK taken at 250 AMU/S with the multiamp circuit. Plot of the resolution of each peak versus scan speed for m/z 28 (N2’) and m/z 69, 131, and 331 from PFK. Plot of the intensity of each peak versus scan speed for m/z 28 (Na’) and m/z 69, 131, and 331 from PFR. Unaveraged mass sweeps of m/z 28 (N2’) and m/z 69, 131, and 331 from PFK taken at 2000 AMU/S with a high bandwidth (100 MHz) preamplifier system. ix £5.93. 2 5 15 21 22 39 45 47 49 50 52 53 54 56 57 59 68 69 70 71 74 76 77 uh hub-F 00 09 N00 I'd N 0| I“ ”N ch “NI-t 4.6 UIOIOIOI 0| 0101-50) N 5.9 0 pm .19 Timing relationships for an NSCAN for the Novix TOMS control system. Three mass sweeps showing the variable resolution between peaks in TOMS. Common peak profiles found in TOMS. Common peak profiles and an example of noise spikes found in TOMS. The flow of decision processes in the current peak-finding algorithm. The flow of the software implementing the current peak-finding algorithm. Block diagram of hardware peak-finder. Schematic of address-decoding circuitry. Schematic of chip-select generation for random-access memory. Schematic of the autoloading feature for generation of addresses when reading from or writing to the random-access memory. Schematic of the next-address generation circuitry when executing the peak-finding algorithm. Schematic of one byte of random access memory with circuitry for access from the host computer and latching control signals for each clock cycle. Schematic of the intensity bus. A comparison of the dynamic ranges afforded by various systems versus the dynamic range available in MS/MS: the basic analog amplifier/ADC available on most systems, the multirange analog amplifier/ADC available from the multiamp circuit, ion counting circuits, and the dual-mode control system. Schematic diagram of the Galileo Dual Output Channeltron control system. Multiamp analog measurement scheme. Configuration of the AMD9513 pulse counter. Schematic of the protection grid logic. Raw ion current versus the corresponding analog intensity from the multiamp circuit (for air) and the theoretical curve (+) expected from the Poisson resolution window (120 nS) calculated from the experimental curve. A mass sweep of the peak representing the nitrogen molecular ion (m/z=28), showing the resulting analog intensity and the measured ion flux. ' Plot of ion flux versus analog intensity for the mass sweep of the nitrogen molecular ion in Figure 5.7. A mass sweep of the peak representing CF:+ (m/z=69) from PFK, showing the resulting analog intensity and measured ion flux. 80 85 86 87 94 99 119 123 124 125 127 128 129 144 146 148 151 153 160 163 165 166 5.10 6.1~ 6.3 6.10 Plot of ion flux versus analog intensity for the mass sweep of CF3+ in Figure 5.9. Plots of ion abundance versus time and L5 potential versus time, showing one full trap-and-pulse cycle. Plots of ion abundance versus time, and L3 and L5 potentials versus time, showing one full inject,trap, and pulse cycle. Plot of ion pulse intensity versus storage time for the proton-bound dimer of acetone and the curve obtained by fitting the data to Equation 2. Plots of ion pulse intensity versus storage time for the benzene molecular ion (no collision gas) for several parent ion energies. Plots of ion pulse intensity versus storage time for the benzene molecular ion for several pressures of acetone collision gas (parent ion kinetic energy of 1 eV). Plots of ion pulse intensity versus storage time for the benzene molecular ion for several pressures of acetone collision gas (parent ion kinetic energy of 10 eV). Plots of ion pulse intensity versus storage time for the benzene molecular ion for several parent ion kinetic energies (pressure of acetone collision gas of 2x10" torr. Plots of ion pulse intensity versus storage time for the benzene molecular ion for several parent ion kinetic energies (pressure of acetone collision gas of 2x10‘5 torr. Plots of ion pulse intensity versus storage time for the benzene molecular ion for several parent ion kinetic energies (pressure of acetone collision gas of 6x10'7 torr. Three mass sweeps of O3 over the isotope peaks of the proton-bound dimer of acetone (A) by conventional data collection (250 emu/S), (B) by conventional data collection with . real-time signal averaging (5 emu/S), 6.11 (C) by trap-and-pulse data collection (5 amu/S). Two product ion scans of the ion/molecule reaction between protonated glycerol and acetic acid (parent ion is (M+H)+ of glycerol at m/z 93) by (A) conventional data collection and by (B) trap-and-pulse data collection. xi 168 180 183 186 190 193 195 198 200 202 208 209 CHAPTER ONE A MULTIMICROPROCESSOR CONTROL SYSTEM FOR A TRIPLE OUADRUPOLE MASS SPECTROMETER 1. Background The Triple Quadrupole Mass Spectrometer The development of triple quadrupole mass spectrometry (TOMS) by Yost and Enke (1-3) has enhanced the widespread acceptance of tandem mass spectrometry as a useful and practical method of analysis. Greater concern over instrument control, intelligent data collection, and meaningful treatment of collected data has been an additional consequence, which arises from the nature of TOMS itself. The TOMS instrument, shown in Figure 1.1, has 5 distinct scan modes, 22 physical devices and 4 software attributes (Table 1.1) which must be controlled during scanning. Furthermore, the TOMS instrument can generate large amounts of data very quickly. All of these qualities .make TOMS a model problem in instrument control and data treatment (storage, retrieval, and analysis). a ccccc anon aloe one H.~ shaman C I O O O O O O O O I I Q 0 O I C O I O O I O C O C I O O O I O O O I 3 Table 1.1 TOMS devices and their mnemonic names NAME DEVICE NAME DEVICE EV Electron energy OZ Quad 2 DC offset REP Repeller 03 Quad 3 DC offset RIP 31 ion volume MHV . Multiplier voltage CIV CI ion volume Ml Mass for quad 1 EXT Extraction Lens DMl Quad 1 delta mass Ll Ion source lens 1 R81 Quad 1 resolution L2 Ion source lens 2 M2 Mass for quad 2 L3 Ion source lens 3 M3 Mass for quad 3 L4 Interquad lens 1-2 DM3 Quad 3 delta mass L5 Interquad lens 2-3 R33 Quad 3 resolution 01 _ Quad 1 DC offset P2 Quad 2 pressure TQMS Software Attributes NAME ATTRIBUTE THR Threshold RTE Scan Rate PWD Minimum Peak Width MWD Maximum Peak Width A TOMS instrument basically consists of an ion source, three quadrupole mass filters, and an ion detector, usually an ion multiplier. The TOMS instrument may also have several lenses to focus the ion beam. The first and third quadrupole mass filters can be operated in either the integral (RF) mode, which passes ions of all mass-to-charge ratios, or the normal (DC) mode, which passes ions of a specific mass-to-charge ratio (mass filtering). The transmission characteristics in the normal mode are further controlled by the resolution and delta mass controls of the quadrupole controllers. The central quadrupole, also called the collision cell, always operates in the integral mode in TOMS and is used for changing the mass of the ions 4 transmitted by the first quadrupole. This mass change can occur through various methods, including collision of the incident ions with an inert collision gas (CAD- collisionally-activated dissociation) (1), reaction of the incident ions with a reactive collision gas (CAR- collisionally-assisted reaction) (4,5), and absorption of light (LD- laser dissociation) (6,7). Scan Modes The option of operating quadrupoles one and three in either RF or DC mode during a scan yields the five different scan modes. Scanning either the first or third quadrupole in the DC mode, while holding the other quadrupole in the RF mode, generates a primary mass spectrum, similar to a conventional mass spectrum. Scanning quadrupole one in this manner (commonly called a lSCAN) yields identical information to scanning quadrupole three (3SCAN). If both quadrupoles one and three are held in the DC mode, then three mass spectrometry/mass spectrometry (MS/MS) scan modes are possible (Figure 1.2). In two of the MS/MS modes, one quadrupole passes only ions of a specific mass- to-charge ratio, while the other is scanned. If quadrupole one is held fixed, a daughter scan (DSCAN) is generated, which identifies the mass-to-charge ratio of all ionic species produced from the modification of the ions selected by quadrupole one. If quadrupole three is held fixed, a parent scan (PSCAN) is generated, which identifies the mass- nova! scum m!\m2 mica. Aoz_=zon ho unwanMLOHUshsno H.N ouamAa oucmlsowuum can samba oSAAaAom IP if a882s_,. E --—‘------ GE. P--——-------------- mam, mmt§u§§83.acaaaea= g; hlflfifigfiu“,i!3?!RZ§K§I#§§H_ managesmcgeeaasaaasaw examizzbseeaasagsaa 40 laboratory control system for a moderate price. Furthermore, most of the systems mentioned in Figure 2.1 were not designed for instrument control, but for intensive calculations. Often their input/output functions, which comprise a large part of the task of a control processor, are quite slow. Some applications cannot effectively use higher performance control systems; no new capabilities would be added with such systems. However, MS/MS control systems can use as fast a control system as possible for several reasons. First, the system can then have the ability to perform new experiments not presently possible because of a need for a high degree of computer control in a short span of time. For instance, real-time experimental optimization and selection is now possible with the NC4000; known experimental facts and rules together with the MS/MS information currently being acquired can be used to change conditions dynamically or select future experiments to elucidate the structure of an unknown compound in real-time. Second, a faster MS/MS control system can better characterize samples that do not last long in the ion source, such as chromatographic eluents or flash pyrolysis products. Thirdly, the less time spent making calculations, performing peak-finding and other housekeeping details, the more time is available to acquire data, given the same scan rate. Obviously, the greater fraction of time the control system spends on data acquisition, the better quality data 41 the mass spectrometrist will receive and the more effectively the sample will be used. The experimental benefits of control system speed are summarized in Table 2.1. Table 2.1 Benefits of a Fast MS/MS Control System Better characterization of transient samples (GC/MS/MS, Py/MS/MS, etc.) More efficient utilization of the ion current Real-time experimental optimization and selection (also depends on software) More efficient use of an operator’s time (also depends on software) Less operator fatigue (also depends on software) 2. The Novix Approach History of Computer Architectures In general, large increases in processor performance also mean large increases in processor price. The development of high-level computer languages has traditionally followed the development of the sets of machine-level instructions for the particular microprocessors (or processors) on which they were to run. These sets of machine-level instructions tended towards larger sets with more complex instructions, in order to reduce program development time (each machine-level instruction accomplishes more of the overall task) and 42 conserve program memory. This progress forced compilers (programs to translate high-level languages, such as FORTRAN, into machine-executable code) to become ”smarter," that is, more aware of the variety of machine-level instructions available and how to use them to create the most efficient code. However, compilers often tended to be simpler than the task required and produced unoptimized code, i. e., code which accomplished a task more slowly than necessary, by having unneeded machine-level instructions or by using awkward programming constructions. Recently, however, multipass compilers'have become more efficient for certain processors and control systems (languages for the IBM PC (3), for instance). Lately, the R180 (Reduced Instruction Set Computer) approach has come into vogue, especially for supercomputers. In RISC, the computer uses a smaller set of instructions which accomplish basic tasks, such as arithmetic instructions, register—to-register movement, register-to- memory movement, etc. The RISC computer is optimized for speedy execution of these instructions, since some studies have shown that a large portion of the computer’s time is spent on such basic instructions. So, even though the R180 computer may accomplish the complex and infrequent instructions more slowly than the CISC computer (Complex Instruction Set Computer), it more than compensates for the loss in time by executing the simple, but frequent, instructions very quickly. Furthermore, RISC allows the 43 compilers themselves to become simpler and more efficient, since they only have to handle a small number of instructions. Nevertheless, hardware development preceded software development for the RISC computers as well (4,5). There are, of course, other approaches to faster computers. Design of bit-slice computers (6) for special applications is one approach. In fact, Metaforth Computers of Great Britain (7) have designed a FORTH processor based upon bit-slice technology. Bit-slice has the advantage of tailoremaking the processor to a given task, giving it great speed. However, designing a bit-slice computer for a specific task will obviously take longer than buying a given microprocessor off the shelf and, eventually, any bit-slice' processor will be limited by the speed of discrete transistor-transistor logic (TTL) (or whatever the chosen technology) components. Processors with large scale integration (LSI), on the other hand, tend to execute functions more quickly than the same function emulated in discrete integrated circuits. NC4000 Architecture The Novix NC4000 embodies the architecture of an already existing high-level language, FORTH, in an integrated circuit. In other words, the NC4000 runs FORTH, rather than a typical assembly language, as its native code. The NC4000 has been called ”a stack machine,” since FORTH itself is a stack-oriented language. A stack is an area of 44 memory used for temporary storage of various values. The data on the stack are normally placed and removed in a last* in first-out (LIFO) manner. The NC4000 is also optimized for subroutine calls (one every clock cycle) and subroutine- threaded code is its normal mode of operation. This means that new programs for the NC4000 are compiled as a series of addresses for the execution of its component programs. FORTH words (programs) consist of concatenated words which have been previously defined or are part of the basic kernel of instructions. To execute FORTH on other processors, the subroutine-threaded code is not inherent and must be created in the software by the FORTH compiler and interpreter. The NC4000 has simultaneous access to both its data and return stacks through separate l6-bit data buses and 8-bit address buses, apart from the l6-bit address and data bus for main memory (Figure 2.2). Most FORTH instructions implicitly operate on items on the data stack, while the return stack is used to direct the return from subroutine calls. Thus, optimization of the access to these two stacks, which normally exist in main memory on the typical microprocessor, is essential to the NC4000’s performance. Furthermore, the top two data stack elements are actually registers on the NC4000, making operations on those two elements especially fast. Finally, the bit patterns within each instruction provide the actual control signals to the various components of the microprocessor, e. g., the arithmetic logical unit 45 Bus port 5 l 16 NC4000A Return 16 16 Data stack stack I:- Data stack (top two elements) 16 Main may Figure 2.2 Block diagram of the NC4000 showing the separate data paths to main memory, its data stack, and its return stack (2). 46 (ALU) or the address multiplexer (Figure 2.3). The elimination of internal microcode, which is standard on conventional microprocessors, further increases the speed of the NC4000. 3. System Description Hardware The Novix BetaBoard Forth computer is an evaluation board, which includes the NC4000 microprocessor, 32 Hwords (l word = 16 bits) of fast memory (35 nS), data and return stack memory (256 words each), two RS-232 serial ports, a SCSI (Small Computer Systems Interface) port, and a timer/counter for performance measurements. The system further provides two sets of connectors for stackable interface modules which allow access to vital processor signals (address and data lines, system clock, etc.). Thus, the Beta board only needs a moderately complex interface board in order to control the EL 400/3 triple quadrupole mass spectrometer. The Novix Beta board comes equipped in an IBM PC (3) support configuration, in which a serial link to the PC allows the PC to serve as a terminal and file server. The first step in preparing the Beta board to control a triple quadrupole mass spectrometer was to create a development system by generating the appropriate code by target compilation and programming a set of ROMs with this code in 47 LI I.._&_\,_J I" ; 1 8.10717. ISLISH m laid! [1loloIoJL A. Ammmbmmmmi L——smum )5353” ——mms azwum Susana —Retumtrommibromtne.EXIT “um —-CopyTlntoN or grmpv ,4 rummage»: 3 _, 'JL' 1?".2" 4 + I f 8 5 TXORY 01 Nwloghcgrryreglster 6 Y-T 10 Minuet-divisorreglster 7 Y 11 WW Figure 2.3 Block diagram of the NC4000 which shows the direct control that the latched instruction exercises over the ALU and registers (2). 48 order to create the stand-alone configuration. Then, equipped with a DTC 520 DB (8) disk controller, a hard disk drive, and a floppy disk drive, all controlled through the SCSI port, the Beta board was ready for hardware and software development. Several functions had to be provided on the Novix- triple quadrupole mass spectrometer interface board in order to mimic the existing Extrel 400/3 control system. First, an interface was needed to the Extrel L-Bus, a peripheral bus which contains all of the digitaléto-analog converters (12 and l6-bit), an analog-to-digital converter with 8 channel multiplexer, and several parallel ports. The NC4000 can now control all of the triple quadrupole mass spectrometer’s physical devices through the analog and digital outputs on the L-Bus by using the L-Bus interface on the Novix TOMS Control Board. The schematic for the L-Bus interface is shown in Figure 2.4. The mass spectrometer interface board needed an interface to the intelligent data acquisition circuit designed by Dr. Bruce Newcome (9) in order to acquire intensity data efficiently. The data acquisition circuit allows parallel operation with the control computer through use of a status byte and/or an "acquisition-done” interrupt. The data acquisition interface, whose schematic is shown in Figure 2.5, now allows the NC4000 to control this data acquisition circuit. 49 F d Figure 2.4 Schematic of the L-Bus Interface. 50 see A A0 , so on: m *I “let up M I u 93% J A! __JLpg as? n. “ J! g: Dt%#* ._JL A6 " I”: JL M in IAO UM em II“ t. i”: 4m I-1..D Figure 2.5 Schematic of the interface to the intelligent data acquisition circuit. 51 The NC4000 is provided with an interface, shown in Figure 2.6, to the hardware peak-finding circuit, which is more fully described in Chapter 4. Basically, this circuit allows rapid, parallel processing of intensity data to determine peak positions and peak heights. This circuit can operate in parallel with NC4000, like the data acquisition circuit, through its status byte and interrupt feature. This parallelism allows the NC4000 to calculate the next ion path value while the peak-finding circuit is processing the current datum. The NC4000 has access to an AMU-timer circuit in the Mass Spectrometer Interface. This AMU-timer allows the computer to synchronize each point in the scan with the user-selected scan rate. The computer cannot acquire the next point until the AMU-timer interrupt has been set. This feature is important not only for keeping the scan rate constant throughout a scan, but also to correlate scan number with time in a sequence of scans. The schematic for the AMU-timer.is shown in Figure 2.7. The NC4000 triple quadrupole mass spectrometer interface board has an interface for ”softknobs,” optical rotary encoders which can be configured in software to control any digitally controlled device with variable resolution. Softknobs are used for manual variation of digitally controlled devices, as would normally be performed to tune the instrument. The schematic for the softknobs interface is shown in Figure 2.8. 52 J1 Figure 2.6 Schematic of the interface to the hardware peak-finder circuit described in Chapter 4. 53 cowamswcosauczw sums use he swanflusom .uwsoswo s.N musuwc 54 .mun%L0acw mnonzuhon 02a $0 Gwaslonom m.m mtsmwu ammql mso> o... 633%: oz». .2 . . . .2 m... .- aliwéflg. “Rely .. my .. magnum. EMILE i "in"! .1. mg. 55 The mass spectrometer interface has a parallel port, whose schematic is shown in Figure 2.9, dedicated to transferring data to the host PDP 11-23 (10) minicomputer for further processing and eventual archival storage. A MM52167 real-time clock (11) is provided, which has a battery back-up. This allows the correct time to be stored with all experimental data without resetting the clock after every power-up. Finally, the AMD 9513 (12) pulse-counter circuit, whose schematic is shown in Figure 2.10, is provided for ion counting. Thus, the NC4000 control system has the capability for dual-mode detection, which is fully described in Chapter 5. The 9513 counter/timer further provides the capability for higher resolution timing than the AMU-timer provides. The most important part of the Novix TOMS Control Board, though, is the actual interface between the Novix NC4000 and all of the separate interfaces described above. The essential problem is to enable the fast timing of the NC4000 to operate compatibly with the slower timing of the peripheral devices. For instance, the NC4000 is provided with fast (35 nS) memory, because the NC4000 places a memory address on the bus during the high portion of the clock cycle and expects to read or write the corresponding datum on the next rising edge. Most of the peripheral devices on the interface board cannot meet this timing requirement. The Novix-mass spectrometer interface (Figure 2.11) seeks to minimize the generation of control signals through software 56 ” . - II ' "- I I — _ m- - _ ~'—.'.ss=m ‘r—v'" L__._m ’l_""" AL s ,, jar—"n '- ' M at 8255A -_, ., Irv—1- "'r—I" ”‘r—a" '“r'_""' _ m ~_. m . 0. J3 Figure 2.9 Schematic of the parallel port for uploading data to a host minicomputer. 57 .uwdcnwo wcqu=OUIoa~=A emu mo swumlcnom oH.N ossuAa .a:: I A E... h"“%lll mmm —nd JEUAa so a I I... a I an m . In N... m ._ In Ema mu Am i In 052 mm w. onus IIAMM Figure 2.11 Schematic of the interface between the NC4000 and the rest of the mass spectrometer control circuits. 59 g‘39'\ g‘.‘flea eelllILoo 8.. can .a .w m 11 M< II M! a .1 a... I. it: in.“ Van M. «an. .3 . I i a mat“ m as.“ 09 <08 L o. .x>z n O— . u no" 9 n 9 n O 60 manipulation. For instance, the counter and serial ports provided with the Novix BetaBoard are addressed through a series of latches, in which you write to an address to send a control signal high, wait an amount of time appropriate to the timing requirements of the peripheral device, and then write to the same address to send the control signal low. The Novix-mass spectrometer interface utilizes JCSl6, a chip select generated on the Novix BetaBoard and available on the peripheral bus, which selects addresses COOO-C799H. This memory selection is further divided into three categories: 1) writing to the interface bus (COOO-C399H), 2) reading from the interface bus (0600-0799H), and 3) reading the interface’s status byte (C400-C599H). The interface’s status byte contains the status bit or interrupt bit from all of the appropriate interfaces. One error in the prototype of the NC4000 is that interrupt functions can only be enabled at times when the processor is not engaged in several tasks (multitasking) In many instances, microprocessors can respond more quickly by reading a status byte than by servicing an interrupt due to the extra time needed to respond properly to an interrupt. Therefore, to monitor the completion of a certain activity, the NC4000 reads the status byte and masks off all other bits with a logical AND function. In order to write to a peripheral device, the NC4000 accesses an address in the range of 0000-0399H, causing the corresponding data bits 0-15 and address bits 0-10 to be ..-.,.___-.. ‘.4 61 latched on the Novix TOMS Control Board. In this way, the appropriate data and address are temporarily stored for the peripheral devices to process at their own rate. Selection signals (chip selects) for the various interfaces are decoded by a PAL20L10 (13), the specifications for which are shown in Appendix C. The chip selects and the write signal (/WH) itself are only valid for a period of time specified by enable signals. These enable signals (active low) are selected by a jumper from any one of eight pulse widths from a 74LSl64 shift register. The length of the pulse width determines the time for which the chip selects or the write strobe are valid. The falling edge of the enable pulse starts one clock cycle after writing to the mass spectrometer interface and lasts from 100-800 as (typically 500 n8 for a chip select; 400 n8 for /WR). The enable signal for /WR should be selected as at least 100 nS less than the enable for the chip selects, since many chips latch the data on the rising edge of the write strobe. Obviously, the NC4000 cannot write to the interface within 600 nS of the last write or conflicting signals will be generated. So far, this has not been a problem. The NC4000 reads from the mass spectrometer interface board in two steps. First, it writes the selected address on the interface board, except that bit 8 (RD-lWR) is high. This translates to the original write address plus 100H. Since bit 8 is high, the PAL recognizes that a read Operation is in progress and holds the given chip select low 62 indefinitely. Inverting the value of bit 8 provides a read signal (/RD). The selected peripheral device responds to its chip select and /RD and places the appropriate datum on the interface data bus. Second, the NC4000 reads from address 0600H, which transfers the contents of the interface data bus onto the Novix’s data bus. The Novix-mass spectrometer interface circuit keeps the Novix convention of word addresses. The NC4000 can write bytes to a peripheral’s address with no problem, because the upper byte will simply be ignored. However, when reading a byte from a peripheral address, the upper byte must be set to zero to read the correct value. .8..an The software for the Novix control system is essentially that which Dr. Carl Myerholtz (14,15) wrote for the Extrel 400/3 control systems except for the following four essential categories of modifications. ’ First, all of the existing control system software which was originally written in 8086/8088 assembly language had to be rewritten in high—level FORTH. This was fairly easy, certainly much more easy than writing high-level FORTH software in assembly language. Second, the original control system software had been written in polyFORTH I, whereas the NC4000 FORTH kernel was consistent with polyFORTH II. Thus, all inconsistencies between polyFORTH I and II had to be resolved. Some 63 differences were only in nomenclature; for instance, the word END was renamed UNTIL to comply more fully with FORTH- 79 standards. Other changes were more subtle. Software which took advantage of certain known structures in polyFORTH I (16) had to be rewritten when those structures were changed in polyFORTH II (16). Third, the NC4000 is a full l6-bit microprocessor, with no provisions for byte addressing in hardware. Therefore, byte operations take place in software at a considerable time disadvantage. Byte operations take about twice as long as word operations on the NC4000. Furthermore, only the first 32 Ebytes of memory can be addressed as bytes. Each word of memory has two addresses: a word address and two byte addresses (twice the word address and twice the word address plus one). The words CELL and BYTE convert from one address form to the other. Therefore, all byte operations which could easily be word operations were rewritten as such, costing the user one unused pseudo-byte of memory. Other operations, such as string operations, had to be rewritten to convert word addresses to byte addresses and use existing character operations on the NC4000. Fourth, new routines were written for the data acquisition circuit and the hardware peak-finder, which did not exist on the Extrel 400/3 control system. Routines were also written to control the AMD 9513 pulse-counting circuit. 64 All of the revised code described above resides on the Novix control system hard disk, as well as on floppy disk back-up copies and hardcopy output. 4. Results The Novix NC4000 Forth computer is now capable of fully controlling a triple quadrupole mass spectrometer. Tables 2.2, 2.3, and 2.4 show the scanning speed and the amount of averaging available for each speed with the old Multibus I control system (Table 2.2), the multimicroprocessor system described in Chapter 1 (Table 2.3), and the new Novix control system (Table 2.4) without the hardware peak-finder. The Novix control system not only operates at faster scan speeds than the Multibus control system but also provides 64 times the averaging for equivalent scan speeds. The new data acquisition circuit is responsible for some of this increase over the Multibus system. This data acquisition circuit allows the user to select a number of averages which are factors of two (1, 2, 4, 8, etc.). Although this leads to a significant increase in the amount of averaging for the Novix system over the Multibus system, it is comparable to the multimicroprocessor system for most scan speeds. The Novix control system would require twice as much time for data acquisition as the multimicroprocessor system in order to perform more averaging. This condition was met only for the 50 and 100 amu/S scan rates. 65 Table 2.2 Multibus-I Scanning Functions Rate Pts/S Amu/S Time/Pt O Averages/Pt 2 2500 250 400 uS 1 3 1000 100 1 ms 4 4 500 50 2 l6 5 250 25 4 32 6 100 10 10 128 7 50 5 20 256 8 25 2.5 40 512 9 10 l 100 1024 10 5 0.5 200 2048 11 2.5 0.25 400 4096 12 l 0.10 l S 4096 13 0.5 0.05 2 4096 14 0.25 0.025 4 4096 Table 2.3 Multimicroprocessor Scanning Functions Rate Pts/S Amu/S Time/Pt O Averages/Pt 0 10000 1000 100 as 16 l 5000 500 200 32 2 2500 250 400 64 3 1000 100 1 m8 128 4 500 50 2 256 5 250 25 4 1024 6 100 10 10 2048 7 50 5 20 4096 8 25 2.5 40 4096 9 10 l 100 4096 10 5 0.5 200 4096 11 2.5 0.25 400 4096 12 l 0.10 l S 4096 66 Table 2.4 Novix Control System Scanning Functions Rate Pts/S Amu/S Time/Pt # Averages/Pt 2 20000 2000 50 us 1 3 10000 1000 100 16 4 5000 500 200 32 5 2500 250 400 64 6 1000 100 1 ms 256 7 500 50 2 512 8 250 25 4 1024 9 100 10 10 2048 10 50 5 20 4096 ll 25 2.5 40 4096 12 10 l 100 4096 13 5 0.5 200 4096 14 2.5 0.25 400 4096 The ability of the control system to scan the triple quadrupole mass spectrometer as fast as the rates listed in Table 2.4 does not suggest the quality of the data at those. scan rates. Several problems can occur at fast scan rates. First, the quadrupole controllers may not be able to change the voltages on the quadrupole rods as quickly as the control system changes the mass command input. Second, the transit time of the ions through the quadrupole fields will limit scan speeds. At lower velocities (low kinetic energies) the ions will more slowly traverse a given quadrupole, during which time the electric fields will be changing. This may possibly lead to reduced transmission and/or degradation of peak shape. Of course, at higher ion velocities, the velocity effects will be reduced but each ion will spend less time in the quadrupole fields. The mass spectral resolution in a quadrupole increases with the square of the number of RF frequency cycles that the ions 67 experience in the quadrupole. Thus, higher velocities will lead to decreased resolution of the peaks in the mass spectrum. Third, the bandpass of the amplifiers in the system (the preamplifier and the voltage amplifiers of the multiamp circuit) may limit scan speeds if it is insufficient to avoid reducing peak intensity and degrading peak profiles. This effect can be corrected by using higher bandpass amplifiers; however, they generally provide lower gains and pass noise of higher frequencies than lower bandpass amplifiers. Therefore, after determination of the scan rates possible with the Novix control system, it was important to verify the characteristics of the spectra obtained with each scan rate. Figures 2.12 through 2.15 show the peak profiles and intensities available with the present multiamp system for scan rates 2 through 5 respectively. Each figure shows the peak profiles for ions of different mass-to-charge ratios (m/z 28 from nitrogen (N2’) and m/z 69, 131, and 331 from perfluorokerosene (PFK)) with ion energies of 5 eV in the scanning quadrupole (quad 1). Ion energies of 5-15 eV are common for the first quadrupole in a triple quadrupole mass spectrometer operating at 20 eV collision energy. The data for each scan are unaveraged, thus, any change in the peak profiles are due to scan speed, not increased averaging at the lower scan rates. Several features are clearly evident. First, the peak profiles taken at faster scan rates show lower resolution (increased peak widths) compared to mass 68 3592 90240 '— 5 '2 :3 O o 8 O o 8 < < o l a O l J_|__ A 20 30 4O 60 70 a) Bill ' WI 45254 '451 U) A U) l- +- 2: :Z :1 :3 O O C) C) L) (J Cl C: < < o J , oI , . , 1 2O 1 30 1 40 320 330 340 M/Z M/ 2 Figure 2.12 Unaveraged mass sweeps of m/z 28 (N2‘) and m/z 69, 131, and 331 from PFK taken at 2000 AMU/S with the multiamp circuit. 69 4sss 1 24864 I I I :2 :2 Z Z :3 :3 O O O 0 0 0 C3 9: < E j 1 _ l 1 #J iL _. 020 30 A40 060 70 so M/Z 3 W2 61504 ' 814 (D h (D '2' '2 8 8 U 0 U 0 C) 9: < o1"“:20 A 130 L 140 0330 ' 5371' ‘ 3'70 W2 - W2 Figure 2.13 Unaveraged mass sweeps of m/z 28 (N2*) and m/z 69, 131, and 331 from PFK taken at 1000 AMU/S with the multiamp circuit. 70 8124 140864 4’ ADC COUNTS m N p. 2: :3 O U U a . < 330 5 WZ Figure 2.14 Unaveraged mass sweeps of m/z 28 (N2’) and m/z 69, 131, and 331 from PFK taken at 500 AMU/S with the multiamp circuit. 71 ‘TSOII lSNIMSQ F U) p. :Z i; :3 C) (J (J gs L) C) < t . JL. ._ _. o 30 40 060 70 so .mlz mm INN!!! 1927 d 03 p. :Z 2) (D I 0 2: (J C) ‘ < M . A. J L . .lww . . 1 2O 1 30 1 40 320 330 3.40 M/Z' M/Z Figure 2.15 Unaveraged mass sweeps'of m/z 28 (N2+) and I/z 69. 131, and 331 from PFK taken t 250 , . multia-p Circuit. a AMU,S Filth the 72 profiles taken at slower scan rates. Figure 2.16 shows the relationship between resolution and scan speed for each ion. Second, peak profiles taken at faster scan rates show slightly decreased ion intensities than those taken at slower scan rates. Figure 2.17 shows the relationship between ion intensity versus scan rate for each ion. Third, the peak maxima appear at progressively greater mass-to- charge ratios as the scan speed is increased. Fourth, the data for m/z 331, which is a lower intensity peak, clearly show that faster scan rates better reject low frequency synchronous noise than slower scan rates. The decreased resolution and intensity of the mass spectral peaks, as well as the peak-shift described above, could be caused by either insufficient amplifier bandpass or by the effects of ion transit times. However, reducing the ion transit time by increasing the ion energy did not cure the peak-shift, but merely decreased the resolution further, as expected from the decreased number of RF cycles experienced by the ions. Increasing the bandwidth of the amplifier, first by eliminating the multiamp circuit (bandwidth 1 kHz) and then by replacing the present preamplifier (bandwidth approximately 3 kHz) with a wideband preamplifier (nominal bandwidth 100 MHz), established that limited bandwidth causes both the decreased resolution and much of the shifting of peak positions. Figure 2.18 shows data obtained with the wideband amplification system at scan rate 2 (2000 amu/S), which can 73 Figure 2.16 Plot of the resolution of each peak versus scan speed for m/z 28 (Net) and m/z 69, 131, and 331 from PFK. 74 r OOON .P L - mm N\2 mm N\2 :2 N\2 En N\2 $323 Swim zcz All. mag lullv 80 /K ¥ was mcwzons sham!» anal omLAB ~.m shaman GEE mom—$3.18!?! 0:3. galelg 0:5. mega—8.12.1“; on no on an to an em on he on on 3 u u u .q 803.0 . 1 808.0 .1 p t . 808.0 85 - ‘ J ‘1 d ‘ Av Av A At t t SJNOOO 00V SJNDOO GOV r V V L4... v “ mm r"'rrw' '— L A . .OBOON r .NE— g dNtoN 805213.... 4.23%. 02.06213.“ 4.23% @409 van—lg SLNOOOOOV .mSOB :« nczov uufiwMOLA scum :olflco N.m wasmwh E5 Eva % 93. 85.8121sz om m... bu on 375% snmoooov sumoozxw 95E HVZIQAfllflfli I. on he 00 no 8.86 w 0 H o 0 H m H682 52¢ 29% oEE 85519133. on 8 G on u . u t 880... m m Sous coco macs as canoe magnum «ago: we m~alexo :e was sodwhoam seem dellco m.m shaman 0:.(8 gig—.121 0:.(2 851012134! .3 nu «n. 5 8 8 ON ON RN a T w u L 8.00m "44 4 u i. 03.0 m m W W 8.93 .30: m mmXEM NQOZ mZKOI 0.5.5.. gulp—nag 0:3. mam—(1019.181 on to nu 00 on no 00 on “ p1 . 0800.0 u « u A. L 00000.0 m m 0 m m m m as .§ 30; No.3 Further experiments, in which usually static parameters such as the resolution control are varied, can help clarify the existence of peaks. However, before undertaking further experiments, it is necessary to know that a problem does indeed exist. In other words, access to the raw data which is being reduced is also needed. However, the algorithm operates as a black box to the user, into which raw data disappears and from which only the processed results appear. There are very few clues in the reduced data on which to base an opinion of whether extraneous or missing peaks are real or an artifact of the algorithm. Users can be quite demanding in their expectations of the peak-finding algorithm which causes the algorithm to become an easy scapegoat. A practical definition of a good peak-finding algorithm is: a sequence of mathematical or logical steps which processes raw data and indicates a peak in every instance that the user would, if he were to examine the raw data, and in no other. The programmer must first decide whether the peak height or the peak area is a more appropriate measure of the peak intensity. This is, of course, dependent on the application. For many applications, the peak height is the appropriate measure of signal intensity. Even in applications such as chromatography where peak area is more characteristic of intensity, peak height can often give more reproducible results, depending on the method of area calculation (2). Peak height is one appropriate measure for 89 mass spectrometric intensity and so my algorithm searches for the peak maximum, rather than calculate the peak area, although it could be easily modified to do so. Finding the peak height is also faster and easier to program. A related problem is whether to calculate the peak position as the device value at which the maximum intensity occurs or whether to make a centroidal calculation. The essential issue here is which measurement of peak position gives the more repeatable value scan to scan, since the mass scale is calibrated on a frequent basis. No conclusive proof has been offered, so the programmer generally chooses the method of calculating peak position which complements his method of finding peak intensity. For peak heights, the device value' at the peak height is the logical way to calculate peak position. The programmer of a peak-finding algorithm has further to choose between real-time processing or post facto processing. Post facto processing involves gathering all of the raw data in a scan and then performing peak-finding. This has the advantages of random access to every piece of data, allowing more sophisticated algorithms such as correlation functions (3,4) to be employed, and relief from overly critical timing requirements. My experiments show that correlation functions have limited utility in triple quadrupole mass spectrometry, since correlation functions measure the correspondence of the current peak profile to a reference peak profile yet triple quadrupole peaks can vary 90 widely in shape. In addition, correlation functions do not deal readily with signal offsets without some sort of high- pass digital filter. The time that it takes to perform peak-finding in post facto processing will not influence the rate of scanning, but it will influence the cycle time from scan to scan. The disadvantage of post facto peak-finding is that large data buffers must be used to store all data points in a scan. As an example, our data system requires 8 bytes of memory to store one datum point: 2 bytes for device value, 2 bytes for peak width and flags, and 4 bytes for intensity. For storing a full peak profile with equally spaced device steps, only 4 bytes would be really needed, but would require calculation of the device value for each intensity value before listing or displaying the data. There are typically 10 points per mass unit and a mass range of 1000. Thus, at least 40,000 bytes of memory would be needed to store the raw data for a single scan. Since we use Intel hardware (5), this buffer would be in extended memory and so wouldbe awkward and slow to address. Real-time peak-finding has complementary advantages and disadvantages. It reduces greatly the need for large memory buffers. For instance, one would expect, at most, 1000 peaks in the typical mass spectrum. Thus one requires 8000 bytes for storage of a processed spectrum instead of at least 40,000 bytes for storage of a spectrum prior to processing. Main memory can usually support a buffer this large, 91 depending on the size of the application code. Since one has access only to the current piece of data and, depending on the algorithm, certain selected pieces of previous data, less sophisticated algorithms must be used. The magnitude of the noise cannot be easily calculated, for instance. Background levels rarely change greatly on a day-to-day basis for a given scan type, however, so the user can enter a threshold value before the scan, below which peaks will not be found. The time spent in performing peak-finding will obviously affect the fastest scan rate possible, since peak- finding is performed after the acquisition of each datum.v Thus, one desires the peak-finding algorithm to execute as fast as possible. However, one would expect faster scan-to- scan cycle times for real-time algorithms, since they merely move the peak data to permanent storage after the scan. Post facto algorithms must perform all peakéfinding after the scan and then move the data to permanent storage. 2. Instrumentation and Software The algorithm described in this Chapter was written for application in the control systems of the two triple quadrupole mass spectrometry (TOMS) instruments in our laboratory. One control system, controlling an Extrel 400/3 triple quadrupole mass spectrometer (6), has a Matrox 8086 CPU card in a Multibus I bus system. The other control system is the multimicroprocessor system described in 92 Chapter 1 with one master and three slave 8088 microprocessors in a homebuilt system of Newcome-Enke design (7). The algorithm resides in the Reduction Slave whose task is to perform real-time peak-finding and to display graphics. Both systems run the 8086/8088 polyFORTH I kernel. The multimicroprocessor runs a distributed- processing FORTH, modified from polyFORTH (8), and both systems run a FORTH-based software control system for the TOMS instrument (9). The algorithm was written in high- level polyFORTH I, but syntax appropriate to the FORTH-79 and FORTH-83 standards, with double-length extensions, was used. Recently, the algorithm was also installed on a control system featuring the Novix NC4000 (10) running polyFORTH II (11) by merely resolving the differences between the byte- addressing of the 8086/88 FORTH and the word-addressing of the M04000 FORTH. This control system was described fully in Chapter 2. 3. The Algorithm Some applications use post facto peak-finding and several such algorithms are available (3,4,12,13). I chose to use real-time peak-finding in the control of our triple quadrupole mass spectrometer, but there are fewer reports in the literature about algorithms of this kind (14,15,16). The three most important decisions in writing a peak-finding algorithm are: l) the conditions that must be met before the 93 algorithm starts looking for a new peak, 2) the conditions that must be met in order to update the maximum intensity for the current peak and 3) the conditions that must be met in order to indicate that a peak is present (peak termination criteria). These three aspects should be implemented with as little dependence as possible on peak shape or day-to—day variations in peak widths or heights. Also, some immunity to noise spikes should be included. The functions in my real-time peak-finding algorithm which address these needs are summarized in the flow chart of Figure 3.4 and are discussed below. Looking for a New Peak Most algorithms start looking for the maximum intensity of a new peak immediately after finding the old one. When looking for a new peak, however, the previous peak must be allowed to reach threshold or the valley between the two peaks. If the previous peak has not terminated before the peak-finding algorithm starts looking for a new one, the tail of a wide peak may be incorrectly interpreted as another peak. This leads to the phenomenon known as peak- splitting. My algorithm does not monitor the absolute intensity alone, but also the difference between the current and previous intensities (the increases and decreases in intensity). Thus, the algorithm first compares the current and previous intensities to determine whether the intensity 94 INIENSIIY INC? LASI GOING P1 "° UP INC? NO WIDE NOUG 7 "0 ABOVE IHLD? a l 1 UPDATE SIORE MAX PEAK CONTINUE J SCAN Figure 3.4 The flow of decision processes in the current peak-finding algorithm. 95 is increasing or not (labeled ”IS INTENSITY INC?” in Figure 3.4). At least two increases in intensity (not consecutive) must occur before the algorithm starts to search for the new maximum, i.e., a minimum of 3 consecutive or 4 nonconsecutive points with an upward trend. After a peak is found, therefore, the intensity will necessarily reach threshold or its minimum intensity before a new peak search begins. Again, this is especially important when a large peak is followed by a much smaller one, since it avoids splitting the large peak’s tail, possibly overwhelming the signal of a smaller peak in the same region. The algorithm’s requirement for two increases (labeled ”UP ENOUGH?" in Figure 3.4) instead of just one, attempts to avoid false triggering by noise fluctuations on the downside of the previous peak. Technically, this is accomplished by requiring that the variable UPFLAG, which measures the number of intensity increases for the current peak, be greater than one in order to update the maximum again. Updating the Maximum Generally, a peak-finding algorithm will test each point to find the point of maximum intensity in a peak. The exception to this in my algorithm, as mentioned previously, is allowing the intensity to reach threshold or the valley between two peaks before starting to test for the new maximum, since the intensity of the tail of the previous peak may be more intense than the maximum of the following 96 peak. If the intensity of the peak is currently decreasing, but was increasing on the previous datum (the variable +LAST was set), then the previous point was a local maximum, by definition. If such a local maximum has a value greater than the current value for the maximum intensity of the peak (stored in the variable MAX-PEAK), then the value of the previous point becomes the new value for the maximum intensity. Therefore, if a peak is currently being monitored (UPFLAG greater than 1) and the previous point was a local maximum with an intensity greater than the current value of MAX-PEAK (labeled ”GREATER THAN MAX?” in Figure 3.4), then my algorithm updates the maximum (labeled "UPDATE MAX” in Figure 3.4). (MAX-PEAK then becomes the intensity of the previous point and XMAX, the associated device value, becomes the device value for the previous point.) Peak Termination when terminating a peak, the peak-finding algorithm should be sure of three things. First, the algorithm should ascertain that the maximum intensity of the current peak has been reached. This could be accomplished by comparing the current intensity to some fraction of the maximum intensity or to a user-set threshold, although the algorithm may become more sensitive to negative noise spikes. Alternatively, the algorithm could verify that the basic trend of the peak is downward, that is, that the intensity has been decreasing over the last few points. Second, the 97 algorithm should determine that the peak is wide enough to constitute a real peak and not a noise spike. ”Hide enough” is a relative term which will vary from application to application and may vary from experiment to experiment. Third, the algorithm should make sure that the intensity is significant enough. For a real—time algorithm, the peak intensity should be compared to a user-set threshold. This threshold should approximate the background offset plus the background noise in the system, or should be large enough to reject small peaks in which the user is not interested. Therefore, in my algorithm, the peak is terminated if the following three conditions are satisfied: 1) there have been at least two consecutive decreases (the peak is currently decreasing and the variable +LAST is cleared- labeled ”LAST PT INC?” in Figure 3.4), 2) the current width of the peak (kept track of in the variable POINTS) exceeds the user-set minimum contained in the variable PHIDTH (labeled ”WIDE ENOUGH?” in Figure 3.4), and 3) the maximum intensity (the variable MAX-PEAK) is above the threshold (labeled ”ABOVE THLD?” in Figure 3.4). The minimum practical value for PHIDTH is 4 device steps, since there must be at least two increases to start looking for a peak and at least two decreases to terminate the peak. Thus, setting PWIDTH at 3 or less does not increase the sensitivity of the algorithm to narrower peaks. If a peak is found, the maximum intensity and its associated device 98 value, along with the peak width and any flags, are moved to the data buffer and all peak-finding variables are zeroed. Further Notes on the Algorithm The flow of the software which implements the peak- finding algorithm is shown in Figure 3.5. Besides the implementation of the three important functions discussed above, the software takes care of the details discussed in the following paragraphs. 'Hhen the intensity is increasing, the algorithm merely notes the fact by increasing UPFLAG, setting +LAST and proceeding (labeled as ”GOING UP” in Figure 3.4 as well). Thus, while intensity is increasing, very little time is spent on peak—finding. The first increase in intensity also starts the width counter (the variable POINTS). Otherwise, when POINTS is equal to zero, a peak has been found recently and the criterion for looking for a new peak has not been satisfied, so POINTS is not increased. The algorithm concludes by updating YPREV, the previous intensity value. Using THRESHOLD as a screen for new data (data below THRESHOLD are not processed) would speed up the algorithm quite a bit, but would interfere with the tracking of the increases and decreases of intensity. This is especially important when a peak starts below THRESHOLD and ends above it. 99 enting the implem software ow of the thm. Th fl rrent peak-finding algori 3.5 100 The FORTH code which implements this algorithm can.be found in Appendix D. For increased speed, I have implemented the algorithm in FORTH Assembler for our 8086 and 8088 microprocessors. For Intel enthusiasts and other interested parties, this code is also given in Appendix D. In some respects, the algorithm was developed for final implementation in assembly language. Thus, instead of using the stack, my peak-finding algorithm uses VARIABLEs for storing values, making the code easier to understand. Using variables makes the algorithm execute more slowly in high- level FORTH, but not in FORTH Assembler. Assembly language routines access the stack and other memory locations with equal speed. Comparison With Other Real-Time Algorithms Few descriptions of real-time peak-finding algorithms can be found in the literature. Most of the work in this area has been done by scientific instrument manufacturers who consider their algorithms proprietary. The actual code for their algorithms can be hard to obtain, although the user’s manual for the instrument itself can hint at some of the features of the algorithm in its discussion of user- controlled variables. The few algorithms that can be found in the literature do not tend to be the major focus of the paper, but merely a sidelight. Hopefully, the increasing popularity of digital signal processing and chemometrics 101 will help to focus attention on this most important form of signal processing and data reduction. The algorithms described in the literature approach real-time peak-finding in different ways. One common approach to peak-finding updates the maximum if it exceeds the current maximum and indicates a peak if the intensity falls below either a user-set threshold or a certain fraction of the maximum intensity (e. g., 1/2 or 3/4) (14,15). The tests for a new peak usually begin immediately, because single intensity values (rather than the difference in successive intensities) provide no easy means to determine the end of the previous peak. In these algorithms, spurious, ”fragmented" peaks are often falsely indicated on the shoulders of real peaks, since the bottom of a peak is not sought. By post- processing the peak data, one can guess which of the indicated peaks are merely fragments, especially if one knows.how frequently a peak is expected (as in low- resolution mass spectrometry, where they rarely occur closer than 1 mass unit apart). In order to reduce this peak fragmentation and reduce the susceptibility to large noise spikes, a minimum width function is is often used. However, the minimum width function reduces fragmentation only if the fragment is indicated as a peak but is narrower than the minimum width, in which case it is disregarded. Many times, however, the algorithm cannot distinguish the fragment from the following peak and, if the fragment is larger than the 102 following peak (as is often the case with isotope peaks), the position and intensity of the fragment will be indicated as the position and intensity of the following peak. In this case, the width of the fragment plus the width of the following peak is sufficiently large to exceed the minimum width requirement. Furthermore, if the spectrum contains both wide and narrow peaks, the high minimum width needed to reject the indication of the shoulders of the wide peaks may also reject the indication of the narrow peaks. This can be a big problem in magnetic sector mass spectrometers in which the peak width varies with mass. Another approach to peak-finding specifies a maximum width. If the intensity has not fallen below threshold and' the peak width has reached this maximum, then the peak is indicated. This approach leads to problems with clusters of poorly resolved peaks. If the intensity does not fall below threshold between the peaks, then a peak will be indicated each time the maximum width is reached. If one specifies a maximum width of 15 steps, for example, then two peaks will be found every 3 mass units (10 steps per mass unit), missing one peak. In order to perform accurate peak-finding and eliminate the problems described above, an algorithm must use all of the criteria implemented in my algorithm: examining the difference between successive intensities as well as the magnitude of the current intensity, waiting for the termination of the previous peak before searching for the 103 next peak, comparing the current width with a minimum width, and comparing the peak intensity with a user-set threshold. Ignoring any of these criteria in an algorithm can lead to problems under appropriate circumstances. Thus, reliable peak-finding is time-consuming and can easily limit scan rates. Furthermore, the difficulties in peak-finding described above become worse with increasing dynamic range. Since mass spectrometry/mass spectrometry (MS/MS) provides a dynamic range of 10°, peak-finding is especially difficult. Therefore, for MS/MS, one must use the best algorithm possible for reliable peak-finding, yet find ways to implement the algorithm quickly enough to minimize the limitation of scan rates. 4. Algorithm Testing The acid test for any algorithm is how it behaves in actual use. This algorithm and the MSSIN algorithm (15) were applied to a series of 16 peak profiles to test their performance. The profiles were chosen to represent a wide range of peak-finding problems. The profiles were gathered from real, raw data and were normalized to prevent any one example from becoming harder or easier for the algorithm to handle, based solely on its intensity. Since all of the algorithms are basically software state machines, how they handle a given peak depends not only on the peak profile itself, but also on the the value of the algorithm’s state variables (variables whose value influences the course of 104 action of the algorithm) and user-defined variables (threshold, minimum width, etc.) upon encountering the profile. The state variables provide the only influence that the data in the preceding part of the spectrum have on the processing of the current datum. Each algorithm was run through the profiles with all mathematically possible starting states. Obviously, some combinations of starting states and peak profiles are either physically impossible or highly unlikely. (Therefore, one must temper the success or failure of the algorithm for a given state-profile combination with an intuitive knowledge of the likelihood of its occurrence. Unfortunately, each algorithm has a different number of state and user-defined variables (Table 3.1), so it is difficult to compare algorithms quantitatively. It is also difficult to quantitate the likelihood of the experimental occurrence of a state-profile combination. Nevertheless, this quantitation is necessary as an absolute measure of the success of the algorithm. So, testing the algorithms for all possible starting states provides, at best, only a qualitative view of their strengths and weaknesses. However, this scheme can provide information about situations in which the algorithm’s performance may be suspect, so that such situations can be avoided. Also, the testing scheme immediately exposes most errors in an algorithm. The testing code that I developed can be found in Appendix E. 105 Table 3.1 Variables for Kristo Algorithm and MSSIN State Variables Kristo MSSIN Algorithmic Variable Variable Function MAX-PEAK MI Maximum Intensity POINTS NP Current Width UPFLAG UF Intensity Increases +LAST Last Pt Increasing? YPREV Previous Intensity User-Defined Variables Kristo MSSIN Algorithmic Variable Variable Function THRESHOLD D3 Intensity Threshold PNIDTH 'NP Minimum Width 5. Algorithm Performance Table 3.2 compares the performance of the present algorithm and that of another popular algorithm, MSSIN, given in reference 15 for one set of starting conditions. The values of each algorithm’s variables indicate that they are not currently monitoring a peak (maximum intensity is zero), that the previous point was decreasing (+LAST=0), but that the next point will be increasing (previous intensity=0). This means that any previous peak has been indicated and has either reached threshold or the valley between peaks. Both algorithms were run through the peak profiles with values of the minimum width ranging from 3 to 6. For reference, depending on the value of the resolution 106 control, quadrupole mass spectrometric peaks can range from 4 to 15 points wide. The results show that the MSSIN algorithm fragments peaks at low values of the minimum width. It does not fragment them at higher values, but then narrower peaks are not found. My algorithm also does not find the narrower peaks at high values of the minimum width, but does not have problems with fragmenting at lower values. Also, note that my algorithm found a peak for noise spike 2 at a minimum width of three. This particular noise spike resembles a real peak in that it has a typical profile with a width of four points. Thus, it is not surprising that my algorithm indicated a peak under those conditions. The user must compromise between sensitivity and noise immunity. The lower minimum width is sensitive to very narrow peaks, but also to fairly wide noise spikes. Of course, in general, noise spikes have a lower intensity than do peaks, so that they may be rejected at an appropriate threshold value. Unfortunately, this is not always the case. 107 TABLE 3.2 COMPARISON OF TWO REAL-TIME PEAK-FINDING ALGORITHMS Starting from Threshold PEAK MSSIN (15) PRESENT WORK PROFILE MIN. WIDTH VALUE MIN. WIDTH VALUE 3 4 5 6 3 4 5 6 Good F Skew Right F Skew Left F Wide F F F F Narrow Horns Splits Isotope- . Coalesced FM FM FM FM M M -M M Isotope- Merges F F F F Isotope- Resolved Small- Coalesced FM M M M M M M M Small Merges FM M M M M M M M Small- Resolved F Noise No. l 0 0 0 0 0 0 0 0 Noise . No. 2 0 0 0 0 l 0 0 0 MISSED A PEAK FRAGMENTED A PEAK IGNORED A SPIKE CALLED SPIKE A PEAK H0013 l 108 I The results shown in Table 3.3 show the performance of the algorithms when they encounter the 16 test profiles after the tail of a previous peak. In this case, the intensity of the tail is larger than the maximum intensity of the test profiles. Upon encountering the given profiles, then, the maximum intensity for MSSIN is the intensity of the tail, but is zero for my algorithm, since the maximum intensity cannot be updated before two intensity increases. The variables UPFLAG (UPCHECK) and +LAST are zero since the intensity has not increased since finding the previous peak. The results in Table 3.3 show that my algorithm avoids increased fragmentation and sensitivity to noise spikes, by. waiting for the previous peak to reach threshold or minimum intensity. Fragmentation occurs with the MSSIN algorithm because the tail is incorrectly identified as a peak. In fact, this intensity can supersede the maximum of neighboring peaks with low intensity. 109 TABLE 3.3 COMPARISON OF TWO REAL-TIME PEAK-FINDING ALGORITHMS Casing Off a Large Peak PEAK MSSIN (15) PRESENT WORK PROFILE MIN. WIDTH VALUE MIN. WIDTH VALUE 3 4 5 6 3 4 5 6 Good F2 F F F Skew Rijht F2 F F F2 Skew Left F2 F F F _ Wide F Fz-zF2 F F F F _Narrow F F F m Horns. F2 F2 F F Splits F F F Isotope- Coalesced FZM FZM F2M F2M FM FM FM FM Isotope- Merges F2 F2 F2 FZM Isotope- Resolved F F F F Small- Coalesced FZM FM FM FM M M M M Small Merges FZM FM FM FM M M M M Small- Resolved F2 F F FM Noise No. l 1 0 0 0 0 0 0 0 Noise No. 2 1 1 0 0 l 0 0 0 KEY: M - MISSED A PEAK F - FRAGMENTED A PEAK F2 - FRAGMENTED A PEAK TWICE 0 - IGNORED A SPIKE l - CALLED SPIKE A PEAK 110 The results shown in Table 3.4 show the performance of the algorithms when they encounter the test profiles after encountering a large intensity increase (or spike). The intensity of the spike is larger than the intensity of the maximum of the test profiles. Once again, the maximum intensity is the intensity of the spike for MSSIN, but is zero for my algorithm, since the maximum intensity cannot be updated before two intensity increases. UPFLAG (UPCHECK) and +LAST are both equal to one since the intensity has increased once since finding the previous peak. The results in Table 3.4 again show that my algorithm avoids increased fragmentation after encountering a large intensity increase. before a peak, because the maximum will not be updated without a consistent upward trend. Sharp intensity spikes do not by themselves constitute a consistent upward trend. Although the spike itself is not wide enough to be called a peak, it can cause fragmentation in the following peaks with some algorithms. 111 TABLE 3.4 COMPARISON OF TWO REAL-TIME PEAK-FINDING ALGORITHMS .After a Large Intensity Spike PEAK MSSIN (l5) PRESENT WORK PROFILE MIN. WIDTH VALUE MIN. WIDTH VALUE 3 g 5 6 3 4 5 6 Good F2 F F F Skew Right F2 F F F Skew Left F2 F F F _ Wide F2 F2 F2 F F F F Narrow F F F FM M Horns F2 F2 F F * Splits F F F F F F F Isotope- Coalesced FZM F2M FZM F2M FM FM FM FM Isotope- Merges F2 F2 F2 F2M Isotope- Resolved F F F F Small- Coalesced F2M FM FM FM M M M M Small Merges FZM FM FM FM M M M M Small- Resolved F2 F F FM Noise No. l l l 0 0 - 0 0 0 0 Noise ‘ No. 2 l 1 1 0 ' l l 0 0 KEY: M - MISSED A PEAK F - FRAGMENTED A PEAK Fz- FRAGMENTED A PEAK TWICE 0 - IGNORED A SPIKE l - CALLED SPIKE A PEAK 112 The results shown in Table 3.5 show the performance of the algorithms when they encounter the test profiles after encountering a small intensity increase (or spike). In this case, the intensity of the spike is smaller than the intensity of the maximum of the test profiles. The conditions upon encountering the profiles is the same for Table 3.5 as in Table 3.4, except that the current value for the maximum intensity is smaller. The results in Table 3.5 again show that my algorithm avoids fragmentation after encountering a small intensity increase before a peak, again by waiting for a consistent upward trend before updating the maximum. However, even with MSSIN, there is reduced fragmentation as compared with a large spike, because the intensity is not enough to overwhelm the intensity of the following peaks. 113 TABLE 3.5 COMPARISON OF TWO REAL-TIME PEAK-FINDING ALGORITHMS After a Small Intensity Spike PEAK MSSIN (15) CURRENT WORK PROFILE MIN. WIDTH VALUE MIN. WIDTH VALUE 3 4 5 6 3 4 5 6 Good F Skew Right F Skew Left F Wide F Narrow M Horns F2 F2 F F Splits F F F Isotope- _ Coalesced FM FM FM FM FM FM FM FM Isotope- Merges F F F FM Isotope- Resolved Small- Coalesced FM M M M M M M M Small Merges FM M M M M M M M Small- Resolved F Noise No. l 0 0 0 0 0 0 0 0 Noise ' . No. 2 0 0 0 0 l l 0 0 KEY: M - MISSED A PEAK F - FRAGMENTED A PEAK Fz- FRAGMENTED A PEAK TWICE 0 - IGNORED A SPIKE 1 - CALLED SPIKE A PEAK 114 6. Algorithm Speed Table 3.6 shows the average execution time for the peak-finding algorithm. The time for the algorithm to process 13 points which defined a basic peak shape was measured. The peak profile provides opportunity for the algorithm to exercise all the decision processes, similar to a true scan. The time required to process the profile was then divided by 13 to give the average time spent per point. The execution time also includes two FORTH literals, which place the intensity value on the data stack. Fortunately, the algorithm itself executes much more slowly than the literals, so the timing reflects fairly accurately the true execution time. Execution times are given for both the algorithm written in high-level polyFORTH I on an 8088 processor, FORTH 8088 Assembler, and polyFORTH II on an NC4000. TABLE 3.6 Timing Information Language Processor Speed FORTH Assembler 5 MR2 8088 215 uS High-level FORTH 5 MHz 8088 823 uS High-level FORTH 6 MHz NC4000 16 uS 7. Conclusion A real-time peak-finding routine has been developed which executes quickly and performs reliably even under 115 adverse conditions. The algorithm has some flexibility- through user-adjustment of the variables PWIDTH and THRESHOLD. Background noise and small peaks can be effectively filtered by THRESHOLD. Adjustment of PWIDTH allows the user to compromise between sensitivity to narrow peaks and immunity to noise spikes. The algorithm was designed for mass spectrometric peak-finding, but should be applicable to other fields such as atomic emission spectroscopy with little or no modification. My study of peak-finding and peak-finding algorithms has shown that it is important to examine the upward or downward trends in the intensity and not just the magnitude of the current intensity value. This feature allows the previous peak to reach threshold or its minimum intensity and a consistent upward trend to be demonstrated before a new search for the peak maximum begins, eliminating the splitting of peaks. The examination of differences in intensity also enables the establishment of a consistent downward trend before indicating a peak, rather than depending on the intensity to fall below a certain level. It is also important for a peak-finding algorithm to have a minimum width requirement to reduce sensitivity to noise spikes, although inappropriate minimum width values can also reduce the sensitivity to narrow peaks. Thresholds are also a common and useful function in peak-finding algorithms, because they eliminate problems with normal variation in background intensity as well as small peaks. 116 References l. R. A. Yost and C. G. Enke, Anal. Chem., 51, 1979, 1251A. 2. Aleksander Janik, J. Chrom. Sci., 13, 1975, p. 93. 3. N. W. Bell, ”Computer Detection of MS Peaks by Real Time Cross Correlation,” Technique Paper No. MS-Z, Hewlett Packard: Palo Alto, CA. 4. W. F. Bryant, M. Trivedi, B. Hinchman, S. Sofranko, and P. Mitacek, Anal. Chem., 52 (1980) 38. 5. Intel Corporation, Santa Clara, CA. 6. Extrel Corp., Pittsburgh, PA. 7. B. H. Newcome and C. G. Enke, Rev. Sci. Instrum., 55, (1984) 2017. 8. C. A. Myerholtz, A. J. Schubert, M. J. Kristo, and C. G. Enke, Journal of FORTH Applications and Research, Vol. 3, No. 2, 1985, p. 189. 9. C. A. Myerholtz, A. J. Schubert, M. J. Kristo, and C. G. Enke, Journal of FORTH Applications and Research, Vol. 3, No. 2, 1985, p. 193. 10. Novix Inc., Cupertino, CA. 11. Forth, Inc., Hermosa Beach, CA. 12. J. W. Cooper, Minicomputers in the Laboratory, New York: Wiley Interscience Publishers, 1983, pp. 251-7. 13. Laboratory Subroutines Programmer’s Reference Manual, Digital Equipment Corporation, Marlboro, MA, 1982, Chapter 2. 14. William H. Caskey, Journal of FORTH Application and Research, 1, p. ll. 15. J. F. Holland, Computer Program ”MSSIN,” Michigan State University, East Lansing, MI 48824. 16. INCOS Software User’s Manual, Finnigan MAT Corp., San Jose CA. CHAPTER FOUR HARDWARE PEAK-FINDING FOR RELIABILITY AND INCREASED SCAN RATES 1. Introduction Reducing sequential intensity data to mass/intensity pairs for all peaks in a mass spectrum occupies much of the time during a mass scan. ”Peak-finding” can thus limit the maximum mass scanning speeds to less than that possible for the mass filter employed. Also, since the processor spends so much time on this task, a substantial fraction of the ion current goes unsampled, which leads to a less than maximum signal-to-noise ratio for the data obtained. Therefore, it' is desirable to reduce the amount of time necessary to perform peak-finding reliably and to perform this task in parallel with other functions. I have developed an electronic peak-finding accelerator (PFA) for quick reduction of raw intensity versus mass data to mass-intensity pairs for all peaks in a mass spectrum. The accelerator accepts sequential intensity data from the host control system processor and returns peak positions and intensities for storage. The peak-finder achieves the speed of a dedicated hardware peripheral, yet retains programmability through software sequencing of the hardware functions. The accelerator’s peak-finding program is written in horizontal microcode (64-bits wide), which is tedious to 117 118 write by hand. Therefore, a microcode compiler, based entirely on FORTH, has been written to facilitate development of code for new peak-finding algorithms. 2. The Hardware Peak-Finder Concept A block diagram of the hardware peak-finder is found in Figure 4.1. Letters in parentheses in the following paragraphs refer to sections on the diagram. The heart of the hardware peak-finder is a RAM—based state machine. The desired peak-finding algorithm is written to the peak- finder’s RAM (B) by the host processor. The algorithm is a. control sequence program and directs the processing of incoming data. The sequence of instructions in the program is controlled by the next-address latch (C). A 16:1 multiplexer (D) provides the ability to branch in the program on any one of 16 conditions. These conditions (E) are generated by the status of the comparators and flags in the peak-finder. Incomidg data are manipulated on a 32-bit bus, which connects the input latches, the output latches, latches for a threshold value, and two banks of comparators with internal registers. Additional counters and flipflops track the occurrence of certain events. Thus, many useful hardware functions can be performed which parallel functions used in software peak-finding algorithms. Furthermore, it 119 .aovcmmaxmom chested: mo Imaumwv zoofim ~.¢ enough :5 Sta 3 120 is simple to add further arithmetic elements without extensive redesign. Acquired data are written into the input latches of the accelerator (A) and peak data are read from the output latches (G). The host processor can monitor the status of the peak-finder (whether the current datum has been processed and whether or not a peak was found) by reading the user status byte (F). With this monitoring capability, the peak-finder can process data simultaneously with the host processor, thus freeing the processor to attend to other tasks. Interfaces have been designed for two host processors. One host processor is the multimicroprocessor control system described in Chapter One, consisting of four Intel 8088 (l) microprocessors, one master and three slaves. The Detection Slave handles the data acquisition and can also control the peak-finding accelerator. The software for the multimicroprocessor control system (2,3) and for its version of the microcode compiler are written in polyFORTH I (4). The other host processor is the Novix control system described in Chapter Two, based on the NC4000 FORTH processor (5). The software control system and the version of the microcode compiler for the Novix control system are written in polyFORTH II (4). 121 Hardware Desigg The hardware peak-finder was divided into two separate circuits for modularity and simplicity of design. The first circuit, designated as PFA-1000A, contains all of the RAM for the microcoded algorithm, counters for such quantities as the peak width, and flipflops which serve as flags. The second circuit, designated as PFA-lOOOB, contains the 32-bit intensity (y-value) bus and the l6-bit mass (x-value) bus, consisting of latches and registers for storing numbers and comparators for determining the greater of two numbers. Modifications can be made to either circuit without changing the other. For instance, one can add more memory to PFA- 1000A without changing PFA—1000B. Extra memory would allow longer control words (greater than 64-bits) and, thus, more control signals. The extra signals could be used to control a multiplier-accumulator (MAC) to allow real-time centroidal calculations. The two circuits transmit and receive signals to and from each other over a 50-pin ribbon cable. Separating the peak-finder into two circuits also prevented troubles with the computer-aided design (CAD) system on which they were designed. The memory-management software on the CAD computer has trouble handling extremely large numbers of parts (greater than about 40 integrated circuits). The three processor address lines (PAO-2), the processor chip select line (/CS), and the processor read 122 (/RD) and write (/WR) lines are decoded in PFA-1000B to select the various chip which control the peak-finder (shown in Figure 4.2). The lower six of the possible eight addresses select the bytes for writing the input intensity and x-value data and reading the peak intensity and mass data. One of the upper two addresses allows reading/writing to the random access memory, while the other address allows either reading from the event counter or changing the mode of the peak-finder to either the load mode (writing and verifying the microcode for the peak-finding algorithm) or run mode (processing incoming data). When changing the mode of the PFA, the board can also be reset to initialize all devices and set the currently selected address to zero. Setting appropriate jumpers in PFA-1000A allows the PFA to be addressed either as bytes or words. Thus, the peak- finder can be optimized for processors with either 8-bit or l6-bit input/output. Some of the general signals generated in PFA-1000B are further combined with memory address selection circuitry (shown in Figure 4.3) in PFA-1000A. The processor can then read or write to each byte in the microcode RAM when the PFA is in load mode. The selection of a particular byte in a particular word in the memory occurs through an autoloading feature (shown in Figure 4.4). Therefore, RAM addresses must be sequentially accessed when either reading or writing. When the PFA is in run mode, all eight bytes of memory (64 bits wide) are accessed at once, making all 123 Pfi 7: OI J4-J9 SELECT 0 OR Io-BIT MODE as Figure 4.2 Schematic of addreSS*decoding circuitry. 124 Figure 4.3 Schematic of chip-select generation for random-access memory. 125 r. a 4'1 . TC « m m 9 a ‘ I.” '3‘. m» es 104 A m nos 4'} Imam All. . 3% i": 1 ._ TO on , EMORY "' u. 3. 3 4., a mo 4'» es 104 4" me 4" IMME it C. 3 J0) Figure 4.4 Schematic of the autoloading feature for generation of addresses when reading from or writing to the random-access memory. 126 control signals (bits in the control word) available simultaneously. The selection of the appropriate control word occurs through the next-address bits of the current control word in the microcode, as well as the current state of the signal selected by the 16-input multiplexer. Since the output of the multiplexer is always the least significant address bit, whether a branch is desired or not, memory must be allocated by pairs in software. If no branch is desired, then the same control word occupies both locations allowing for correct execution upon any value of the multiplexer’s output. This next-address generation scheme is shown in Figure 4.5. The design of one byte in the microcode RAM is shown in Figure 4.6. Each byte includes two 2148H random access memory chips with 4 by 1024 bit storage, a 74L8245 bidirectional transceiver for reading and verifying the bytes in each control word, a 74LS374 octal latch for latching the current control signals for each clock cycle. The 2148H was chosen for its speed (20 ms access time) and low cost. PFA-1000A contains eight such bytes, providing the-64-bit control word. Each bit in the 64-bit microcode is a direct control signal either for the next—address generation, one of the integrated circuits on the intensity or x-value buses, or one of the counters or flipflops. The design of the intensity bus is shown in Figure 4.7. Basically, incoming data are latched by a bank of six 74L8374s (4 for the 32-bit intensity and 2 for the 16-bit x- 127 .lsuwaomaa mswvswhxxooa on» uswusuoxo sum: amuwsoafio cesawsosom muoavvmlaxoc emu mo Owesloaom silllJ. m5 = = .A .JQIIIIIJs. d. le- is -u illllllq I TI Am. ._a. .all... W: a. u .A M In. I Qtu 1 0.35 . talus 83088408 (D la #3 '01 N a 8838 «qr-Him“ . ll.ll 83883048 0‘) la #3 '..(3l 3 383 a A“. Ii ital m.e «Lassa . to .o 1., o N; ,. .A . - 0.x 0? .e . 'A . .s. Q:& 128 .o~u>o suede some pom w~s=mmm Monacoo wswzoasm use suasaaou «no: as» Scam ensues sow hauwsosfiu saw: huoawa mucous Bones» yo mama use we swunflonom m.v seamen n: 101—N 080! 309. 02¢ .- op mVN 2 0303 60—200 130 value). There are also latches for a threshold value and output (peak) data. Two banks of four 74F524 8-bit registered comparators allow storage of the present maximum intensity and the previous intensity, as well as comparing these values with data on the intensity bus. Thus, the previous intensity value can be compared with the present intensity by driving the present intensity onto the bus from its latches and monitoring the status lines from the appropriate bank of registered comparators. In another example, the maximum intensity can be compared against threshold by transferring the threshold value onto the bus from its latches and monitoring the status lines from the 74F524s which contain the maximum intensity in their registers. 3. The Microcode Compiler Design Goals An algorithm microcode compiler was written to allow inexperienced programmers to write and test new algorithms for the peak-finding accelerator without extensive knowledge of either the intricacies of the peak-finder’s electronics or of writing horizontal microcode. With this goal in mind, I sought to use the inherent extensibility and flexibility of FORTH to create a syntax for the compiler that was as close to FORTH itself as possible. In essence, the syntax should create a microcode compilation that is analogous to 131 the familiar resident FORTH compilation, including the typical control structures. Appendix F contains a full listing of the FORTH code for the microcode compiler. I wanted the compiler to be easily modified, so further improvements to the hardware would not outdate the compiler. This flexibility in the compiler also allows it to be modified for completely different applications which require horizontal microcode. In order to achieve this ease of modification, the microcode compiler needed to be flexible in several ways. First, the compiler needed to be flexible with respect to word length. The peak-finding accelerator described in this chapter uses a 64-bit word, but this compiler attribute could be modified for a completely different environment or for the same environment after the addition or deletion of hardware functions. This is accomplished by changing the value of the constant WORDLENGTH in block 2 to the new word length (in bits). The new value must be a multiple of 8, but is otherwise limited only by the requirement that the buffer in which the compiler constructs the microcode not exceed the amount of memory available on the host system. This restriction that WORDLENGTH be a multiple of 8 is merely a function of the organization of memory on the host processor. Most processors move data in multiples of 8 bits (e. g., 8,16,32-bit processors). Unused bits at the end of a control word need not actually exist in the hardware, 132 since nonexistent bits in the peak-finding RAM will not be latched or used. Secondly, the compiler needed to be flexible with respect to grouping of the bits into control fields (groups of signals that control related devices or accomplish related tasks) and with respect to the definition of each bit in the control field. The flexibility allows the compiler to be easily modified after any hardware changes to the peak-finder or for a completely new microcode environment. Thirdly, the compiler needed to be flexible with respect to the depth of the program space. The RAM used in the hardware peak-finder is 1024 words deep, but other environments might require more extensive program space. Again, the value for the depth of the program space is limited only by the memory available for the microcode buffer on the host system and can be changed by changing the value of the constant RAM-DEPTH in block 1. Fourthly, flexibility with respect to the control structures would also be desired. For instance, additional signal multiplexers could add the capability make a decision (jump) based on two conditions simultaneously. One would then like the compiler to take advantage of this capability. Unfortunately, this would necessitate a departure from the common IF . . . THEN syntax employed here. A syntax similar to 0=IF, l=IF, 2=IF, 3=IF, . . . THEN would be needed in that case to respond to the four possible conditions. The 133 modifications to the present compiler to allow that feature would not be too difficult, but, for now, I have chosen familiarity rather than unnecessary flexibility. The Software The heart of the microcode compiler is the word ENCODE found in block 5. ENCODE is a second-order defining word, that is, a word which defines new defining words. ENCODE defines words for each control field, such as MUX.SELECT and lFLAG (also defining words), assigning to each control field a length in bits and a location in each control word. These words, in turn, define the various instructions for their designated control field. MUX.SELECT, for instance, defines instructions which will compile the appropriate bits for controlling the input to the 16-channel multiplexer into the control word currently being compiled. lFLAG defines words which will compile the appropriate bits for one of the peak- finder’s flipflops into the control word currently being compiled. Thus, lFLAG can define lCLR, which will compile the appropriate bits for clearing the first flipflop when the control word is executed, lSET, which will compile the bits for setting the flipflop upon execution, and lHLD, which compiles the bits which leave the flipflop unchanged upon execution. The activity initiated by these instructions (lCLR, lSET, lHLD, etc.) is to compile the appropriate bits into the microcode buffer in the designated 134 instruction field of the control word currently being compiled. These primary instructions can themselves be linked by the typical FORTH colon (:) definitions into a data movement, which can represent an entire control word or a logically linked part of a control word. Furthermore, sequences of control words can be linked by colon definitions into macros. Movements and macros can be used for programming convenience or to give an instructions and control words new mnemonic content. In order to link control words into useful macros, though, one also needs control structures to direct the sequence of the compilation of the control words. Three variables, ”current,” ”node,” and ”available” control the sequence of compilation of control words into the microcode buffer. The variable ”current” holds the number of the current control word being compiled and directs compilation of instruction fields into the appropriate location in the microcode buffer. The variable ”available" holds the number of the next unused location in the buffer. Locations for control words are allocated two at a time: one for the control word which will be the subject of a branch on zero and one for the control word which will be the subject of a branch on one. If no branching is occurring, these two instructions are the same. The variable ”node” comprises three bytes. The first two bytes are the number of the most recently compiled control 135 word which contained a branch instruction, while the third byte signals whether the control word currently being compiled is the subject of a branch or not. If a branch instruction occurs, the compiler first compiles the control word which will be the subject of the branch if the result is one (the selected multiplexed signal is high). The compiler does this by placing the address of this control word into the next-address field of the control word from which the branch is occurring (the node) and onto the parameter stack to provide the reference location for later compilation of the corresponding branch-on-zero instruction. If no branch instruction occurred in the control word compiled last, the address of the current instruction should be compiled into the next-address field of the previous instructions. The variables ”current,” ”available," and ”node" are manipulated by the control structures ”if,” ”else,” ”then" and ”next.” These control structures retain the same meaning as in FORTH itself. They are preceded by a condition test (a MUX.SELECT instruction field), which upon execution will generate either a one or a zero, which is the value of the least significant address bit. The word "if” signals that the following control word will be the subject of a branch upon a result of one; ”else” signals that it will be the subject of a branch upon a result of zero. The word ”next” is the control structure for linear program flow (no branching). Therefore, the control word following ”next” is 136 not the subject of a branch. The word "next” must be used inside a colon definition; the corresponding word for interpretive mode is ".” All of the other control structures can be used in either compile or interpretive mode. The word START precedes the control word that will start the repetitive part of the algorithm. Thus, one can have a set-up portion of microcode (to initialize devices) and a run-time portion (to actually find peaks). HOME forces a return to the address of START after execution of the previous control word and should, therefore, follow the last instruction in each branch of the algorithm. This command restarts the algorithm for processing the next datum. All of the other control structures can be used in either mode. The word MICROCODE initializes the compiler and should precede compilation of the algorithm. Error-checking routines make sure that only one component is driving each bus in order to eliminate bus conflicts. If any potential conflicts are found, error messages are generated which indicate the suspect instruction and bus. The assembly level code words ?BIT and ?2BITS return the value of a single bit or two contiguous bits respectively, given a byte address and a bit number. MCHECK uses these assembly level routines to perform this error checking. MCODE>DISK moves the entire code-buffer to a file on disk for later use. The file starts at the block designated 137 in CODE-FILE, a constant whose value can, of course, be changed. Block 25 in Appendix F contains some debugging and listing aids. SHOW types out a given microinstruction. CLEAR erases a given microinstruction. REV gives the current state of all control structure variables. ”list" types out the first n microinstructions. Algorithms can be compiled interactively, as long as ”(next)" is used, or formulated inside a definition using "next.” ALGO in block 26 in Appendix F is one such word, which defines a sample peak-finding algorithm (6). ALGO uses macros written in blocks 15-18. Executing UCODE will execute the word ALGO, thus, compiling the algorithm into the microcode buffer. If no errors are found, UCODE will also write the resulting microcode to disk. 4. Results Processing Speed With the current peak-finding algorithm, the hardware peak-finder is capable of processing an average of one datum per microsecond. Theoretically, then, the peak-finder could process 1 million points per second. However, the primary limitation to the speed of peak-finding is actually transferring the data from the data acquisition circuit to the hardware peak-finder. Of course, the speed of the peak— finder makes almost any operation seem slow, but there are two reasons why the transferal of intensity data is slower 138 than might be expected. First, the intensity values are only available as bytes. The peak-finder, on the other hand, can accept values either as 16-bit words or as bytes. Thus, writing data as bytes to the peak-finder is twice as slow as would be possible writing words. Second, reading data from the data acquisition circuit is the slowest transaction on the Novix Mass Spectrometer Interface Board (described in Chapter 2). On the other hand, when the peak- finder is operated in byte mode, it is not necessary to mask off the high byte when reading from the data acquisition circuit and to combine the two low bytes into one 16-bit word, since the high byte is simply not latched. This adds to the speed advantage of hardware peak finding over software peak-finding for the Novix Control System. Peak-finding speed could be further enhanced by using the flexibility designed into the hardware peak-finder to create an autoloading feature which would control and accept output from the data acquisition circuit. The autoloader would generate the control signals and monitor the ”acquisition-done” interrupt from the data acquisition board, reading the data at hardware speeds. The large amount of time spent on software transferal of data between these two circuits would be eliminated. The drawback to this approach is that it eliminates the possibility of other kinds of software processing between acquisition and peak- processing like dual-mode acquisition, described in Chapter 5. 139 Improvements in Scan Speed and Signal Averaging The addition of hardware peak-finding to the Novix TOMS control system has made possible the scanning speeds and concomitant amounts of averaging shown in Table 4.1. This can be compared to the scan speeds and amounts of averaging before adding hardware peak-finding in Table 4.2. A new scan speed of 4000 amu/S is now possible. However, this scan speed contains no rate synchronization step and may be erratic from point to point. Furthermore, the problems with the 2000 amu/S rate described in Chapter 2 will only be exacerbated at 4000 amu/S. This scan rate has been included for completeness, but its utility is questionable. Note that the scan rates for hardware peak-finding produce only reduced spectra, so that no peak profiles can be obtained. The lower scan rates, in which software peak-finding consumed as much as 368 of the time spent at each point, can now include much more signal averaging with hardware peak- finding. Rate 2 (2000 amu/S) has 8 times more averaging. Rate 3 (1000 emu/S) has twice the amount of averaging. By rate 6, the amounts of averaging are equal. As the scan speed decreases, more and more of the time spent at each point is spent signal averaging, whether peak-finding is performed in software or hardware. The time saved by performing peak-finding in hardware is not enough to allow twice as much averaging at these lower rates (the number of 140 averages must be a factor of two, as described in Chapter 2). Of course, the improvement in the number of averages performed at a given scan rate with hardware peak-finding would be much more dramatic with slower processors. Table 4.1 Novix Control System Scanning Functions With Hardware Peak-Finder Rate Pts/S Amu/S Time/Pt # Averages/Pt 1 40000 4000 25 uS 1 2 20000 2000 50 8 3 10000 1000 100 32 4 5000 500 200 64 5 2500 250 400 128 6 1000 100 l as 256 7 500 50 2 512 8 250 25 4 1024 9 100 10 10 2048 10 50 5 20 4096 ll 25 2.5 40 4096 12 10 1 100 4096 13 5 0.5 200 4096 14 2.5 0.25 400 4096 Table 4.2 Novix Control System Scanning Functions Without Hardware Peak-Finder Rate Pts/S Amu/S Time/Pt # Averages/Pt 2 20000 2000 50 us 1 3 10000 1000 100 16 4 5000 500 200 32 5 2500 250 400 64 6 1000 100 1 ms 256 7 500 50 2 512 8 250 25 4 1024 9 100 10 10 2048 10 50 5 20 4096 ll 25 2.5 40 4096 12 10 l 100 4096 13 5 0.5 200 4096 14 2.5 0.25 400 4096 141 5. Conclusion The hardware peak-finder has made possible faster scan rates and, more importantly, greater signal averaging at fast scan rates. Because of the limitation that the number of averages be a factor of two, hardware peak-finding is only important at scan rates faster than 250 amu/S. The hardware peak-finder accomplishes this speed in peak finding and still allows flexibility in the choice of algorithms through software sequencing. The algorithm compiler has made the electrically complex hardware peak-finding accelerator accessible to the average scientist. We have used the extensibility and interactive nature of FORTH to make the tedious chore of creating 64-bit horizontal microcode into a familiar programming environment with typical control structures and inclusive error-checking. The hardware peak-finder allows a function once run in software at a typical speed of 100 uS/point to now be executed in hardware at l microsecond/point. The limitation in scanning speed is no longer reliable peak-finding, but in data acquisition and transferal to the peak-finder. REFERENCES 1. Intel Corp., Santa Clara, CA. 2. C. A. Myerholtz, A. J. Schubert, M. J. Kristo, and C. G. Enke, Intelligent Instruments and Computers, 3, 1985, ll. 142 3. C. A. Myerholtz, A. J. Schubert, M. J. Kristo, and C. G. Enke, Intelligent Instruments and Computers, 3, 1985, 13. 4. Forth, Inc., Hermosa Beach, CA. 5. J. H. Golden, C. H. Moore, and L. Brodie, Electronic Design, March 21, 1985. 6. M. J. Kristo and C. G. Enke, in preparation. CHAPTER FIVE DUAL-MODE DETECTION FOR HIGH PERFORMANCE ION CURRENT MEASUREMENT AND EXTENDED DYNAMIC RANGE IN MS/MS 1. Introduction Kondrat and Cooks (1) first reported the increase in useful dynamic range obtained in tandem mass spectrometry (MS/MS). This is due to the great decrease in chemical noise in the system, resulting from the addition of the fragmentation step and the second mass analyzer. However, very little work has been done since that observation to capitalize on that increased dynamic range or even to make it available in a single scan. Figure 5.1 compares the dynamic range afforded by various data acquisition systems with the dynamic range potentally available in MS/MS systems. The typical dynamic range for an MS/MS instrument extends from the limits of chemical noise in the system (usually less than 1 count per second) to the saturation point of the multiplier (greater than 109 counts per second). Of course, with analog measurements, the multiplier voltage or preamplifier gain can be changed to measure larger or smaller ion flux rates, but this does not change the dynamic range of ion flux measurable at any given setting. In this work, a data acquisition system has been implemented which takes advantage of the full dynamic range of MS/MS by using the Galileo Dual Output Channeltron (2). 143 144 .lsaahe “chases wool IHssv was was .nuw30hwo umaassco new .uwnoswo missuasl use flash onmsams>s on<\uowmwfimle modems omssawaasl on» .maoanhm use: so ognmams>s 00<\Lowmw~nfis madman canon on“ "m£\mz :« odnsaws>s muses ownschv on» ssnao> almanac a:o«am> an pmvhovmo mounds swimahv one we conwammaoo < H.m shaman IIJII Ifill O . a ll . v BEOOOO e .J“—QESOO Illl 2:.xu IIIIIIII o .00: 983300 Illlllll~ i! ll . SIRS. 22!. mi< 00332‘ 1358-- #30 ES! :BEOZ .Sfll. 145 Kurz and Roy first described the dual-mode detector, which is capable supporting simultaneous analog measurements and pulse-counting, to the mass spectrometric community in 1979 (3). Subsequent applications using the dual-mode detector were described by Schoen (4) and Matthews (5). Basically, the dual-mode detector (see Figure 5.2) consists of two continuous dynode multipliers in series, separated by the analog anode, ground isolation grid, and protection grid. Ions incident upon the detector or its conversion dynode release secondary electrons. These electrons undergo further amplification in the low-gain section to a total gain of 104 (with the recommended -l400 V applied). The analog anode then collects 90* of the electrons to provide the analog signal. The remaining 103 of the electrons are free to enter the high-gain section of the dual-mode detector if the protection grid is held at common potential. This electron flux will then undergo further amplification to a overall gain of 10s (with +1900 V on the rear section and -l400 V on the forward section). Pulse-counting can then be performed with the signal at the anode of the high-gain section. However, a voltage of -350 V can be applied to the protection grid to prevent the electrons from entering the high-gain section. This grid protects the high-gain section under conditions of high input ion flux. 146 ANALOG OUTPUT NICII GAWI SECTION ”—32—. EM ANALOG W CQCII'TB “PROCESSOR AND SOFTWARE H una- VAL. Figure 5.2 Schematic diagram of the Galileo Dual Output Channeltron control system. 147 2. System Description To take advantage of all the dual-mode detector’s capabilities, the control system must include analog signal processing, pulse-counting, logic for controlling the protection grid, and normalization of the analog and pulse- counting data into a single number proportional to the absolute count rate. The interconnection of the various subsystems involved in these operations is shown in Figure 5.2. Analog Processing For analog processing, I have chosen the multiamp analog measurement scheme shown in Figure 5.3 (6). In this’ scheme, current from the analog anode is converted to a voltage by a preamplifier with a transresistance of 107 V/A. A multiamp circuit amplifies this signal at five different levels of gain simultaneously. In the selection logic circuit, the outputs of all of these amplifiers are individually compared with the full-scale voltages of the ADC. The largest signal which does not exceed the ADC range is selected. The selection logic circuit also provides three range bits which indicate the binary value of the log to the base two of the gain for the selected signal. A data acquisition circuit combines the range signal with the output of the 12-bit analog-to-digital converter to form a 20-bit integer intensity value. The data acquisition .oaosom acofiossaaoa ucasss naswaasz m.m shaman ==0§0 0.00 20:03an O— —?::O 8 . . .30.. m 3.300.... I R: 03 0.004 .08! 2 AH 2 :25 an”: _ :3 .2. .oio [at . , A- 5.2. > e: .2330 AAA‘AA 3 149 circuit also sums a user-specified number of successive conversions and sends a 20-bit average to the host processor. The maximum data rate for the 20-bit average is 4 uS per conversion (e.g., for 16 conversions per datum, the data acquisition board takes 64 uS.) Ion Counting Current pulses from the pulse-counting anode are converted to TTL logic pulses by a pulse amplifier discriminator (Princeton Applied Research Model 1182) (7). The pulse amplifier discriminator (PAD) has user-adjustable output pulse widths from 10 to 75 n8 (which affects the maximum possible count rate) and threshold levels from 150 to 500 uV, which can optimize the PAD sensitivity and immunity to noise for a given gain in the detector. The PAD can operate in current input as well as voltage input mode. The pulses from the PAD are then counted by a versatile counter/timer circuit based on the American Micro Devices 9513 Counter/Timer Chip (8). The AMD 9513 chip contains five lB-bit counters which can be concatenated and individually configured. The pulse counter/timer circuit can measure pulse rates in either constant time (constant scan rate) or constant pulse count (constant precision) mode. Although the counting rate specification for the AMD9513 is only 7 MHz, experience in our laboratory has shown most chips capable of counting uniform pulse rates over 9 MHz with an external 10 MHz clock. The circuit also 150 senses when the pulse rate is insignificant (user-defined) and interrupts the processor, so the scan can continue. This is important for two reasons: 1) if the system is in constant count mode, an input pulse rate of 0 counts per second will force the system to wait indefinitely, and 2) one study has shown that up to 708 of the time spent in data acquisition is spent acquiring data at points which contain only negative (”nothing there”) information (9). This interrupt feature senses the absence of useful ion current and notifies the processor to continue the scan. Thus, time spent acquiring data can be more efficiently utilized. Figure 5.4 shows how the AMD 9513 counters are configured by the software. Counter 5 provides the counting window for the counters 1 and 2 which are concatenated into one 32-bit counter. If the counter is operating in constant time mode, then counter 5 counts clock pulses. The clock pulses are provided by any one of 5 internal frequencies, derived by division of the external lO-MHz frequency. The output of counter 5, which is only low during the count, provides a time window (gate) for counters l and 2 to count ion pulses. If the counter is operating in constant count mode, then counter 5 counts the ion pulse train, which can be appropriately divided when selecting a number of ion counts for the counting window larger than 16 bits. Counters 3 and 4 count down from user-set numbers, toggling their output when the count reaches zero. Counter 3 counts ion pulses and counter 4 counts clock pulses. The logical 151 .soscsoo «mesa mammaz< ens «0 nosaasausmaoo e.m masses 82. .sihw IQ sorce— 0.00 25005:...“ A? 2500 152 AND function of the two outputs provides a signal which goes high if the time interval provided by counter 4 has elapsed without counter 3 having counted the required number of pulses. The software needed to configure the 9513 in this way can be found in Appendix G. Protection Grid Logig Figure 5.5 shows the schematic of the protection grid logic (10). This circuit provides two important functions. First, if the 16X line of the multiamp board exceeds a user- set voltage (currently +1.6 V, which corresponds to an ion current of 10 nA at the analog anode or approximately 3 million ions per second), the protection grid is held at -350 V. Otherwise, the protection grid is held at common potential. Secondly, when the protection grid is on, it holds the O output of the 74LS74 flipflop low. Thus, the processor can set, and then read this flipflop to determine whether or not the protection grid is enabled and thus, whether to acquire analog or pulse-counting data. The asynchronous nature of this part of the circuit ensures that, if there is any doubt about the protection status, analog data (which is continuously available) will be acquired. It takes the protection grid circuitry about 2 uS to turn on the grid and 30 uS to turn it off. During data acquisition in most systems, no additional "dead time” for settling of the protection grid voltage is needed since additional processor tasks take at least 30 uS. For very 153 .UMmoH vwau noquOuOLQ saw me Qwumlusom m.m shaman o3 .— m A1 Islam. 3.. z: — 05m 0 a r 92>.- . p250 goo >03. H 55,00 H 3.. as. can as. 5! \ IO! :32“ \ \— 1 z; . 324 . :2: o: 5.. >39 38 W >00 >09 154 high performance systems, however, such time considerations may become significant. Data Handling Finally, the dual-mode control system normalizes the pulse-counting and analog data into one 32-bit integer value for further processing by the overall mass spectrometric control system. Therefore, all pulse-counting data, whether taken in constant time or constant count mode, is transformed into a 32-bit integer flux rate (in counts per second) by dividing the number of pulses counted by the elapsed time. Although the 32 bits assigned to the flux rate could accommodate a count rate as high as 4300 MHz (32 bits), the counting system only counts random pulse rates up to 3 MHz as will be described later. To achieve the desired normalization, analog data are multiplied by a conversion factor (the number of counts per ADC unit). This factor is determined for each peak in the mass spectrum by calibration in the region where both ion- counting is valid and analog measurements are significant. High ion fluxes (greater than 3 MHz in our system) require analog measurements, due to the pulse overlap errors encountered at high pulse rates. The highest analog output values correspond to count rates of 1-2 GHz, depending on the analog gains in the system (analog multiplier gain and preamplifier gain). Thus, ion-counting data require about 155 22 bits to be represented digitally, while representing the data in integer form from both outputs requires 29-32 bits, again depending on the analog gains. Simplicity of software requires that values be stored in multiples of 8 bits, so a 32-bit integer intensity value is used. Dual-mode Scanning In our system, under actual operating conditions, the instrument control computer can acquire ion intensity data using the dual-mode control system hardware and software in a dual-mode scan sequence. After the quadrupole mass filter and lens voltages have been updated, the dual-mode control system sets, and then checks the protection grid flipflop. If the flipflop is cleared, it acquires and formats an analog value. Otherwise, ion-counting data are acquired and corrected for ion pulse overlap. If pulse-counting is valid and the analog intensity is significant, then the analog calibration factor (ion counts per ADC unit) is calculated for the current peak in the mass spectrum. Then the resulting 32-bit intensity can be stored or processed further, for example to obtain peak heights, areas, or positions. The next set of quadrupole and lens voltages can be applied and the scan continues. Dual-Mode Software The user can invoke dual-mode acquisition at any time with the command DUAL-MODE. This command brings up a menu 156 which steps the user through the various choices available in dual-mode acquisition. First, the user chooses between counting ions in constant time or constant count mode. Then, the user can select the appropriate time or count interval from a menu. The user is further prompted to enter a time window (in microseconds) and a threshold for the number of counts to occur in that window to be considered a datum with ion count information significantly above the background count rate. The software then transfers this information to the Detection slave, where the counter/timer circuit is configured and the dual-mode sequence becomes the operative algorithm for data acquisition. The user can switch back to pure analog acquisition at any time by typing ANALOG. The dual-mode sequence software is found in Appendix H. 3. Pulse Overlap Correction and Analog Calibration .One would expect a straightforward correlation between the equations which describe the numerical output from the two sections of the dual-mode detector. If the counting system is fast enough to keep up with the incident flux, i. e., each count is a single ion event, the number obtained from the pulse—counting section will be equal to the actual incident ion flux (0.3)of those ions that convert into 1 electron or more. The current obtained from the analog 157 section is given by Equation 1, neglecting collection efficiencies; =eOJm(t,V)n(v,j) [1] where e is the charge on an electron and m is the multiplier gain of the first section, which depends on the high voltage applied across the analog section of the multiplier and the history of the multiplier, and n is the average number of electrons emitted per incident ion, which depends on the ion velocity and the particular species striking the multiplier. The number obtained from the analog measurement, though, is the analog-to-digital conversion of the analog voltage output of the multiamp circuit. This voltage is a product of the input current, the transresistance of the preamplifier, and the gain of the selected voltage amplifier. The analog output is accompanied by a digital code for the amplifier gain. This leads to the generalized equation for the analog intensity given by Equations 2 and 3: ADC output=iC/e [2] ADC output=COJm(t,V)n(v,j) [3] where C is a constant that includes the preamplifier transresistance and the amplifier voltage per least significant bit, which are known. As indicated in Equations 1 and 3, the gain of the analog section of the dual-mode detector (m) is a function 158 of the species striking the detector. Many studies have shown that the gain of an ion multiplier varies with the mass and the velocity of the incident particle, the number of constituent atoms in the incident particle, and the chemical nature of the constituent atoms (ll-21). This is due principally to a variation in the average number of electrons produced when the ion collides with the first surface in the detector system. The use of conversion dynodes can reduce this species-dependence to some degree, but variations still occur (22-24). In order to know the absolute ion flux, then, frequent measurements would be necessary to maintain an up-to-date value for Cm(t,V)n(v,j). For each peak in the mass spectrum, at an ion flux in the region where both ion current and ion count outputs are active, the control system simultaneously measures the ion current (in ADC units) and the ion count (in incident ions per second). Since both values are obtained at the same incident ion flux, they allow the determination of the ion current produced by a given ion flux for the specific incident ion beam. Normalization between the two outputs (division of the ADC output by Cm(t,V)n(v,j)) takes place in software, but relies extensively on an Intel 8087 Numeric Coprocessor for timely calculations (25). All software was written in the programming language FORTH (26). 159 4. Results The outputs from both sections of the dual-mode detector are plotted against each other for a wide range of ion fluxes for air (predominately a mixture of nitrogen and oxygen ions) in Figure 5.6. This curve represents a convolution of the current output of the detector and the counting characteristics of the pulse-counting system. Due to the Poisson distribution of arrival times for the incoming ions and the fixed resolution of the counting system, an increasing percentage of the incident ions are not counted as the ion flux increases. This is because multiple ions are counted as one event at the higher rates (27). The percentage of pulses lost for a given, random input flux is well known from Poisson statistics (PRoxp = PRact * exp(-PRact*Res)), where PRaxp is the experimentally measured ion count rate, PRact is the actual ion count rate, and Res is the resolution window for the counting system. The resolution window can thus be shown to be 0.368/PRexp.asx. where PRaxp.max is the maximum experimentally measured count rate. The Poisson equation can be solved in reverse by successive approximations; however a simplified form of the equation, which is easier to solve in reverse, is given in Equation 3. X Pulses Lost: 100 1 Pulse Rate t Resolution [3] 160 .m>u:u fisaceawsomxo use 900% vowsmzomsu Am: ONHV 300:“: soflaadcmms sommwom use scam newcomxo A+v o>sao gnawuosoocu one was Asws Lowe assuseu maswaasa any Bonk auwmsoasw mofisss wsflvsoamossco use useso> 000L000 new 300 @.m 005000 6:2: 093 Eszz. oo._ 0611130+ (1) The reaction of the protonated acetone molecule with acetone was carried out in a similar manner, except that the pressure in the ion source region was 5x10‘4 torr. This created conditions suitable for chemical ionization and protonated acetone was formed in abundance. The protonated acetone molecule was mass selected using the first 177 quadrupole and reacted with the neutral acetone in the second quadrupole (Reaction 2). (CH3CH2)2CO+ + (CH30H2)2CO -> C10H2002+ (2) The reaction of protonated glycerol with acetic acid was implemented by protonating the glycerol during FAB in the ion source of the TOMS and by regulating the partial pressure of acetic acid in the center quadrupole region. The ion source and central quadrupole regions are differentially pumped so that there is little mixing of the neutral glycerol and acetic acid. The protonated glycerol was mass selected by the first quadrupole and reacted with the acetic acid in the second quadrupole to form the proton- bound adduct ion (Reaction 3). C4H11(0H)2* + CH30H2000H -> C?H1904* (3) Experiments were also performed with the benzene molecular ion, using acetone as a nonreactive collision gas in the central quadrupole. Repeated scans under various conditions showed that no reaction between the two reagents occurs. Thus, the benzene/acetone system makes an effective probe for the physical characteristics of ion trapping, since it maintains similar conditions to the protonated acetone/acetone CAR reaction without interference from chemical reactions (ion stability). 178 Instrumental Conditions for Ion Trapping Typical TOMS instrument parameters for El, CI, and FAB are shown in Table 6.1. Table 6.1 Typical Conditions for Ion-Trapping in the Center Quadrupole of the TOMS Parameters El :91 :Q1 FAB Filament 70 eV 300 eV 300 eV ---- Repeller 14.3 V 33.0 V -46.6 V 0.0 V CIV 2.7 V 32.2 V -37.6 V 0.0 V EIV 14.9 V -185.8 V -1.5 V -106.3 V EXT - 23.7 V -3.7 V 75.9 V -26.4 V L1 -30.0 V -l3.0 V -23.3 V 18.9 V L3 10.0 V -191.3 V 110.4 V -72.2 V 01 - 0.5 V 20.0 V -33.0 V —9.4 V L4 5.9 V 4.0 V 66.9 V 5.0 V O2 14.0 V 32.2 V -26.6 V -l.8 V L5 var var var var O3 4.0 V 20.0 V -32.7 V -l3.2 V Multiplier —1.7 kV -1.7 kV -2.0 kV -l.7 kV Conversion Dynode -3.0 kV -3.0 kV -3.0 kV .-3.0 kV FAB Gun ----------------------- 10.0 kV 3. The Trap-and-Pulse Experiment The trap-and-pulse experiment is based upon an experimental observation by Greg Dolnikowski (13,14) that CAR product ion currents would increase dramatically after first raising and then abruptly lowering the voltage on lens 5 (the interquad lens between the second and third quadrupole). To implement this concept, the voltage on lens 5 is raised to prevent all positive ions from exiting the collision region then, after waiting a specific length of time, the potential is lowered to release the trapped ions. 179 Repetitive acquisition of intensity data after pulsing out the trapped ions will define the trap—and-pulse profile. The sequence of lens voltages and the resulting trap-and- pulse ion intensity profile are shown in Figure 6.1. In order to perform trap-and-pulse experiments on negative ions, the trapping potential would be negative and the potential for pulsing the ions out of the collision region would be positive. The maximum instantaneous ion current obtained in a trap-and-pulse experiment is many times larger than that obtained under steady-state conditions for stable CAR products. Typically, one uses a trapping potential of +100 V for positive ions and ~100 V for negative ions. The pulsing potential is then -100 V for positive ions and +100 V for negative ions. Smaller voltages can be used and still trap the ions, but the most reproducible data were obtained with these values. Part of the reason for this phenomenon is shown in Figure 6.1. The maximum for the trap-and-pulse profile occurs after the voltage on L5 has reached a significantly negative value. The potential for lens 5 decreases exponentially after the control system updates the new value to the digital-to-analog converter due to the RC time constant of the L5 power supply. The data system requires a finite time (approximately 2 uS) to start acquiring intensity values after dropping the potential on lens 5. Thus, the maximum of the peak will be missed if the potential on lens 5 decays below zero before the system can oe~sasnse|0ssu Hush oso mewsona .emoho .elwu aaeao> Hm0000000 mg 000 Ola» nausea oocevssnm new mo auon H.m shaman u}: w... om. 8. s n 0 f8 A Ice 4P 0.8. 180 AllllmeDQ V A l¢——— TRAP—->4-— PULSE ——-* 11111 II Iluiuluuunn-Iziulu w ................. run!:iulnllulnlunl I m J 17 as T“ JJ ['1‘ -----..-..- ........... --- - ..-- m JJ JI . m m n m . m A a . m . m . > > woz¢<4um was)? me m0<._..5> n.- and L3 showing one full inject,trap, Plots of ion abundance versus time, Figure 6.2 and L5 potentials versus time, and pulse cycle. 184 It is possible to trap stable products such as those at m/z 59 (acetone+H)+ and 117 (acetone dimer+H)+ in the central quadrupole for up to 20 S. The number of trapped ions decays exponentially with increasing trapping time. The time constant for the ion at m/z 117 at 5x10" torr acetone was 2.8 S or, in other terms, the rate constant for ion losses was 0.358 S‘l. Other product ions could only be detected in the inject-trap-and-pulse experiment at lower pressures around 7x10‘5 torr acetone. The less stable ions fall prey to other competitive reactions at higher pressures leading to more stable products. At the lower pressures, these less stable ions, like the ion of mass 43, could be trapped for short periods of time. The ion of mass 43 could be trapped for about 100 mS in the collision region before its signal faded into background. 4. Investigation of the Trap-and-Pulse Process An investigation into the nature of the trap-and-pulse method was undertaken. There are three possibile means for ion loss or gain in the trap-and-pulse method. First, ions which enter the exit region of the central quadrupole will be lost if they are not trapped with 1008 efficiency. If one assumes that all losses in the central quadrupole are ion concentration dependent, then the rate of change of the number of ions in this quadrupole trap will be equal to the incident ion flux minus the fraction of ions being lost (the 185 inverse of the trapping efficiency) per unit time multiplied by the ion concentration (Equation 1). dI/dt = P - fl [1] (where I is the number of ions in the trap, P is the incident ion flux, and f is the ion loss rate constant) The solution to this differential equation, given the starting condition Io=0, is given in Equation 2. I = P/f*(1-exp(-ft)) [2] Thus, deviations from linearity in a plot of the integral ion intensity versus trapping time will reveal any ion concentration-dependent losses. Such a plot is shown in Figure 6.3 for the protonated acetone/acetone reaction (5x10“ torr collision gas pressure) (reaction 2). By fitting the resulting data to Equation 2, a rate constant of 12 +/- 2 S"1 was calculated. On the millisecond time scale, which is the time scale for the experiment, this corresponds to a trapping efficiency of about_99%. Although, this may seem like an almost perfect ion trap, experiments indicate and Equation 2 shows that there is a maximum ion capacity, less than the theoretical space charge limit, which will be determined by the trapping efficiency (f) and the input ion flux rate (P). For stable, nonreactive parent ions, like the benzene molecular ion, this mass transfer equilibrium determines the maximum trapping capacity of the central quadrupole. 186 .N coma-sou as case one masuasc s: coasasno u>n=o 0:» van accuses mo seams vasonlsoaomn 0:0 mom saw» sunbeam assuo> zasmsoasw «sass new we «can «.0 venues 6.5 mg moéofi 0mm -. omp \. nmw ., gm . @W . mm n00 ihzuzimaxm o . omkcu sis . 1mo+me . 1mo+mm rmo+mn . Imo+m¢ Tmo+mm e rno+mm (SIN-{103 30V) AllSNEIlNI 3810c! NOI 187 The second means of ion loss or gain in the trap-and- pulse experiment is inefficient extraction of trapped ions from the central quadrupole. The fraction of ions which can be extracted can be calculated from the number of ions represented in the trap-and-pulse profile divided by the number of ions which expected based upon 1008 trapping and extraction efficiencies (the steady state product ion current times the trapping time). Experiments with the benzene molecular ion and acetone indicate an extraction efficiency on the order of 198. For stable product ions like the proton—bound dimer of acetone formed from the reaction of protonated acetone with acetone, the extraction efficiency as calculated above yields values above 100%. Apparent extraction efficiencies above 1003 indicate that an ion is being produced faster than it is being lost, usually at the expense of less stable species in the reaction chamber. Thus, the third method of ion loss or gain is formation or degradation of product ions in the central quadrupole during the trapping period. For a stable, nonreactive ion, like the benzene molecular ion, the net ion gain due to reaction should be 0. For a stable product ion like the proton-bound dimer of acetone, the net ion gain will be positive and, in fact, overcome losses due to imperfect trapping and extraction. For an unstable product ion like CHacO+ from reaction 1, the net ion gain will be negative 188 and may prevent detection of the ion at high pressures and/or long trapping times. For stable product ions with reactions yields that overcome losses due to imperfect trapping, the trap-and- pulse ion intensity limit reflects a limit to the accumulation of ions in the collision chamber due to space- charge. This effect is also seen in other techniques (14). When monitoring a parent ion with a significant abundance, such as protonated glycerol generated by FAB, a high rate of parent ion influx occurs into the central quadrupole and the space-charge limit will be reached quickly (within 100 m8). Lower abundance parent ions will, of course, reach the space-charge limit more slowly. By raising the voltage on L4 (the interquad lens between quadrupoles one and two) after a certain length of time after raising the voltage on L5 to begin trapping, all losses due to diffusion back through the entrance to the quadrupole are eliminated. This technique makes a nice probe for the causes of imperfect ion trapping and the effects of ion energy and collision gas pressure. Figure 6.4 shows a plot of integral ion intensity versus trapping time for the benzene molecular ion with a wide variety of ion energies with no collision gas present (5x10‘7 torr). This plot serves to show that the oscillations in ion pulse intensity are real, since the oscillations from different experiments reflect the same pattern. Apparently, there is significant transverse ion movement in this experiment, 189 Figure 6.4 Plots of ion pulse intensity versus storage time for the benzene molecular ion (no collision gas) for several parent ion energies. Amps m2: moéofi corm- . .3:- - .owf - Hem- . .0...- . _ 0 >31... 3+3 >OPQIO >0.OPI >0 :1 >onPI-¢o+mm ¢o+mn >9! j -v.w .Uhflumh I¢O+mm (SlNflOO 30V) MISNELLNI ES-Ifld NOI 191 causing the extracted ion intensity to increase when the ions are moving towards L5 upon extraction. The low frequency of the oscillations shows that the ion motion is not due to the initial kinetic energy of the ion (at 1 eV the ion is moving at 1.57x10s cm/S and the quadrupole is 20 cm long, yielding frequencies in the kilohertz range). This movement is caused by repulsion of ions due either to the raising of L5 or, more likely, the raising of L4. All of the following studies involve thermalizing the benzene molecular ion with acetone collision gas. Figures 6.5 and 6.6 show the effect of collision gas pressure for two different kinetic energies of the benzene parent ion. Both figures show that the trapping of ions where they can be extracted (either the exit region or, for this experiment, the entrance region where L4 can push the ions toward the exit) is enhanced by higher collision gas pressures. It is also clear that the ion lifetimes are very much dependent on pressure. Analysis of the data from Figure 6.5 (1 eV) shows the dependence of ion loss on collision gas pressure (Table 6.3). Table 6.3 Dependence of Ion Loss on Collision Gas Pressure 25333235 Loss Rate Constant 2x10“ torr 7 +/- 1 8‘1 2x10'5 torr 5 +/- 1 8‘1 2x10"6 torr 2 +/- l 8‘1 6x10‘7 torr 0.9 +/- 0.5 8‘1 (6x10'7 torr not shown on graph) 192 Figure 6.5 Plots of ion pulse intensity versus storage time for the benzene molecular ion for several pressures of acetone collision gas (parent ion kinetic energy of 1 eV). 193 mac... mimo— I mmo... mlwop ole amok .vlwoF I 6.5 m2: moéofi AUNwe haw p in m.w assess Imo+mw Tmo+mm 1mo+mm rmo+m¢ (SanOO 00v) MISNBlNI BS‘Ifld NOI 194 Figure 6.6 Plots of ion pulse intensity versus storage time for the benzene molecular ion for several pressures of acetone collision gas (parent ion kinetic energy of 10 eV). 195 CON om — 3.5 m2: moéofi .4q_-e/L-r._-v.-tx ‘E- memo... mimop ale mace. mime? Ole ”EOE .leO— I m.m o.=u.a Tmo+mo.N Ino+mocs e. rmo+mod T Tmo+mo.m r roo+wo.— (SanOO 30v) MISNHlNI 3810:! NO! 196 Therefore, as collision gas pressure increases, ion loss also increases. This loss could either be caused by increased ion scattering or a quenching of the ions due to the higher pressure. Also note the decreased rate constant for 10" torr with this experiment (7 8'1) as opposed to that calculated from the data of Figure 6.3 (12 8‘1). Thus, ion loss is decreased when the potential is raised to prevent ions from leaving the central quadrupole, as in the dsta of Table 6.3, over the normal trap-and-pulse experiment of Figure 6.3. This indicates that a certain fraction of the trapped ions diffuse back through the entrance to the collision chamber past L4. Figures 6.7-6.9 show the effect of ion energy for different collision gas pressures. At high collision gas pressures (Figure 6.7 and 6.8), higher ion energies produce increased ion yield. This is most likely due to the increased ability for ions of higher energy to penetrate the central quadrupole to reach the exit of the quadrupole, where they can be extracted by L5. This phenomenon must be balanced against the need for low ion energies for increased reaction yields in exothermic CAR when determining the proper ion energy for analysis. At low collision gas pressures (Figure 6.9), e. g., vacuum, lower ion energies produce increased ion yield. This probably occurs, because more of the ions probably reflect back out of the collision cell at higher than at lower ion energies. 197 Figure 6.7 Plots of ion pulse intensity versus storage time for the benzene molecular ion for several parent ion kinetic energies (pressure of acetone collision gas of 2x10‘4 torr. 198 8.5 m2: moéoB com 02 GNP om 0+ 0 P' L L — L F r h LI b b b b P L P b 0.0 Imo+mo.m ‘1‘ - Av a I It $38.... . I: . A . . nmo+mo m 1.)" Imo+mo.m >o P I >m m I >0 or I 5.0 0.50: [DOA-MO.— (SlNflOO 30V) AllSNELLNI BS'Ifld NOI 199 Figure 6.8 Plots of ion pulse intensity versus storage time for the benzene molecular ion for several parent ion kinetic energies «pressure of acetone collision gas of 2x10‘5 torr. 200 cam 6.5 m2: moéo-fi om, om_ om as o FLIIFPLLFL ILIVPPLLLPLO mo+me . O . rmo+mm r 1mo+mn mo+m¢ >0 r I Imo+mm >om7¢iu >0 OF I m... 2...... {0+8 (SlNflOO 30V) AllSNl-LLNI BS-IHd NOI 201 Figure 6.9 Plots of ion pulse intensity versus storage time for the benzene molecular ion for several parent ion kinetic energies :pressure of acetone collision gas of 6x10’7 torr. 202 3.5 m2: moéob com 00? ONF om 00 o P P % L L n p b b P b L {—1 L h b b L L L 0.0 >0 e I A >m m I - >m or To odoom 1o.ooo¢ \ . no 0000 odoom m... 2:: Lacie; (SanOO 30v) ALISNEUNI ES'IHd NOI 203 Analyses of the trap-and-pulse and the inject-trap-and- pulse profiles also provides sone insight into the trap-and- pulse experinent. The inject-trap-and-pulse profile quickly reaches a saxinun and then decays exponentially with a tine constant of 4 as, which is also the tine constant of the L5 power supply. The trap-and-pulse profile is not cleanly exponential, however. The first part of the teaporal decay is exponential, but the last part has a square root dependency, indicating diffusional control. Furthermore, the width of the trap-and-pulse profile is wider at higher than at lower collision gas pressures. This further indicates that the trap-and-pulse profile is at least partly controlled by diffusional effects. 5. The Trap and Pulse Algorithn and Software Considerations The trap-and-pulse experisent has been incorporated into the full range of MS/MS scans and device sweeps. Thus, if the lass spectronetrist wishes to enploy the trap-and- pulse nethod of data collection for a set of experilents he invokes the reaction scans. RDSCAN, the reaction daughter scan or reaction product scan, identifies the nass-to-charge ratio of the products resulting from the reaction of the selected parent ion with the reactive collision gas. RNSCAN, the reaction neutral loss scan, identifies the lass- to-charge ratio of parent ions which undergo a given lass change when reacting with the collision gas. RPSCAN, the 204 reaction parent scan, identifies the mass-to-charge ratio of parent ions which produce a given product upon reaction with the collision gas. RSWEEP, the reaction device sweep, generates the full ion current profile upon varying the value of a physical device. RSWEEP is especially useful in finding the optimum values for parameters, such as the RF voltage value in the central quadrupole (M2) and the voltage offset for quadrupole three, which will be held constant during a reaction scan. These reaction scans perform exactly like their conventional counterparts, except that they perforn a trap- and-pulse experiment after every step of the device being scanned. For a scan in which the device is either quadrupole l or 3 or both, the mass value is typically incremented in steps of 0.1 AMU. In that case, a trap-and- pulse experiment would be performed every 0.1 AMU. The maximum intensity of the trap-and-pulse profile is then used as the ion intensity for that nass-to-charge ratio. These intensity values versus the mass-to-charge ratio at which they were acquired define the mass spectral peak shape, which, in turn, can be further processed to find peak locations and peak intensities. The software for the BSCANS and RSWEEPS can be found in Appendix I. The essential difference in the software between the reaction scans and conventional scans is the use of the routine RACQUIRE (reaction acquire) instead of ACOUIRE. Both routines return a 32-bit intensity value to 205 the stack. ACQUIRE returns a 32-bit averaged intensity‘ value, which is proportional to the steady state ion current at the detector. RACOUIRB, on the other hand, returns 32- bit value to the stack which is proportional to the maximum ion current generated by the trap-and-pulse experiment. In order to obtain this value, RACQUIRE first sets the voltage on L5 to the value specified in the variable VTRAP. This places the central quadrupole in the trapping mode. Second, RACQUIRE waits the number of milliseconds specified in variable TSTORR. This determines the accumulation of ions and the average ion residence time in the trap. Third, RACQUIRE changes the voltage on L5 to the value specified in the variable VPULSE. This pulses the ions out of the trap I towards the detector and purges the trap for the next experiment. Fourth, RACQUIRE begins acquiring ion intensity values, using the routine ACQUIRE. Each value could have a user-specified amount of averaging, but generally unaveraged intensity values are used, since they can be obtained more frequently, in order to be certain of determining the exact peak maximum. RACQUIRE obtains a finite number of ion intensity values, specified by the variable #ACQS. The user selects #ACQS so as to be sure to catch the entire trap-and- pulse profile. While acquiring these intensity values, RACQUIRE finds the maximum ion intensity value. This maximum then becomes the intensity value for the current mass-to-charge ratio, which will be further used to define the mass spectral peak profile. All of the variables 206 mentioned above are set by the user in a menu called RXSET. In RXSET, the user can choose the values appropriate to his analysis or accept the default values. An alternative set of reaction scans uses the integrated intensity of the trap-and—pulse profile as the intensity for that device value. These scans and sweeps are designated +RDSCAN (integrating reaction daughter, or product, scan), +RPSCAN (integrating reaction parent scan), etc. The software for these scans is identical to the normal (maximum value) reaction scans, except that the integrating reaction scans use the routine +RACOUIRR, which sums the resulting intensities for the trap-and-pulse profile, rather than finding the maximum. However, we havei found that these scans give poorer signa1~toabackground noise ratios than the equivalent reaction scan which just uses the trap-and-pulse maxima. This is probably due to the poor definition of the baseline for these peak shapes, due to the asymmetry of the peak, thus yielding poorly reproducible peak areas for the intensity. More sophisticated peak-defining and integration algorithms might have improved the reproducibility of the peak areas, but would have slowed the reaction scans even further. Reaction scans are much slower than conventional scans, because of the time spent trapping at each step of the scan. Typical durations for a reaction scan from 50-500 AMU are 1 to 2 minutes depending on the trapping time selected. Thus, reaction scans are unsuitable for transient samples such as 20? gas chromatographic peaks. However, the trap-and-pulse algorithm has also been implemented for single reaction monitoring (SRM) and multiple reaction monitoring (MRM). In SRM, ions of a specific mass are selected in quadrupoles l and 3 and intensity values are acquired repetitively. Thus, SRM monitors the time-dependent intensity of a particular parent—daughter ion pair. MRM repetitively monitors a number of these pairs, obtaining the time-dependent intensity on a less frequent basis. Obviously these modes are used for targeted analysis of transient samples. They not only achieve better characterization of the.time profiles of such transient samples, but also better single- to-noise ratios for the peak profiles, (e. g., chromatographic peak area), since more time is spent collecting data at the reaction pairs of interest than is possible in a full scan. Thus, the trap-and-pulse technique can be used to characterize transient samples as well using R-MRM.' The FORTH code for R-MRM also appears in Appendix I. 6. Results Figures 6.10 and 6.11 demonstrate the two advantages of the trap-and-pulse technique over conventional CAR scans. Figure 6.10 shows the increase in the ratio of signal to noise for the trap-and-pulse technique over conventional CAR for equivalent amounts of averaging. Each of sweeps A through C are of the acetone dimer pseudomolecular ion formed from Reaction 3. Sweep A is a conventional CAR 208 .,m\:sm my comacvmyoc cant woman can gnaw >2 ADV .Am\=sm mv 2:_wmsm>n ~scuwm mlwuldamu saw: cowuoodmou sump _sco«u:m>:oc an Amv .Am\=ln cmmv codaomaaoo cusp Macawuca>cou >3 Acv occuooa we nulwv vasonucoHas; 3:. a: named vaa.cmw age Lm>o no we macezm mmmi cases c~.® assumm mnmn:mv unmmowv 3.3)." one ataxm m0fi£.93n2370 OHSEQIIZZEmfi AEQEWQH!.FZEQ§?< 209 I 00 °/o = l7000 93 CONVENTIONAL su‘ é 3! (GH- H20” . 75/ (new? ' \ss 0% . . . . r . . . 80 I00 |20 I40 M/Z Relative Abundance A l00°/o = 68000 TRAP AND PULSE '53 (“st |00% (A4 on -2uzo )* G". I I7 4» 93 .. ’ ’1/ I \3»"” V3” :21 0% I . . . I - -I . I so IOO Iéo I40 wz ACETIC ACID Relative Abundance V 1 A G GLYCEROL Figure 6.11 Two product ion scans of the ion/molecule reaction between protonated glycerol and acetic acid (parent ion is (M+R)* of glycerol at m/z 93) by (A) conventional data collection and by (B) trap-and-pulse data collection. 210 daughter scan with no signal averaging. Sweep B is a conventional CAR daughter scan with 256 averages per datum (20 mS of averaging). Sweep C is a reaction scan with 20 m8 of trapping time. The resulting signal-to-background noise ratios were calculated as the peak signal intensity divided by the standard deviation of the background. The S/BN ratio for the trap-and-pulse peaks is four times larger than for the signal averaged peak. It is clear that, for CAR product ions, averaging the ion current in the central quadrupole is superior to averaging at the detector for equivalent scan rates. This occurs not from a decrease in the amount of noise, as in signal averaging, but rather from increasing the signal more than the noise. Furthermore, the reaction scans can help discriminate against certain noise sources, such as FAB neutral noise and synchronous noise in the detection electronics, since these noise sources are only present in one analog-to-digital conversion of the maximum trap-and-pulse intensity, while the ion current is summed for the whole trapping time. Figure 6.10 also shows that the mass spectral peak profile or resolution is not degraded through the trap-and-pulse technique. Figure 6.11 shows the increase in the number and abundance of products obtained from the trap-and-pulse technique over a conventional CAR scan. Figure 6.11A shows a conventional daughter scan of the products formed from the reaction of protonated glycerol and acetic acid in the central quadrupole (Reaction 3). Figure 6.llB shows the 211 trap-and-pulse scan for the same reaction. The appearance of the spectrum is obviously greatly different. First, the ratio of product ion intensities to the parent ion intensity is greatly increased in the trap-and-pulse spectrum. This should be expected since parent ions are being converted to product ions continuously during the trapping period. The intensity of some product ions are enhanced more than others, since unstable product ions can decompose or react further with the collision gas given long trapping times. Figure 6.11 also shows that at 7x10‘5 torr acetic acid in the collision chamber, ionic products are observed that are not seen in a conventional scan. The peaks at m/z 110, 117, 119, 121, and 135 are not present even at low intensity in the conventional spectrum unless the pressure of acetic acid is increased by at least an order of magnitude. These products are observed during the chemical ionization of glycerol and acetic acid; similar products have been observed in a reaction of protonated alcohols and acetic acid in ion cyclotron resonance (15). The peaks at m/z 119 and 121 are due to proton transfer to the acetic acid dimer; the peaks at m/z 110, 117 , and 135 represent new ions that are the result of characteristic neutral losses from the proton-bound adduct of glycerol and acetic acid. These extra peaks could provide more information about the adduct ion or even the analyte ion. 212 7. Conclusion It is possible to trap stable ions with very low axial kinetic energies, such as CAR products, with up to 1008 efficiency in the central quarupole and extract them with up to 19% efficiency of a TOMS instrument with no physical modifications. The ability to trap ions efficiently in the central quadrupole increases the detectability (signal-to- background noise ratio) of CAR products and the number of products observed in the CAR spectrum. The trap-and-pulse method can conceivably be used to enhance ion signals for other reactions in the central quadrupole, including charge transfer or photodissociation. REFERENCES l. R. A. Yost, C. G. Enke, D. C. McGilvery, and J. D. Morrison, Int. J. Mass Spectrom. Ion Phys., 1979, 39, 127- 136. 2. D. C. McGilvery and J. D. Morrison, Int. J. Mass Spectrom. Ion Phys., 1978, 28, 81-92. 3. M. L. Vestal and J. R. Futrell, Chem. Phys. Lett., 1974, 28, 559-560. 4. J. D. Morrison, K. Stanney, and J. M. Tedder, J. Chem. Soc. Perkin Trans. II, 1981, 838-841. 5. J. D. Morrison, K. Stanney, and J. M. Tedder, J. Chem. Soc. Perkin Trans. II, 1981, 967-969. 6. J. A. Chakel and C. G. Enke, Anal. Chem., in press. 7. D. D. Fetterolf, R. A. Yost, and J. R. Eyler, Org. Mass Spectrom., 1984, 19, 104-5. 8. R. A. Yost and D. D. Fetterolf, Mass Spectrom. Rev., 1983, g, 1-45. 213 9. D. D. Fetterolf and R. A. Yost, Int. J. Mass Spectrom. Ion Proc., 1984, 62, 33-49. 10. J. P. Schmit and P. H. Dawson, N. Beaulieu, Org. Mass Spectrom., 1985, 20, 269-275. 11. J. Jalonen, J. Chem. Soc., Chem. Commun., 1985, 872-874. 12. J. P. Schmit, S. Beaudet, and A. Brisson, Org. Mass Spectrom., 1986, 21, 493-498. 13. G. G. Dolnikowski, M. J. Kristo, C. G. Enke, and J. T. Hatson, Int. J. Mass Spectrom. Ion Proc., in press. 14. G. G. Dolnikowski, Ph. D. Dissertation, Michigan State University, 1987. 15. C. A. Myerholtz, Ph. D. Dissertation, Michigan State University, 1983. . 16. R. T. McGiver, Jr. and R. L. Hunter, Int. J. Mass Spectrom. Ion Proc., 1985, 64, 67-77. 17. P. W. Tiedeman and J. M. Riveros, J. Am. Chem. Soc., 1974’ g, 185—9e CHAPTER SEVEN SUGGESTIONS FOR FUTURE WORK The completion of the multimicroprocessor TQMS control system has made the prototype TOMS instrument in our laboratory (the U. S. S. Enke) a viable and useful instrument. Preliminary studies have shown that the U. S. S. Enke is more sensitive than our EL 400/3 TOMS instrument. However, more research should be conducted on this instrument in order to fully exploit its enhanced control features- real-time graphics and linked device sweeps. The creation of the Novix Control System has demonstrated the exciting possibilities, as well as the problems, of scanning quadrupole instruments very rapidly. Since scanning faster requires amplifiers with greater bandwidths and greater bandwidths pass higher frequencies of noise without attenuation, synchronous noise must be reduced in the instrument and detection system. My experience has shown that very little attention is paid to reducing noise in scientific instruments. For example, the mechanically convenient stack configuration increases capacitive coupling between the RF and the signal, since the RF high voltage leads are in close proximity to the low-level current signals. However, beyond totally redesigning the vacuum chamber to eliminate the stack, many other improvements can be made to the 400/3 instrument to reduce this noise. The distance between the preamplifier and the analog anode of 214 215 the ion multiplier should be reduced, the various power- supplies should be decoupled to eliminate transmission of noise through the power lines, and the placement of voltage references should be carefully designed. Upon reduction of synchronous noise in the system, design of a high bandwidth preamplifier and multiamp amplification scheme will allow full exploitation of both the dynamic range of TOMS and the scan speed of the Novix control system. These modifications would allow the full power of high-speed data acquisition to be realized on this instrument. The extra speed of the Novix control system should also be used to develop real-time experimental optimization and control. I have started exploring this possibility by writing a small MS/MS database manager and expert system. This system can be found starting at Block 3000 on the hard disk. Basically, this database contains TOMS experiments appropriate to identification of various chemical compounds. I have already entered a few organophosphorous pesticides explored in the work of Mark Bauer (1,2) into the database, but did not test the real-time identification; Eventually, such a database/expert system could be linked with a chromatography expert system in order to identify peaks as they elute into the ion source. My work with peak—finding algorithms will hopefully open up more discussion in the literature about this very important subject. Incorrect peak-finding can render useless even the most carefully acquired data. The 216 development of the hardware peak-finder has shown that the peak-finding function can be performed in hardware, yet maintain the flexibility of exploring new algorithms through downloadable software sequencing. Peak—finding in hardware provides faster execution and allows the use of more sophisticated, yet more time-consuming algorithms. In retrospect, the design of the hardware peak-finder would have been simplified by using the new Weitek 32-bit integer processor (3), which came into production after the start of the project. The Weitek chip can perform most arithmetic and logical operations in a single 100-nS clock cycle, as well as perform quick multiplication of two 32-bit numbers. This would provide a simpler and less expensive design, since most of the needed functions would be provided in the processor itself. However, the progress of electronics practically outdates any design before its completion. The dual-mode control system is an excellent tool for mass spectrometrists. With the proper commercial development and exploitation, the dual-mode detector will become the detector of choice for mass spectrometry and possibly other areas of analytical chemistry, such as optical spectroscopy. The trap-and-pulse experiment has shown that collisionally assisted reactions can be analytically useful (4). The primary limitations to the utility of CAR in the past have been the poor yields for CAR products and the lack of structural information about the adduct ions. The trap- 217 and-pulse experiment has greatly enhanced the yield of product ions and new products have been detected that increase the structural information about the adduct ions. Nevertheless, this experiment points to an even better solution to the problems of CAR. By redesigning the collision chamber, one can create and control an electric field gradient in the axial direction, allowing storage of the ions in a potential well and then forcing all ions towards the exit of the central quadrupole, generally improving the creation and collection of ionic products from CAR. I Although much work has been done already, the development of TOMS instrumentation is far from complete. As shown by the recommendations above, the bulk of research in this area should fall into four areas: improving the speed of data collection, improving data reduction, improving the accuracy and dynamic range in measuring the ion current, and improving the collision cell design. REFERENCES 1. M. R. Bauer, M. S. Thesis, Michigan State University, 1983. 2. M. R. Bauer, Ph. D. Thesis, Michigan State University, 1986. 3. “TL-1033, Weitek Corp., Santa Clara, CA 95054. 4. G. G. Dolnikowski, Ph. D. Dissertation, Michigan State University, 1987. APPENDIX A. FORTH CODE FOR LINKED SCANS 218 SCROI 0 ( Load Block for Linked Device Scans- HJK 11/16/86) 1 8 LOAD ( Basic FORTH Stuff) 2 ’ (CREATE) ’CREATE I 3 540 LOAD ( Math Load) 4 : COMMAND ; 5 612 625 THRU ( Slave 1 Device Access) 6 : IGET 8070 BLOCK 0 0 ITABLE 123 (CHOVE ; 7 IGET 8 1250 1253 THRU ( Spline Fitting) 9 1254 1256 THRU ( User Interface) 10 ’ ?CREATE ’CREATE I 11 12 13 14 15 SCROZ O ( Spline Fitting- HJK 11/16/87- adopted from Novix routines) 1 2 CONSTANT PTS PTS ZARRAY raw 999 CONSTANT n 2 : )rau ( v) n raw 2! l [’] n +! ; 3 4 : x ( '- ) raw 8 0 2>N ; 5 : y ( '- ) raw 2+ 3 O 2>N ; 6 : h ( i’f) DUP )R 1+ x R) x F- ; 7 : V ( I” ) DUP )R 1- h R) h F/ ; 8 : H ( i‘f) DUP )R 1+ Y 1 Y F‘ R) h F/ ; o 10 6 FINTEGER F6. 11 : ai ( l'f) V ; 12 : bi ( i-f) v 1.0 F+ 2.0 F* ; 13 : c1 ( i-f) DROP 1.0 ; 14 : d1 ( i-f) DUP >R w I 1- w F- F6. Fr R) h F/ ; 15 SCRIS 0 ( Spline Fitting - HJK 11/16/86) 1 PTS SARRAY beta PTS SARRAY gamma PTS SARRAY phi 2 3 : BETAS 1 bi FDUP 1 beta 5! n 1- 2 DO I ai I 1- ci Ft 4 FSHAP F/ I bi FSHAP F- FDUP I beta 3! LOOP FDROP ; 5 6 : GAHHAS 1 d1 1 beta 53 F/ FDUP 1 gamma 5! 7 n l- 2 DO I ai F* I di FSHAP F- 8 1 beta SO F/ FDUP I gamma 5! LOOP FDROP ; 9 10 : PHIS O phi PTS 2* ERASE n 2- gasna se 11 FDUP n 2- phi s! l n 3 - DO I ci F* I beta 58 F/ 12 I gamma Se FSNAP F- FDUP I phi s! -1 +LOOP FDROP ; 13 14 : MATRIX BETAS GAMMAS PHIS ; 15 21$) SCRBA 0 ( Spline Fitting _ NJK 11/16/86) 1 PTS SARRAY aj PTS SARRAY bj PTS SARRAY cj PTS SARRAY dj : SOLVE MATRIX n 1- 0 DO I h F6. F* I phi se FOVER F/ I aj s! I 1+ phi $9 FSNAP F/ I bj S! I h F6. F/ I 1+ y I h F/ FOVER I 1+ phi s@ F* F- I Ci 5! I y I h F/ FSNAP I Phi 56 F* F- I dj 5! LOOP ; ‘OCO‘QOsCflbOJM : SUBDIVIDE ( n-n i 1 -32k) DUP 0 ran 6 n 1* raw 6 1+ 10 NITHIN IF 0 BEGIN 1+ 2DUP raw 8 ) NOT END 1‘ ll ELSE R) 2DROP 32768 THEN ; 12 13 14 15 SCRRS 0 ( Spline Fitting- NJK 11/16/87) : SPLINE ( n-n) SUBDIVIDE )R )N I 1+ x FOVER F- FDUP FDUP FDUP F* F* I aj 58 F* FSHAP I dj 58 F* FSNAP I x F- FDUP FDUP FDUP F* F* I bj SO F* FSHAP R) cj 58 F* F+ F+ N) ; 01450410.— 6 7 8 9 10 ll 12 13 14 15 SCRAB 0 ( User Interface for Linked Devices- HJK 11/16/36) 1 4 CONSTANT BLNAX 2 VARIABLE QLDEVICES 3 CREATE LDEVICES ALHAX 2* ALLOT 4 5 : ?LDEVICES CR ." Number of Devices to Link: ” #INPUT DUP 6 DUP ILMAX > ABORT” Too many devices to link" 7 ILDEVICES ! CR CR 0 DO 3 ." Linked Device 8" I . .” : " RINPUT 9 LDEVICES I 2* + ! CR LOOP ; 10 11 12 13 14 F+ 220 SCR37 0.( Input Values for Devices- NJK 11/16/86) 1 : ?LVALUES CR ." The Value for Mass 1000.0 will stop entries" 2 0 [’] n 9 CR CR 1024 0 DO REGULAR ( usual ver. of NUMBER) 3 ." Mass f" I . ." : " {INPUT DUP CR 4 ." Value A" I . .” : " QINPUT CR CR MATH 5 SNAP )raw 10000 2 IF LEAVE THEN LOOP ; 6 7 8073 CONSTANT LBLOCK 3 CREATE LBUFFER 2043 ALLOT 9 10 : )LBLOCK ( n-) )R LBUFFER LBLOCK I 2* + BLOCK 1024 MOVE 11 UPDATE LBUFFER 1024 + LBLOCK R) 2* + 1+ BLOCK 1024 HOVE 12 UPDATE ; 13 14 15 SCROB 0 ( Input Values for Devices- HJK 11/16/36) 1 8082 CONSTANT Dtable 2 3 : LINKS RLDEVICES G 0 D0 CR CR ." Device: ” 4 LDEVICES I 2* + G DUP RDEVICE ! U. CR ?LVALUES SOLVE S 1024 0 DO #DEVICE 0 H1 I 64 * )UNITS SNAP {DEVICE 9 6 SPLINE >DAC LBUFFER I 2* + ! LOOP 7 I )LBLOCK LOOPP FLUSH ; 8 9 )Dtable RLDEVICES @ 0 DO I 2* LDEVICES + e tDEVICE ! 10 DEVICE-ADDRESS Dtable BLOCK I 2* + 2+ ! UPDATE LOOP 11 OLDEVICES O Dtable BLOCK ! UPDATE FLUSH ; 12 . 13 : LSCANS 7947 SCREEN CR ?LDEVICES LINKS )Dtable ; 14 - 15 ' SCRG9 0 Welcome to the Wonderful world of Linked Devices 1 2 You will first be prompted for the number of devices that you 3 wish to link (up to 4) and the number of those devices- check 4 the TONS user’s manual or PED for the number of a given device. 5 6 You will next be prompted to enter the value for each device 7 at various masses. You can determine these values by experiment 8 or you can play around. To stop entering mass-device values 9 enter the values for mass 1000.0. You must have values for mass 10 1000.0 and 0.0. Enter values as integers to avoid confusing 11 the floating point processor which looks for fractions, e. g., 12 enter 10.0 as 100. Between entered values, values for the devices will be calculated at roughly 1 anu intervals using a spline fitting routine translated from one for the Novix polyFORTH environment by the good people at polyFORTH. 221 SCRBI 0 ( Device Tracking - MJK from CAM 11/13/36) 1 VARIABLE Dtable COMMAND 3 ALLOT 2 VARIABLE ldevices COMMAND 3 VARIABLE table COMMAND 3190 ALLOT 4 5 CODE TRACKING ( n-) 0 POP R PUSH I PUSH 06 I l MOV 6 0 SAR V 0 N MOV table A N ADD Dtable K I NOV 7 Idevices 1 NOV 1N2 IF BEGIN H ) 0 NOV R 0 XCHG 8 0 R ) NOV 2048 A N ADD LOOP THEN I FOR 9 R POP NEXT 10 11 12 13 14 15 SCR82 0 ( Linked Scans- MJK 12/14/36) HEX 1 : lstart O FCCO C! FSTOP rate Q RATE 0 AMUF/F C! 3 2 DECIMAL 3 4 (LSNEEP) ( tsteps, startdac-) DUP !DATA !SCRATCH 5 0 DO 6 ?YOK ( detection done?) 7 +DEVICE ( increment and out) 8 scratch O DUP ( current value) 9 TRACKING ( track all other devices) 10 XOK ( go-ahead to detection) 11 )PEAK ( reduction) 12 LOOP ; 13 14 : LSNEEP ( step end start dev-) DUP !DEVICE! SNEEPDEV ! 15 )DAC&STEP lstart (LSHEEP) SCANEND ; COMMAND SCRI3 ' 0 ( Linked Scans - MJK 12/14/36) 1 2 : (LISCAN) ( tsteps startdac~) OIINIT 3 0 DO 4 ?YOK ( detection done?) 5 +Ol>3 ( increment and out) 6 M1$CRATCH C DUP ( current values) 7 TRACKING ( track all devices) 3 XOK ( ion path done) 9 )PEAK ( to reduction) 10 LOOP ; 11 12 : LISCAN ( step end start') DRR M1 3)DAC 13 OSTEPS lstart (LlSCAN) SCANEND ; COMMAND 222 SCRBA 0 ( Linked Scans - MJK 12/14/36) 1 2 : (L3SCAN) ( Osteps startdac-) OSINIT 3 0 D0 4 ?YOK ( detection done?) 5 +03>1 ( increment and out) 6 M3SCRATCH G DUP ( current values) 7 TRACKING ( track all devices) 8 XOK ( ion path done) 9 )PEAK ( to reduction) 10 LOOP ; 11 12 : L3SCAN ( step end start-) DRR M3 3)DAC 13 BSTEPS lstart (L3SCAN) SCANEND ; COMMAND SCRQS O ( Linked Scans - MJK 12/14/86) 1 2 . (LDSCAN) ( #steps startdac-) Q3INIT 3 0 DO 4 ?YOK ( detection done?) 5 +03 ( increment and out) 6 MBSCRATCH @ DUP ( current values) 7 TRACKING ( track all devices) 3 XOK ( ion path done) 9 )PEAK ( to reduction) 10 LOOP ; 11 12 : LDSCAN ( step end start-) DRR M3 3)DAC l3 CSTEPS lstart (LDSCAN) SCANEND ; COMMAND 14 15 SCRfié 0 ( Linked Scans - MJK 12/14/36) 1 2 (LPSCAN) ( tsteps startdac-) OlINIT 3 0 DO 4 ?YOK ( detection done?) 5 +01 ( increment and out) 6 MISCRATCH O DUP ( current values) 7 TRACKING ( track all devices) 3 XOK ( ion path done) 9 >PEAK ( to reduction) 10 LOOP ; 11 12 : LISCAN ( step end start-) DRR M1 3)DAC l3 RSTEPS lstart (LPSCAN) SCANEND ; COMMAND 14 15 223 SCRB7 0 ( Linked Scans - MJK 12/14/36) 1 2 (LNSCAN) ( Ksteps startdac-) OSINIT OIINIT 3 0 DO 4 ?YOK ( detection done?) 5 +013 ( increment and out) 6 MISCRATCH G DUP ( current values) 7 TRACKING ( track all devices) 3 XOK ( ion path done) 9 >PEAK ( to reduction) 10 LOOP ; 11 12 : LNSCAN ( step end start-) DRR NSET M1 3)DAC 13 “STEPS lstart (LNSCAN) SCANEND ; COMMAND 14 15 SCRKS 0 ( Master Linked Scans- MJK 12/14/86) 1 : LSNEEP statCLR BDEVICE O DUP 2PUSH 2 @PARAMS 1PUSH SL3 SHEEP SL1 SHEEP SL2 SHEEP 3 SHEEPEND ; 4 5 : LISCAN M1 SCANINIT SL1 LISCAN 0 SCANEND ; 6 7 : L3SCAN M3 SCANINIT SL1 L3SCAN 1 SCANEND ; 8 9 : LDSCAN M3 SCANINIT SL1 LDSCAN 2 SCANEND ; 10 11 : LPSCAN M1 SCANINIT SL1 LPSCAN 3 SCANEND ; 13 : LNSCAN M1 SCANINIT NSET SL1 LNSCAN 4 SCANEND ; SCR89 0 ( Linked Scans for Master- MJK 12/14/36) 1 4 CONSTANT #LDEVICES 2 8073 CONSTANT LBLOCK 3 8032 CONSTANT LDEVICES 4 ILABEL table table 5 ILABEL Qdevices Kdevices 6 7 3 q : LTABLES KLDEVICES 2* I 1024 t + O 1 )SLAVE LBLOCK I + BL SL1 NOTHING LOOP . 1024 IPMOVE SL1 NOTHING LOOP 2+ Dtable 10 LDEVICES BLOCK DUP O #devices 1! 2+ Dtable 11 ILDEVICES 2* IPMOVE ; 13 LTABLES APPENDIX B. FORTH CODE FOR REAL-TIME GRAPHICS 224 SCRhl 0 ( Real-Time Graphics - MJK 12/16/86) : RGINIT ( start end max-inten) Max-Inten 2! 1 CSIZE RHAXES ; COMMAND BEGIN )R XGET DUP I !X )UNITS YGET ZDUP I !Y NORMALIZE ?LOG . SNAP PLOT 10 R) 1+ SSTAT 3 + CO 1 I ll END OPOINTS ! 12 SCANEND ; COMMAND 1 2 3 4 5 : RGSHEEP SCANINIT LPYO LPXO (CUR) VECTOR 0 6 7 3 q SCR82 0 ( Real-Time Graphics - MJK 12/16/86) 1 CODE ?RGPEAK 2 POP 0 POP I PUSH U PUSH ?PEAK CALL 2 U POP I POP NEXT 3 4 : ?RGPEAK ?RGPEAK ?peak 6 0: NOT 5 IF XYLAST 29 I @Y NORMALIZE ?LOG 1 OX HIST PLOT 6 0 ?peak ! XYLAST 2! THEN ; 7 B : RGSCAN SCANINIT LPY @ LPX O (CUR) 9 BEGIN 10 XGET DUP xvalue ! )UNITS 11 YGET 2DUP ?RGPEAK 12 NORMALIZE ?LOG SNAP VECTOR PLOT 13 SSTAT 3 + CO 1 = 14 END 15 - SCANEND ; COMMAND SCR43 0 ( Real-Time Sweeps for Master- MJK 12/16/36) 1 : RGINIT ( d") ’START Q 2PUSH ’END 6 2PUSH SNAP 2PUSH 2PUSH SL2 RGINIT ; 2 3 4 5 : RGSHEEP ( d“) statCLR SDEVICE O DUP 2PUSH @PARAMS 6 1PUSH RGINIT ( put the maximum intensity on slave 2) 7 SL1 SHEEP SL2 RGSNEEP SL3 SHEEP SHEEPEND ; 9 10 : RGSCANINIT ( d-) statCLR ODEVICE @ 2PUSH @PARAMS ll RGINIT SL2 RGSCAN ACOSCAN ; 12 13 14 15 225 SCRAA 0 ( Real-Time Graphics for Master- MJK 1 2 : RGlSCAN Ml RGSCANINIT SL1 lSCAN 3 4 : RG3SCAN M3 RGSCANINIT SL1 3SCAN 5 6 : RGDSCAN M1 RGSCANINIT SL1 DSCAN 7 8 : RGPSCAN M3 RGSCANINIT SL1 PSCAN 9 10 : RGNSCAN M1 RGSCANINIT NSET SL1 11 ‘ 12 13 14 15 12/16/86) 0 SCANEND ; 1 SCANEND ; 2 SCANEND ; 3 SCANEND ; NSCAN 4 SCANEND 9 APPENDIX C. PAL SPECIFICATIONS FOR NOVIX INTERFACE PAL20L10 N1000A NOVIX I/0 CHIP-SELECT GENERATOR EAST LANSING, MI AA A9 A8 A7 A6 A5 /EN NC NC NC NC GND NC /INIT /DAO /PEAK /P18EL /PZSEL /9513 /TIME /START /0LKSEL /LBUSEN V00 MSU CHEMISTRY DEPT. 226 PAL DESIGN SPECIFICATION MICHAEL KRISTO 01/16/86 IF (V00) LBUSEN = /AA# A9* /A8* /A7* EN + ; C200 NR /AA* A9* A8! /A7 ; 0300 RD IF (VCC) CLKSEL = /AA¥ /A9* /A8* A7! A6¥ A5* EN + ;00E0 NR /AA* /A9* A8* A7! A6* A5 ; 01E0 RD IF (VCC) START = /AA* /A9* /A8* A7* A6* /A5t EN + ; COCO NR /AA* /A9* A8* A7* A6* /A5 ; 0100 RD IF (V00) TIME = /AA* /A9* /A8* A73 /A6* A51 EN + ; COAO HR . /AA* /A9* A8* A7! /A6* A5 ; 01A0 RD IF (V00) 9513 = /AA* /A9* /A8* A7* /A6* /A5# EN + ; 0080 WR /AA* /A9* A8* A7* /A6* /A5 ; 0180 RD IF (VCC) PZSEL = /AA* /A9* /A8* /A7* A6* A5* EN + ; 0060 NR ' /AA* /A9* A84 /A7* A6* A5 ; 0160 RD IF (VCC) PlSEL = /AA* /A9* /A8* /A7* A6* /A5* EN + ; 0040 WR /AA* /A9* A8* /A7* A6* /A5 ; 0140 RD IF (VCC) PEAK = /AA* /A9* /A8* /A7* /A6* A5* EN + ; 0020 WR /AA* /A9* A8* /A7* /A6* A5 ; 0120 RD IF (V00) DAO = /AA¥ /A9* /A8* /A7* /A6* /A5$ EN + ; 0000 WR /AA* /A9* A8* /A7* /A6* /A5 ; 0100 RD IF (VCC) INIT = /AA* A9* /A8* A7* EN ; 0280 NR DESCRIPTION THIS PAL GENERATES THE CHIP SELECT SIGNALS FOR THE NOVIX I/O BOARD. /EN GOES LOW FOR A PERIOD OF TIME SELECTED BY THE 1- TO-B JUMPER COMING FROM THE 74164 SHIFT REGISTER. THUS, THE WRITE CHIP SELECT IS OF A DETERMINATE LENGTH. THE READ STAYS ACTIVE UNTIL WRITTEN T0 AGAIN. GENERATE THE READ STROBE IS TWO STEPS: 74HOT244’S IN ORDER TO READ THE DATA ON THE NOVIX I/O BUS. ALL ADDRESSES ARE BASED ON THE READ TRANSACTION AND THEN ENABLE THE A 0000 BASE ADDRESS. APPENDIX D. FORTH CODE FOR PEAK-FINDING ALGORITHM 227 SCRil 0 ( Peak-Finding Algorithm- MJK 5/9/87) 1 2 VARIABLE UPFLAG ( Number of increases in peak) 3 VARIABLE +LAST ( Last pt increasing -1- or not-0) 4 VARIABLE PNIDTH ( Minimum acceptable width) 5 VARIABLE POINTS ( Number of points in peak) 6 VARIABLE THRESHOLD 2 ALLOT ( User-adjustable threshold) 7 VARIABLE MAX-PEAK 2 ALLOT ( Current maximum intensity) 8 VARIABLE YPREV 2 ALLOT ( Intensity of previous point) 9 VARIABLE XVALUE ( Device value of current point) 10 VARIABLE STEP ( Step for scanned device) 11 VARIABLE XMAX ( Device value for MAX-PEAK) 12 13 14 15 SCRKZ 0 ( Peak-Finding Algorithm- !PEAK - MJK 5/9/86) 1 2 VARIABLE KPOINTS ( The number of peaks found so far) 3 VARIABLE DATABUFFER 3000 ALLOT ( where the data goes) 4 VARIABLE B/P ( Bytes per stored point) 5 6 8 B/P ! ( For our system) 7 3 ( !PEAK moves the parameters of the new peak to the DATABUFFER) 9 10 : !PEAK #POINTS 6 B/P * DATABUFFER + )R 11 XMAX O I ! ( bytes 1.2) POINTS 8 I 2+ C! ( byte 3) 12 0 I 3 + C! ( any flags go here- in byte 4) 13 MAX-PEAK 28 I 2+ 2+ 2! ( bytes 5‘8) 14 KPOINTS 1+! ( one more peak found) 15 - 0. MAX-PEAK 2! ; SCR83 0 ( Peak-Finding Algorithm- MJK 5/9/36) : ?PEAK ( d‘) 2DUP YPREV 23 D( 2 IF ( decr.) +LAST @ 0: 3 IF ( decr.) POINTS 0 PWIDTH G ) 4 IF ( width 0k) MAX‘PEAK 2O THRESHOLD 2O D< NOT 5 IF ( above thld) !PEAK THEN 6 7 3 H 0 POINTS ! 0 UPFLAG ! ELSE POINTS 6 0: NOT IF POINTS 1+! THEN THEN ELSE ( at top) UPFLAG B 1 ) 9 IF ( up twice) YPREV 2O MAX‘PEAK 20 D< NOT 10 IF ( new max.) YPREV 20 MAX-PEAK 2! 11 XVALUE 8 STEP 8 ‘ XMAX ! THEN 12 THEN 0 +LAST ! ( intensity was decr.) POINTS 1+! THEN 13 ELSE ( incr.) +LAST 1+! UPFLAG 1+! POINTS 1+! 14 THEN YPREV 2! ; 15 228 SCR44 0 ( Peak-Finding AlgorithM‘ 3086/3 !PEAK - MJK 5/10/36) 1 ( !PEAK moves parameters of the new peak to the DATABUFFER) 2 3 ASSEMBLER 4 5 CREATE KPOINTS N MOV N SHL N SHL N SHL 6 DATABUFFER 8 N ADD XMAX 1 NOV N 1 ) MOV POINTS LDA 7 0 2 N) NOV 0 A 3 NOV I flag again) MAX-PEAK 2+ 1 NOV 8 1 6 N) MOV MAX-PEAK 1 NOV 1 4 N) MOV #POINTS INC 9 0 0 SUB MAX'PEAK STA MAX-PEAK 2+ STA RET 10 11 FORTH 12 13 14 15 SCRKS O ( Peak-Finding Algorithm in 8086/8 Code- MJK 5/10/86) 1 ( Note: This algorithm uses previous variables) ASSEMBLER 2 CREATE PEAK-up UPFLAG INC +LAST INC POINTS INC RET 3 CREATE PEAK-down POINTS LDA PNIDTH 0 SUB 0( NOT IF MAX-PEAK 2+ 1 NOV MAX-PEAK 2 NOV THRESHOLD 1 SUB THRESHOLD 2+ 2 $88 0( NOT IF !PEAK CALL THEN 0 0 SUB POINTS STA UPFLAG STA 3 ELSE ‘1 APOINTS TEST 0: NOT IF POINTS INC THEN RET CREATE PEAK-0 2 8 UPFLAG CMP CS NOT 10 IF YPREV 2+ 1 NOV YPREV 2 NOV MAX-PEAK 2+ 1 SUB \1 Ch. 0! b ‘O 11 MAX-PEAK 2 388 0( NOT 12 IF YPREV LDA MAX-PEAK STA 13 YPREV 2+ LDA MAX-PEAK 2+ STA 14 XVALUE LDA STEP 0 SUB XMAX STA 15 THEN THEN POINTS INC 0 0 SUB +LAST STA RET SCR46 I 0 ( Peak-Finding Algorithm in 8066/8 Code- Cont. - MJK 10/31/86) 1 2 CODE ?PEAK 3 2 POP 1 POP U PUSH I PUSH 2 U NOV 1 I NOV 4 YPREV 2+ 1 SUB YPREV 2 $88 0< 5 6 IF -1 K +LAST TEST 0: 7 IF PEAK“d0wn CALL 8 ELSE PEAK-0 CALL 9 THEN 10 ELSE PEAK-up CALL 11 THEN 12 13 I YPREV 2+ MOV U YPREV NOV I POP U POP 14 NEXT 229 Timer for Algorithms ) : TESTER 0 0 ?PEAK 1000 0 ?PEAK 2000 0 ?PEAK 3000 0 ?PEAK 4000 0 ?PEAK 5000 0 ?PEAK 6000 0 ?PEAK 5000 0 ?PEAK 4000 0 ?PEAK 3000 0 ?PEAK 2000 0 ?PEAK 1000 0 ?PEAK 0 0 ?PEAK ; 13 POINTS) : GO COUNTER TESTER TIMER ; CODE- 215 OS on 5 MHZ 8083) CODE- 323 uS on 5 MHZ 3033) APPENDIX E. FORTH CODE FOR ALGORITHM TESTING 230 SCRII 0 ( Testing Routines for Peak-Finding Algorithms- MJK 6/30/36) 1 17 25 MATRIX PDATA ( creates a 17x25 matrix which can be accessed as- rowt colt PDATA) : RFILL ( n elements, n, rowk) 2DUP O PDATA ! ( telements) 0 PDATA ! ( starting addr.) SNAP 1+ 1 DO DUP ROT SNAP 2 3 4 5 ( RFILL fills a row in PDATA with n elements on the stack) 6 7 8 I 2* + ( current addr. in matrix) ! LOOP DROP ; q 10 ( Sample Input to Matrix) 11 150 250 570 990 2140 4730 7760 10000 9690 8690 3890 12 770 310 230 ( GOOD PEAK) 13 14 ( Aelements) 1 ( rowK) RFILL 14 15 SCRI2 0 ( More Testing of Algorithms- MJK 6/30/86) 1 2 : RERRESH o spoxwrs ! ; 3 4 : ANALYZE ( n-) DUP B ( telements) 0 DO I XVALUE ! 5 DUP 2+ I 2’![ + O ( new datum) 0 ( n->d) ?PEAK 6 LOOP DROP ; 7 3 : REPORT CR #POINTS 0 DUP . ." PEAKS FOUND " CR 0 DO 9 ." POINT A " .DATABUFFER I B/P * + O . 10 ." INTENSITY = " DATABUFFER I B/P * + 4 + 20 D. 11 CR LOO ; 12 13 : ANALYZER REFRESH ANALYZE REPORT ; 14 15 SCR83 O ( More Testing of Algorithms- MJK 6/30/36) 1 ( This version of PRESTATE initializes the algorithm to 2 a well- behaved starting state- other versions can vary the 3 starting conditions to really exercise the algorithm) 4 : PRESTATE 0 0 YPREV 2! 0 +LAST ! 0 UPFLAG ! 5 0 0 MAX-PEAK 2! ; 6 7 .PRESTATE CR ." YPREV = " YPREV 20 D. CR 8 ." +LAST = " +LAST C U. CR 9 ." UPFLAG = ” UPFLAG 9 U. CR 10 ." PNIDTH = " PNIDTH O U. CR ; 11 12 : ALGORITHM 7 3 DO I PNIDTH ! ( different min. widths) 13 17 0 DO ( different peak-shapes = rows in matrix) 14 I 0 PDATA PRESTATE .PRESTATE ANALYZER LOOP LOOP ; APPENDIX F. FORTH CODE FOR MICROCODE COMPILER 231 SCRIl 0 ( Microcode Compiler Load Block - MJK 4/23/87) 1 2 ’ (CREATE) ’CREATE ! 3 2 5 THRU ( Basic Compiler) 4 6 7 THRU ( Instruction Types) 5 8 13 THRU ( Instructions) 6 19 2O THRU ( Control Structures) 7 14 18 THRU ( Movements) 3 21 23 THRU ( Error Checking) 9 26 LOAD ( Algorithm) 10 24 LOAD ( )Disk) 11 25 LOAD ( Debugger) 12 CR CR .( Algorithm has been resident compiled ) CR 13 .( To compile the actual microcode type UCODE ) 14 ’ ?CREATE ’CREATE ! 15 SCR82 ( Microcode Compiler - MJK 4/28/87 ) CR .( Loading Basic Compiler ) 64 DUP CONSTANT NORDLENGTH ( should be a multiple of 15) 16 / CONSTANT N/N 1024 CONSTANT RAM-DEPTH CREATE CODE-BUFFER N/N RAM-DEPTH * ALLOT CODE-BUFFER N/N RAM‘DEPTH * ERASE ‘OCONO'~MJ>CANHO ( The following 2 VARIABLES should range from 0 to RAM-DEPTH) IO VARIABLE current ( microinst. currently being compiled) 11 VARIABLE node 1 ALLOT ( inst. from which branch occurs) 12 ( node 1+ is flag for branching) 13 VARIABLE available ( next available virtual address) 14 VARIABLE start ( start of repetitive part of algorithm) 15 SCRK3 O ( Microcode Compiler - MJK 4/23/37) HEX l 2 : here ( -a) current 8 N/H * CODE-BUFFER + ; 3 4 : T2/ ( t-t) OVER 1 AND )R D2/ ROT 2/ 7FFF AND R) 5 IF 8000 OR THEN ROT ROT ; 6 7 : BIT-TRANSLATE ( d n - n1 n2 n3) 0 SNAP 2SNAP ROT 8 ?DUP 0: NOT IF 0 DO T2/ LOOP THEN SNAP ROT ; 9 10 : KMOVE ( src, dest, cnt - ) 0 DO 2DUP I + @ SNAP I + B 11 OR OVER I + ! LOOP 2DROP ; 12 13 14 y... 01 232 SCR84 O-( Masking of appropriate bits - MJK 4/23/87) HEX 1 ( This word allow the initialization of code space to something 2 other than zeroes ) 3 4 : MASK ( a, bit offset, length) “1 DUP ROT 5 ?DUP 0: NOT IF 0 DO 02* SNAP FFFE AND SNAP LOOP THEN 6 ROT ?DUP 0: NOT IF 0 DO 02* SNAP 1 OR SNAP LOOP THEN 7 ROT )R I 1+ O AND I 1+ ! I 8 AND R) ! ; 8 9 10 11 12 13 14 15 SCRCS 0 ( Microcode Compiler - MJK 4/28/87 ) 1 : ENCODE ( startbit length- ) CREATE , , DOES) ( d') 2 2C CREATE DUP , ( length) OVER 16 MOD + 16 /MOD 3 SNAP IF 1+ THEN DUP )R , ( #words required) 4 ( Awrzlen + sb MOD 16 / 16) 5 16 /MOD , ( sbyte offset ) 6 ( sbytezsbit/16) DUP , ( mask offset) 7 16 SNAP ‘ ( bit Offset for d in BIT-TRANSLATE 8 = 16 ‘ sb l6 MOD ) 9 BIT-TRANSLATE I 10 0 D0 , LOOP 3 R) - 0 DO DROP LOOP ( drop useless data) 11 DOES) )R I 4 + ( source) 12 here I 2 + O ( sbyte offset ) + ( destination) 13 DUP ( addr) I 3 + 0 ( Sbit off) I O ( length) MASK 14 R) 1+ B ( count) tMOVE ; SCRKB O ( Microcode Compiler - MJK 4/28/87) 1 CR .( Loading Basic Instruction Types) 2 ( sb length ) 3 0 8 ENCODE variables ( d-) 4 8 10 ENCODE NEXT.ADDRESS 5 18 4 ENCODE MUX.SELECT 6 22 3 ENCODE ?PEAK 7 25 1 ENCODE CLKON/OFF 8 26 5 ENCODE THRESHOLD 9 31 1 ENCODE NEN.DATA 10 32 2 ENCODE MAX.PEAK ( lDCMP) 11 34 2 ENCODE XMAX 12 35 2 ENCODE YPREV ( 2DCMP) 13 38 2 ENCODE XPREV 14 40 2 ENCODE lFLAG 15 42 2 ENCODE 2FLAG 233 SCR87 0 ( Microcode Compiler - MJK 4/28/87 ) 1 ( Sb length ) 2 44 4 ENCODE lCNTR ( d“) 3 48 2 ENCODE lCCMP 4 50 4 ENCODE ZCNTR 5 54 2 ENCODE 2CCMP 6 56 1 ENCODE ONT) 7 57 l ENCODE VAR) e 53 6 ENCODE EXPANSION Q 10 11 12 13 14 15 SCR48 0 ( Microcode Compiler - MJK 4/28/87) 1 CR .( Loading Intructions ) 2 0. variables NADA 3 1. variables TOBYTE 5. variables 1CMP 4 2. variables T18YTE 6. variables ZCMP 5 3. variables T2BYTE 7. variables lCNTRLD 6 4. variables T3BYTE 8. variables 2CNTRLD 7 ( Condition Codes) ' 8 0. MUX.SELECT ?NENPT 8. MUX.SELECT ?1F/F 9 1. MUX.SELECT ?YPMAX 9. MUX.SELECT 9MUX 10 2. MUX.SELECT ?MPMAX 10. MUX.SELECT lOMUX 11 3. MUX.SELECT ?2CMPMAX 11. MUX.SELECT 11MUX 12 4. MUX.SELECT ?QCMPEO 12. MUX.SELECT 12MUX 13 5. MUX.SELECT ?1CMPMAX 13. MUX.SELECT 13MUX l4 6. MUX.SELECT ?ICMPEO l4. MUX.SELECT 14MUX 15 7. MUX.SELECT ?2F/F 15. MUX.SELECT lSMUX SCR49 O ( Microcode Compiler - MJK 4/28/87) 1 0. MAX-PEAK XMAX-PEAK 2 3. MAX‘PEAK !MAX-PEAK 3 1. MAX'PEAK /MAX-PEAK 4 2. MAX-PEAK @MAX-PEAK 5 6 0. YPREV XYPREV 7 3. YPREV !YPREV 8 1. YPREV /YPREV 9 2. YPREV BYPREV 10 11 1. lFLAG 1CLR . lFLAG lHLD l2 2. lFLAG lSET 13 1. 2FLAG 2CLR 3. 2FLAG 2HLD 14 2. 2FLAG ZSET 4...- U" 234» SCRIIO ‘OmNOxCflwaD—O ( Microcode Compiler - MJK 4/28/87) 3. XMAX XMHLD 2. XMAX !XMAX 1. XMAX OXMAX XPREV XPHLD . XPREV !XPREV . XPREV @XPREV PM“ 0. ?PEAK !PEAK . ?PEAK NO-PEAK . ?PEAK XPEAK \JO‘~ 0. NEXT-ADDRESS rst 0. VAR) @VAR l. VAR) XVAR SCRtll O ( Microcode Compiler - MJK 4/28/87) 0. CLKON/OFF NOCLK 1. CLKON/OFF ONCLK HEX 1E. THRESHOLD !OTHRESH lD. THRESHOLD !lTHRESH lB. THRESHOLD !2THRESH l7. THRESHOLD !3THRESH 0F. THRESHOLD @THRESH 1F. THRESHOLD XTHRESH DECIMAL 0. NEN.DATA @NEN 1. NEN.DATA XNEN SCR412 ( Microcode Compiler - MJK 4/23/87) 0. CNT) !CNT 1. CNT) XCNT HEX 0A. lCNTR !1CNTR 09. lCNTR ClCNTR OB. lCNTR UlCNTR 03. lCNTR DlCNTR 0F. lCNTR XlCNTR DECIMAL O. EXPANSION EOFF 235 SCR413 0 ( Microcode Compiler - MJK 4/28/37 ) HEX 0A. 2CNTR !ZCNTR 09. 2CNTR @2CNTR 0B. 2CNTR UZCNTR 03. 2CNTR DZCNTR 0F. ZCNTR XZCNTR DECIMAL OUJWONUIJBMNH (A 10 0. lCCMP XlCMP lCCMP !lCMP 11 2. lCCMP /1CMP 1. lCCMP ClCMP 12 13 14 15 (A . 2CCMP X2CMP . 2CCMP !2CMP . 2CCMP /20MP 1. ZCCMP OZCMP NO SCR414 0 ( Microcode Compiler - MJK 4/28/87) 1 CR .( Loading Movements ) 2 3 : NAIT NADA ?NENPT XMAX-PEAK XYPREV lHLD 2HLD XMHLD 4 XPHLD XPEAK NOCLK XTHRESH XNEN XCNT XICNTR X2CNTR 5 XlCMP X2CMP rst XVAR EOFF ; 6 ( 0 0 C0 FD CC FF 3C 03 - SHON AFTER CLEAR ) 7 8 : ALL-QUIET RAM-DEPTH 0 DO 1 current ! NAIT LOOP ; 9 CR 2 SPACES .( Initializing CODE Area) 10 ALL-QUIET ll 12 13 14 15 SCRKIS 0 ( Microcode Compiler - MJK 4/29/87) : ZERO NADA @VAR ; : NADA NADA XVAR ; : lCMP lCMP @VAR ; : 2CMP 2CMP OVAR ; : lCNTRLD lCNTRLD @VAR ; : 2CNTRLD 2CNTRLD OVAR ; ‘OODVO‘-M-D~O~INH : 0THRESHOLD TOBYTE @VAR !OTHRESH ; 10 : 1THRESHOLD TIBYTE @VAR !1THRESH ; 11 : 2THRESHOLD TZBYTE @VAR !2THRESH ; 12 : 3THRESHOLD TSBYTE OVAR !3THRESH ; 13 : THRESHOLD next 0THRESHOLD next 1THRESHOLD 14 next 2THRESHOLD next 3THRESHOLD ; 236 SCR816 0 ( Microcode Compiler - MJK 4/29/87 ) : !UPTST 2CMP !ZCMP ; : CLR ZERO !1CNTR !2CNTR !2CMP !lCMP lCLR 2CLR - : ZAPsBUS CTHRESH !MAX-PEAK !YPREV ; : INITIALIZE next ZERO next !UPTST next 2CMP THRESHOLD : INCREASING U10NTR U2CNTR lSET NO-PEAK @NEN !YPREV 1 2 3 4 5 next ZAP-BUS next @THRESH ; 6 7 8 next @NEN ; 9 1O : @maxima @MAX-PEAK OXMAX ; 11 : PEAK Omaxima !PEAK next Bmaxima ; 12 : @minima @THRESH ZERO ; 13 : PKRST ZERO !ICNTR Ominima !MAX-PEAK next Bminima - 14 : PKSTORE PEAK next ZERO !ICNTR @minima !MAX-PEAK 15 @minima ; SCRAI? 0 ( Microcode Compiler - MJK 4/29/87 ) . DONN lCLR U2CNTR NO PEAK ONEN !YPREV next @NEN'; : @previous @YPREV GXPREV ; !MAX @previous !MAX-PEAK !XMAX next @previous ; : NENMAX !MAX next lCLR U2CNTR NO-PEAK @NEN !YPREV next BNEN ; ‘00.?‘JCF-‘U1304MH 10 : IGNORE lCLR NO-PEAK @NEN !YPREV next @NEN ; 14 15 SCR418 0 ( Microcode Compiler - MJK 4/29/87) 1 ( Aliases) 2 : OPOINTS OZCNTR ; 3 : @UPFLAG OlCNTR ; 4 5 : !POINTS !2CNTR ; 6 : !UPFLAG !2CNTR ; 7 8 : ?+LAST ?lF/F ; 9 10 : ?LESS-THAN-ONE ?2CMPMAX ; 11 : ?TOO-NARRON ?lCMPMAX ; 12 13 14 15 SCR419 237 0 ( Microcode Compiler - MJK 4/29/87) 1 CR SCR420 ‘OCOVO‘U‘kMN .( Loading Control Structures) !PREV.INST ( n n ‘) N/N * CODE-BUFFER + BYTE )R 256 /M00 SNAP I CC OR I C! I 2 + CO 0R R) 2 + C! ; : if ( -current) available O node B !PREV.INST node 1+ 6 IF available 8 node 8 1+ !PREV.INST THEN available B DUP 1+ DUP current ! node ! 2 available +! 0 node 1+ ! ; : else ( current-) DUP current ! node ! 0 node 1+ ! ; : then ; (next) ( a-) available 8 DUP DUP current ! ROT DUP EXECUTE SNAP 1+ current ! EXECUTE 2 available +! DUP node B !PREV.INST node 1+ 6 IF DUP node Q ‘1+ !PREV.INST ( last one was a next- so br needed for both) THEN node ! 1 node 1+ ! ; : next ’ \ LITERAL COMPILE (next) \ \\ ; IMMEDIATE (next) ’ (next) ; O ( Microcode Compiler - MJK 4/29/87 ) SCR§21 ( Error Checking Routines - MJK 4/29/37) ~0mwo~mawn~o H’s-s I-‘O 12 : 13 14 15 : ?BIT ( bit! add : HOME start B current 8 !PREV.INST node 1+ 9 IF start 6 current 9 1- !PREV.INST THEN ; : START current 0 DUP node ! 1- DUP DUP !PREV.INST start ! 0 node 1+ ! ; : microcode O DUP current ! node ! DUP EXECUTE 1 node 1+ ! 1 current +! EXECUTE 2 available ! ; : MICROCODE ’ \ LITERAL COMPILE microcode \ \\ ; IMMEDIATE .( Loading Error Checking Routines) ( bits- only one of which can be active at any time) CREATE 081 3 . 51 . 45 . 57 . CREATE 082 2 . 54 . 48 , CREATE YBl 2 . 31 , 30 , CREATE YBZ 2 , 36 , 32 , CREATE XB1 3 , 31 , 39 , 35 , f) G SNAP ?DUP 0: NOT IF 0 DO 2/ LOOP THEN 1 AND ; ?2BITS ( sbitt. a-n) G SNAP ?DUP 0: NOT IF 0 DO 2/ LOOP THEN 3 AND ; SCR822 .238 0 ( Error Checking- MJK 4/29/37) 1 VARIABLE ’.ERROR 2 : .ERROR ’.ERROR @EXECUTE ; 3 VARIABLE Errors 0 Errors ! 4 5 : .DB CR ." Too Many Devices Driving the DB Bus in Instruction 6 " current O U. 1 Errors +! ; 7 : .YB CR .” Too Many Devices Driving the YB Bus in Instruction 8 I ' current 8 U. 1 Errors +! 9 : .XB CR ." Too Many Devices Driving the X8 Bus in Instruction 10 " current B U. 1 Errors +! ; 11 12 13 14 15 SCR423 0 ( Error Checking - MJK 4/29/87) ‘DCONCIKU‘TbO-IMH 10 11 12 13 lCHK 0 OVER 8 1+ 1 DO OVER 1 + O ( bit of interes) 16 /MOD here + ( word of interest) ?BIT 0: + LOOP SNAP DROP \\ ; : ZCHK ( n-) OVER 8 1+ 1 DO OVER I + C ( selected bits) 16 /MOD here + ( word of interest) ?2BITS 2 = + LOOP SNAP DROP \\ ; : CHK ( 2’5 1’3 -) lCHK ZCHK l ) IF .ERROR THEN ; : CHECK [’] .DB ’.ERROR ! DB2 DB1 CHK [’] .YB ’.ERROR ! YB2 YBl CHK [’] .XB ’.ERROR ! XBl lCHK 1 ) IF .ERROR THEN ; UCHECK RAM-DEPTH 0 DO I current ! CHECK LOOP ; 14 : 15 SCRK24 0 ( Disk Storage of Algorithm - MJK 4/29/87) 1 ( In downloading we load byte 0’s first, then byte 1’s etc. However, in memory we have word 1 -byte 0-7, word 2, byte 0-7, etc. This word rearranges the bytes for later downloading.) 5360 CONSTANT CODE'FILE : UCODE)DISK N/N 0 DO RAM-DEPTH 0 DO CODE-BUFFER I N/N * + J + 8 256 /M00 DROP J 2* RAM-DEPTH * I + 1024 /M00 CODE-FILE + BLOCK BYTE + C! LOOP UPDATE LOOP FLUSH N/N 0 DO RAM-DEPTH 0 DO CODE-BUFFER I N/N * + J + O 256 [MOD SNAP DROP J 2* 1+ RAM-DEPTH * I + 1024 /M00 CODE-FILE + BLOCK BYTE + C! LOOP UPDATE LOOP FLUSH ; : UCODE ALGO UCHECK Errors O 0: IF UCODE)DISK THEN ; 239 SCRCZS 0 ( DEBUGGERS) : SHON ( n-) N/N I CODE-BUFFER + N/N DUMP ; : CLEAR ( n') N/N * CODE-BUFFER + N/N ERASE ; : EXPOSE ( ch) 0 DO I SHON 2 +LOOP ; DLJVD-UID-(Awo— 10 11 12 l3 14 15 SCRK26 0 ( Algorithm - MJK 7/31/87) 1 : ALGO MICROCODE CLR INITIALIZE next ?NENPT START 2 if @NEN ?YPMAX 3 if ?+LAST 4 if @UPFLAG ?LESS-THAN-ONE 5 if DONN HOME 6 else @YPREV ?MPMAX 7 if DONN HOME else NENMAX HOME then then 8 else @POINTS ?TOO-NARRON 9 if BPOINTS ?LESS-THAN-ONE 10 if IGNORE HOME else DONN HOME then 11 else @THRESH ?MPMAX 12 if PKSTORE HOME else DONN HOME then 13 then then 14 else INCREASING HOME then 15 else HOME then ; APPENDIX G. FORTH CODE FOR AMD9513 COUNTER 240 SCRII 0.( Dual-Mode Control- Slave 3- MJK 2/15/85) 1 2 VARIABLE 3LD ( Significant Count) COMMAND 3 VARIABLE 4LD ( Significant Time) COMMAND 4 VARIABLE SLD ( Nindow Count) COMMAND 5 VARIABLE CDIV I Count Divisor) COMMAND 6 VARIABLE FDIV ( Frequency Divisor) COMMAND 7 VARIABLE CTMODE ( Time or Count) COMMAND 8 9 10 11 12 13 14 15 SCR42 O ( 9513 Counter Utilities) HEX 1 AMD9513 1+ CONSTANT COMMAND-REGISTER 2 3 : 95data I n-) AMD9513 C! ; 4 : 95com I n-) COMMAND-REGISTER C! ; 5 6 : NZERL I n-) 0 DO 00 9Sdata LOOP ; 7 CODE GRAB I n') 0 POP COMMAND‘REGISTER STA B AMD9513 0 NOV B AMD9513 0 HI MOV B 0 PUSH NEXT ‘000 10 ll CODE N)9513 I n-) 0 POP 2 2 SUB O 2 NOV B 12 2 AMD9513 MOV B 0 HI 2 NOV B 2 AMD9513 MOV B NEXT 13 14 DECIMAL 15 SCRK3 ' 0 ( This is the 9513 Counting Scheme for Constant Count) 1 HEX 2 : CCLOAD 01 95com ( counter autoload) 3 I 1CTR) A8 9Sdata AB 95data 4 NZERL 4 I 2CTR) 28 95data 00 95data 4 NZERL 5 I 3CTR) 02 95data 02 95data 3L0 O N)9513 2 NZERL 6 I 4CTR) 02 95data OB 95data 4L0 O N)9513 2 NZERL 7 I 5CTR) 02 9Sdata 01 95data 5L0 8 N)9513 2 NZERL 8 O7 95com 4 NZERL ( Alarm Register) 9 20 95data CDIV CB 95data ( Master Mode) ; 10 11 : COUNT 5F 95com E5 95com E4 95com EB 95com 3F 95com ; 12 13 : DATUM 9F 95com 11 GRAB 12 GRAB ; 14 DECIMAL 5..- (fl 241 4CTR) 02 95data 0B 95data 4L0 O N)9513 2 NZERL 5CTR) 02 95data FDIV CO 95data 5L0 E N)9513 2 NZERL 8 07 95com 4 NZERL ( Alarm Register) 9 2O 95data 81 95data ( Master Mode) ; SCRC4 0 ( This is the 9513 Counting Scheme for Constant Time) 1 HEX 2 : CTLOAD 01 9Scom ( counter autoload) 3 I lCTR) A8 95data A1 95data 4 NZERL 4 I ZCTR) 28 95data 00 95data 4 NZERL 5 I 3CTR) 02 95data 02 95data 3L0 O N)9513 2 NZERL ( ( 10 11 12 : 95RESET FF 9Scom ; 13 14 DECIMAL APPENDIX H . FORTH cons Poo DUAL-MODE SCANNING 242 SCRII ( Dual-Mode Scanning- MJK 2/16/86) : PULSES I -d) COUNT ( Start counting in selected mode) BEGIN PIO CB 4 AND 4 = END ( Check for end of count) DATUM ( Acquire 32-bit count of pulses and time) ; ( Dual-Mode Interrupt) HEX ASSEMBLER HERE 0 POP 0 POP 0 POP 0 P0P ( clean up int args) 0 0 SUB 0 PUSH 0 PUSH I null data) STI ( enable interrupts) ’ EXIT JMP ( next word = PMODIFY) 10 OD INTERRUPT 11 DECIMAL 12 CREATE DMINT ( holds interrupt goodies) 13 . A . ( value, value, addr) 14 : !DMINT DMINT 2+ 26 DMINT O 2! ; 15 ‘OmmebMMh-D SCRI2 0 ( Flux Calculations - MJK 6/18/86) HEX 1 3E7A D752 9ABC AF48 LCONSTANT 9513CLK 2 DECIMAL 3 : CFLUX I d-d) CDIV CG ?DUP 0: IF 16 THEN 4 )N 5L0 C )N F* I Bcounts) 9513CLK 2)N F* 5 ( time) F/ ( flux) 2N) ; 6 7 : TFLUX ( d-d) 2)N ( count) FDIV CB 11 2 8 IF 1 ELSE 1000 THEN )N 5L0 O )N F* 9 9513CLK F’II I time) F/ I flux) 2N) ; 10 ' 11 : FLUX CTMODE 9 IF TFLUX ELSE CFLUX THEN ; 12 13 14 15 SCR83 O ( Normalization Routines for Dual-Mode- MJK 6/18/36) LVARIABLE RES COMMAND ( +120.0E-09 RES 1! ( calculated 6/86- MJK ) LVARIABLE DCAL : RETROFIT ( d-f) 2)N RES lo 4.0 F* F* ( 4ac) 1.0 FSNAP F- ( 1-4ac) FSORT 1.0 FSNAP F- 2.0 RES 19 Ft F/ ; 4.. ONOCOVOKMwaH 11 : PMODIFY I d-d) FLUX RETROFIT 2N) ; 12 : AMODIFY I d-d) 2)N DCAL 10 F* 2N) ; 13 14 15 243 SCR44 O ( Dual-Mode Calibration- MJK 6/18/86) HEX : DMACOUIRE I d“d) COUNT TEST-ACOUIRE BEGIN PIO CO 4 AND 4 = END DATUM ; ( DSLOPE gives the slope of the pulses versus A-to-D curve) : DSLOPE I d d c F) RETROFIT 2)N F/ ; : DCALIBRATE 5 0 DO DMACOUIRE DSLOPE LOOP F+ F+ F+ F+ 5 )N F/ DCAL l! ; COMMAND Dos-NO-(flb-MMI— I 10 F386 402D SCONSTANT ELD DECIMAL 11 VARIABLE pulses 2 ALLOT 12 : POISSON YOK BEGIN ?XOK PULSES 2DUP pulses 2O 13 D( NOT IF pulses 2! ELSE 2DROP THEN YOK 14 SSTAT 1+ CB 1 AND 1 = END 1.0 ELD )N pulses 2O 2)N 15 F* F/ RES 1! ; COMMAND SCRIS O ( Dual-Mode Control Scheme- MJK 2/15/86) 1 CODE ANALOG ACOUIRE NEXT 2 3 : DUAL-ACQUIRE ‘1 PRORST C! I clr flag and then read) 4 PIO CO 2 AND IF ANALOG AMODIFY 5 ELSE PULSES PMODIFY 6 THEN 7 )PEAK ; 8 : DUAL-SCAN CTMODE 0 IF CTLOAD ELSE CCLOAD THEN YOK 9 BEGIN 10 ?XOK ( wait for Ion Path) 11 DUAL—ACQUIRE I data-point) 12 YOK ( send ok to Ion Path) 13 SSTAT 1+ CO 1 AND 1 = END 14 1 STATOUT C! ; COMMAND 15 ». SCR46 O ( Master Debugging Additions) 1 HEX F880 CONSTANT AMD9513 F8C0 CONSTANT P10 2 3 4 5 : COMMAND ; 6 7 8 9 10 11 12 13 14 15 244 SCRK7 0 ( Matrices for Control of Pulse Counting ModeS‘ MJK 2/4/86) 1 2 I CDIV, COUNT) 3 CREATE Count-Control ( 0) 0 C, 62500 , ( 1) 10 C, 50000 , 4 ( 2) 10 C, 10000 , I 3) l C, 40000 , ( 4) 1 C, 17800 , 5 I 5) 1 C, 10000 , I 6) 1 C, 5000 , ( 7) 1 C, 1000 1 6 I 8) 1 C, 400 , I 9) 1 C, 178 , I 10) l C, 100 , 7 8 ( FDIV, COUNT) 9 CREATE Time-Control I O) 11 C, 1000 , I 1) 11 C, 2000 , 10 ( 2) 11 C, 4000 , I 3) 11 C, 10000 , I 4) 11 C, 20000 1 11 ( 5) 11 C, 40000 , I 6) 14 C, 100 , I 7) 14 C, 200 s 12 I 8) 14 C, 400 , I 9) 14 C, 1000 , I 10) 14 C, 2000 , , ( l3 ( 11) 14 C, 4000 14 15 12) 14 C, 10000 , SCRBS 0 ( Dual-Mode Setting Routine for Master- MJK 2/4/86) 1 2 CVARIABLE CDIV 3 CVARIABLE FDIV 4 VARIABLE 5LD 5 VARIABLE 4L0 6 VARIABLE 3L0 7 e : ?PULSE-RATE ( a-n c) CR CR ." Rate to Use: " AINPUT 3 t + 9 DUP 1+ 4 SNAP cc ; 10 11 : CCVARS Count-Control ?PULSE-RATE CDIV C! 5LD ! ; 12 : CTVARS Time-Control ?PULSE'RATE FDIV C! 5LD ! ; 13 14 15 SCRI9 0 ( Dual-Mode Setting Scheme for Master- MJK 2/4/86) 1 2 10 CONSTANT 95MH2 3 VARIABLE CTMODE 4 5 : ?SCHEME PAGE 10 0 CURSOR ." DUAL MODE SETTING ROUTINE " 6 CR CR .” Do You Hant Constant Time (T) “ CR 7 “ or Constant Precision (no. of counts) (0) ? “ 8 KEY 84 = DUP CTMODE ! IF 7923 SCREEN CTVARS 9 ELSE 7924 SCREEN CCVARS THEN ; 10 11 : ?NINDON 7922 SCREEN ." Time Nindow (usec): " 12 RINPUT 95MHZ * 4LD ! CR 13 .“ Counts to Occur in Nindow: " KINPUT 3L0 ! ; 14 15 245 SCRIIO 0 ( Dual-Mode Setting Scheme for Master- MJK 2/4/36) 1 3LABEL FDIV fdiv 3LABEL CDIV cdiv, 2 3LABEL 5LD 51d 3LABEL 4LD 41d 3 3LABEL 3L0 31d 3LABEL CTMODE ctmode 4 5 : DMPARAMS FDIV CG fdiv IC! CDIV C0 cdiv IC! 5LD 0 51d 1! 6 4LD 0 410 I! 3LD 8 31d ! CTMODE O ctmode I! ; 7 8 9 10 11 12 13 14 15 SCRBII 0 ( Dual-Mode Resolution Determination- MJK 8/12/36) 1 3LABEL RES RES 2 LVARIABLE DMRES +120.0E-09 DMRES 1! 3 4 : ILO ( a3,al-) 3 0 )SLAVE 16 IPMOVE ; 5 6 : IL! I al,a3-) 0 3 )SLAVE 16'IPMOVE ; 7 8 : POISSON L2 ’CURRENT O ’START 8 ’END 0 ’STEP 0 9 1 ’STEP ! 0 ’START ! 250 ’END ! statCLR OPARAMS 10 ADEVICE O 1PUSH SL3 POISSON SL1 SNEEP 11 ’STEP ! ’END ! ’START ! ’CURRENT ! DMRES RES ILO ; 12 13 DMRES RES IL! 14 15 SCR912 0 ( Dual- Mode Setting Scheme- MJK 2/4/86) : DUAL SCAN SL3 DUAL SCAN ; : ASCAN SL3 SCAN ; l 2 3 . 4 : .ANALOG .status 12 .MNAME ; 5 : .DUAL .status 13 .MNAME ; 6 7 8 c, : DMCALIBRATE RRR L2 ’CURRENT Q 130 SET SL3 DCALIBRATE SET DRR ; 10 : DUAL‘MODE ?SCHEME ?NINDON DMPARAMS 11 [’] DUAL~SCAN ’ACOSCAN ! .DUAL CR ; 12 13 : ANALOG [’] ASCAN ’ACOSCAN ! .ANALOG CR ; 14 .246 SCR413 ‘OmNmeuMh-o .Null Data Window Control Studies ( e. g. Darland, Enke, Leroi ) have shown that about two-thirds of the time spent in data acquisition is spent acquiring null data ( data with only negative information ). The Null Data Nindow Control serves two puposes in Dual-Mode Detection. First, it can drastically shorten the time spent in collecting null data, sicne it is often evident very quickly that no significant ion current exists at a given point. The user can set the point to determine whether or not this looks like a null data point. Secondly, it prevents the detection scheme from "hanging up" in Constant Count Mode, when there are no counts at all. SCR414 0 Dual-Mode Setting Routine - Constant Time 1 For Pulse Counting Only 2 Rate Time/Pt 3 0 100 4 1 200 5 2 400 usec 6 3 1 msec 7 4 2 8 5 4 9 6 10 10 7 20 11 8 40 12 9 100 13 10 200 14 11 400 msec 15 12 1 sec SCRAIS 0 Dual-Mode Setting Routine - For Constant Count - Precision 1 2 For Pulse Counting Only Rate No. of Counts Precision 0 1 x 10E6 0.100 1 5 x 10E5 0.140 2 1 x 10E5 0.320 3 4 x 10E4 0.500 4 1.78 x 10E4 0.750 5 1 x 10E4 1.000 6 S x 10E3 1.400 7 1 x 10E3 3.200 8 4 x 10E2 5.000 9 1.78 x 10E2 7.500 10 l x 10E2 10.000 APPENDIX I. FORTH CODE FOR REACTION SCANS 247 SCRAI 0 ( Variables for Reaction Scanning- MJK 8/6/85) 1 2 VARIABLE VTRAP 20.0 VTRAP ! ( Voltage on L5 to trap ions) 3 VARIABLE TSTORE 1000 TSTORE ! ( Time to store ions in MS) 4 VARIABLE VPULSE -100.0 VPULSE ! ( Pulsing voltage on L5) 5 VARIABLE KACOS 100 KACOS ! ( Number of acqs in pulse) SCRK2 0 ( Reaction Scanning Primitives- MJK 8/6/85) : RACOUIRE IDEVICE 0 L5 ’CURRENT O VTRAP 8 SET TSTORE 0 MS VPULSS 0 SET 0. RACOS @ 0 DO ACOUIRE DMAX LOOP )R )R L4 SET KDEVICE ! R) R) ; (RPSCAN) OIINIT +01 10 MS 0 DO RACOUIRE ?PEAK +01 RSYNC 1 /LOOP : ‘OCONOkCfl-DOJMr—e 10 : (RDSCAN) 03INIT +03 10 MS 11 0 DO RACOUIRE ?PEAK +03 RSYNC 1 /LOOP : 13 : (RNSCAN) DUP OlINIT 03INIT NSET +013 10 MS 14 0 DO RACOUIRE ?PEAK +013 RSYNC 1 /LOOP ; 0 ( Reaction Scanning- MJK 8/6/85) 1 : RPSCAN M3 DATAOUT DRD SCANINIT M1 OPARAMS 3)DAC BSTEPS (RPSCAN) 8 SCANEND ; 2 3 . 4 : RDSCAN M1 DATAOUT DRD SCANINIT M3 @PARAMS 3)DAC 5 OSTEPS (RDSCAN) 9 SCANEND ; 6 7 8 : RNSCAN DRD SCANINIT M1 @PARAMS 3)DAC ASTEPS (RNSCAN) 10 SCANEND ; 10 : (RSNEEP) ( Asteps, startdac-) !DATA DUP APOINTS ! 11 0 DO 0 VALUE 0 I ’X 2! RACOUIRE I ’Y 2! 12 +DEVICE RSYNC LOOP ; l4 : RSNEEP FSTOP STEP 8 lDEVICE 0 SNEEPDEV ! 0. MAX-INTEN 2! 15 0. TIC 2! @PARAMS )DAC&STEP (RSNEEP) 5 SCANEND ; SCRC4 0 ( 248 User Interface for the Reaction Scans- MJK 8/14/85) 1 4 8040 7 LABELS RXNNAME 2 3 4 5 : 6 7 8 .RXNNAME I n-) RXNNAME )TYPE ; NORML 12 U.R ; : VTGE 6 SPACES N.1 ; :CASE RXNVAR VTRAP TSTORE VPULSE AACOS ; 9 :CASE .RVALUE VTGE NORML VTGE NORML ; 10 11 : 12 13 14 : 15 SCR85 ‘OODNCI’nm-bUJNF-O so as A .RXSET PAGE 8041 SCREEN 8040 LOAD 4 0 DO CR I .RXNNAME I RXNVAR Q I .RVALUE LOOP 20 SPACES ; RXSET .RXSET 4 0 DO 20 I + 23 CURSOR 63 EMIT 8 EMIT #INPUT ?DUP IF DUP I RXNVAR ! THEN LOOP ; Reaction Scanning Primitives- MJK 8/6/85 ) : +RACOUIRE #DEVICE 8 L5 ’CURRENT 8 VTRAP 0 L5 SET TSTORE 0 MS VPULSE 0 SET 0. #ACOS O 0 DO ACOUIRE D+ LOOP )R )R L5 SET CDEVICE ! R) R) ; I+PSCAN) 011NIT +01 10 MS 0 DO +RACOUIRE ?PEAK +01 RSYNC 1 /LOOP ; (+DSCAN) 03INIT +03 10 MS 0 DO +RACOUIRE ?PEAK +013 RSYNC 1 /LOOP ; (+NSCAN) DUP 01INIT 03INIT NSET +013 10 MS 0 DO +RACOUIRE ?PEAK +013 RSYNC 1 /LOOP ; Reaction Scanning- MJK 8/6/35 ) ' : +RPSCAN M3 DATAOUT DRD SCANINIT M1 @PARAMS 3)DAC ISTEPS I+PSCAN) 8 SCANEND ; : +RDSCAN M1 DATAOUT DRD SCANINIT M3 @PARAMS 3)DAC OSTEPS (+DSCAN) 9 SCANEND ; : +RNSCAN DRD SCANINIT M1 @PARAMS 3)DAC ASTEPS (+NSCAN) 10 SCANEND ; (+SWEEP) ( #steps startdac-) !DATA DUP #POINTS ! 0 DO 0 VALUE 0 I ’X 2! +RACOUIRE I ’Y 2! : +RSNEEP FSTOP STEP 0 KDEVICE @ SNEEPDEV ! 0. MAX-INTEN 2! O. TIC 2! @PARAMS )DAC&STEP (+SNEEP) 5 SCANEND ; SCRC7 249 0 (MRM for Reaction Scans- MJK 3/23/86 ) ‘OOOVCF-Uihwfiih O 10 11 12 13 14 15 SCRSB I 5 ( NORMALIZE DOT PLOT MSSLOT : RCOLLECT I cycle4-) I DUP MASS- SET IF 4DUP THEN !RXREC ; 5 MS BRXNS O 0 RACOUIRE ?LOG SNAP FIELDS ! ROT ’Y 2! DO SNAP LOOP DROP 0 ( MRM with the Reaction Scans- MJK 3/23/87) (RATE) 0 )R RXINIT 12 13 14 15 SCR89 ‘CCO‘MONMhMMh-O 1—1—1—1—1—1— mutant—o : R MRM : R-lSIM : R-3SIM DRD RCOLLECT .' elapsed" R) RATE ; DRR RCOLLECT " elapsed“ R) RATE ; RRD RCOLLECT ' elapsed” R) RATE ; ?LEAVE CR .' (RATE) 0 )R ?LEAVE RSYNC LOOP MRM complete” CR ." (RATE) 0 )R ?LEAVE RSYNC LOOP MRM complete“ CR .' RXINI RXINI 0 DO I RSYNC LOOP TERMINAL MRM complete“ RXEND T 0 DO I TERMINAL RXEND T 0 DO I TERMINAL RXEND 1000 M00 DUP ?RESET 2TIMER CR BELL DUP ?RESET 2TIMER CR BELL DUP ?RESET 2TIMER CR BELL 250 SCRBI 0 1- 2 ‘OOZJNG-(fibw CR CR { VARIABLE VALUE} CR EXIT VTRAP TSTORE VPULSE KACOS SCRO2 ‘OCOVU-(flbCANO—O REACTION SCAN EDITOR This allows one to set the extra parameters available in the reaction scans. In a reaction scan, LENS 5 is held positive for a user-specified period of time in order to store up + ions. The lens is then pulsed negative, pulling the resulting ions out of quadrupole 2. A user-specified number of acquisitions are then scanned for the highest value (in RSCANS) or are integrated (in +RSCANS). RSCANS seem to give the highest signal-to-noise ratio. VTRAP is the voltage used to store up the ions in the collision chamber. TSTORE is the amount of time in milliseconds for which the ions are stored. VPULSE is the voltage used to pulse the ions out. {ACQS is the number Of acquisitions made for each pulse (each datum). Note: Each acquisition is made up of a number of averages (set by RATE). It is best to use 2 rate to catch the maximum. SCR83 ‘OCOVGUI-bMNI-‘O