1'; EJ '47.?" 3 . 2’ . -—.. . .._ '32:: ' do ' I . g. 2.5,: 1.... .. " .1 .— O ~ ' "L- . '. I v r . -7. -. ‘b' 9 -vv‘ r..- . w..— 5 .o . I I p ,r. a. Y ~— ——: . ~33 .- . - “.11“. n, l‘ _ v. J." A ..... r_ —-——A.—.-a——4h—— _—‘ ' ‘ .‘c .. ‘:~.r-..;- ‘r-o . .4»— ”a.-. no“... 5.. .4 m.—‘ I I ”~— ._- w . ‘a r' I *H‘ A ~o .——_4———3 _' .». - A—-_;- p—- - '- —‘ d. h ’ g. ._. \ .._o 4., . , "Mow, 4.... . flow _ ,_ _,._,‘,_..___.... ...,......h . I- “'1‘ ”9"‘_,. . . ' J . -‘ A ‘c. I h‘ v u. . . ' ' NS—I—‘fi‘v. M - . .- < .v. o .. . —_. .‘ZJL" “ 0 “a. .04 ‘_. a .- .'..._."o.....— . . . . . . .2. - «4. *- L';:2....-. W .._.. . .— o .- ...- P. .po ..—.—~ t u....—. .--‘.- .—'-——. . , .... M .. ~— . A_......‘ . m— ... w , 6. JR.- - . ...._. .4- . 22:: 0 l I . .. E. . “‘43” . A. |"__.. Wmo-«p. 0:4 A 'mu‘ m- w. '2 O w .‘4 .cc . 4 - mam. '“q: : .s o‘ . . . .. I _ .a n J ——» :.r- .52 W’ - .... .--—-~.,., . ‘ " £315..“ . . . A .‘ II. .t . - .. . 1° . r- . . 7 . . ‘ - . _ J .. . “W“QO __.—. n- ‘i .1d 4 22:3?1 :7!‘ vii 6:? at. ’I‘e. ,,..:» 6,3“ ' ”"0: ;!'{;:I'; .7 J) -a -‘r :' ‘ fix A ‘ 1 ° "" "1-"JMI ': : ”i=1: 6. ti,'-.§‘~: III . I I : "‘1“‘l‘>< . :' J . . ‘ _ ‘ ! . . «J‘JI- ' r ‘ ' ‘ 1" "r I .‘ \I 1"” “:33 M ”’4‘ z r 953 ‘ ‘II 3491‘ I1';1.14‘i I): at ‘ u“: Ignaz!“ 1:”! 21:1}? {it 3.1:“ .~ W 091??!" this, "i. 3" my“ $94.} it“; v. I) fl " .943 “I11“ “Oil d‘O’H {6: J 193“ . '1 1.x Fig": {I ‘I{‘ II SJFII '14:); ! '~‘ ”I. 1?“. ‘ I i. ‘1‘}; ‘1‘}? Lids“: ‘2!“ 09V (‘1) flihjil '91:“! ‘ I III‘ "l‘igdnf‘kév .I \ PW» 22““? )1 3‘3 Ed“: ”WWII If!” ‘ It“ :I‘ I W“ III:I:II..III :‘2?‘ f::.?- ' -p _._- ‘i‘t‘ - § M {II 1‘31"}. 1“.” 6 1 6“ ‘I' I”;“1“'Itzi%' 1I6'I' I"‘.I“' my .. . . ,JV' '5‘: PM ”W :I5.»: :16” “1‘“ “6M “MARLIN II 033%“ Egg ‘5‘: __ «A {t‘XLSKQ This is to certify that the thesis entitled Development of Interactive Operating System Software for Triple Quadrupole Mass Spectrometry presented by Carl Alan Myerholtz has been accepted towards fulfillment of the requirements for Masters degree in Chemistry fl/Q’ 54a Major professor \ Date ape/(:44, x413 0-7639 MS U is an Affirmative Action/Equal Opportunin Institution MSU LIBRARIES ” 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. DEVELOPMENT OF INTERACTIVE OPERATING SYSTEN SOFTUARE FOR TRIPLE QUADRUPOLE MASS SPECTROMETRY BY Carl Alan Myerholtz A THESIS Submitted to Michigan State University in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE Department of Chemistry 1982 /3 7* 00‘7/6‘ ABSTRACT DEVELOPMENT OF INTERACTIVE OPERATING SYSTEM SOFTWARE FOR TRIPLE QUADRUPOLE MASS SPECTROMETRY BY Carl Alan Myerholtz A convenient command structure was needed for the computer-automated control of all instrument parameters and scanning modes of a triple quadrupole mass spectrometer (TQMS) instrument operating in the research environment. The interactive software control system developed to meet this need aids in the optimization of the many parameters that affect the ion beam. It also implements the various scanning procedures used in TQMS applications (daughter, parent and neutral loss scans). The operating system. software was written in the programming language FORTH. Due to the extensible nature of the FORTH language, the resulting software becomes essentially a high level language for programming control of our TQMS instrument. The capabilities of the control system include: automatic sequencing of experimental modes, scanning any system parameter and generating either a linear or a logarithmic display of the result, and generating three dimensional plotscu‘any two instrument parameters verses ion current. To my parents ii ACKNONLEDGMENTS I would like to express my thanks to Dr. Chris Enke under whose guidance this research was performed. I thank the members of the Mass Spectrometry Research Group for their support, especially the contributions of Mr. Bruce Newcome. Financial support for myself was provided by Michigan State University and a grant from the National Aeronautics and Space Adminisration (NASA).Financial support for the TQMS instrumentation project was provided by the Office of Naval Research (ONR). Finally I would like to express my appreciation and graditude to my parents and my friend Marie for the their support. iii Chapter 1 TABLE OF CONTENTS INTRODUCTION Introduction to Triple QUadrupole Mass Spectrometry Need for a Control System Control System Objective Chapter 2 HARDWARE OF THE TQMS SYSTEM Control System Computer Mass Selection Data Acquisition Ion Lensing Mass Storage Display Electronics Future Electronic Modifications Chapter 3 SELECTION OF THE FORTH LANGUAGE SYSTEM Programming Languages and Control Applications Traditional Languages The FORTH Language System Software Development Systems . Chapter u SOFTWARE FUNCTIONS DEVELOPED Design Goals Vectored Exection Device Control Table Mass Axis Calibration Neutral Loss Scanning Algorithm iv Page 11 11 15 l7 l9 19 20 21 23 23 27 30 38 tn u1 u2 1:2 us 52 Tuning Functions Data Acquisition Software Conclusions Chapter 5 ELECTROMETER AMPLIFIER Circuit Operation Circuit Description Calibration Improving Switching Times Chapter 6 PERFORMACE DEMONSTRATION Setting Parameters Taking Data Displaying Data Creating New Commands Non-spectral Data Review of Objectives Closing Remarks APPENDIX A Operator's Manual APPENDIX B The Multiplexer/Offset Board REFERENCES Page 55 56 57 58 58 6O 66 66 68 68 7O 72 7a 76 8o 82 83 118 123 TABLE. 3.1 5.1 5.2 5.3 LIST OF TABLES BASIC and Assembly Language Comparison Amplifier Transresistance Component List Amplifier Feedback Resistance vi PAGE 29 6O 63 6A FIGURE 1.1 1.2 2.1 2.2 2.3 2.4 3.1 3.2 3.3 3.u 1m u.2 4.3 5.1 5.2 5.3 6.1 6.2 6.3 6.6 6.5 LIST OF FIGURES TQMS Instrument Block Diagram TQMS Operating Modes Physical Layout Operators Console Mass Selection ContrOl Data Acquistion Electronics Stack Example FORTH Program Example Memory Requirements by Language Memory Requirements by Application for Assembler and FORTH Vectored Execution of Acquire Device Control Table Organization DCT Interaction Transresistance Amplifier Diagram Transresistance Amplifier Schematic Additions for Improved Settling Times STAT Display Quad 1 SWEEP Daughter Scan LIN/LOG Display Comparison Mass Spec Examples vii PAGE 12 13 16 18 32 3A 36 37 “3 AS 46 59 61 62 69 71 73 75 76 FIGURE PAGE 6.6 Ion Volume Sweep 77 6.7 Quad 2 SWEEP . 79 6.8 Three Dimensional Plot 81 viii CHAPTERl INTRODUCTION Introduction to Triple Quadrupole Mass Spectrometry The triple quadrupole mass spectrometer is a versatile analytical instrument as well as a flexible research tool. It is still a relatively new instrument, with the first one being assembled in our laboratdry in 1978 by Rick Yost1. A TQMS instrument incorporates many of the features of a conventional quadrupole mass spectrometer, while providing a variety of powerful new operating modes. The basic configuration of a triple quadrupole mass spectrometer is shown Figure 1.1. A TQMS instrument consists of an ion source, two quadrupole mass filters, one quadrupole collision chamber, ion lenses fwn' interquadrupole transmission, and finally a detector after the third quadru- pole for measuring the ion current. The heart of a TQMS instrument is the quadrupole collision chamber. Here ions selected by the first quadru- pole mass filter undergo collision with neutral gas molecules. The collision gas can either be chemically reactive toward the selected ions, which results in addition products, or more commonly an inert gas such as argon. Collisions with an inert gas usually produce charged and neutral fragments in a process called collisionally 3 activated dissociation (CAD), cn' collision-induced dissociation (CID)2. The resulting ions can then be analyzed using the second quadrupole mass filter. A quadrupole can be operated in one of two modes which are referred to as the "DC" and "RF" modes3. When a quadru- pole is operated in the "DC" mode it acts as a mass filter and allows only ions of a selected mass to pass through it. In the "RF" mode, a quadrupole acts as an ion pipe and is transparent to ions of all masses. In a TQMS instrument, each quadrupole can be set to either the "RF" or "DC" mode, the later being used to pass ions of only one mass, or to scan over a mass range to generate a mass spectrum. These various modes for each quadrupole can be combined in many ways to provide different modes of operation for the instrument. For example quadrupole one can be set in the "DC" mode, quadrupole two into the "RF" mode, and quadrupole three into the "DC" mode. This instrument configuration is referred to as the DC/RF/DC mode. The five most useful combinations of the three quadrupole modes are as follows: Quadnuuulg Qng Egan - In this mode the instrument is set in the DC/RF/RF mode and quadrupole one is scanned. In this mode the instrument functions as a conventional quadrupole mass spectrometer. Quauzuuglg Inge; Sgan - In this mode the instrument is set in the RF/RF/DC mode and quadrupole three is scanned. In this mode the instrument functions as a conventional quadru- pole mass spectrometer. u Daughtgn Sgan - In the mode the instrument is set in the DC/RF/DC mode with quadrupole one set to a user-selected mass while quadrupole three is scanned. This type of scan generates a spectrum of all the fragment ions (daughter ions) which are generated by the selected (parent) ion when it undergoes the CAD process in quadrupole two. Pazgnt Suan - In this mode the instrument is set in the DC/RF/DC mode with quadrupole three set to a user-selected mass while quadrupole one is scanned. A parent scan generates a spectrum of all the ions formed in the ion source (parents) that generate the selected fragment ion (daughter) upon undergoing the CAD process in the collision cell. Neutral Lgss Scan - In this mode the instrument is set in the DC/RF/DC mode and quadrupoles one and three are scanned together. Quadrupoles one and three are offset by a constant mass with quadrupole one set to pass a higher mass than quadrupole three. This type of scan generates a spectrum of all the ions formed in the ion source (parents) that lose a selected neutral fragment when undergoing the CAD process in the collision cell. The magnitude of the neutral loss is selected by the mass offset between quadru- poles one and three. It is also possible to scan for a mass gain due to a reaction in the collision chamber. Figure 1.2 diagrams these modes of operation. In addition to these types of mass scanning experiments, several other useful types of experiments can SOURCE QUAD 1 COLLISION CELL QUAD 3 .___1. A.B.C I w RF A B C RESULT C DC (SCANNING) .__.__.w A A B B A.B,C C C ‘ DC RF (SCANNING) QUAD l SCAN A -B A,B,C A,B,C C $.___ (—— ~ RF _ RF , QUAD 3 SCAN A I [————+ D B .B B—-—-> E | C I |—-—> ‘F ' ' DC ' RF DAUGHTER SCAN 'A A A——-> D,E C C C--> G,H "". DC RF (SCANNING) PARENT SCAN .____1. T_______, A A A—> A-14 B B 8—) B-18 C c C-———A C-18 L__, __.____, DC RF. - (SCANNING) NEUTRAL LOSS SCAN FIGURE 1.2 DC (SCANNING) TQMS OPERATING MODES 6 . easily be performed with a TQMS instrument. The axial or kinetic energy an ion possesses when it undergoes a collision in quadrupole two can readily be varied. From the changes in fragmentation patterns and fragment ion intensities that result from varying the axial energy, information about bond strengths and internal energies of the parent ion can be obtained” By varying the pressure of the collision gas in quadrupole two ii: is possible to determine the collisional cross section of an ion, identify metastable species, and determine the reaction order of the CAD reactions“. As can be seen from the variety of experiments which can be performed , TQMS is capable of providing a great variety and quantity of information. Potential applications of this versatile instrument include; mixture analysis, structure elucidation and screening complex mixtures for specific compound types. Need for a Control System ‘ The many modes of operation and large numbers of vari- ables involved in the ion path contribute to both the versa- tility and complexity of a TQMS instrument. The variety of operating modes makes it a very powerful analytical tool, yet this variety greatly increases the difficulty of ”controlling the instrument. It was evident that in order to become a viable research tool, some degree of computer control had to be introduced into the chemist/instrument interaction loop. Most mass spectrometer systems today 7 utilize a minicomputer system to acquire and report data5'6'7. The computer system and it's associated software are often referred to as a "data system". Many of these data systems have very little control over the instrument, often they can only initiate a mass scan upon commands. Only limited control of the instrument is needed by these computer systems since in a conventional mass spectrometer there is only one significant variable, mass. The operator has to optimize only a few lens settings.to get a good ion beam, and then use the data system to acquire data. This is not the case with a TQMS instrument. The major experimental variables include the mass selected by each quadrupole, the axial energy of the ions, and the pressure in the collision cell. In addition, the three quadrupoles introduce the need for many ion lensing elements which adds greatly to the complexity of instrument operation. The demands placed upon the data system by the five different mass scanning modes of TQMS are not greatly different than those of a conventional mass spectrometer. Indeed, several- commercial data systems have been modified to function with TQMS instruments6’8. However, to take advantage of the other types of experiments TQMS is capable of providing, such as axial energy and collisional cross section studies, a great deal more control of the instrument is needed. To utilize all of the different operating modes effectivelu and to simplify operation of this very complex instrument, an intelligent control system is needed. This system must go beyond conventional data systems, for in addition to performing mass scanning experiments» it must support other experimental modes as well. It must also be flexible and expandable enough to incorporate new experimental modes as they are developed. While doing all this, the control system must have the net effect of making the instrument easier and more efficient to use instead of complicating the operation by presenting the operator with more complex control procedures. Control System Objectives ' The primary goal of the control system is to provide an effective interface between the operator and the instrument. The entry and display of information should be in a form the operator is already familiar with or can readily under- stand9. The control system must reduce the complex variety of operations into a few simple, well-understood operations for the operator to learn. Data should be displayed graphically since this is how mass spectral information is traditionally seen. Values of the various parameters should be entered and displayed in terms.of familiar units.‘Nhile accomplishing all of this, the control system must also remain flexible and open ended so that it does not become the limiting factor in the instrument's capabilities and performance. For ease of operation and for use by operators without extensive expertise, as much of the operation of the instru- ment as possible should be automated. When switching among the various modes of operation, the control system, not the 9 operator should be responsible for changing all the necessary parameters. For example, when selecting one of the mass scanning modes, the control system should select the appropriate "RF" or "DC" mode for each quadrupole. In so far as possible, the system should be self calibrating, so that the operator need not be concerned with long term drift of various instrument parameters such as lens potentials. When- ever possible the control system should be capable of detecting malfunctions of error conditions in the hardware of the instrument and be able to report them to the operator. Our TQMS instrument, operating in the research“ environment, is in a continuous state of evolution. Various components are constantly being modified or replaced to try new experiments or to improve instrument performance. The control system must be readily adaptable to these changes in instrument configuration. New pieces of electronic hardware should be easily interfaced to the control system and such changes should be transparent to the operator in terms of instrument operation. In order to be able to take full advantage of the instrument's capabilities, the operator must be able to design and program his or her own experiments. Instructing the control system to perform relatively simple types of new experiments should not require any programming expertise. Ideally, instructions to perform new experiments should not be significantly different from routine instrument 10 operation. However, the control system must remain open ended enough so that the truly experienced programmer is not limited and can readily implement specialized and more exotic modes of operation. Some of the basic requirements of an intelligent control system for a TQMS instrument,_(which also apply for all instruments) have been covered in this chapter. The following chapters will deal with some of the major factors in developing such a control system for the TQMS instrument in our laboratory. CHAPTER 2 HARDWARE OF THE TQMS SYSTEM The hardware necessary to implement and control TQMS can be broken down into six categories: control system computer; mass selection; Idata acquisition; ion lens control; mass storage; and display. The computer system is the heart of the electronics system; devices in all of the other categories are interfaced to the computer which controls the operation of the entire instrument. The only part of the instrument not under computer control is the vacuum system. Figures 2.1) and 2.2 are block diagrams of the physical layout of the TQMS instrument in our laboratory. Control System Computer In our laboratory we have developed our own modular microprocessor system‘o. This system is build around Intel's 8085 microprocessor and its associated family of’peripher- als. The laboratory computer system consists of a set of small circuit boards each implementing a different function. The following standard modules have been developed to date: 1) Central Processing Unit (CPU) 2) 8K/16K RAM/ROM Board 3) Dual UART A) Interrupt Controller 5) Chip Select 11 12 Lao>:a _.N ma:o_a zuem>m me_7oeeomnm «wheaxoo, Au «wiloz_zoo n~\__ .mu .a ,5. . 8,. :33 m 338 m e . em amenaxoo .m mucaama<=c emem>m mw 8328 w mt mo_zoecemsm zo_eomeuc . 1 “soaazo_mo xm_o uncom044_omo Aomhzoo mu.m_4¢:< oz< mo~oupma onmpzou 4_uomzsuze «upmm>zoo 4 Figure 3.11 MEMORY REQUIREMNETSBY APPLigATION COMPLEXITY FOR ASSEMBLER AND FORTH There is one line of constant slope representing the memory requirements of assembly language programming. Two curves have been drawn to represent the memory needs of equivalent FORTH programming. The upper curve starting at 6K bytes represents the memory requirements of FORTH in its maximum configuration including the editor and assembler; the lower curve, starting at 512 bytes, represents FORTH in its tninimum configuration. In both cases the initial FORTH Inemory requirements are greater than assembly language rleeds, but as complexity of the application increases use of 38 FORTH results in a savings of memory space. FORTH accomplishes this memory savings in two ways. One is that FORTH compiles each word reference into a two-byte address, whereas in assembly language, a subroutine call requires three bytes on most microprocessors and four bytes on minicomputers. Thus FORTH achieves a 33-501 savings over assembly language when calling another routine. The second memory saving characteristic of FORTH derives from it's extreme modularity. This may be illustrated with the following example. If a constant needs to be added to an 8- bit number, it would probably take at least three bytes of assembly language code to perform this operation. If it is necessary to perform this operation twentyfive different places in a program, this would take seventy-five bytes. Writing this operation as a subroutine would not generate any savings since the subroutine call itself would take three bytes. If a new FORTH word was written to perform the operation, it would take up about sixteen bytese However, each time it is reference only two bytes are needed. For twenty-five references this would be fifty bytes plus a sixteen-byte overhead gives a memory usage of Sixty-six bytes, which is a twelve percent saving over the assembly language version. Software Development Systems The role of development systems in the generation of Software for control applications is sometimes overlooked, especially in scientific laboratories where writing software 39 is not a specialty. A development system is a computer system that is used to generate software to run on a control system computer. The development system acts as a programmer's toolbox and work bench. It often includes features which may not be needed or available on the control system computer, such as sophisticated editors, a terminal, a printer, lots of memory, a PROM programmer and mass storage. Since the computer hardware associated with a control system is often non-standard, it is necessary to have a development system on which commercially available software can be modified for eventual implementation in the control system computer. Two disk drives are needed on a development system so that disks can be copied to provide backup copies of software. In our laboratory,aisingle board computer featuring a Z80 CPU, 64K bytes of RAM, two serial I/O ports, two 8-bit parallel I/O ports and a floppy disk interface was selected for use as a software development system26. This board was connected to two 8-inch floppy disk drives, a video terminal and a PROM programmer. The Z80 board was chosen because it executes the same instruction set as the 8085 processors used in our microcomputer systems and because it is capable of running the CP/M operating system which has become a de facto standard for microcomputer systems. This allowed us to purchase a version of the sophisticated polyFORTH system which was designed to run under the CP/M operating system27. One of the features of polyFORTH which sets it apart from NO other implementations of FORTH is its target compiler. The target compiler feature allows the user to recompile the basic FORTH system with any additions or changes the user wishes to make. The development system was used to generate a new version of polyFORTH to run on our micro systems. Thus the development system acts as an interface between our non- standard hardware and the products available in the commer- cial markete In addition to the polyFORTH system, a FORTH screen editor was purchased for use with the development system to aid in program generation. Several new features were added to the screen editor to enhance it's performance. Routines were written in FORTH to drive a PROM programmer, so that when a new FORTH system is generated it can be permanently stored in read-only memory. CHAPTER A SOFTWARE FUNCTIONS DEVELOPED This chapter will highlight some of the special soft- ware features developed for controlling the TQMS instrument in our laboratory. Internal Operations of the software will be discussed in some of the more interesting cases. Design Goals Prior to the start of this project the instrument functions under microcomputer control were quadrupole scanning, data acquisition and a limited set of graphic display routines. The software was primarily written in assembly language and was stored in EPROM. There was no provision for local programming on the microprocessor. The combination of these factors led to a very rigid inflexible system that was unable to adapt to the changing needs of the research environment. As a result there was a great deal of user frustration with the system, to the extend that an X-Y recorder and manual controls were used for data,acquisition because the microprocessor control system could not adapt to the needs of the users. This situation gave rise to the following design goals. 1) Control of Quadrupole Scanning 2) Control of Ion Path Elements 3) Make the Instrument User Friendly III 42 u) Provide a Local Programming Environment 5) Create a Flexible/Adaptable system 6) Create User Documentation Vectored Execution Vectored execution is a powerful programming technique that was used extensively in the creation of the operating system software. Its use adds greatly to the flexibility of the system since it allows new functions to be added with little or no changes to existing software. Vectored execution works in the following manner. At a specified memory location a vector (pointer) to a segment of program code is stored. When a function that needs to use that segment of code is executed, this vector is fetched from the memory location and control is transferred to the designated address. This allows different segments of program to be executed by the same function by simply Changing the address stored in one location. Figure 4.1 illustrates the use of, vectored execution in the word ACQUIRE. The location AMODE contains the address (vector) of either the autoranging routine (as in figure 4.1) or the fixed gain acquisition mode. The word ACQUIRE operates by fetching the contents of the location AMODE and then proceeding;to execute the code pointed to by that vector. Thus either mode of acquisition can be used by simply storing the appropriate address in AMODE. The Device Control Table All of the various devices discussed in chapter two ‘13 Onwawo< mo coauaooxm vou0u0o> H.q madman @50me © woo/>2 maquZ ” ._ Seaman mm B mooo mobm> be Hie/am ma . Boga 18,4 -252. XH m m< A4 that are interfaced to the control system computer are controlled through a.device control table (DCT). The current implementation of this DCT allows for control of up to thirty-two devices. The DCT contains four user-definable entries for each device: 1) a current value where the device is normally set, 2) and 3) start and end values which specify the range over which the device is to be scanned, and A) a step value which controls the increment of advance when the device is scanned. Four additional entries in the DCT under control Of the programmer are as follows: 5) the name of the device, 6) the address of the routine to be executed to send data to the device, 7) the address of the routine that sets up the appropriate numeric formats for input and display values of the device and the appropriate conversion factors between units such as converting volts into a DAC value, and 8) a general purpose entry called flags. The flags entry, currently only used for devices that are part of the ion controller contains the number (0-15) of the ion controller DAC that is being used to control the device in question. Figure A12 illustrates the organization of the DCT entries for each device in the system. All of the interaction between the user and the devices interfaced to the instrument is routed through the DCT. The user need not be concerned with the different characteristics Of each device since by use of the DCT all devices appear to behave the same. Figure 11.3 diagrams the interaction between the user, the DCT, and the various devices in the system. The user only interacts with the DCT, 45 DEV I CE CONTROL TABLE CURRENT VALUE START VALUE END VALUE ' STEP SIZE FLAGS COVERSIONS VECTOR DATAOUT VECTOR NAME ADDRESS Figure 4.2 Device Control Table Organization 116 OHLJLLJ mamZmo mu_>mo uEUmam coauomumucH Hon m.¢ Ouawam Em: C Al 6 .59; .5328 uu_>mo 53mg 55 mod 32:58 2055248 « _ ”7 never directly with a device. The routines pointed to by the DCT vectors perform all the necessary numeric formatting, scaling, and communication protocols for the various devices. Consider the case of one of the ion lenses controlled by the ion controller as an example. The conversion routine accepts a voltage value on top of the stack and returns a value that will cause the DAC to output the desired voltage. A conversion routine is also provided to perform the reverse Operation, accepting a DAC value and returning the corresponding voltage value. This two way communication is symbolized by double ended arrows in figure u.3. A different set of conversion routine must be developed for each type of device in the system. To output data to a device the DATAOUT vector is used to point to the device driver specific to the desired device. Communication is only one-way, with data being transferred from the DCT to the device driver and passed on the the device. To add a new device to the system, only four short routines need to be written. One is the device driver, which is often little more than storing the number on top of the stack in some specific location. A routine that formats the DCT entries for the STAT display (putting decimal points in the right places, etc.)ijsneeded. Finally two conversion routines need to be developed, one to convert values expressed in familiar units (volts, mass, etc.) into DAC values and a second to perform the reverse Operation. 48 The reasons for selecting this table-driven approach are twofold. First and most importantly, it simplifies the operation of the instrument. All of the different types of devices in the system are controlled in the same way. The user only has to learn one set of commands that modify the DCT. This is simpler than having to learn one set of commands to modify the ion lenses, another to control the mass settings of the quadrupoles, and so on. Secondly, our instrument is a research instrument which is undergoing continuous evolution, with new types of devices being added and Old ones removed or modified. To add control of a new device to the system, a programmer need only add new entries into the DCT and write software to drive the new device. There is no need to write new commands or modify existing software to add additional devices. MASS AXIS CALIBRATION The masses selected by quadrupoles one and three are controlled by two 16-bit digital-to-analog converters (DACs)28. The digital values ranging from 0 to 65535 sent to the DACs must somehow be related to the mass value selected by the quadrupole. There are several approaches to this calibration problem, one which puts the burden on the hardware and others that put the burden on the software. In the first case some arbitrary relationship between the DAC values and the mass values is selected. For example, suppose a change in DAC value of 100 is to correspond to a one amu change in mass. The gains of bOth the DACs and the 49 quadrupole controllers are then adjusted to achieve this 100 to 1 relationship over the desired mass range. This is a very tedious operation which can take many hours to perform since there isaigreat deal of interaction between all the gain and Offset controls. The 16-bit DACs as well as the quadrupole controllers are subject to long-term drifts which can cause errors in mass assignments if not corrected regularly. The quadrupole itself is part of a tuned Circuit and anytime it or it's connecting wires are moved during cleaning, the impedance of the tuned circuit is changed, and a shift in the mass axis Occurs. These drifts and shifts would require that this complex and time-consuming calibration be done much more frequently than anyone would want to. Another drawback to this method is that is assumes that the response of both the DACs and the quadrUpole controllers are absolutely linear. In contrast to the demands made on the operator and the system, this method of mass calibration makes programming very easy. To set a quadrupole to a desired mass value, the mass need only be multiplied by a constant ( in this case 100 ) to find the appropriate DAC value. The mass scan on a quadrupole is theoretically linear with respect to the applied scan voltage. Thus it would be possible to develop a software calibration scheme that would determine the slope and intercept Of a line relating DAC voltage to the mass selected. This approach was not taken in the initial implementation Of the control system software because of several possible drawbacks. Small errors in 50 determining the slope could lead to mass assignment errors, though this problem could be eliminated with enough careful programming. Also there would be no correction for any nonlinearities present in the system. The time needed to perform the necessary calculations for each point while scanning would be too great without the addition of special- ized hardware. At this time, the control system computer does not have the capability of readily performing the needed least squares fit to allow the computer system to accurately calibrate itself.Perhaps when greater numeric processing power (by the addition of a numeric processor, such as INTEL's 8321) or extra programming time is available, the practicality of this approach can be explored. The use of lookup tables is impractical in this application due the memory requirements of such an approach. For example, assuming that the smallest desired mass increment was 0.1 amu and the largest mass range to be scanned would be 1000 amu, a 10,000 element lookup table would be needed. Since each element would require two bytes, the lookup table for juSt one quadrupole would be 20,000 bytes and for all three'quadrupoles would be 60,000 bytes. 'This value is totally impractical considering the 8085 microprocessor can only address 65,535 bytes of memory. The approach that was implemented in the control soft- ware is as follows. A sample generating many fragments over a wide mass range is introduced into the mass spectrometer. 51 Mixtures or compounds such as perfluorokerosene (PFK) or Perfluorotributylamine (PFTBA) are often used. The DAC controlling one of the quadrupoles is then scanned over it's full range (0-65535) and a mass spectrum is obtained. A number'of peaks in the.sample, evenly distributed over the entire mass range, are selected as mass calibration points. (In the current implementation the number of points is limited to sixteen.) The known mass values of these peaks and the DAC values at which the peaks occur are entered into a calibration table.‘TO select a given mass, the software uses this table to interpolate the desired DAC value. The interpolation routine was carefully coded to make sure no rounding errors were introduced by the use of integer math. Although this procedure is currently being performed manually, it will be automated in the future. After the calibration compound is entered into the inlet system a calibration program will be executed that will set up the calibration tables for the quadrupoles in just a few minutes. Speed is a major consideration in implementing mass scanning functions. The desired mass range is scanned by converting the starting mass into a DAC value, then incre- menting this value until it reaches the value that corresponds to the ending mass. As peaks are identified during the scan, the DAC value at which they occur is stored. After the scan is completed these DAC values are converted into mass values with the aid of the calibration tables. 52 Neutral Loss Scanning Algorithm The ability to scan over a mass range selecting for fragments that are the result of a certain neutral loss provides a powerful technique for screening mixtures. A neutral loss scan is performed by scanning quadrupoles one and three at the same time but at a a constant difference in mass. This is a somewhat difficult function to implement because the responses of the two quadrupoles are not identical. Each quadrupole'has it's own mass axis calibra- tion, which can ideally be described by a slope and offset. One method of performing a neutral loss scan is to scan quadrupole one over the mass range of interest, while quad- rupole three is slaved to quadrupole one to allow it to follow by some mass difference. Several laboratories have accomplished this slaving of one quadrupole's scan to another by the use of some additional hardware29. The signal that drives the master quadrupole (quad one) is fed into an operational amplifier circuit that has controls for the user to adjust gain and offset. The output of this circuit is then used to drive the slaved quadrupole. The user adjusts the gain of this circuit until a change Of one amu on the master causes a change of one amu on the slave. The Offset is then adjusted to provide the desired mass difference. This approach has several draw- backs. One is that adjusting the gain of the amplifier circuit to match the two quadrupoles is a tedious operation. The greatest drawback is that manual intervention is needed to adjust the offset for each desired neutral loss. 53 In the interest of making the system easy to use and to allow for maximum freedom in future automation of mode selection, the neutral loss scanning function was imple- mented entirely in sOftware. This isiconsistent with the philosophy that the difficult or tedious tasks be performed by the computer. The implementation of the neutral loss scanning function that was used is the following. The two quadrupoles are initialized to their respective starting values, which isairelatively straight forward operation. Using the calibration tables to determine the appropriate values to send to the DACs, quadrupole one is set to its starting mass value and quadrupole three is set equal to the starting mass of quadrupole one minus (or plus) the desired offset. The difficult part is scanning the two quadrupoles together at a constant rate while allowing the slopes of their calibration curves to be different. The slopes of both calibration curves over the desired mass range can be deter- mined from the calibration tables. These slopes can be used to compute a ratio that relates the setting of quadrupole three's DAC to the value sent to quadrupole one's DAC. It would be possible to use this ratio to calculate a value for quadrupole three each time a new value is sent to quadrupole one. However, even using integer arithmetic, (which is much faster than using floating point routines without the support of special hardware) the necessary calculations could take up to several milliseconds for each point, which would make the scan undesirably slow. The approach taken was to increment the DAC for quadru- 54 pole one by an integral quantity. Addition of integers can be accomplished very rapidly with a microprocessor. The DAC's controlling the quadrupoles accept 16-bit data words, requiring the calculations to be done on 16-bit quantities. The 8085 instruction set includes a convenient double add (DAD) command, which performs a 16-bit addition. The ratio of the slopes of the two calibration curves is then used to calculate how much to increment quadrupole three each time quadrupole one is incremented. Unfortunately this result will have a fractional component which is somewhat difficult to work with when performing integer calculations. One solution is to break the current quadrupole three DAC value and its incremental value into two numbers: one represents the integer component and the other represents the fractional component of the number. Thus calculations are extended over more than 16-bits and a binary point is assumed to be between the two values (a binary point is the binary number system equivalent to a decimal point). The accuracy of the fractional component is extremely important. since errors can accumulate from the successive additions involved. The obvious choices are between using an 8-bit or a 16-bit fractional component. An 8-bit fraction has a resolution of one part in 256, the smallest fractional part that can be represented is about 0.004. In the worst case an error of this magnitude would cause a two to four amu change in the mass Offset during a scan. A 16-bit fraction has a resolution of one part in 65535, the smallest fractional part that can be represented is about 1.5x10-5. In this case 55 the worst case error would be about an 0.008 amu change in mass offset over the scan, which is.a negligible error. Because of this extremely small error, a 16-bit fractional part was implemented in the control software. An excellent discussion of binary integers with fractional parts can be found in reference 30. Tuning Functions A.great number of factors influence the ion beam in a TQMS instrument. There are many ion lenses, the quadrupole potentials, the resolution of the quadrupoles, and many other factors. All of these interact to make the set up and optimization of the instrument a potentially formidable task. To help simplify the tuning up process, a number of special functions were implemented in the control software. Chief among these are the fast scanning routines. There are five fast-scanning routines, one for each of the five modes of quadrupole operation. A fast-scan routine does not take any data; it scans a quadrupole rapidly enough that a mass spectrum can be continuously displayed on an oscillo- scope screen. This allows the user to readily observe the affects of various adjustments. A special case Of the fast scanning operation is a split screen mode, which allows two peaks of greatly different mass to be displayed next to each other on the oscilloscope screen. This feature is particularly helpful in determining if a particular para- _meter shows any high or low mass discrimination. Taking advantage of the multitasking capabilities of 56 polyFORTH the fast scan and split screen routines were implemented as background tasks. This allows the user to enter commands while the computer is displaying the fast scan., The user can change lens voltages from the keyboard and immediately observe the results on the oscilloscope display. A special MANUAL function was implemented that allows the user to increment or decrement the value of any device with a single keystroke. This, combined with the immediate visual feedback provided by a fast scan or split screen display, makes it very easy to manually fine-tune the value of any device. Data Acquisition Software The data acquisition software contains all the routines which interact with the hardware that measures the ion current output from the mass spectrometer. Routines in the data acquisition category currently perform the following operations: reading a value from the 12-bit ADC, controlling the range select lines of the variable gain amplifier, and autoranging the amplifier to Obtain the best signal to noise ratio for each data point. All other programs or routines that need ion current information are interfaced to the data acquisition routines through the word ACQUIRE. ACQUIRE returns the current value of the ion current. In the future we expect to be experimenting with different data acquisition hardware as well as testing new algorithms for Optimizing data acquisition. Since routines outside the data acquisition group only use the word 57 ACQUIRE, interfacing to new data acquisition hardware is a relatively simple process. Software is written to drive the new hardware and ACQUIRE is vectored to this new routine, no modifications need be made to any other portions of the control software. This makes it easy to test and implement new data acquisition hardware and software. Conclusions All of the original design goals were able to be met. Chapter six contains examples of scanning the quadrupoles and ion path elements cited as goals one and two. The use of the device control table construct has made the instrument much more user friendly in terms of parameter setting and display. The use of the FORTH language system provides a local programming environment. All of the mass spectrometry functions are loaded into. RAM from floppy disk. These last two features combined with the extensive use of vectored execution create a highly flexible system that can be readily adapted to new needs. Finally the user's manual in appendix A provides extensive documentation of the use of the system. CHAPTER 5 TRANSRESISTANCE AMPLIFIER Use of a current to voltage converter with variable gain can greatly enhance the dynamic range of a data acquisition system. The ability to control the gain of a current to voltage converter by the use of digital signal levels opens new possibilities for intelligent data acqui- sition. When such a current to voltage converter is inter- faced to a laboratory computer system, routines can readily be developed to intelligently autorange the converter to optimize the signal to noise ratio of the data acquired. Such an current to voltage converter is described here. This converter is suitable for use with low current sources such as the photomultiplier tubes and Channeltron electron multi- pliers often encountered in spectroscopic and mass spectro- metry applications. Circuit Operation Figure:5.1 is a block diagram of the transresistance amplifier. The amplifier takes a low level current input and generates an output that varies between +/-10 volts. The gain of an amplifier that converts a current into a voltage is referredIHJas transresistance31, Since in addition to amplifying the signal the amplifier converts it from the current domain into the voltage domain. The transresistance 58 59 Snowman uoamwaos< mocmumamoumcmoe H.m moawfim mu_m_4m:< mc z.o_+ :m oi mm >9- Oi\>>\>>>\IO mm 3930 o :52 - lo v S n olIOm + m. , _ mmooomo «IIIG IlIAu N_ m I o.— I m n __ a: 82: 20.53% wozouaaH u0m m50fiufivv< m.m ouumfim win—59.3 Fu<.I_mm 63 Component List for Electrometer Amplifier U1,U2 LF351 Operational Amplifier U2 D0211 Quad Analog Switch U4 74138 3-to-8 Decoder R1,R12 1000M 1% Resistor R2 100M 1% Resistor R3,R4 10M 11 Resistor R5,R6 1M 1% Resistor R6 100k 1% Resistor R7 10k 1% Resistor R9,R11 22k 5% Resistor R10 2k 10 Turn Trim Pot R13,R14 10k 10 Turn Trim Pot ' . TABLE 5.2 COMPONENT LIST 64 Range selection is accomplished with integrated circuits U3 and U4, while U2, R7 and R8 form the final amplifier stage. Resistors R9 through R12 are used to generate a trimming current to correct any Offset current present at the input of U1. R13 and R14 are used to trim the balance of operational amplifiers U1 and U2. Integrated circuit U4 accepts the three binary range select inputs and decodes them into four separate select outputs that are used to control the four analog switches contained in U3. These switches are used to place resistors R2 through R6 in parallel with R1, in the feedback loop, to control the gain of the transresistance stage. Resistor R1 is always in the feedback loop to prevent the amplifier from saturating if an invalid range is selected and to allow for five levels of gain when only four levels of.switching are available. Table 5.3 shows the results on the trans- resistance stage of switching various resistors in parallel with R1. FEEDBACK RESISTOR RESISTANCE TRANSRESISTANCE R1 1000M0 1.00x109 R2+R3 99M0 0.99x1o8 R4 9.9M0 0.99x107 R5 I.0N0 1.00x106 R6 100k0 1.00on5 Table5.3 AMPLIFIERFEEDBACK RESISTANCE The 1% error introduced in two of the ranges due to the parallel resistor R1 is not significant because the 65 tolerances of the components used are no better than 1%. The final stage configures U2 as an inverting amplifier with a fixed gain of 100. Capacitors C1 through C5 prevent amplifier U1 from becoming an oscillator. To prevent oscillation, the RC product of the feedback loop must approximately equal the RC product of the input32. The output impedance of the signal source forms the R component, and the parasitic capacitance introduce by coaxial cables and other sources forms the C component of the input RC product. The optimum values of . capacitors C1 through CS have to be selected in each appli- cation. Parasitic capacitance should be kept to a minimum, since the feedback capacitance adversely effects the band- width Of the amplifier. Output settling time after switching between different ranges also is affected by these capacitors. An adverse characteristic of analog switches is charge injection on the \ switched signal. Whenever an analog switch is closed a small 0"12 coulombs) is injected into the amount of charge (about 1 signal being switched33. Normally, charge injection is not a major problem, but in this amplifier with it's extreme sensitivity to low level currents it can be quite trouble- some. When ranges are changed, the amplifier sees this injected charge as a current large enough to drive it into saturation. The time it takes the amplifier to recover varies between 0.1 and 100 msec depending on the range selected and the size of the capacitor involved. Settling times for each range must be determined experimentally for 66 each application. Calibration Since fixed resistors were»used.in the feedback loops of the operational amplifiers there is no way of adjusting the gain, only the offsets can be adjusted. To calibrate the amplifier, first ground the input of U1 through a 1000Mn resistor and select range 0. Adjust R10 until the output of U1 is zero. Adjust R14 until the output of U2 is zero. At this point U2 is properly balanced. Connect the input of U1 to the signal source the amplifier is to monitor. Setup the signal source to give a zero output. It is important to do this portion of the calibration procedure with the amplifier connected as it will routinely be used, since changes in cable routing and length can affect the offset current at the input of the amplifier. Adjust R10 until the output of U1 is zero. Change the amplifier range to range 1. Adjust R13 if necessary to zero U1. Change the range back to 0 and readjust R10 if necessary. Iterate this procedure until a zero reading is obtained on both ranges. Improving Switch Settling Times Settling times on all ranges can be reduced to under 2 msec. with addition of the mechanical relay circuit shown in Figure 5.3. Range switching is then accomplished by the following procedure. Close the relay, change the range, open the relay. When the relay is closed it shorts out the feed- back loop, preventing the amplifier from going into saturation. The network formed by C1 and R1 is needed to 67 smooth out the edge of the relay control signal so that it does not induce enough current into the amplifier to cause it to saturate. R1 is adjusted to minimize the effect. This amplifier has been in use with the triple quadrupole mass spectrometer in our laboratory for the past year. The amplifier's performance has been comparable to the Keithley model 18000 amplifier, which it replaced. The only maintenance needed was an: occasional recalibrétion to correct for long term drift in the components. CHAPTER 6 PERFORMANCE DEMONSTRATION Introduction This chapter will highlight some of the commands of the control system and Inn: they reduce the complexity of instrument Operation. Examples will be given of how readily 'other types of information, such as appearance potentials, can be obtained, instead of just mass spectra. Finally the ability and advantages Of generating new commands will be demonstrated. A complete description of all the commands and operations of the control system can be found in appendix A. Setting Parameters The current settings of the four user entries in the device control table»(current,start,end, and step) for all the devices in the system can be displayed with the STAT command. See figure 6.1 for an example of this display. There are a number Of commands that can modify different entries in the DCT, however the operator need only learn one to make full use of the instrument. The PARAM command allows the operator to examine the four user entries for a selected device and modify them if so desired. The PARAM command is executed by first entering the mnemonic name of a device followed by the command PARAM. The values of the four user entries are each displayed in turn, and the operator is '69 ><4¢m_0 h. N v 0.0mm 0.0V m.0.N m2 5. v 0.00. 0.00.1 0.mv mm . v 0.0m0 0.00m m.0.~ .2 0. v 0.00. 0.00.1 0.05 >0 0 mmhm 02w hm<4mm.0 c. 1.9.; x 10 times a second) the mass spectrum is displayed continuously and allows the operator to easily observe the effects of tuning various parameters. In a TQMS either or both of the quadrupoles may be scanned and the choice of which quadrupole's sweep potential Should be connected to the X axis on the oscilloscope depends on the nature of the experiment. In the case of a daughter scan experiment, the sweep potential from quadrupole three Should be used; for parent or neutral loss scans, the sweep potential for quad- rupole one Should be connected to the oscilloscope. When a conventional oscilloscope is used to monitor a mass spectrum as described, it is often difficult to closely compare or observe two peaks widely separated in mass. For example, when using PFTBA to tune up the instrument it is often desirable tornonitor the intensity and peak shape of the mass 69 and 219 fragments. However when the X axis gain 118 119 on the oscilloscope is increased sufficiently to observe the peak Shape in detail, the peaks are spread so far apart that only one peak can displayed on the screen. In order to diSplay two widely separated peaks side by side on the oscilloscope screen it is necessary to subtract an offset voltage from the sweep potential driving the oscilloscope while scanning the higher mass peak. This causes the peak to shift toward the lower mass peak on the oscilloscope screen. Instead of providing the operator with a switch to select which sweep potential drives the X axis on the oscilloscope, an analog multiplexer was interfaced to the microprocessor address and data bus. This interface was designed so that when a quadrupole number (1, 2, or 3) is written into a specific memory location, the sweep potential for that quadrupole is selected to drive the oscilloscope. The control system uses this ability to automatically select for the user which quadrupole sweep potential will drive the, oscilloscope depending on the type of experiment being run. An operational amplifier in the difference amplifier configuration is used to subtract an offset voltage from the sweep potential. Since the microprocessor system controls the sweep potential, an 8-bit digital to analog converter (DAC) was interfaced to the data bus to generate the offset voltage. This allows the microprocessor to subtract the offset voltage at the desired point in the scan. Figure 8.1 Shows a block diagram of the system. The latch is loaded by the computer with the desired quadrupole number, this number is used by the multiplexer to select the 120 mm_m_4a:< mozummmmuo 2