“as I ‘73-) Iy 5‘55 A n.- . in 4.3.4 '3’} “. . II. “.3151!“ x}I' .I':,'ILI II. ' 'Iu-z-x .~ _I.I"| . . . I II‘I‘IIIII . F1I(V‘H‘\III.I‘ II" In“ I:- '. . II. 'Ilfi'. I???" .‘:III 4'an ’. If‘ 93:34“ I; 5*... ’ .> .~r $4.. ‘r; $- . -. “£5? _ , - . 3.3“? ”mm" L *3 II . r 1. Z “11: .Q . I 5: VIII 1.x 2 ”‘fi’ V5332. " ""9“ ' " "I M. 4” \ II'SLNy‘ $3: 1444‘”;- ... IEIII . ‘ I 1| U 4 ‘K .I "1‘9. 'I‘I".':.-:II 11:: 'II.‘ ’I: .tIau.:‘I{‘n 5.2:” ‘gl 0 'IV . III..III-I‘-I.:II II IIIJ‘I‘I‘IIIIJIIr-III-I ‘.’(‘:'- \u ‘I. AM VI!:‘ of :fl' . 2’ N‘fic ;.;. ‘-:I§'.‘::-.v1.‘,.:1": 2::p-II:1;‘I'I_;'.'5 su::rfp'...x;w R" 'I I .I ;I m" I 0.1: "IN“. . 'I '. .' . . \‘I, o ‘5) , \N b .; ,, I (.4 {4“ 4'1“" "W" My. " 93.. '4 III: ': | “3“: 11:31; I I . , ‘ 2E; ‘ :‘VJII “(a ii? “1‘39" “$35? .: 3'59 K‘s .... “95.33 '\' I x o' ',I.‘“ ‘I.III""I\I\‘..V‘.“‘ 3‘. . ,I . I ., II;\“. I‘h"‘ “,IIIIIIIIII .Iv‘I'Iu I«\‘ ‘ 'I 1 '.1;‘I',I...'.;="'. ‘. ,- I.- . L I: 3;” 4M II'ILTt'Kr’M :4 ‘.' L'- .. WWI? I‘ L 1",; '|l‘&."\. - LLI' ".I. I‘ll I.—1 l-I'Wt. This is to certify that the thesis entitled Investigation and Development of Electrothermal Atomization for Atomic Absorption Spectroscopy presented by Eugene Harlan Pals has been accepted towards fulfillment of the requirements for Ph . D . degree in Chemis try W924 Major professor Date May 26, 1978 0-7639 I .TBRARY Michigan Star University INVESTIGATION AND DEVELOPMENT OF ELECTROTHERNAL ATOMIZATION FOR ATOMIC ABSORPTION SPECTROSCOPY By Eugene Harlan Pals A DISSERTATION Submitted to Michigan State University in partial fulfillment of the requirements for the degree of DOCTOR OF PHILOSOPHY Department of Chemistry 1978 ABSTRACT INVESTIGATION AND DEVELOPMENT OF ELECTROTHERMAL ATOMIZATIONINHXATOMIC ABSORPTION SPECTROSCOPY By Eugene Harlan Pals A computer-controlled electrothermal atomizer atomic absorption (EAAA) instrument has been developed which utilizes sophisticated software and hardware to automate all of the individual machine functions involved in a typiCal EAAA analysis. The computerized system contains a state of the art atomizer heating regulation device, an automatic sample dispenser, and a computer-controlled atomization cell positioning device. The atomizer heating regulation device allows the operator to select any of four types of feedback regula- tion of atomizer heating: current, voltage, power, or radiation. The variable volume automatic sample dis- penser is capable of rapidly and precisely delivering 1.0 to 5.0 pi sample solution to the atomizer surface, and this allows total EAAA measurement precisions of l to 3%. The automatic vapor cell positioner allows the precise displacement in two dimensions of the atomizer Eugene Harlan Pals relative to the optical axis of the instrument over a one inch range in each dimension for spatial studies of the atomic vapor plume. The system software also provides for automatic execu- tion of the simplex algorithm to optimize a chosen instru- ment response such as the magnitude of the absorbance signal. Any 2 to U of the 13 experimental parameters under computer control may be varied by this algorithm to achieve the optimum desired response. The computer- controlled EAAA instrument with its associated software has been shown to be a powerful and versatile tool for studies of fundamental EAAA processes. The simplex op- timization technique is also shown to be a valuable tool in optimizing the performance of the EAAA instrument. ACKNOWLEDGMENTS During the time I was in graduate school many people have been kind to me when they could have been indifferent, have helped me when they had more important work of their own to do, and have somehow made the trials and tribula- tions of research not only bearable, but at times even enjoyable. There is no possible way to thank everyone who deserves credit, but a few people do deserve special mention. First, my research preceptor, Professor Stanley R. Crouch, who managed to guide my research in the proper direction without stiffling me when I wanted to try some- thing outside the master plan. I wish to thank Dr. Chris Enke for serving as my second reader, Dr. Tom Atkinson for rendering invaluable assistance in the production of many of the figures presented in this work, and also Dr. Andrew Timnick because he was such a pleasure to teach for and a good friend as well. Also I must thank Dr. Eric Johnson for helpful dis- cussions in the areas of electronics and computer program- ming and Marty Joseph for the use of his simplex routine and his help in applying it to the EAAA instrument. Jim Gano helped with some of the final stagesuuaam 5 «022850202 5522.4 Biaipowga Bo:— -r r """"""""""""""""" J mmE 5&8 $.38 mwmzuama w_l >ow>w.o.u Tamas“: 3&2» 5.29:8“; WcoomofioanT 1784 _2 o3 - BEES. 4452mm Adz—2mm... «whats—cu «pry—Ea Eu - m2... - aura” 18 vapor cell, the atomizer power controller, the atomizer vapor cell positioner, the general interface, and the instrument optics. The automatic sample dispenser is discussed in Chapter A. B. ATOMIZATION VAPOR CELL A simplified scale drawing of the atomizer vapor cell is shown in Figure 2. The graphite braid atomizer (Union Carbide Corp., Parma, OH) is held in the Jaws of a brass holder at each end. When a screw in the upper Jaw of the holder is loosened, the Jaw may be slid away from the atomizer so the atomizer can be removed and re- placed. The power connections are made to the bottom of the lower Jaw near the outer end of the holder. It was necessary to mount the atomizer holder on brass heat sinks since prolonged heating of the atomizer would heat both the holder and the material it was mounted on enough to deform plexiglass. The brass heat sinks are elec- trically isolated from the steel support structure by a layer of plexiglass. The channel formed by the brass heat sinks on two sides, and a plexiglass plate on the other two sides, contains the sheath gas flow apparatus. This apparatus was fashioned from close packed glass capillaries glued together and was supported on a ridge along the inside walls of the plexiglass box. The laminarity of gas flow (28) from this type of apparatus ATOMIZ ER HOLDER 19 a QUARTZ ; ‘5‘”I’CELL WALLS GRAPHITE BRAND IHTMMZER F$:52:'?:4:1$Wfl£‘?_{ . ATOMIZER '~. ggl """““" HOLDER GLASS CAPlLLARY ATOMIZER ._ '4 .->'+13<‘.~‘=;§E lull“: :;:;:;:;:;' 33:5: 6— i Me AR PURGE GAS ,- ..... lllll ------ ----- IIIIII lllll IIIIII u-l <—-HEIGHT ADJUST ‘ "‘.':‘:':':":::" -:mt30w=o 20:415me Gut/On. EMS—20.5 m0 3m_>mm>0 " v mmDGE w>J<> 90238 96 "llIllllIIlllJ $39.58 $30.". $520.2. . n _ _ llamll: _ _ \\\\\4l _ IX) _ > u 38 Swim _ 6/5 _ 548%.“. _ _ . «3.205 :mtaomo 29.22282 _ ._>> _ 2.10:3 ._ WV 7 v _ _.. I I I 11 lllllllllllll L ..|._ 2.... .V hm 292.50% . 04.: .3... > 29.255 . + E3 5&3 34mm»; 43.38 $.30“. 34m ¥zm._._30m_0 <0 Jomkzoonm mmDOE 31 the atomizer heating level relative to the voltage refer- ence input. The feedback signal is fed from the front panel regulation mode selector switch to 0A3 where the polarity is reversed but the magnitude is unchanged. 3. Current, Voltage, and Power Regulation Circuitry The current regulation is quite straight forward and is shown in Figure 6 along with the voltage and power regulation circuitry. OAl buffers the voltage signal from the sensing resistor that is located in the power transistor assembly bank. The output of OAl is sent to the front panel mode select circuitry and the back panel current monitor output. In previous designs the voltage drop across the atom- izer was monitored with an instrumentation amplifier (27, 29). However, a difference amplifier (OAl) is quite suf- ficient since the input voltages are not large, and load- ing of the voltage source is not possible in this case. The potentiometer on the non-inverting input was adjusted so that the CMRR of the difference amplifier was maximized. Again the output voltage for the voltage regulation cir- cuitry is sent to the front and back panels. The power regulation circuitry utilizes an integrated circuit (IC) four-quadrant multiplier to compute the product of the current through and the voltage drop across the atomizer. The analog multiplier contains two on—chip 32 Embaom. 0 2073.. wam mm 30.... oz . 4 w0<._.:_ O> szm ~50 “m m ~50.“— x. v.0. 33 difference amplifiers. The multiplier's transfer function is the product of the differences of the voltages appear- ing at the difference amplifiers inputs divided by ten. The atomizer current is represented by the voltage drop across the sensing resistor, and this voltage is pre- sented to one input of one of the difference amplifiers. The series resistor and the head-to-head Zener diodes protect the analog multiplier chip from the overvoltage damage. The inputs to the second difference amplifier are similarly protected and are used to monitor the voltage drop across the atomizer. At these inputs the two vol- tage divider networks scale the signal voltages to the appropriate levels and again a trimpot is provided to maximize the CMRR. The 20 k9 potentiometer is used as a fine adjust on the output voltage level. The output of the analog multiplier is buffered by a gain-adjusting OA (OA2) before being sent to the front and back panels. A. Radiation Regulation Circuitry The radiation regulation circuitry is shown in Figure 7. The current output of the phototransistor, which is mounted to observe the atomizer blackbody emission, is converted to a proportional voltage by 0A1, and the gain adjusted and the polarity reversed by OA2. Since this regulation mode is not applicable at low temperatures because the atomizer emission level is very low, a 311 .>m._._30m_u 20:44:09“ 29.5204”. "h meoE >> a >6 9. > ._1 ”m manner... U>J<> m<0 QOZNJOm 37 a TTL signal to the optical coupler and causes the photo- diode to emit. The phototransistor receiver is turned on when the light is received, and the current from it is boosted by transistor Q1 to a level that will turn on triac T1. The optical coupler is a safety device that serves to isolate the digital circuitry in the inter— face from the line voltage necessary to operate the sol- enoid gas valve. When the triac is triggered, the solenoid gas valve (Cat. No. 2-l2, General Valve Corp., E. Hanover, N.J.) opens and allows the hydrogen gas to mix with the argon flowing into the atomization cell. The H2 OVERRIDE switch is wired in parallel to the triac switching cir- cuit and thus may be used to actuate the gas valve in- dependent of the remote switching circuit. This is useful when the rotameter that controls the H2 gas flow rate needs to be adjusted. The sudden switching of hydrogen gas causes a surge of gas through the atomization cell. This effect can be mediated somewhat if some glass wool is packed into the H2 gas lines to provide some backpressure. The hydrogen reacts with the traces of oxygen in the argon sheath gas only when the atomizer reaches a dull red heating level (lOOO—l200°C). Thus it is necessary to exercise caution when the H2 flame is used. If the flame con- sistently does not light, the laboratory may experience a sudden violent metamorphosis as this accumulated, unspent H2 reacts rapidly to form water. Under normal conditions, 38 the amount of H2 used is less than 1 Amin and the H2 is switched on only during atomization. The diffusion flame produced occupies the entire height of the quartz walls of the atomization chamber. Fortunately, the flame is relatively cool and does not cause extensive heating of the cell walls. Also, it is nearly totally optically transparent. In fact, often the only real visual evidence that the flame has been ignited is the observation of the Schlerien effects it produces. 6. Prospectives Much of this circuitry was constructed using archaic techniques and components and, because of this, suffers from contact resistance and other problems. Still, it has performed quite well. The major drawback of this design is that the useful range of the temperatures under radiation regulation is limited by the dynamic range of the phototransistor. This means that to have acceptable regu- lation at high temperatures, a neutral density filter must be inserted in front of the phototransistor to decrease the amount of light it observes. Ideally, radiation regulation would have at least two separate photosensi- tive elements; one for the low temperature range and another for the high temperature range. A phototransistor is perhaps the best for the low temperature range, since 39 it has good sensitivity. But, in the high temperature range a photodiode should be used because it has a faster response time and a wider dynamic range. E. POSITIONER 1. Introduction and General Overview The positioner is the device which displaces the atom- ization cell in two dimensions with respect to the optical axis of the instrument and thus allows the observation of the atomic concentration in any locale within the atomiza- tion cell. This device consists of two physically sepa- rate modules. One module contains the interface, general logic circuitry, stepper motor power supplies, and front panel controls. The second module (shown in Figure 9) consists of an aluminum superstructure on which is mounted the translational stepper motors, an x and a y translational stage, and the atomization cell with its associated optics. The positioner can operate in either a local mode or under computer control. Details concern- ing the operation of the logic circuitry can be found elsewhere (28,68) and will not be discussed here. 2. Physical Structure Two translational stages (Cat. No. “20-51, Newport Research Corp., Fountain Valley, CA) and two stepper HO .m wizard motors (Cat. No. 23D—6102A, Computer Devices, Santa Fe Springs, CA) accomplish the horizontal and vertical dis- placement of the atomization cell. In each case the step- per motor shaft is directly coupled to the screw drive of the translational stage so that no imprecision is intro- duced by a gear system. The direct coupling was accom- plished by drilling a hole the size of the stepper motor shaft in the head of the translational stage lead screw and locking the shaft and the screw together with two allen screws. Both translational stages are perpendicular to the optical rail and are mounted side by side. The side of the base structure of the atomization cell is fastened to the mobile section of the vertical translational stage. The vertical stepper motor is fastened to the immobile section of the vertical translational stage and, as the stepper motor is pulsed, the lead screw which drives the translational stage rotates inside a nut attached to the mobile part of the translational stage. Thus, as the stepper motor is pulsed, the mobile section of the trans- lational stage moves relative to the position of the im- mobile section. The entire assembly is mounted on the mobile section of the horizontal translational stage. The horizontal motor and the immobile section of the horizontal translational stage are connected to the positioner superstructure which is, in turn, fastened to U2 the optical rail. As in the vertical section, the hori- zontal stepper motor is secured to the immobile section of the horizontal translational stage. As the motor is pulsed, it turns the lead screw which causes the mobile section of the translational stage to move relative to the immobile section. Optical interrupters and occluders (mounted on the atomization cell, translational stages, and the positioner superstructure) are used to define the limits of travel of the translational stages and to pro- vide a reliable reference position. The positioner super- structure is fastened to the optical rail in such a manner that it is possible to move it anywhere along the optical axis of the instrument. This structure also contains one fixed position and one mobile lens mount in-line with the entrance slit of the monochromator. 3. Remote and Local Operation When the front panel mode switch is set to LOCAL, the other front panel switches are activated. The RESET switch causes the positioner to drive both the horizontal and vertical translational stages to the reference point defined by the optical interrupters described previously. This resets the counters in the logic circuitry to zero and, as further movements are made, these counters are used to point to the present position of the atomization ”3 cell. To move the atomization cell away from the reset position, numbers, which correspond to the desired hori- zontal and vertical destinations, are entered into the front panel thumbwheel switches, and the GO switch ac— tuated. This causes the motors to begin concurrently to seek the desired location. If the direction of the movement is positive, the motors will move slightly past the desired location and then return to it. This means that the final direction of movement is always negative and, whatever slop there may be in the drive mechanism, is thus corrected. The thumbwheel switches are U digits wide, but the logic circuitry accepts only 12 binary bits (a concession to the 12-bit computer used in the remote operation mode), so that legal decimal locations are from O to A095 in both the horizontal and vertical directions. If a destination outside the legal limits is requested, a fault condition occurs, which lights the front panel FAULT LED and aborts the movement. To correct this fault condition, a reset must be executed. The position horizontal O and vertical 0 is the reset position, and the position horizontal 20H8 and vertical 0 locates the atomizer just beneath the path of the absorbing light beam. This latter location is also used as the place for sample deposition when auto— matic sample deposition is desired. The actual physical UH diSplacements that correspond to these user units can be easily calculated since each user unit corresponds to 2 stepper motor pulses, the stepper motors require 200 steps per revolution, and the lead screws are machined to have no threads to the inch. Thus, the end—to-end travel in both the horizontal and vertical directions is limited to 8192 pulses (1.02“ in). If the front panel mode switch is set to the LINE position, the other front panel switches are deactivated. Commands are then accepted only from the computer. The possible computer commands are GO, RESET, skip on flag, clear flag,enable interrupt, disable interrupt, load hori— zontal destination register, and load vertical destination register. The CO and RESET commands function exactly the same in the remote mode as they do in the local mode, and the load location register commands serve the same function as loading the front panel thumbwheel switches. Now, however, it is impossible to load an illegal destination since the locations are transferred in l2-bit binary. The skip-on—flag and clear flag commands are necessary so that a new command will not be accepted before the previous command has been completed. The positioner interface was constructed so that it could be interrupt driven. However, because of the timing and position con- straints imposed on the positioner by the automatic sample dispenser and the data acquisition system, no practical “5 time savings would be realized by operating the device under interrupts. Thus, the added software complexity of an interrupt system could not be justified. A more detailed discussion of design concepts of the positioner is given in Appendix B and a very detailed description of the positioner's electronic circuitry is also available (28). F. GENERAL INTERFACE All communications to and from the computer with the EAAA instrument occur through the general interface, except for the positioner which contains its own inter- face. The interface functions may be conveniently divided into five categories: automatic sample dispenser, analog- to-digital conversion, digital-to-analog conversion, general purpose flags, and input switch register. An overview of the automatic sample dispenser interface is given in Chapter A and is discussed in great detail else- where (28). Voltages representative of the photomultiplier photo- currents are quantized by an analog-to-digital converter (Cat. No. ADC-HY12BC, Datel Systems, Canton, Mass.). This l2-bit, hybrid, successive approximation converter has a conversion time of about 8 us and a maximum non-linearity of il/2 LSB. In practice the quantization error due to the l2—bit resolution of the converter was observed only A6 in the measurement of dark current and was small enough so that it can be discounted as a significant source of error. The maximum conversion rate was about one order of magnitude faster than the software could handle the data. Even so, the software-limited conversion rate was still more than an order of magnitude greater than the slowest rate acceptable for an accurate integration of even the fastest absorbance signals. Although a converter of this speed is unnecessary for normal integration of absorbance transients, kinetic studies and studies of the rate of atomizer temperature increase might require a fast converter such as the one used. The digital—to—analog converter (Cat. No. DAC—HY12BC, Datel Systems, Canton, Mass.) is used to supply the reference voltage for the atomizer power supply control- ler. This l2—bit hybrid converter has a conversion time of 3 us and a maximum non-linearity of il/Z LSB. Again these specifications are much better than required by this particular application. For example, in radiation regula— tion, the resolution of this converter (2.5 mV) corresponds to a temperature resolution of l.0° to 3.0°C (the actual resolution depends on the particular temperature region). Atomizer temperatures determined by optical pyrometry have a precision of at best i25°C. Furthermore, because of the physical nature of the atomizer, the temperature in some regions on the atomizer may be more than 25°C different “7 from the nominal temperature. It is important that the atomization temperature be stable and reproducible, but for most elements the absolute value of this temperature may be any value within a several hundred degree range and still not affect the precision and accuracy of the measurement. The converter's slew rate of 20V/us and settling time of 3 us far exceed the response time of the atomizer heating circuitry and in no way limit the time it takes for the atomizer to reach its final tempera- ture. The hardware associated with the three general purpose flags is composed of three flip-flops and associ- ated circuitry. It is so routine that it does not war- rant discussion here. The user input switch resister is an array of six single-pole, single-throw switches in a dual-in-line package on the front panel of the general interface box. On computer command, the status of these switches is read into the 6 most significant bits of the accumulator. Again the interface circuitry is of a com- mon garden variety and does not warrant detailed discus- sion here, since it has already been discussed in detail by Dr. Baxter (28). CHAPTER 3 PROGRAMMING THE COMPUTERIZED ELECTRO-THERMAL ATOMIZER ATOMIC ABSORPTION INSTRUMENT A. INTRODUCTION The electronic revolution of the 1960's and 1970's caused a significant increase in the availability of computers to chemists. At first chemists used computers only in the passive role of data reduction. Typically experimental data was manually transformed into a computer compatible form such as punched cards and physically trans- ported to the site of a large central computer for data analysis. This large computer generally had a high level language such as FORTRAN available if the chemist had chosen to do his own programming, or sometimes he might even be able to use a routine supplied by the computer vendor. When the computer price structure changed so that it was reasonable to dedicate a computer to one instrument the scope of the Chemist's software problem changed sig- nificantly. Now the computer could play an active role in the experiment including sequencing events and control- ling data acquisition. More often than not computers in this price range had no laboratory oriented high level A8 A9 language and even if one was available special control functions and data acquisition functions required routines which had to be written in assembly language. Now when- ever a chemist found it necessary or desirable to modify an existing computerized instrument, computerize an exist- ing instrument, or to build a totally new computerized device, he needed to deal with programming on a much more complex level. The problem was attacked in one of three ways: hire a professional programmer, use a special in- house developed high level laboratory oriented language (70—72,7A) or the chemist would learn how to do his own programming. The basic problems associated with hiring professional programmers include communication difficulties between the chemist and the programmer concerning the exact requirements of the software and also the basic inflex— ibility of this approach in dealing with changing require— ments of the laboratory. Special in-house laboratory oriented high-level languages never have achieved wide- spread popularity since the initial effort of developing them for each particular type of computer and interface requires too much time investment. Worse still some of these languages wasted some of the computer's power by not making some functions of the computer accessible to the user (71,72), and also lacked good error diagnostic messages. A number of developments have made the task of 50 educating the chemist to be his own programmer easier and more attractive. First, the languages available on small computers have developed far past the original assembly languages so that most general purpose computers will support FORTRAN or BASIC and often times both of these languages. Also the price of peripherals has de- clined so that mass-storage based operating systems are often available to the chemist. These systems make the computer easier to use and decrease programming time significantly. Another consequence of the declining cost of computer mainframes has been the increased proportion of the cost of an experiment in terms of both time and money that was invested in software. In fact, in some cases software costs may comprise 80% of the total development costs (7A). The availability of good software support is now one of the major factors in the choice of which particular computer a chemist will purchase. Even if the choice of the computer is already made, there is still the choice of what language to use. Writing in a high level language may use 50 to 300% more core memory (75) and slower execu- tion time, but still may be the method of choice because it takes less time to learn the language and less time to write and debug a program. Poor programming techniques and an inadequate programming philosophy in either assembly language or any high level language can severely limit 51 the capabilities of the interfaced instrument, limit future modifications and expansion, expand software main- tenance costs, and needlessly limit the instrument's throughput. The remainder of this chapter describes how these considerations affected the design of the software of an electro-thermal atomizer AA instrument. The result- ing package of hardware described in Chapter 2 and this software yielded a versatile, powerful, and easy to use analytical research instrument. B. CHOICE OF A PROGRAMMING LANGUAGE To make an intelligent choice of a programming lan- guage it is first necessary to define clearly the tasks the program will be required to handle. The minimum a reasonably useful program would be expected to do for our experiments included sequencing the operations of the autosampler, positioner, braid heating apparatus, and data acquisition system. Also, it should compute the integrat- ed absorbance and have provisions for automatically scan- ning the horizontal and vertical displacements for a one or two dimension profile of the atomic cloud above the braid. Further, a hardcopy of the integrated absorbance and experimental parameters should be available and a plot of absorbance versus time should be presented on the system terminal. In summary, the program is required 52 to do significantly complex calculations both for determin- ing integrated absorbance and scanning parameters, and also control a significant amount of I/O with the com- puter's peripherals and the instrument's interface. The languages available on the 8/e which might be used to write this program included: PALD, PAL8, MACRO8, SABR, RALF, FOCAL, BASIC, FORTRAN II, and FORTRAN IV. Of these PALD, MACRO8, and FOCAL are not supported by the 08/8 operating system and since the operating system is a powerful tool used in creating, debugging, and execut- ing programs, these three languages were immediately rejected as unsuitable. The assembly languages remain- ing, PAL8, SABR, and RALF, were rejected as possible alternatives for two reasons. First, the program required significant device dependent I/O, computation, and complex sequencing, all of which are much more easily dealt with in a high level programming language. Second, the mini- mum required program, even when written in a high level language, should fit in the available core memory and not significantly degrade execution time performance. The remaining high level languages are FORTRAN II, FORTRAN IV and BASIC. FORTRAN IV and BASIC are more powerful than FORTRAN II with respect to the capabilities designed into the compilers. However, each time machine level code needs to be executed it must be referenced as a subroutine call. Writing this code requires a good 53 deal of familiarity with the subroutine calling conven- tions of these compilers and also is memory inefficient. 0n the other hand FORTRAN II allows in line insertion of SABR code which allows the programmer to write efficient code while remaining fairly ignorant of much of the inner workings of the FORTRAN II compiler. Further, FORTRAN II does have all the necessary I/O handling and calculation routines. Thus FORTRAN II was initially chosen as the programming language for the instrument, primarily because of ease of use and programmer familiarity with the lan- guage. C. FORTRAN II PROGRAM CAPABILITIES The program which was written using FORTRAN II as the source language meets all the minimum requirements neces- sary for a useful program as described in the previous section. It is written in a modular fashion so that whenever possible each major function is allotted its own particular subroutine. Several of these routines were written by Dr. Eric Johnson including the routines to drive the autosampler (SAMP), positioner (POS), the routine to oversee one sample run (GBRUN), and the plotting pack— age (ADPLOT). The main program, GBEXEC, sequences calls to sub- routines to initialize the positioner, initialize the autosampler, and take the dark current reading. Then it 5A interacts with the user so that he may choose such things as: the type of experiment (autosampling; zero, one, or two dimensional scan; etc.), and program options (hard copy of results, plot of absorbance versus time on system terminal, etc.). When a requested series of sample runs has been completed the program allows the user several options concerned with changing parameter values, changing program options, or exiting the routine. For each individual sample run GBEXEC sets up the proper variable values and passes them to a subroutine called GBRUN. This routine interprets the variable values so that the proper subroutines are called in the proper sequence for one complete sample run. This will include some or all of the following functions: sample deposition (SAMP), movement of the braid to the sampling position (POS), heating the braid (TKDATA), and data acquisition (TKDATA), calculation of integrated absorbance, hard copy of results, and plot of results (ADPLOT library). The TKDATA subroutine sets the digital to analog con- verter for the proper heating levels for the desolvate, ash, and atomize powers. The routine uses the real time clock (CLOCK) routines to execute the programmed timed delays in the delay, desolvation, and ash steps. The atomize time delay is provided internally to the data acquisition section of the TKDATA routine. This section takes data at 500 Hz and stores the individual analog 55 to digital conversions in the FORTRAN II defined arrays IDATA and IBACK. The data are routed to IDATA for a sample run and IBACK for a background run. In addition to the above routines, several utility routines were developed including one named BELL. This routine was used to signal the operator that his inter- action was required to do some mechanical function (such as open the PMT shutter) or to alert him that the present task had been completed. The program caused the terminal bell to be rung periodically until the user typed a spec- ial character which caused either resumption of program execution or an exit to keyboard monitor (the 08/8 operat- ing system). The program as described occupied all of the avail- able four fields of core memory. It used the fixed volume sampler designed by Akbar Montaser (29), and the pro- gram was used routinely in the process of checking the reproducibility and long-term drift characteristics of this sampler when it was coupled with the graphite braid atomizer. D. THE PDP 8/e FORTRAN IV SOFTWARE The FORTRAN II source program described in the pre- vious section was adequate for initial experimentation, but proved somewhat inflexible in meeting the changing demands of our research program. First, the original 56 autosampler needed to be replaced by one that was more versatile and reproducible. This second sampler required much more complicated machine level coding, which would have further cramped the available memory. Furthermore, any significant departure from the alternatives designed into the program required wrestling with modifying the already tortuous flow diagram of GBEXEC. Writing an equivalent but more powerful program using FORTRAN IV be- came a necessity. Some of the advantages gained by using FORTRAN IV as a source language were the following: in- creased effective program size through the use of FORTRAN IV overlaying capabilities; improved calculation times since FORTRAN IV uses the extended arithmetic element - FORTRAN II does not; improved program execution time due to the efficient interrupt driven structure of the FORTRAN IV run time system; DEC's FORTRAN IV also has full ANSI compatibility so that programs from outside sources can be more easily assimilated into the experimental routines; and FORTRAN IV has a more powerful set of possible program statements and instructions, which make programming and debugging easier. Before attempting to explain the structure and capa- bilities of the FORTRAN IV GBA program, it is necessary to explain briefly DEC's FORTRAN IV software package. The package contains four major components: a compiler, assembler, loader, and run time system. The FORTRAN IV 57 compiler produces source files in RALF assembly language in three passes with an optional fourth pass for listing files. The RALF assembler accepts the compiler output and creates relocatable binary modules for execution on machines that do not have a floating point processor (if the FFP is available a FLAP assembler is used). The third component is a LOADER which combines all of the inde- pendently compiled and assembled relocatable binary files of the main program, subroutines, and library routines into a load module. The fourth component is the Fortran Run Time System (FRTS). This program supervises loading the load module, swapping overlays as necessary, and handles the I/O requested by the program. The capabilities of the FORTRAN IV compiler not avail- able in FORTRAN II that are of particular interest for our uses include the availability of logic variables, logical IF statements, and Hollerith formats, which allowed easy implementation of the monitor type program structure described later. In line insertion of error statements in listing files greatly simplifies debugging operations. Most important, however, was the possibility of more versatile device independent I/O, which allowed hard copy results to be generated on the line printer and data to be stored in two or more data files open for input concurrently. FORTRAN IV also has available an extensive library of utility routines. One utility routine of 58 particular note is ONQI which adds the user written inter— rupt handler to the run time system's polled interrupt skip chain. Another utility routine, ONQB, adds a user written routine to the background task list of the run time system. These two routines allow the programmer to structure execution of routines such as plotting and device drivers (e.g., autosampler handler) in such a manner that instrument throughput is enhanced. Compiler options A and F which allow the generation of RALF assembly language source files, and fully annoted listing files, respectively, are of great utility. Thus, when machine level functions are required, a skeleton FORTRAN sub- routine can be compiled under the A option and can then be edited so that the desired machine level code is added at the proper position. This greatly simplifies the machine level subroutine writing, since much of the calling convention and argument passing is already taken care of by the compiler. This modified routine can then be loaded with FORTRAN routines and called in the same manner as any other FORTRAN subroutine call. To modify a RALF source file, the programmer need only understand a few of the RALF instructions and argument passing conventions. The RALF assembler operates in two modes: the ralf mode and the eight mode. The ralf mode has one, two, or three word instructions that deal with a software simulated three word floating point accumulator and seven, one word 59 index registers. This format allows 15 bit direct addressing, base page relative addressing, and register indirect addressing. The eight—mode RALF code uses the 8/e machine level instruction set of PAL8 except for a slightly different indirect addressing convention and a different method to indicate the memory locations occu- pied by the routine. The main task of the machine level programmer is to conform to the RALF conventions with respect to argument passing and transferring execution back and forth from the ralf-mode and the eight-mode code. The FORTRAN IV loader differs from the FORTRAN II loader in that it allows overlaying. Up to eight levels of overlays are allowed with up to 16 overlays per level, except for level 0 which is always core resident and may never be overlayed. Level 0 must contain the main program, library routines, and any modules containing eight-mode RALF code. There are a few important restrictions to keep in mind when designing an overlay structure. Func- tionally, the loader regards all overlays in a given level as having the same length as the longest overlay. All overlays are multiples of two blocks long. Also, as a general rule, no program may execute a call which would cause itself or any program that called it to be overlayed. The loader provides an optional loader map listing which designates overlay levels, program locations, etc. In the loader map there are two error messages which do not 60 appear in the DEC documentation. An : beside a subroutine name designates that there is a possible violation of the overlay calling rule mentioned above. A :EE designates that the loader did not locate any entry point correspond- ing to this subroutine name, even though it had been re- quested to be loaded. The load module created by the loader is executed under the auspices of the FORTRAN Run Time System (FRTS). It is this program that allows devices to be defined for device independent I/O, sets up appropriate buffers, and provides the interrupt driven handlers to allow fore- ground I/O with background computation. Another nice feature is error trace back at run time. This function detects fatal run time errors, gives terse error state- ments, and fingers the culprit both as to line number and subroutine name. Typing a CONTROL B at run time provides this same trace back function. The PDP 8/e FORTRAN IV package as described here possesses many attributes not found in the FORTRAN II package and was used to generate a more flexible, power- ful, and easily modifiable program than the program which was written using FORTRAN II as a source language. 61 E. PROGRAM STRUCTURE FOR THE EAAA INSTRUMENT Because of the limitations of the FORTRAN II program and the extended possibilities of programming using the DEC FORTRAN IV package, it was advantageous to expand the tasks required of the GBA software. Rewriting and restruc- turing the software using FORTRAN IV as the source lan— guage resulted in improvements in the following areas: decreased execution time, raw and processed data avail- able in output files, more error checking functions, in— creased modularity so that software was more easily modi- fied, and added features which expanded the abilities of the program to handle situations and experiments not originally designed into the software. The overlay structure of the resulting program (GBMDS2) is shown in Figure 10. In the figure, routines which occupy the same level but different overlays are separated by a colon. These routines occupy the same portion of core but are swapped into memory at different times during execution. If the routines occupy the same level and overlay, their names are separated by a comma. These routines are always co-resident in core since the run time system always swaps into core entire overlays not just portions of the requested overlay. The lines connecting programs denote that the program in the upper level may call the lower level routine. Note that routines in level 0 may be accessed by routines in any level, but 62 Emgmcga «magma on» we ogauuzgam Ampgo>o mgu we Eagmm.o .ofi «Lama; xa<¢o . mom n mamxxm . pi e ~w4_uuz:c.ozamucnoz< .xuoau .Jaum .zu»_zm /////// xoo< .uw4 63 to avoid mass confusion in the diagram these connecting lines were left out. The routines residing in level 0 are the main routine and the RALF subroutines containing eight-mode code. Since the level 0 routines may not be overlayed, great effort was made to keep these routines as short as possible. Also in level 0 is the special function routine BLOCK DATA, which contains no executable code and is used to initialize the values of common vari- ables. Subroutine INPUT is called immediately upon starting execution of the main program. Almost all user inter- action with the experiment is through this routine. Under user commands the default values of experimental param- eters set in the BLOCK DATA subroutine may be changed. Also, initialization and demonstration routines for the positioner, autosampler, and data acquisition system may be executed. When the user completes this setup, he gives a special command to start the execution of the experiment. The control is then passed back to MAIN which normally calls the subroutine FLOW, unless in the simplex mode in which case the SIMPLEX subroutine is called. In the FLOW subroutine, all experimental parameters are checked for illegal values. Error messages are printed for each illegal value detected, and the control is then directed back to subroutine INPUT. If no illegal values were detected, new arguments which will later be passed to the sampler and positioner subroutines are calculated, 6A the sampler and positioner subroutines are calculated, and control is passed to the DATA-CALC subroutine. The DATA-CALC routine interacts with the sampler, positioner, digital to analog converter (DAC), and analog to digital converter (ADC) subroutines to acquire, calculate, and out- put the results of a single sample run to the requested output devices. If a plot of absorbance versus time for a sample run was requested, control is passed to the PLOT subroutine. If no plot was requested, control is passed back through the main program to the FLOW subroutine. After the PLOT subroutine has completed a plot of absor— bance versus time, program control is passed back through MAIN to the FLOW subroutine, unless the wait mode has been asserted. In the wait mode, the user has the option of requesting a plot of background levels or exiting this routine back to MAIN, which will respond by recalling subroutine FLOW. In overlay five of level one, the sim- plex package is loaded. Discussion of the functions of these routines has been reserved for Chapter 5. The complete program GBMDS2 may be easily created if the relocatable sources of the programs in Figure 10 and the FORTRAN IV library are available. This is the first point of easy program modification since any of the individual modules may be modified and used in place of the original version at this point. Further the routines SUBONE, SUBTWO, SUBTHR, and SMXSUB are optional routines 65 which may, but need not, be loaded concurrently with the original routines. If loaded, they may be executed at specific times during program execution if the user re- quests them at run time. These routines allow for such things as non-standard calculation schemes or file out- put formats. When the user has created one of these new routines or modified one of the system routines, he can create the new GBMDS2 program and start execution using the following dialog. This dialog utilizes the batch stream program GBMDS2.BI to create the new program. .SUBMIT SYS:GBMDSZ.BI(UTE) .R FRTS *GBMDS2 *FILE1.DA(:) BACKGROUND [ START POSITIONER TDAAAD DAIGIA ] SUBONE TRUE? CALL SUBDNE ] YES SKIP CALCULATIONS REQUESTED? [g CALCULATE INTEGRATED ABSORBANCE T 7E5 CALL SUBTND F" NO YES WRITE ABSORBANCE VALUES INTO FILEZ ND T RETURN Figure 13. Flow Diagram of the DATA-CALC Subroutine (continued). 77 emission of the braid. The positioner is then started back toward the sample deposition position, and the calcu- lation of the integrated absorbance is begun. The calculation of the integrated absorbance for a sample run requires four measurements: 100% T, sample absorbance, background braid emission, and dark current. The photocurrent components of these are given below. I1 = IOL + ID I2 = IAL + ID + IBE + IME I3 = ID + IBE + I0L In = ID where IOL is the photocurrent due to the unattenuated line source, ID is the dark current, IBE is photocurrent due to continuum braid emission at the analysis wave- length, IME is the photocurrent due to the thermally excited atomic emission of the analyte, and IAL is the photocurrent due to the line source when it has been attenuated by the analyte and any background absorbance of the matrix at the analysis wavelength. If the con— tributions to the photocurrent by analyte emission and continuum background absorbance are negligible then the absorbance at any given time is I0L Il-IA A = log ——— = log , 78 and the integrated absorbance is the sum of these absor- bances over the specified time interval. Note that this is not a true integration and that it depends on sampling frequency and peak shape (28). In the actual coding, the mathematical identity that states that the sum of a series of logarithms is equal to the log of the multiplicative product of the series was used. This improves execution speed since multiplication is a much faster computer operation than computing logarithms. If a continuum source is used instead of the line source, the pertinent measurements are In = ID I5 ’ IOE + ID I7 ID + IBE + IOE The new photocurrent components are 100’ which is the photocurrent from the unattenuated continuum source, and IH, which is the attenuated continuum source. Because of the bandpass of the monochromator, the attenuation of the continuum source by the analyte can be disregarded when compared to any broad band absorbance by matrix species. Again if the analyte emission is neglected Ioc IS'IA A = log ——— = log C IC I6'I7+IS'IA 79 If the background level is constant from run to run, the true sample absorbance (AS) is AL = AS - AC. For most of our work Ad was assumed to be very small so that AL was taken to approximate AS. The PLOT subroutine uses a plotting package written by Dr. E. R. Johnson to present an absorbance versus time plot. In this plot, the origin of the time axis is the time at which atomization power was first applied to the braid. When the plot has been completed, and if not in the wait mode, the program control is directed back to the subroutine FLOW. If in the wait mode the user may request a plot of background transmittance versus time. Normally, however, the wait mode is used to allow manual sample deposition, and program execution may be restarted on command when this manual deposition has been completed. Listings of the DATA-CALC and PLOT subroutines are in Appendix A, and more information concerning the exact mode of operation can be extracted from the extensive docu- mentation at the beginning of each listing. The important features to note in the DATA-CALC routine are the switch register options, which aided debugging and progress monitoring of long running experiments. Also, note the importance of point by point braid emission background correction of absorbance values since especially in the beginning of the atomization period this background level changes rapidly. 80 I. ASSEMBLY LANGUAGE SUBROUTINES Because of the number of hardware devices that needed to be controlled in the GBA instrument, a good deal of assembly language programming was necessary. In some cases the skeletons of these RALF routines were derived from compiling FORTRAN IV subroutines as suggested early in this chapter. In other cases where no argument passing, etc., was necessary the FORTRAN IV compiler was overly verbose so that even the ralf-mode RALF code was written without aid from the compiler. The program ADCR is an example of this type and its listing is given in Appendix A. Also in Appendix A is the listing of AD8M which is the eight-mode complement of ADCR. These two routines function together to acquire data, convert the data to FORTRAN IV compatibility, and store the data in a floating point array in the calling program. To use this routine, three programs in the ADCR package must be called. First, FREQS is called with an argument denoting the requested frequency of conversion. The requested frequency is rounded off to a multiple of 1., 2., or 5. between 1. x 10"3 and 5. x 10”. Then the proper arguments are calcu- lated, passed to the GBA hardware clock, and the clock started. The user then calls SET to pass the number of con- versions requested and the name of the data array. Fin- ally, when the atomization step is to begin, the user 81 calls GO to initiate the actual data taking. The ralf- mode programs FREQS, SET, and GO interface to the respec— tive complementary sections of eight mode code in AD8M. The eight-mode code and ralf-mode code were kept separate so that the ralf-mode routines could be overlayed if necessary. The complex portions of the task are handled mostly by the eight-mode code. First it must pick up the address of the data array in the calling program and determine the data field in which it starts. As data are acquired, they are converted to FORTRAN IV floating variable form using the Extended Arithematic Element and stored in the requested data array. Another level of complexity is added by the fact that FORTRAN IV arrays may be loaded across field boundaries so that the code must also detect when a data field change is necessary. The routine will execute without missing a data point at data rates in excess of one kilohertz. If, however, the requested con— version frequency is excessive and causes a data point to be missed, an error halt with l in the accumulator occurs. A single FORTRAN IV callable RALF subroutine handles all the functions of the positioner: CALL POS (HPOS, VPOS, COM) where HPOS is the horizontal destination; VPOS is the vertical destination; and COM is the command type. There 82 are three possible command types: RESET, WAIT, and G0. The RESET command causes the positioner to seek the reference position defined by the vertical and horizon- tal optical interrupters. The WAIT command causes the computer to wait for the positioner to set its done flag before returning from this subroutine to the calling routine. The remote mode GO command functions much the same as the local mode GO command with a few minor distinc- tions. The horizontal and vertical destinations are the HPOS and VPOS subroutine arguments, respectively. The software converts the arguments to the machine coordinate system (which is l2-bit binary with the 0,0 position at the optically defined reference point) from the user co- ordinate system, which uses mm as units and has the origin defined as the position where the atomizer is just below the HCDT light path (i.e., midway horizontal travel, ver- tical as high as possible without blocking the light beam). Thus legal destinations are from —l2.5 to 12.5 mm hori- zontal and from 0. to 25.0 mm vertical. A FORTRAN IV callable subroutine written in RALF is used to drive the DAC. The calling form is: CALL DAC (ARG) where ARC is a real number which represents the desired output voltage. The unique feature of this subroutine 83 is that it may be compiled under several different com— piler options, which can cause the argument to be inter- preted differently (69). If no compiler option is speci- fied at compilation time, the real argument is converted to its binary equivalent and passed directly to the DAC input latch. With compiler option 1, the DAC is assumed to be a unipolar 0. to 10. V DAC, and the argument will be interpreted as a voltage. This voltage will appear at the DAC output. Compiler option 5 produces a similar interpretation. But in this case, the DAC is assumed to be a bipolar -5 to +5 V DAC. Subroutine FLAG is also written in RALF assembly language and is called in the following manner: CALL FLAG (RAD, HD, SP) where RAD, HD, and SP are real arguments with the values of -l, 0, or +1. An argument with a value of +1 causes the flag to be set. A -1 argument causes the flag to be cleared, and 0 does not affect the state of the flag. The RAD argument is used to set or clear the flag, which causes a changover to radiation regulation of the atomizer heating. The HD argument is used to set or clear the flag which triggers the gas valve for the hydrogen dif- fusion flame. The SP flag operates similarly to the RAD and HD flags, but it has not yet been assigned a specific purpose. 8A The subroutine which reads the user switch register into the accumulator is actually a function type sub- routine and an example of a typical call to this routine is given below. IF (SWITCH (5.) .E0. 1.) CALL PLOT The argument to the function subroutine indicates which switch is being interrogated, and, if that switch is set, the function returns a value of 1.. If it were not set, a value of 0. is returned. In this example, the SWITCH function subroutine is used in a logical IF state- ment so that the PLOT subroutine is called only if switch 5 is set. The functions actuated when the other switches are set are given in Table 2. Although this switch register may at first seem to serve a rather frivolous function, in actual practice it is almost indispensible. In fact, the necessity for this type of interaction was not recognized in the original design. However, it became so necessary to have this type of run-time control, this switch register was added after the construction and testing of the rest of the circuitry was completed. Also used by GMBDS2 are the clock routines written by Dr. E. R. Johnson. These routines use the 8/e's real time clock to provide accurate time delays. The soft— ware to drive the automatic sample dispenser is discussed in some detail in Chapter A and will not be discussed here. 85 Table 2. Run-time Front Panel Switch Options. Switch Function 0 Interrupt task execution,go to GBA monitor 1 Print run counter, position, and logic variables on system terminal 2 Print scan variables on system terminal 3 Print sample dispenser variables on system ter- minal A Plot Absorbance vs. Time on system terminal 5 Unassigned CHAPTER A CONSTRUCTION AND TESTING OF THE VARIABLE VOLUME AUTOMATIC SAMPLE DISPENSER A. INTRODUCTION .———— Automatic sample delivery in electrothermal atomiza- tion atomic absorption (EAAA) measurements can improve measurement precision and result in a substantial time savings for the experimenter. Mechanically assisted (76L semi—automatic (77,78),and automatic (68,79,80), discontinuous sample introduction systems have shown that these types of systems can improve both the precision of volume metering and the precision of positioning the sample over manual sample delivery. In many cases however, the gain in precision is much less important than the pos- sible time savings. A great number of the AA instruments equipped with electrothermal atomizers have automated all instrument functions except sample introduction, so that while the instrument handles all the rigorous tasks such as data acquisition and analysis the experimenter is left with the mundane task of operating a hypodermic syringe. In our laboratory we wished to perform experiments to 86 87 map the atomic vapor in two dimensions above the atomizer. Each of these maps would require at least one hundred sample depositions and such maps would be required for several elements, matrices, and atomization temperatures. With a task of this magnitude, automation of the sample introduction technique was imperative. Choice of the particular design of the sample introduction system was affected by previous experience with automatic sample delivery systems (79,80) and the physical constraint that the system had to fit on an optical rail already crowded by the presence of the automatic positioner for the atomizer cell (28). Further, to yield maximum flex- ibility the system was designed so that the sample volume and the sample type could be changed under computer control. The relationship of the Automatic Sample Dispenser (ASD) to the other components of the computer—controlled EAAA instrument is shown in Figure 1A. The diagram has been simplified for clarity by omitting the automatic atomizer vapor cell positioning device. The ASD consists of a sample turntable module, a transport and sample delivery module, and the electronics associated with controlling these modules. The sample turntable module contains sample cups which allow the selection of any of six different samples. The transport mechanism provides vertical movement to lower the delivery system either into the selected cup or onto the filament atomizer. The rotor 102035 0323 033.32 5:; 205335 <<52..qu Suhm>m 02.555 EDOE< watioems agave we use Acv .opaauccau mpasmm Amy .ccma =x ~ Amy .meo =x any .LOpaacgoucP ocm~ gag Auv .mpxm opaaucgsu Amy .Lcuos sacaoum Aa -....-_xm: 44:; Till 2° nh’ cc: 97 capo: ------ so hum; capo: ooonuc ~o pro—c capo: cannon buccah no ocwn Dumnu . m\’n~uo , ”WWW“ AHmufimmsz $5.28 (W 98 command and pulses the appropriate stepper motor drive circuit. This drive circuit channels power from the stepper motor power supply down the stepper motor power lines in the proper sequence causing the motor to step. The motor is stepped in this manner until the desired movement is completed. The interface recognizes a task as complete when the motor movement causes a change of state at the appropriate optical interrupter (OI) or micro- switch (uSW) (this type of interaction is denoted by a dashed line in Figure 17). The syringe motor may also be stopped when a specified number of steps have been executed. The interface also contains error checking logic so that if the execution of a requested command would cause a movement that is self-damaging, then that move- ment can not be executed. An example of this type of command would be a request to rotate the sample turntable when the syringe needle was in one of the sample cups. Either the completion of a legal task or the request of an illegal movement causes the interface to signal the computer that the task has been acted on. The computer may then interrogate a status register which contains flags indicating the legality of the last requested move- ment and the status of each of the position indicating optical interrupters and microswitches. The syringe and turret stepper motors are models 202215D200—Fl.6 and lO-20l3DAO-F75, respectively, Sigma 99 Instruments, Braintree, MA. The rotor and transport step- per motors are models 23D6102A and 23D6306A, respectively, Computer Devices, Santa Fe, CA. The stepper motor drive circuits were constructed as recommended by the Sigma Stepper Motor Handbook (82). A filtered, but regulated +25V power supply was built in-house to provide the raw power for the stepper motors. 3. Software Three Fortran IV callable assembly language subroutines control all the actions of the ASD. The first, INIT, safely moves the ASD from whatever position it may be at power up to the state in which the syringe is empty and positioned above the sample turntable sample cup zero. The second, TUNE, moves the sampler so that the delivery needle is at atomizer level and then waits for the operator to fine tune the delivery position on the atomizer. When this task has been completed the ASD returns to the initi— alized position. The third routine, SAMP, is used to re- quest the delivery of a specified volume of sample solution onto the atomizer. SAMP, INIT, and TUNE all contain a list of Job words in sequential memory locations, and each of these Jobs words corresponds to one or more motor move- ments. Table 3 gives the bit assignments for both the Job word and the status registers. For example, the job word list for INIT contains a Job word for each of the 100 Table 3. Bit Assignments for the Status Register and Job Word Register. Accumulator Bit Status Register Enable Register OKOCONQU'I Illegal Vertical Illegal Rotor Illegal Syringe Illegal Turret Syringe Empty Syringe Full Rotor Left Rotor Right Vertical Top Vertical Bottom Turntable at Cup 0 Interrupt Enable Top/Purge Up/Down Vertical Enable Left/Right Rotor Enable Turret MSB Turret Bit 2 Turret Bit 3 Turret LSB Syringe Special Instruction Flag 101 following movements: ascend to the top (7A00), rotate the syringe over the sample turntable (0336), send the sample turntable to cup one (0302), descend to the sample turntable (0400), empty the syringe (0100), and finally ascend to the top position (7A00). The Job word list for SAMP is much lengthier and has three separate entry points which correspond to the purge, load, and deliver functions. To decide which functions are necessary, the software keeps track of the sample number in the syringe and the volume of the solution contained in the syringe. The purge function, which involves the rinsing of the syringe twice with distilled water, is executed only when the sample requested is dif- ferent from the sample presently in the syringe. The load operation, which entails refilling the sample syringe, is executed only if the sample in the syringe is the same as the last one requested but the amount is insufficient, or when the last function executed was a purge operation. If the request involves no sample changing and the amount in the syringe is sufficient, then only the delivery func- tion is executed. When the proper entry point has been determined, this routine picks up individual Job words, sends them out to the interface, and waits for the interface to set the done flag. When the done flag is set, the routine reads the status register and halts if any of the illegal flags 102 are set. If the command was not illegal, then the move- ment is assumed complete, and the next Job word is fetched and acted on. This process continues until the requested delivery is completed. The lone exception to this type of operation is the special case of syringe instructions. These instructions require an additional information word which indicates the number and the direction (i.e., load or deliver) of syringe motor pulses to be executed. A request for a sample delivery from a Fortran routine is in the form of a subroutine call with two arguments one which indicates the sample number, the other which indicates the amount to deliver in p2. The only restric- tion is that before the first delivery is requested the INIT and TUNE routines must have been properly performed. C. EVALUATION OF PERFORMANCE The important criteria to be considered in the evalua- tion of the ASD are the delivery accuracy, precision, and inertness toward the sample solution. The accuracy and precision of the delivery and thus the total AA mea- surement precision is quite dependent on the mode of opera- tion and the particular delivery needle used. The most obvious conclusion to be drawn from the study of precision given in Table A is that an entrapped air pocket is quite detrimental, especially for needles with small diameters. This entrapped air pocket is formed in the precision glass 103 Table A. Measurement Reproducibilities of Various Delivery Modes. Needle Material i.d. stol TRSD2 %RSD3 %RSD” St. Steel .5 “.3 12.A 2.8 120 St. Steel <.2 2.2 * 2.2 * Teflon .5 1.8 100 1.5 65 Teflon .3 3.“ 95 3.3 23 RSDl Atomizer not heated during delivery, no entrapped air space in syringe. Atomizer not heated during delivery, entrapped air in syringe. Atomizer heated during delivery, no entrapped air space in syringe. Atomizer heated during delivery and entrapped air space in syringe. Deliver totally ineffectual. 10“ barrel between the syringe plunger head and the surface of the sample solution whenever the ASD initially fills itself. The only way to prevent this air bubble is to manually charge the syringe barrel with sample solution before the fill function is executed. When the ASD is operated with an entrapped air pocket the inner diameter of the delivery needle significantly affects the delivery precision. This is explicable if one considers that at the time of delivery the sample solution is subjected to capillary forces of the braided graphite atomizer and the syringe needle. Also the surface tension of the solution and the hydrophilic or hydrophobic nature of the syringe needle material affect the reproducibility of the delivery. Heating the atomizer to desolvation temperature during the delivery enhances the ability of the atomizer to compete for sample solution and when an entrapped air pocket is present this enhancement is very detrimental to delivery precision. In this part of the study no scavenging of the analyte by either the stainless steel or teflon needles was observed. Table 5 shows the results of long term tests on the precision of sample delivery for three individual atomizers. In Figure 19 the graphical representation of one of these experiments demonstrates that no perceptable scavenging of the 1 ppm cadmium by the syringe needle or precision glass barrel occurred during the duration of this 105 m.m N.m m.H o.m :.m m.m m.m w.m m.m om.mH wH.mH :H.NH No.mH mo.mH mm.HH ow.mH mH.mH mm.mH m.H m.H >.H ~.H m.H m.H ~.H n.m :.m :m.ma oo.mH wa.mH H:.NH H:.NH om.NH Hm.mH wH.mH om.mH m.m >.m m.m m.m m.m :.m ~.m m.m =.m mm.NH :H.NH mH.mH :o.ma :w.aa mm.HH mm.HH mN.HH mo.ma owmlamm ommlawm owmlflzm onmlaom oomIHmH owHIHmH omHIHm owIH: Gala 0mm .mn< vopmpwoucH m Qmm .mm< UmpmhmmpCH m 0mm .mp< Uopmpwoch H gonadz cam .02 noNHEOp< .spfififieapm some wees .m mHQmB 106 .- .. ,— -Ir- ,- a). ,— .. b -r- ,— — JJ'LLl'lll'lJ lll'IIj 0.000 I.H% 0 'lll'lil'lll 'ITIIIIII J'JII'LII [IT‘IIIITFIIIUI 1.500”- ‘I’ 7. 3x mozez m_eemea we» .NN H epeemea> z a so u 6 m m >l§L°r-.Dr-0 N 118 the line BN. If the response at R is greater than the response at B, then an expansion to point E, which is twice the distance from the centroid as vertex R, is at- tempted. If this response is better than R, then the new simplex will be the triangle NBE. If the response at R is between the responses of B and N, but greater than the response at E, the new simplex will be RBN. If the response at R is less than at N but greater than at W, a contraction to the BNCr simplex is executed. If the response at R is worse than the respon- ses at N and W then the response at point Cw will be evaluated and the new simplex will be BNCw. The last two types of moves (contractions) are executed only if the response at this contraction is better than at W. In the original Nelder and Mean algorithm, if all of these attempted moves failed to achieve a better response than W, a more massive contraction is executed. In this work, the next worst vertex N of the original simplex is reflected throughout the centroid of the simplex face opposite it. A second modification of the Nelder and Mead algorithm was necessary to deal with instrumental errors. If a vertex had been retained by the simplex for more than n+1 moves, it was re-evaluated and the old response was replaced by the new response. In the EAAA instrument occasionally a drop of solution would cling to the exter- ior of the delivery needle during the refill operation 119 and would be delivered to the atomizer along with the requested sample, and this would result in an erroneously high evaluation of the response at that point. If this response was not re-evaluated, the simplex would rotate about this point in a manner not unlike a dog chasing its tail. Note that most researchers have averaged the old and new values of the response to get the response value to be used in the simplex algorithm (A7,52,59). This action is best suited for averaging out random error; the replace- ment operation is best suited for reducing systematic instrumental errors, since with averaging it might take an unreasonable amount of testing to overcome the effects of the one incorrect response evaluation. B. SIMPLEX SOFTWARE The fundamental FORTRAN IV routine used to implement the simplex algorithm on the EAAA instrument was adapted from a routine written by Mr. lartin Joseph and Dr. Eric Johnson in our laboratories (85). Some extensive modi- fications were necessary to allow this routine to be em- bedded into the EAAA routines and to allow the desired flexibility in the selection of the variables to be opti- mized and the calculation of the response. 120 1. Initiation of a Simplex Optimization The user may enter the Simplex mode of operation by specifying the :SMP command, to the GBA monitor (subrou- tine INPUT). Upon receiving this command the program requests the user to select the number and the names of the variables to be optimized. At this point the user may chose 2 to A of the 13 possible experimental param- eters listed in Table 6 as factors for the simplex optimiza- tion. The selection of these variables must be influenced by certain practical considerations for the simplex to operate properly. The software, however, will accept any combination of these variables. The rules for making acceptable choices of factors in this particular applica- tion are discussed later in this chapter. The user is then prompted to enter the upper limit, lower limit, and the desired convergence precision for each variable. For example, the lower limit for the variable DEST (desol- vation time) might be set at 0. s, since negative times are meaningless. The upper limit might be set at 60. s to prevent the simplex algorithm from making a response test at a desolvation time that is so long that it is experimentally impractical. The value entered for the desired precision relates to the detection of the con— vergence of the simplex on the optimum. When all the vertices of the simplex have values for each factor which are separated by less than the specified precision 121 Table 6. Experimental Parameters that May be Optimized With the Simplex Routine. Variable Description DEST Desolvation time ASHT Ashing time ATMT Atomization time DELT Delay time between sample runs DESP Desolvation power ASHP Ashing power ATMP Atomization power AMNT Amount of sample delivered HPOS Horizontal location of observation window VPOS Vertical location of observation window FREQ Data acquisition rate INTST Number of the data point at which the integration is begun INTSP Number of the data point at which the integration is stopped 122 for that factor, the simplex is halted. The user is then requested to enter the factor values for each of the initial simplex vertices. There is also a choice of the optimization mode, and the options include: limited inte— gration mode (this mode must be used if INTST and INTSP are chosen as factors to be optimized), whole integration mode (normal mode), or peak absorbance. The user may also specify more than one sample run to be taken per response evaluation. Finally, one can enter an itera- tion limit, which will cause the simplex to halt after this specified number of moves even if it has not converged on an optimum. This last option is quite useful if it is desired to perform several optimizations under batch stream control as described in Chapter 3. 2. Run—Time Options Some of the option variables function in the simplex mode of operation similar to the manner they function in the normal mode. If the LPT option is set, an output of the initial simplex parameters, as well as a running account of the progress of the simplex, is output to the lineprinter. The PLT option causes an absorbance versus time plot to be output to the system terminal. This has the same appearance as the plot given in the normal mode, but uses a separate set of subroutines because of overlaying requirements. Switch 0 on the front panel of the general 123 interference box still serves the function of aborting the task and exiting to the GBA monitor. Switch A causes an absorbance versus time plot even if PLT was not re- quested. The file option variables in the simplex mode pertain to file output formats entirely different from those in the normal mode. One file format outputs the iteration number, the factor values, and the response at the vertex just tested. This file is useful for the crea- tion of plots of the movement of the simplex and plots of the progress of each individual variable. The other file output keeps a record of all of the response values and is useful for archival storage since it is short. C. TESTS OF THE SIMPLEX ALGORITHM ON A KNOWN RESPONSE SURFACE On-1ine optimizations of experimental parameters for a particular instrument must deal with noisy response surfaces and, if parameters other than those parameters being optimized change, the algorithm must also deal with shifting response surfaces. The success of simplex optimizations is dependent on the characteristics of the system being optimized. Thus it is desirable to test the simplex on a "standard" response surface, where the global optimum is known. 12A 1. The Cadmium Integrated Absorbance Response Surface Two-dimensional mapping experiments of cadmium absor- bances (83) yielded a known response surface for one particular optimization that might be attempted on the EAAA instrument. The optimum integrated absorbance in the response surface was assigned an arbitrary value of 100, and the iso-absorbance lines were drawn to define the regions where the integrated absorbance decreased by 10% increments from this optimum value. Figure 23 shows the response surface and several starting Simplexes used in the optimization of the cad- mium integrated absorbance signal. The global optimum is located near 0. mm vertical displacement and 0. mm horizontal displacement. The response drops off rapidly in all directions (the slope of the response surface is inversely proportional to the distance between the iso- absorbance lines). The slope for vertical displacements is less severe than the slope for horizontal displacements. Also the pointed intersection between the iso—absorbance lines near zero horizontal displacement are indicative of a sharp ridge in the response surface. The irregularities in the iso-absorbance lines above 12 mm vertical displace— ment suggest a non—smooth surface. Also, since source flicker noise (hollow cathode lamp flicker) is a signi- ficant source of imprecision, the signal-to—noise ratio should be poorer for the regions bounded by iso-absorbance 125 24 2| '- l8- V E R I5- T I (3 I2? ‘ A L 9.. (mm) 6.. 3.. HORIZONTAL (mm) Figure 23. Cadmium Integrated Absorbance Response Surface with Assorted Starting Simplexes. 126 lines which indicate low cadmium concentrations. An addi- tional source of noise in the upper regions of the vapor cell is caused by the breakup of flow laminarity as the sheath gas begins to encounter the surrounding atmosphere near the top of the atomization cell. The slight asym- metry of the surface in the upper regions is probably indicative of the prevailing wind currents in the labora— tory. 2. Methods of Monitoring the Progress of the Simplex The movements of the simplex which used triangle G in Figure 23 as the starting simplex are shown in Figure 2A. Note that it initially moves rapidly toward the horizon- tal center of the vapor cell and down toward the atomizer with two expansions. Then two contractions on the only vertex remaining from the original simplex cause a rapid approach toward the horizontal optimum. After one more expansion in the general direction of the global optimum, the algorithm causes a series of reflections and contrac- tions until an optimum very near the true global optimum is found. This type of plot is instructive, but somewhat confusing, and applicable only to two-factor optimizations. Single parameter progress plots such as Figures 25, 26a, and 26b, are more easily analyzed. These plots show both the successful and nonsuccessful moves of the algorithm for a single factor at a time, and thus may be used to 7.0" 5.0-- amndofl10< 3.0-- :o-o-c-t-umov :3: 2.0-- 0.0 -4.0 Figure 24. 127 I l J -3‘.o -230 -1.0 0.0 1.0 Horizontal Position (m) The Moves of Simplex Optimization 6. RESPONSE 128 TE’ 32 3E 5.‘j:' 2C 4-'::' j: 3.-EE— 3E 20-— ' IE Li} SE 1 00"!!! IIIIIJIJIJIIIJIIIIIIJ - ITWIIIITIITIWWDIIIIIIIIT—l 1 5 10 15 20 SIMPLEX N0. Figure 25. Progress Plot of the Cadmium Integrated Absorbance Response in a TWO Parameter Optimization 129 mucnncoma< voumgmmacm savanna mo :ovumu?ewaao Lmumsmgca 03H m c? co*u*moa PopcoNALo: use co+uwmoa Puuvugm> yo muopa mmmcuoca .02 medsz .02 qudsz on a“ a. m a e~ a” a. m Give. 0'- on. I .N. O”- (NH) NOIlISOd WVINOZIHOH .eN seemed .o— .(HN) NOIlISOd TVDILHBA 130 monitor the progress of an optimization of any dimension- ality. These plots were created by slightly modifying the optional simplex mode output file so that it could be used as an input file to the program MULPLT on the CEMCOMGRAF facility. The progress curves are generated by first plotting the value of the parameter of interest at each vertex of the starting simplex and then connecting the points with lines. A line is then drawn from the last plotted vertex value to the value of that parameter at each attempted move. The line drawing process is then repeated using the value of the parameter at the last successful simplex move as the new origin for further lines to values at the next attempted move, etc.. Figures 25, 26a, and 26b indicate the movements of simplex optimization A in Figure 23. Some interesting conclusions about the optimization process may be deduced from a careful consideration of these figures. The move- ment of the response (integrated absorbance) is shown in Figure 25. For the initial moves, the improvement in the response is rapid, because the simplex is large and lo- cated on a steep gradient of the response surface. How- ever, when the simplex is smaller and on a more level portion of the response surface, the changes in the response are quite small. It seems quite incongruous that the response seems to degrade from its peak value at simplex 7 to a somewhat smaller value when the simplex is halted. 131 This could be due to several factors. It is possible that this vertex was actually retained in the final simplex and only the other two vertices moved. However, inspec- tion of the data in the data file that recorded the simplex moves revealed that this had not occurred. It is also possible that there might have been a change in some parameter not being tested. Atomizer aging, which can cause a loss in measurement sensitivity, could cause a shift in the response surface and this process might yield a progress plot like the one obtained. Indeed this may be part of the cause of the degradation in response. But, as will be shown in the analysis of the vertical parameter progress plot, this type of sawtooth plot is also indicative of the approach of the simplex to an optimum that lies on one of the parameter bounderies. If the progress of the vertical variable, Figure 26a, and the progress of the horizontal variable, Figure 26b are compared, it can be seen that the simplex converged on the horizontal optimum much faster than it did on the vertical optimum. This cannot be attributed solely to the fact that the response surface has a larger slope in the horizontal variable than in the vertical variable. First, convergence for a single parameter is dependent on the size and orientation of the initial simplex. Second, because the size of the simplex moves are limited and any attempted moves outside the designated boundaries are 132 assigned very unfavorable responses, the simplex tech- nique has difficulty converging on an optimum that is located on a boundary. 3. Comparison of Optimizations with Different Starting,Simplexes The results of starting the optimization at each of the starting simplexes shown in Figure 23 are given in Table 7. Optimizations A1 through A6 all shared the common starting simplex A. On a noise free surface the algorithm would make exactly the same movements each trial, and the optima found would be identical. Experimental noise causes six different optima to be located, but all of these are in the immediate vicinity of the true global optimum. Although the least efficient optimization (A5) took nearly 60% more moves than did the most efficient (AA), both processes took considerably fewer experimental observations than any mapping experiment that could be expected to find an optimum as near the true global op- timum. The D, E, and F initial simplexes all failed to con- verge on the true global optimum. For optimizations E and F, the reason is that the initial simplex was located in a region of the response surface that has an unfavor- able signal-to-noise ratio, and this caused the simplex 133 Table 7. Results of Optimizations of the Horizontal and Vertical Positions for Maximum Cadmium Integrated Absorbance. HPOS VPOS Optimum Optimum Iterations Optimization (mm) (mm) Required A1 - .29 .21 1A A2 .09 .A9 1A A3 .19 .28 1A AA .0 .27 13 A5 - .13 .5A 23 A6 .13 .27 18 B .03 .67 16 C .22 .67 16 D - .19 1.A 8* E -1.8 1A.O 8* F - .80 13.5 12* G .01 .5A 11 A6' .20 .21 25 G' .1A .29 1A *Failed optimization due to noise on the response surface. 13A to contract prematurely. Noise causes more contractions than expansions, since contractions are statistically favored by the simplex algorithm. It is possible, but highly unlikely, that there are indeed some small local optima which the simplex found in this region. These optima would have to be quite small or they would have been visible in Figure 23. The reasons for the failure of optimization D to converge on the true global optimum are more subtle. First, the initial simplex was created so that its size, location, and orientation made it dif- ficult for the simplex algorithm to move it toward the true optimum. Because it was very close to the vertical boundary and oriented so that its first moves were con- tractions, the simplex fell prey to instrumental noise and contracted before it could re-orient its movement in the direction of the optimum and make significant progress. In fact, all the eight moves of this optimization were contractions. Optimizations B, C, and G all converged in the vicinity of the true global optimum in a reasonable number of move- ments. Along with optimizations Al through A6, these optimizations demonstrate that a judicial choice of a starting simplex involves the placement of the simplex in a region of the response surface that has a significant slope, low noise, and is not near any variable boundaries. Another form of failure for the simplex, which was 135 not observed in these tests, is the loss of dimension- ality of the simplex on a response surface ridge. If the simplex were to somehow locate two of its vertices on the response ridge (i.e., both vertices have a horizontal value near 0. mm), the algorithm would cause a series of reflections and contractions on the one vertex not on the ridge until the simplex resembled a straight line. When this happens, the movement of the simplex is restricted to movements in the direction defined by this line, and the true optimum may never be located. None of the op- timizations in this study showed this failure mode, be— cause although there is a ridge in the response surface, there is still a consistent slope in the variable which parallels the ridge. (In this case the change in response for vertical displacements along the vertical ridge is consistent and large enough to prevent the loss of dimen- sionality.) The software caused the simplex to be halted when the range of values for each parameter at all the vertices was within a specified precision. In these optimizations the precision specified for both the horizontal and verti- cal variable was 0.5 mm. If this restriction is lifted, the optimum located is closer to the true global optimum. Optimizations A6' and G', which are continuations of optimizations A6 and G, demonstrate this point. In these optimizations, the simplex was allowed to continue until 136 the operator could no longer detect any significant move- ment of the simplex. The optima located are significantly closer to the true global optimum, and the range of values for the horizontal factor under these conditions reaches 0.03 mm and 0.32 mm for optimizations A6' and 0', respec- tively. Similarly, the range of values for the vertical factor is 0.13 mm and 0.1A mm. A. Optimization of the Integrated Absorbance of Manganese The results of studies on the optimization of the horizontal and vertical position for maximum Mn integrated absorbance are shown in Table 8. The vertical concentra- tion profiles for manganese (8A) and cadmium (28) show that the atomic population of manganese decreases with the increasing distance above the filament more rapidly than the atomic population of cadmium. For this reason, the initial simplex was located rather near the atomizer surface. (It was actually the same as simplex A in Figure 23.) Because of the short half-life of atomic manganese in the sheath gas, its response surface probably has very similar slopes for horizontal and vertical displacements. For optimizations A and B, in Table 8, the simplex converged on an optimum a bit higher and farther in the negative horizontal direction than the cadmium optimizations, but convergence was achieved in a comparable number of 137 m Ama.v m. A:~.V m. ma ms. mm. n a H Amo.v m. Ao:.v m. mm mm. em. 0 H Amm.v m. Aoz.v m. MH H.H m.HI m H Aom.v m. Amm.v m. mH am. am. I < ASEV AEEV mom> momm coapmsam>m AmoNHHmopv AEEV AEEV coapmn omQOQmom oopmmsvom oogfisvmm Essfipdo Esefipdo IHEHuqo \mCOfipmppr :0fimfioogm wCOHpmpmuH mom> momm .omocmmcmz pom mocwnLOmn< coumpwmQCH Ezefixmz pow mCOHuHmom HwOHupo> ocm Hopcomfipom mo mCOApmNHEHqu on» no mpazmmm .m magma 138 iterations. Perusal of the progress of optimization C indicates that it contracted too much initially, and noise problems made it difficult for it to find the true optimum. In optimization D, three sample determinations were aver- aged for each response evaluation. This should decrease the susceptibility of the simplex algorithm to random noise. After 15 iterations the atomizer suffered catas- trophic failure from aging, and this occurred before the true optimum was located. From the standpoint of achiev- ing the most efficient optimization, increasing the number of runs per response evaluation does not help. The simplex algorithm is self-correcting for random errors if they are not so overwhelming that they cause premature contrac- tion (A9). In the manganese optimizations, the algorithm con- verged on the vertical optimum more rapidly than it con- verged on the horizontal optimum in three of four optimiza- tions. For cadmium, the convergence on the horizontal optimum was always rapid. This difference is probably due to the greater vertical slope in the manganese res- ponse surface than in the cadmium response surface. The overall performance of the simplex algorithm in finding an optimum close to the global optimum was poorer for manganese than for cadmium, which seems to indicate that there is more noise on the manganese response surface than on the cadmium response surface. Since the 139 atomization temperature for manganese is about 1000°C higher than the atomization temperature for cadmium, the disturbance of the sheath gas flow laminarity near the atomizer is greater for manganese, and undoubtedly this is at least part of the cause for the noisier response surface. D. FOUR PARAMETER OPTIMIZATIONS The labor-saving characteristics of the simplex algorithm as compared to grid—search optimizations become more significant as the dimensionality of the optimiza- tion is increased. To collect data to evaluate the entire response surface for a four factor optimization is too time consuming even for a totally automated system, such as the EAAA instrument. Since the operation of the algorithm in a four parameter optimization was untested, it was necessary to test the technique on four parameters whose effects on the selected response were either known or could be easily deduced. 1. Four Parameter Optimization of the Integrated Absorbance of Cadmium The four factors chosen were the horizontal position, the vertical position, the amount of sample, and the length of the time delay between sample deliveries. The 1A0 chosen response was again the cadmium integrated absor- bance. There is not expected to be any interaction be— tween the horizontal and vertical position variables and the two new factors, so the horizontal and vertical optima should be the same as in the two parameter optimization. Obviously, the optimum value for the amount of sample solution delivered should be the maximum amount allowed by the upper boundary, and the length of the time delay between sample determinations should have no effect on the response. In the five test cases shown in Table 9, the starting simplexes were located randomly in factor space according to the guidelines established in the previous section. Note that the number of iterations required for conver- gence was significantly greater than the number required in a two parameter optimization. Even though the delay time has no effect on the response chosen (integrated absorbance), in each case the simplex algorithm converges on an "optimum" value for this factor. The inconsequential nature of this factor is signalled by the totally random values on which the simplex converges for this parameter. This does demonstrate that the technique can find a true optimum even if one of the chosen factors has no effect on the response. The horizontal positions designated at the optimum are not unlike those found in the two parameter optimization, except that optimizations B and C yielded 1A1 Table 9. Results of Optimizations of Delay Time, Hori- zontal Position, Vertical Position, and Amount of Sample for Maximum Integrated Absorbance for Cadmium. 2:21:21:- as xx ‘82:? All? A 9.3 0.0 .6A 3.93 AA B 18.0 -.63 3.6 3.97 31 C 5.A -.51 .87 3.9A 39 D 15.3 .28 .38 3.89 28 E 9.0 .11 1.1 3.92 30 1A2 a result a little farther from the true global optimum than any of the optima found in the two parameter optimiza- tions. This effect is even more pronounced in the opti- mization of the vertical parameter where one of the "optimum values" found was over 3 mm from the true optimum value. The approach of the sample amount to the upper boundary level is consistent throughout the test as was initially expected. Since this parameter has a very strong effect on the response, the convergence precision for this parameter is very good. For optimization E, the Figures 27, 28A, 28B, 29A and 29B are progress plots of the response, vertical position, horizontal position, sample amount, and delay time, respec- tively. Comparison with parameter progress plots for the two dimensional optimization show that the improvement in response is more gradual, and the movement toward the horizontal and vertical optima is also more gradual. Also, the approach to the vertical and sample amount optima, which are located at the parameter boundaries, is rather slow and tentative. The difficulty that this simplex algorithm has in locating an optimum located at a boundary seems to be characteristic of this algorithm. The super modified simplex is thought to approach optimum located at a boundary value much more readily (37). Unfortunately the progress plot of the delay time parameter contains no distinctive characteristics which RESPONSE 0.0 Figure 27.. 1A3 2E 3; 2: SE 1: 2: '1': :: ‘LIIIJIJI ll! llJllllJlJlllllllllllJ IIIIIII III IIIITTIIITIIIIIIIIIIV 1 s 10 1s 20 25 SIMPLEX N0. Progress Plot of the Cadmium Integrated Absorbance Response in a Four Parameter Optimization. 1AA .mucaacomn< umuogmmuca savanna on» mo co¢ue~.s.uao cmpmsmgma used a e? . co*u.moa Poucourgoz we» ecu covurmoa Fourucm> as» ea muopa mmmcmoca .mm «camva .oz xmnmzmm .02 anasz n~ on a. e_ a . mu e~ m. o. m L 0.0 E._________~—L_______E_EP___—~___ ad 1 .2 __. _-_:J_u_____ 4fi_______.. # . .T . on An 2 0 H A . ”U .. 3 at. fi.~8 Z .. l on 0 u.- o I N Junxu i am V . .r .l . w” nu ; a d o d 1.. o 0 a nu Aw a e. S U. I . l .. i o I nun-61 m .N. oh luv... oh \I .1 \I . H H . w n... w ( 1. I\ + & mm& .2 mm. .S 1A5 .mucwngoma< vmuacmmucn savanna ecu mo covuanpsvuno gmumsagme hack a cw we?» Ampmo on» ten acaos< upasmm mzu we «ope mmmgmoga .am mesmvu .oz xmndzmm. .oz xmnmsz mu ca 3 S m a 3 on 3 2 m a n 4 1.- A” An.” w + u H i A. .. .. .. n. H 1r .. a. n fiJw agn. .. ”n v. H .. ..A :I .u. .2 .. .. .1 u H I .. .n. .2 H u H a. H _ luv: .2 \I 1.”: “n as n i -. . 3 H \ nu .uqs : .. r. n n. .2 A. H H _ .n .2 n H m LLfi oh" hr o... .u S V N d 1 3 .~ V N O n N .n i \I .H 1 I\ J 1A6 would point out that this parameter has no effect on the response chosen. It appears that the only way to show definitively the insignificance of this factor is to com- pare the optimum values for this parameter in several optimizations. 2. Simplex Optimization with a Complex Response Function The second four parameter optimization attempted was of a more practical nature. It is generally desirable in EAAA determinations, as with many other analytical deter- minations, to maximize the accuracy and precision of the measurement process and to minimize the analysis time. This means that the value used as feedback to the simplex algorithm must be some type of weighted sum of individual responses, which is representative of the analysis time and the precision and accuracy of the measurement. Within this context, the parameters chosen as factors for the four parameter optimization were horizontal position, vertical position, desolvation time, and desolvation power. Since a major portion of the analysis time under normal operat- ing conditions is spent in desolvating the sample, minimiza- tion of this variable could represent a significant in- crease in instrument throughput. The desolvation power was chosen as a factor because it interacts with the desolvation time. That is, the time necessary to 1A7 desolvate the sample is not independent of the desolvation heating temperature. The response chosen to measure the analysis time is straightforward. However, an experimentally practical measure of the measurement precision and accuracy is more difficult. In normal practice the standard deviation is used as a measure of the precision and an indication of the accuracy. The number of experiments necessary to give a reasonably reliable estimate of the standard devia- tion would cause the optimization to take a prohibitively long time. If one assumes that the noise in the region of the global optimum is homoscedastic and that the EAAA measurement is well-behaved with respect to the relation- ship of the integrated absorbance to the cadmium concen- tration, then the assumption that the magnitude of the integrated absorbance is representative of the precision and accuracy of the measurement is justified. Rules for designing the function which calculates the combinational response from two individual responses have been established (3A,A7). However, each particular system requires some prior knowledge and careful consideration before a satisfactory response function can be established. First, it was necessary to write an equation for each individual component of the response function that would normalize each individual response to be near unity at its optimum value. For the signal response contribution, 1A8 Ra, the integrated absorbance was divided by the estimated maximum value of the integrated absorbance. Under these conditions, ABSINT (1) Ra = 3. The time response contribution, Rt, was normalized with respect to the upper and lower boundary constraints as follows. Rt = 1. - (DEST - 5.) (2) A0. - 5. The combinational response, Rc, was then calculated as a weighted sum of these normalized responses by Equation 3, Rc = .75Ra + .25Rt . (3) A subroutine was written to execute the calculation of this response function. The routine was assimulated into the load module for GBMDS2 program, and activated in the simplex mode of operation by setting the variable which indicates an alternate response evaluation will be required. After A0 iterations, the simplex algorithm had converged to the expected precision for the horizontal position (-0.A5 mm), the vertical position (0.A6 mm), and 1A9 the desolvation power (.A6 volts at the DAC which controls the braid temperature). At this point the average desolva- tion time for the simplex was l6.A s. But, the range of values for the vertices in the final simplex was 13.9 to 20.3 s. The optimization was not totally successful. The shape of the response surface under this weighting scheme allowed a proper convergence for the horizontal and verti- cal parameters, but not for the other two factors. When a combinational response is used, the response surface may be thought of as the convolution of the individual response surfaces. This process will make it likely that the combinational response surface will be less regular than most individual response surfaces. Thus, the prob- ability of a successful optimization is diminished. In this particular case, it appears that the weighting of the response toward the signal magnitude initially favored finding the location of the horizontal and vertical optima. Recall that it has already been pointed out that the simplex will converge on an "optimum" for a factor even if this factor is insignificant. In this weighting scheme, the effect of changes in the delay time were effectively screened by the large effect the position variables had on the calculated response. When the position variables had converged, the size of the simplex had diminished so much that it was entirely located on a plateau in the 150 response surface. This caused experimental noise to mask the impact that changes in the desolvation parameters had on the response. Changing the weighting factors to favor the desolvation parameters over the position param- eters might allow the algorithm to find the true optimum. From this study, it appears that the parameters that are least significant and cause plateau regions in the response surface should be weighted most heavily so that they control the initial movements of the simplex. Thus their optima will be located before the simplex contracts sig- nificantly. This is not a panacea, because the portion of the response surface traversed by the simplex is de- pendent on both the starting simplex and the random ef- fects of instrumental noise. For this reason, weighting schemes that might work well in one trial may fail miser- ably if the optimization is restarted with a different or even the same initial simplex. The super modified simplex algorithm might achieve more consistent results in this type of optimization since it has been suggested that it is immune to noise (37). It has been shown in this section that four parameter optimizations are possible on the EAAA instrument if the response surface is well-behaved. It was also shown that combination response functions add a degree of complexity that increases the probability of failure of the simplex algorithm. 151 E. OPTIMIZATIONS OF THE MEASUREMENT PRECISION 1. Direct Optimization of the Measurement Precision As stated in the previous section it would be desir- able to optimize the precision of the EAAA measurement directly. However, this would require a large number of experimental observations. For this reason, only a three dimensional Optimization was attempted. Three parameters were chosen which were thought to have a significant ef- fect on the measurement precision: the vertical height, the sheath gas flow rate, and the atomization power. The vertical position should affect the precision by several mechanisms. The higher the observation window, the smaller the expected signal and the less laminar the sheath gas flow. Both contribute adversely to the pre- cision. On the other hand, low observation heights in- crease the noise by increasing the-amount of shot noise from the observation of background radiation from the atom- izer. At very low positions, the atomizer may occlude some of the source radiation and increase the detrimental effect of some noise sources that are independent of the level of source radiation. High atomization temperatures can also contribute to the amount of continuum radiation observed by the system, and more tepid temperatures can cause incomplete atomization of the analyte. The sheath gas flow rate should influence the measurement noise at 152 both low and high flow rates, since the flow laminarity is destroyed at either extreme. This optimization was actually carried out with a multi-minicomputer system. One minicomputer controlled the EAAA instrument and another executed the simplex routine. Response and test conditions were transferred between computers by the Pals asychronous link (i.e., the operator typed the response or test condition produced by one computer into the other computer's terminal). The operator was also required to adjust manually the gas flow rate. The starting simplex was generated by the simplex program. Four sample runs were taken for each determina- tion of the measurement precision, and after 1A iterations, which required 120 sample runs, the simplex was halted. The range of values for the starting simplex and final simplex vertices are shown in Table 10. The flow rate increased, the height of the vertical observation window increased, but the atomization temperature remained essen- tially unchanged. The improvement in overall measurement precision was not very significant. The failure of this optimization to converge is likely due primarily to the statistical noise in the response measurement. That is, the variance in the variance pre- dicted for a set of only four determinations. The response is not only quite noisy, it also contains a plateau in the region of the optimum for at least the sheath gas 153 H.mlm.m m.z o.mtm.z H.m m.HHIm.m m.oa m.m:a.m m.m Hmcfim .mlm.a :.m H.muu.: H.m z.m|o.n m.> o.m|m.m m.m HmeHCH owcmm owmgo>< owcmm owmpo>< mwcmm owmpo>< mwcmm mwwpo>< onQEHm 2\m pmzom soapmNfiEOp< soapfimom Hmofipno> opmm 30am mom .oapmm mmfloz ow Hmcwfim Ezefixmz how hmzom :oHpmNHEOp¢ new .eofipfimom Heefipee> .epmm seam mew one go cospemfiefipeo mo mpflsmem .OH magma 15A flow parameter. Later studies showed that over the range of about 2.5 to 3.5 l/min, the flow rate has little effect on the measurement precision. It would also have been better to use some intuition in the decision about the size and location of the initial simplex rather than accepting the simplex suggested by the computer routine. Also of some concern, but probably not important here, is the fact that some noise is resultant from sources not under rigid control. As noted in Chapter A this noise is in the range of l to 3% with some long term drift. This noise level should only limit the precision of the final determination of the optimum, and should not be serious enough to invalidate totally the optimization process. 2. The Determination of the Oppimum Integration Time Window The attempt to optimize measurement precision by varying the limits on the time window for the evaluation of integrated absorbance was a good deal less ambitious than the optimization just described and met with a great deal more success. In this optimization, the integration start time and stop time were varied under the constraint that the stop time always had to be later than the start time. Several data files were recorded that contained a chronological series of 200 absorbance data points for cadmium collected over a 1.0 5 period. Each of these 155 data files contained 10 replicate sample runs. The pre- cision was evaluated within the limits of each new integra- tion time window suggested by the simplex algorithm on this data set so that no additional on-line data acquisi- tion was necessary. The data in Table 11 clearly show that optimizing the integration limits results in a significant increase in measurement precision only when the amount of analyte is near or below the detection limit found when absorbance points during the entire atomization step are integrated. Previous experiments in this genre, which had a peak detection algorithm, had not shown any statis- tically significant increase in the measurement precision (28). The problem with such algorithms is that it is very difficult to write one that will perform well for high and low sample concentrations, and that will perform with any consistency at or near the detection limit where the noise in the signal is quite significant. Furthermore, these algorithms can be expected to be advantagous only at low concentrations, where the noise sources that are independent of the photocurrent level become important. Figure 30 is a typical absorbance peak shape for a 2 HA sample of 10 ppb cadmium, and is useful in the inter- pretation of the start and stop times of the signal inte- gration listed in Table 11. To test the validity of the values found in these optimizations a scheme was devised in which the optimum time values found by the simplex .10 .— ABSORBANCE Figure 30. 156 0.0 . .. .1 .2 .3 .4 .5 .6 .7 .8 .9 1.0 TIME (SEC) A Typical Absorbance Peak for 2 pl of 1 ppm Cadmium Solution 157 .UOHLmQ mchmon :oHpmNHEoum can no cam on» a» ocm wcHCCHwon on» ohm coHpmpwoch no mpHEHH map con: COHumcHEHmpmo on» you 9mm R * MO m.OH OH. OH. OH O HA 0.0H OH. OH. OH O OHH m.mH OH. NH. OH O .ONH m.mH OH. HH. OH O .Hm m.OH OH. mO. OH O O.m m.m Hm. OH. OOH m O.m O.m me. OH. OOOm O COprpwoch Hassoz EOEHOOO OH deem upepm HOOOO HOOOHO OOHmHOeeO HOV meeHe coHOOewOOeH .eeoo OO pew wcHCHmmH .moEHB doum ocm ppmpm COHpmeoch mo mCOHpmNHEHon mo mpHSmom .HH oHnt 158 optimization were applied to several test sets. Table 12 contains the results of these tests. In Table 12, the learning sets were data sets on which the simplex optimiza- tion was performed, and the test sets were data sets which were collected under identical experimental conditions. The optimum time window as determined by simplex optimiza- tion of each of the learning data sets was then used to evaluate the data in the test sets. Also shown in Table 12 is the precision for each of the test data sets when the absorbance integration includes the entire atomiza- tion period. A 5 to 10 times improvement in the measure- ment precision resulted when the test data were evaluated between the simplex suggested limits as compared to the integration over whole atomization period. Also, the improvement in precision does not seem to vary significantly for a given test set when the integrated absorbance is evaluated in the different time windows found by the simplex optimization of each of the learning data sets. The results of these optimizations can only be applied to a limited extent to actual determinations for several reasons. The width of the absorbance peak is related to the amount of the analyte in the sample so that a constant time window will observe a smaller portion of large peaks than of small peaks. This will cause curvature in cali- bration plots, but this is not an unreasonable price to pay for the observed increase in measurement precision 159 Table 12. Evaluation of Applicability of Simplex Deter- mined Integration Time Window to Other Data Sets. Test Set (%RSD) Learning Set F G H I Normal Integration* A 13 15 19 17 130 B 16 13 15 1A 120 C 20 2O 2O 22 120 D 17 20 21 2O 80 E 13 13 12 13 60 * % RSD for determination when the limits of integration are the beginning and end of the atomization heating period. 160 and sensitivity. The width and time location of the absorbance peak is also a function of the ashing and atomization temperatures. The atomizer will reach the final atomization temperature earlier if the ash tempera- ture is high, so that the absorbance peak will occur earlier in time. Also the rate at which analyte atoms leave the atomizer is temperature dependent so that the width of the peak depends on the final atomization temperature. These results point out the value of limited integra- tion of the absorbance peak. Because of the interaction of the integration start and stop times with the ash temperature, atomization temperature, and sample amount, it is highly desirable to have these parameters available for optimization. These results lead to the conclusion that an on—line optimization of the measurement precision would have a very good chance of success. However, the number of experimental data points needed would be large and the acquisition of this data would be prohibitively time consuming in anything but a totally automated environ- ment. F. CONCLUSIONS AND PERSPECTIVES The software required to implement the simplex tech- nique on the EAAA instrument was neither complex nor lengthy, and the wetware (operator knowledge) required 161 was significant, but not unreasonable. The unique features of this work include: 1) the simplex optimization tech- nique has never been applied to EAAA spectroscopy, 2) this is the first on-line application of the simplex that allowed the user any flexibility in the choice of param- eters to be varied in the optimization. The on-line op- timization of the integrated absorbance signals of cadmium and manganese proved that the technique was an efficient method of finding the global optimum if and only if a judicial choice of the initial simplex was made. The optimization of the integrated absorbance signal by vary- ing the delay time, sample amount, horizontal position, and vertical position demonstrated the tendency of the simplex to converge on an "optimum" value for a factor even if it is insignificant. Restarting the simplex in another region of the response surface not only helps to decide if the optimum located was a local optimum or the global optimum, but will also point out the insignificance of a factor by converging on totally random optima for that parameter. The attempted optimization of a combinatorial response function demonstrated that as the response func- tion becomes more complex, the response surface is likely to take a shape less favorable for the operation of the simplex algorithm. Optimization of the measurement pre- cision was shown to be an experimentally difficult task because a good estimate of the variance requires a large 162 population of individual measurements. It would not be difficult to set up the optimization of the signal-to- background ratio, since the background value could be easily evaluated from the array which contains the data for the correction of atomizer continuum background radia- tion. The problem with this type of response function evaluation is that the HCDT source drift causes an im- precise determination of the background level. It would be more desirable to evaluate the standard deviation of this set of noise measurements and assume that this is a good approximation of the noise in the signal measure- ment. This procedure is still somewhat susceptible to HCDT drift, but software could be generated to minimize the effect of this drift. A direct optimization of the precision of the measurement would be very valuable and could be applied to the determination of practical samples such as the determination of manganese in chlorophyll (86). There have been at least as many suggested improvements to the simplex optimization technique as there have been researchers who have used the technique. Most suggestions have been directed toward the desensitization of the algorithm to the effects of noise on the response surface (37,58,63). This work has pointed out the critical nature of the size, location, and orientation of the starting simplex on the success of the optimization. I propose 163 that the starting simplex be generated by selection of the sum of the vertices of a regular polyhedron of n+m dimensions, where n is the number of factors to be optim- ized and m is an arbitrary integer greater than 1. The response at each vertex of this figure is then evaluated, and the n best vertices and the worst vertex retained. These are then used to form the actual starting simplex for the simplex algorithm. In two dimensions this pre- liminary figure might be an equilateral pentagon. Nor- mally the two best vertices will be adjacent vertices and the worst vertex will be opposite the face formed by the two best vertices. When the two next worse vertices are discarded, the remaining figure is a triangle elongated in the direction of the optimum. Thus the simplex can be moved rapidly toward the optimum on the first move. Often the region in which the simplex starts is the noisiest section of the response surface that it will have to traverse. Thus, it is critical to move it rapidly in the correct direction, so that the simplex does not fall prey to its natural statistical tendency to contract pre- maturely in the presence of noise in the response. The temptation to retain more than n+1 vertices in the working simplex should be restrained, since increasing the number of vertices will make the simplex move more sluggishly over the response surface. REFERENCES 3. 10. 11. 12. 13. 1A. 15. 16. 17. 18. References A. Walsh, Australian Patent No. 230Al (1953). A. Walsh, Spectrochem. Acta, 1, 108 (1955). C. T. J. Alkemade and J. M. W. Milatz, Appl. Sci. Res. 32. 289 (1955). C. T. J. Alkemade and J. M. W. Milatz, J. Opt. SOC. Am": _A_5_, 583 (1955). W. H. Wollaston, Phil. Trans. Roy. Soc. London, Ser A, 23, 365 (1802). T. T. Woodson, Rev. Sci. Instr., AA, 308 (1939). B. V. Lvov, Spectrochim. Acta., 11, 761 (1961). R. Woodriff and G. Ramelow, Spectrochim. Acta., 23B, 665 (1968). — R. Woodriff and R. Stone, Appl. Optics, 1, 1337 (1968). R. Woodriff, R. W. Stone, and A. M. Held, Appl. Spec- trosc., 22, A08 (1968). R. Woodriff, B. R. Culver, and K. W. Olsen, Appl. Spectrosc., EA, 530 (1970). R. Woodriff and D. Shrader, Anal. Chem., AA, 1918 (1971). G. K. Pagenkopf, D. R. Neuman, and R. Woodriff, Anal. Chem., AA, 22A8 (1972). R. Woodriff, B. R. Culver, D. Shrader, and A. B. Super, Anal. Chem., A5, 230 (1953). H. Massmann, Spectrochim. Acta., 23B, 215 (1968). H. Massmann, in Flame Emission and Atomic Absorption Spectrometry, Vol. 2, J. A. Dean and T. C. Rains, Eds., Marcel Dekker, New York, 1971. Perkin-Elmer Corporation, Instrument News, AA, A (1970). H. L. Kahn and S. Slavin, A. A. Newsletter, 19, 125 (1971). 16A 19. 20. 21. 22. 23. 2A. 25. 26. 27. 28. 29. 30. 31. 32. 33. 3A. 35. 36. 37. 165 Perkin-Elmer Corporation, Analytical Methods for Atomic Absorption Spectroscopy Using the HGA Graphite Furnace, Norwalk, Conn., March 1973. T. S. West, and X. K. Williams, Anal. Chim. Acta., A5, 27 (1969)- R. G. Anderson, I. S. Maines, and T. S. West, Anal. Chim. Acta, 5;, 355 (1970). J. F. Alder and T. S. West, Anal. Chim. Acta, 5;, 365 (1970). K. W. Jackson, T. S. West, and L. Balchin, Anal. Chem., 35. 2A9 (1973). A. Montaser and S. R. Crouch, 25th Pittsburgh Conf. Anal. Chem. Appl. Spectrosc., Papers 199 and 116 (197A). A. Montaser, S. R. Goode, and S. R. Crouch, Anal. Chem., .36. 599 (197A). A. Montaser and S. R. Crouch, Anal. Chem., A6, 1817 (197“)- A. Montaser and S. R. Crouch, Anal. Chem., Al, 38 (1975). D. N. Baxter, Ph.D. Thesis, Michigan State University, East Lansing, MI, 1977. A. Montaser, Ph.D. Thesis, Michigan State University, East Lansing, MI, 197A. S. Augusta, CRC Crit. Rev. Anal. Chem., A, 155 (197A). E. P. Box, Biometrics, lg, 16 (195A). . E. P. Box and K. B. Wilson, J. Roy. Statist. Soc. -. 1;. l (1951). G G B G. E. P. Box, Appl. Statisc., g, 81 (1957). C. W. Lowe, Trans. Instr. Chem. Engrs., Ag, T33A (196A). W . Spendley, G. R. Hext, and F. R. Hinsworth, Techno- metrics, A, AAl (1962). J. A. Nelder and R. Mead, Computer J., l, 308 (1965). M. W. Routh, P. A. Schwartz, and M. B. Denton, Anal. Chem., Ag, 1u22 (1977). 166 38. K. w. Lam, Clin. Chem., g;, 89 (1977). 39. D. J. Legget, Anal. Chem., A9, 276 (1977). A0. J. K. Haken, M. S. Wainwright, and R. J. Smith, J. Chromat., 133, l (1977). Al. E. Baumgarten, F. Weinstrauch and H. Hoffkes, J. Chromat., A2. G. L. Ritter, S. R. Lowry, C. L. Wilkins, and T. L. Isenhour, Anal. Chem., A1, 1951 (1975). A3. T. R. Brunner, C. L. Wilkins, T. F. Lam, L. J. Soltz— berg, and S. L. Kaberline, Anal. Chem., A8, llA6 (1976). AA. D. E. Long, Anal. Chim. Acta, AA, 193 (1969). A5. S. N. Deming and S. L. Morgan, Anal. Chem., A5, 278A A6. S. N. Deming and P. G. King, Research/Development, g5, 22 (197A). A7. S. L. Morgan and S. N. Deming, Anal. Chem., A6, 1170 (197“). T" A8. P. G. King, S. N. Deming, and S. L. Morgan, Anal. Lett., 8. 369 (1975). A9. M. J. Holue, D. E. Long, and D. Smette, Anal. Lett., 50. F. P. Czech, J. Ass. Offic. Anal. Chem., 5g, 1A89 (1973). 51. F. P. Czech, J. Ass. Offic. Anal. Chem., 5Q, 1A96 (1973). 52. L. R. Parker, Jr., S. L. Morgan, and S. N. Deming, Appl. Spectrosc., g2, A29 (1975). 53. R. D. Krause and J. A. Lott, Clin. Chem., 29, 775 (197A). 5A. W. K. Dean, K. J. Heald, and S. N. Deming, Science, 189, 805 (1975). 55. F. Darvas, J. Med. Chem., AZ, 799 (197A). 56. D. E. Fonner, J. R. Buck, and G. S. Banker, J. Pharm. Sci., g2, 1587 (1970). 57. 58. 59. 60. 61. 62. 63. 6A. 65. 66. 67. 68. 69. 70. 71. 72. 73. 7A. 75. 167 W. E. Rippetoe, E. R. Johnson, and T. J. Vickers, Anal. Chem., A1, A36 (1975). R. R. Ernst, Rev. Sci. Instr., 9, 998 (1968). E. R. Johnson, C. K. Mann, and T. J. Vickers, Appl. Spectrosc., 59, A15 (1976). P. G. King, Ph.D. Thesis, Emory University, Atlanta (197A). O. V. Thomas, L. Kryger, and S. P. Perone, Anal. Chem., fig. 761 (1976). M. W. Routh, P. A. Swartz, and M. B. Denton, Anal. Chem. 39. 1A22 (1977). E. R. Johnson, Ph.D. Thesis, Florida State University, Tallahassee, Florida (1975). K. M. Cellier, and H. C. T. Stace, Appl. Spectrosc., g9, 26 (1966). M. L. Parsons and J. D. Winfordner, Appl. Spectrosc., N. V. Mossholder, V. A. Fassel, and R. N. Knisley, Anal. Chem., A5, 161A (1973). J. L. Malakoff, J. Ramirez-Munoz. and A. Scott, Anal. Chim. Acta, 33) 515 (1968). S. R. Crouch, D. N. Baxter, E. H. Pals, and E. R. John- son, Anal. Chem., 59, 291A (1978). Digital Equipment Corp., OS/8 Handbook, Maynard, Mass. Digital Equipment Corp., 197A, Chapter 8 S. P. Keller and J. F. Eagleston, J. Chem. Ed., A5, 317 (1971). E. C. Toren, Jr., R. N. Carrey. A. E. Sherry, and J. E. Davis, Anal. Chem., AA, 339 (1972). H. E. Keller, G. E. Courtois, and J. E. Keller, Chem. Instr., A, 269 (1972). G. S. Cembrowski, D. B. Cottrel, and E. C. Torren, Computers and Chemistry, A, A5 (1975). R. E. Dessy, Anal. Chem., 32, llOAA (1977). L. A. Leventhal, Killobaud, ll, 2A (1977). 76. 77. 78. 79. 80. 81. 82. 83. 8A. 85. 86. 168 F. J. M. Massen, F. D. Posma, J. Balke, Anal. Chem., 56. 114145 (1971:). V. Sacchetti, G. Tessari, and G. Torsi, Anal. Chem., 39, 1175 (1976). C. J. Molnar and J. D. Winfordner, Anal. Chem., A5, 1807 (197A). S. R. Goode, A. Montaser, and S. R. Crouch, Appl. SpeC-. 21. 335 (1973). S. R. Crouch, A. Montaser, and S. R. Goode, in "In- formation Chemistry: Assisted Chemical Research Design", (8. Fujiwara and H. B. Mark, eds.), University of Tokyo Press, Tokyo, 1975, pp. 107-12A. "Sigma Stepping Motor Handbook", (Sigma Instruments, eds.), Braintree, Mass., 1972. R. G. Anderson, I. S. Maines, and T. S. West, Anal. Chim. Acta, 5;, 355 (1970). D. N. Baxter, E. H. Pals, E. R. Johnson, and S. R. Crouch, 27th Pittsburgh Conf. Anal. Chem. Appl. Spectrosc., Paper 169, Cleveland, OH, March 1976. R. D. Reeves, B. M. Patel, C. J. Molnar, and J. D. Winefordner, Anal. Chem., A5, 2AA6 (1973). M. D. Joseph and E. R. Johnson, unpublished program, 1977. J. T. Gano, E. H. Pals, and S. R. Crouch, Current Research (1978). APPENDIX A Selected Program Listings 169 GOOnOOOOOOOOOOOGOOOOOOO0000000 170 ' PROGRAM FUNCTION: MAIN PROGRAM FOR GBA EXPERIMENTS MODIFIED TO ALLOW SIMPLEX OPTIMIZATIONS PROGRAMMER: E. R. PALS VERSION: *IAPI (2.03) (3.01) DATE: 10/10/76 (12/31/76) (Ell/77) FILENAME: EPMAIN.F4 (EPMNV2.F4) (EPMNSZ.F4) LOADING INSTRUCTIONS: MUST BE LOADED INTO OVERLAY ZERO. NOTE: FURTHER INFORMATION IS AVAILABLE IN THE FORM OF A HELP FILE. CHANGES VERSION 2.01: 1. DATA AND CALC ARE COMBINED INTO ONE PROGRAM. “2. COMMON VARIABLE DEFINITIONS ARE UPDATED. 3. ADD OPTION OF USER SUBROUTINE THREE CHANGES VERSION 2.02: l. SWITCH REGISTER OPTION FOR PLOTTING IS ADDED CHANCES VERSION 2.03: 1. GBA SWITCH REGISTER.OPTION 4 IS USED TO FORCE CALL TO PLOT. , CHANGES VERSION 3.0!: I. MODIFIED TO ALLOW SIMPLEX OPTIMIZATIONS. . ~-——.— OOOOO000000000063000OOOOOOOOOOO 171 PROGRAM FUNCTION: MAIN PROGRAM FOR GBA EXPERIMENTS MODIFIED TO ALLOW SIMPLEX OPTIMIZATTONS PROGRAMMER: E. H. PALS VERSION: *lA-I (2.03) (3.01) DATE: 10/10/76 ( 12/31/76) (fill/77) FILENAME: EPMAIN. F4 ( EPMNVZ. F4) ( EPMNS2. F4) LOADING INSTRUCTIONS: MUST BE LOADED INTO OVERLAY ZERO. NOTE: FURTHER INFORMATION IS AVAILABLE IN THE FORM OF A HELP FILE. CHANGES VERSION 2.01: 1. DATA AND CALC ARE COMBINED INTO ONE PROGRAM. 0 2. COMMON VARIABLE DEFINITIONS ARE UPDATED. 3. ADD OPTION OF USER SUBROUTINE THREE CHANGES VERSION 2.02: 1. SWITCH REGISTER OPTION FOR PLO'ITING IS ADDED CHANGES VERSION 2.03: 1. GBA SWITCH REGISTER OPTION 4 IS USED TO FORCE CALL TO PLOT. CHANGES VERSION 3.01: 1. MODIFIED TO ALLOW SIMPLEX OPTIMIZATIONS. 0000000000000OOOOOOOOOOOOOOOOfiOO 172 METHOD : I. 5. 6. CALL INPUT- THIS ROUTINE ALLOWS INITIALIZATION OF INSTRUMENT PATAMETERS. THE ROUTINE WILL NOT ALLOW EXIT UNLESS: ALL PARAMETERS ATE WITHIN LEGAL LIMITS. A DARK CURRENT VALUE HAS BEEN TAKEN THE SAMPLER AND POSITIONER INITAILIZED. IT ALSO STARTS TE REAL TIME CLOCK. CALL FLOW- THIS ROUTINE HANDLES CHANGING THE POSITION AND SAMPLE SPECIFICATIONS. WHEN AN ASSIGNED TASK HAS BEEN COMPLETED THE OPERATOR MAY ENTER COMMENTS AND CLOSE THE FILE. EXIT MAY BE BACK TO MAIN WITH INSTRUCTIONS TO GO EITHER TO THE DATA TAKING ROUTINE OR TO TO GBA MONITOR( SUBROUTINE INPUT). CALL DATA- THIS PROGRAM EXECUTES CALLS TO POS.SAMPD.DACo ADC. AND CLOCK ROUTINES TO ACQUIRE READINGS OF 100”. SIGNAL ATTENUATED BY SAMPLE. AND BACKGROUND EMMISION OF GBA. THE ABSORBANCE RESULTS ATE THEN CALCULATED. THE DATA MAY THEN BE PACKED TO PASS TO THE PLOT ROUTINE. 0R WRITTEN ON ONE OR BOTH OF TWO OUTPUT FILES. AND/0R OUTPUT TO THE LINE PRINTER. (COMBINES FUNCTIONS OF VERSION 1 PROGRAMS DATA AND CALC) IF REQUESTED CALL SUBTHR- THIS IS AN OPTIONAL USER SUBROUTINE. IT IS NOT NECESSARY FOR CORRECT PROGRAM EXECUTION AND IF IT IS NOT REQUESTED IT NEED NOT BE LOADED INTO THE LOAD MODULE. IF REQUESTED CALL PLOT AND PLOT THE RESULTS ON THE ADDS AND/OR THE LINEPRINTER. RETURN TO STEP2 TO FIND OUT IF TASK IS FINISHED. ODD Cit-0 0 IO 0 06300 173 PROGRAM MAIN EXECUTABLE CODE FOLLOWS COI’H‘ION CC’I‘L‘ION COIU‘ION COI‘ZTICI COPE-ION COIZI’JN COI‘II‘IOI‘I C OPE-ION CO 13202"? COILT ION PLTI'.LPT.RAD.I{DF.WAIT. DEST.ASHT.ATMT.DELT. DESP ASIIP , ATI‘ZP , SCAN . VER. BOR, VERI . HORI . VEPL. HORL NI‘ISCAN . NINIRUN , SAM? . SAMPSZ FIRSTI . ISAIIC, NSCANJ-EPOS, VPOS. IRUN. ISAI'IP AI'INT. ISAI‘ICA.TAG. XIOIDK.XIDK FREQ, INTST. INTSP /A/ ISAI‘IPL( 4-0) . NRUN, IGOTO /B/DATAI( 100) . DATX‘2( 100) , AKIN, AMAX, IDIR /CBLI{/IIODEI . SUB! . SUB2. F ILEl . F ILE2. DARKT.P INIT.SINIT.SU'33 / [DEB/ITER. VIN IT( 5 . 4) , PM. ISVAR( 4) , ITYPE. LSI‘IP. KRUN LOGICAL PLTT.LPT,RAD.HDF,WAIT.SCAN,SA1‘ZP.FIRST1.SUB3.LSIZ? IS'GIN BY CALLING INPUT TO SET UP PARAIETEPS CALL INPUT II W CALL SII-IPLEX FROG IF( .NOT.LSIIP) GO TO 2 III-LII IF OPTIMIZATION PqEQUESTED CALL SMXOPT GO T01 NOW CALL FLOWS- IS THE TASK FINISHED. WHAT IS TO BE DONE NEXT? CALL FLOW CO TO(1.1,3).ICOTO CALL DATA EXERCISE THE HARDWARE ALSO. CALCULATE THE RE ULTS CALL DATA IF REQUESTED GO TO USER PROGRAM IN LEVEL ONE IF(SUBG) CALL SUBTHR IF REQUESTED PLOT THE RESULTS IF(PLTT.OR.(SWITCH(4.).EQ.1.)) CALL POT CO T02 END DO00000000COOCOCOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO??O??O?O??OO VER: 1714 BLOCK DATA SUBROUTINE TO INITIALIZE COMMON FOR GBA PROGRAMMER: E. H. PAIS 2.10 COMMENTS: AS VARIABLES ARE ADDEI) TO COMMON THIS PROGRAM MUST BE UP DATED PER PAGE 8-119 OS/B MANUAL. LOADING REQUIREMENTS: THIS SUBPROGRAM MUST BE LOADED IN LEVEL ZERO AND CANNOT BE MADE PART OF A LIBRARY. VARIABLE DESCRIPTION : PLTT- LPT- RAD- HDF- WA I T- FIRSTI- SCAN- SAMP- SUB 1- sm- SUB3- F ILEI- FILE2- . DABKT— PINIT‘- SINIT- DEST- DESP- ASHT- ASHP- ATMT- ATMP- VER- HOR- VPOS- HPOS- VERI -' HORI - VERL- HORL- SAMPSZ- LOG I CAL VARI ABLES- PLOT RESULTS OUTPUT RESULTS TO LINE PRINTER USE RADIATION PROGRAMING (VS. POWER PROG.) DURING ATOMIZATION STEP USE HYDROGEN DIFFUSION FLAME DURING ATOMIZATION PAUSE AFTER PLOTI'ING TO ALLOW DATA INSPECTION OF MANUAL DELIVERY FO SAMPLE USED TO INDICATE TO FLOW WHETHER INITIALIZATION OF VARIABLES IS NECESSARY A ONE OR TWO DIMENSIONAL SCAN IS REQUESTED USE OF THE AUTO SAMPLER FOR SAMPLE DELIVERY IS REQUESTED CALL USER SUBROUTINE ONE FROM DATA BEFORE CALCULATING RESULTS CALL USER SUBROUTINE TWO FROM DATA AFTER CALCULATING RESULTS CALL USER SUBROUTINE SUBTHR FROM MAIN AFTER RETURNING FROM DATA WRITE INTEGRATED ABSORBANCE. ETC. TO FILE SPECIFIED AS DEVICE 5 TO FRTS WRITE BACKGROUND CORRECTED ABSORBANCE FOR EACH DATA POINT TAKEN DARK CURRENT VALUE HAS BEEN TAKEN POSITIONER HAS BEEN INITIALIZED SAMPLER HAS BEEN INITIALIZED ’REAL VARIABLES- ' DELT- DELAY TIME BETWEEN SAMPLE "RUNS (SESJ 'DESOLVATION TIME (S) DESOLVATION POWER ( VOLTS FROM DAC OUTPUT) ASH TIME (S) ASH POWER (V) ATOMIZATION TIME(S) ATOMIZATION POWER( V) INITIAL VERTICAL POSITION (MM) INITIAL HORIZONTAL POSITION (MM) LAST (PRESENT) HORIZONTAL POSITION (MM) LAST (PRESENT) VERTICAL POSITION (MM) WHEN SCANNING DISTANCE THAT VERTICAL POSITION ‘IS INCREMENTED (MID AS ABOVE FOR THE VERTICAL POSITION (MM) MOST EXTREME LEGAL VERTICAL POSITION IN A GIVEN SCAN (MM) MOST EXTREME LEGAL HORIZONTAL POSITION IN A GIVEN SCAN (MM) VARIABLE USED TO INDICATE SAMPLE SIZE WHEN USING MANUAL SAMPLE DEPOSITION DOOOOOOOOOOOOOOOOOOOODDOOOOOOOOOOOOOOOOOOO00000000000 I NT‘SP- 175 AMNT- AMOUNT PT SAMPLE DELIVERED BY AUTOSAMPLER (UL) XIDK- AVERAGE OF 100 DARK CURRENT READINGS (0-4095) XIOIDK- AVERAGE OF 100 READINGS OF 100%T READONGS ABSINT- INTEGRATED ABSORBANCE FOR A SAMPLE RUN ' FREQ- DATA ACQUISITION RATE (HZ) AMIN- MINIMUM ABSORBANCE READING IN A PARTICULAR SAMPLE RUN AMAX- MAXIMUM ABSORBANCE IN A PARTICULAR SAMPLE RUN DATA1- ARRAY CONTAINS 100 TIME REPRESENTATIVE VALUES FOR THE SAMPLE ATTENUATED TRANSMITTANCES DATA2- ARRAY CONTAINS 100 BACKGROUND TRANSMITTANCES TAGI- CONTAINS A2 FORMAT TAG FOR DATA OUTPUT STAT'MENTS INTEGER VARIABLES- NMSCAN- NUMBER OF SCANS REQUESTED NSCAN- NUMBER OF SCANS COMPLETED NMRUN- NUMBER OF RUNS REQUESTED NRUN- NUMBER OF RUNS COMPLETED ISAMC- SAMPLE SPECIFICATION PRESENTLY BEING EXECUTED IRUN- NUMBER OF RUNS REQUESTED FOR A PARTICULAR SAMPLE NUMBER AND AMOUNT ISAMCA- NUMBER OF SAMPLE DELIVERIES COMPLETED ON THE PRESENT SAMPLE SPECIFICATION ISAMP- SAMPLE CUP NUMBER FROM AUTOSAMPLER THAT WAS REQUESTED IGOTO- CONTROLS PROGRAM FLOW IN MAIN UPON RETURN FROM SUBROUTINE IDIR- GIVES THE DIRECTION (POSITIVE OR NEGATIVE) OF THE LAST HORIZONTAL MOVE ISAMPL- ARRAY CONTAINS SAMPLER SPECIFICATION WORDS EACH OF WHICH IS A CODED AND PACKED WORD WHICH INDICATES THE SAMPLE NUMBER. AMOUNT. AND NUMBER OF DELIVERIES REQUESTED MODE- INDICATES DEVICE FROM WHICH INSTRUCTIONS ARE .TO BE READ 0= ADDS TERMINAL 4-: DEVICE (FILE) SPECIFIED AS NUMBER 4 TO FRTS SIMPLEX VARIABLES- LSMP- LOGICAL VARIABLE INDICATES SIMPLEX MODE OF OPERATION IT'YPE- INDICATFS MDE OF CALCULATING RESPONSE ISXVAR- INTEGER ARRAY WHICH CONTAINS THE NUMBERS WHICH RELATE'TO WHICH VARIABLES ARE TO BE OPTIMIZED. IDEM- DIMENSIONALITY OF THE SPACE (NO. OF FACTORS) V(I.J)- VALUE OF FACTOR J AT VERTEX I ALIM(3.J)- LOWER UPPER LIMITS. PRECISSION IN EACH-FACTOR J IRET(I)- NO. OF MOVES VERTEX I HAS BEEN RETAINED IMV- TYPE OF MOVE IWRST- INDEX OF NEW WORST POINT INTST- NUMBER OF POINT WHERE INTEGRATION STARTS NUMBER OF T'HE POINT WHERE INTEGRATION STOPS 176 BLOCK DATA VARIABLES USED BY‘MANY OF THE ROUTINES ARE IN BLANK COMMON; COMMON PLTT.LPT,RAD.HDF.WAIT,DEST.ASHT.ATMT{DELT.DESP COMMON ASHP.ATMP,SCAN.VER.HOR.VERI.HORI.VERL.HORL COMMON NMSCAN,NMRUN.SAMP.TAGI COMMON FIRSTI.ISAMO.NSCAN.HPOS.VPOS.IRUN.ISAMP COMMON AMNT. ISAMCA,ABSINT.XIOIDK.XIDK COMMON FREQ.INTST.INTSP COMMON /A/ISAMPL(40).NRUN.IGOTO COMMON /B/DATA1(IOO),DATA2(I00).AMIN.AMAX.IDIR COMMON /CBLK/MODE,SUBI.SUB2,FILE1.FILE2.DARKT,PINIT}SINIT,SUB3 COMMON /SPBLK/SP1.SP2.SP3,SP4,SP5,SP6 COMMON IISIM/ IDIM.V(5.4).Rlfi).ALIM(3.4).IRET(5).IMV.IWRST COMMON /IDEB/ITER4VINIT(5.4).PM.ISXVAR(4).ITYPE.LSMP.KRUN.IL DATA AMNT/1.0/ DATA MODE/OI DECLARE LOGICAL VARIABLES AND INITIALIZE OPTIONS LOGICAL PLTT,LPT.RAD.HDF.WAIT,SCAN.SAMP.FIRSTI.FILE LOGICAL SUB!.SUBZ.FILEI.FILE2,DARKT,PINIT,SINIT.SUB3.LSMP DATA PLTT.LPT.RAD.HDF.WAIT.SCAN.SAMP/l.l.1.0.0.0.0/ DATA FIRSTl,SINIT.SUB3/l,0.0/ DATA SUB!.SUB2.FILE1.FILE2,DARKT.PINIT.LSMP/0.0.0.0.0.0.0/ INITIALIZE HEATING TIME PERIODS DATA DEST.ASHT,ATMT,DELTVIO.,10...5,10./ INTIALIZE POWERS DATA DESP.ASHP,ATMP/.25,.25.].0/ INITIALIZE SCAN PARAMETERS DATA VER.HOR.VERI.HORI.VERL.HORL/l.,0.,1..l.,12.,4./ DATA NMRUN.NMSCAN/I.l/ INITAILIZE DATA TAKING FREQUENCY'TO 200 HZ ~DATA FREQ.ABSINT/200..O./ INITIALIZE OTHER VARIABLES .DATA VPOS.HPOS,NRUN.ISAMP.AMNT70.,O.,1.I.2./ (DATA INTST.INTSP/I.50/ DATA IGOTO/S/ DATA SP1,SP2,SP3.SP4,SP5,SP6/6*O./ DATA TAGI/'DA’/ END OOOOOOOOOOOOOOOOOOOOOOOOOOOOO0000000000000OOOOOOOOODOOOOOOOOONDOOO 177 'PROGRAM.NAME: SUBROUTINE INPUT VER: 3.01 PROGRAMMER: E. H. PALS CHEMISTRY DEPT., MSU E. LANSING. MICH 48824 CALLING FORM: CALL INPUT CALLING REQUIREMENTS: ALL GBA VARIABLES MUST BE STORED IN COMMON AND THE INITIAL VALUES DEFINED IN THE BLOCK DATA SUBROUTINE. .LOADING REQUIREMENTS: MUST BE LOADED IN LEVEL 1. ‘EXTERNAL ROUTINES: EPLIMT.ANYCHRWEPBKV2.EPSAP,EPSAMP EPPOS,CLOCK.EPDAC,EPSPV2.EPDARKrEPADC EPADBM,EPPOSD,EPSAPD,PARINS VARIABLE DESCRIPTION: SEE PROGRAM MAIN AND BLOCK DATA SUBROUHTNE PURPOSE: THIS SUBROUTINE IS ENTERED WITH A DEFAULT SET OF PARAMETERS WHICH MAY BE CHANGED AS DESIRED BY SETS OF COMMANDS 2 TO 6 CHARACHTERS IN LENGTH. SOME OF WHICH REQUIRE A NUMERICAL ARGUMENT. UPON COMPLETION CONTROL IS PASSED BACK TO THE MAIN PROGRAM. A MORE COMPLETE DESCRITION OF THE COMMAND SET FOLLOWS. CHANGES VERSION 31D: 1. COMMON DEFINITIONS ARE CHANGED TO COINCIDE WITH THE COMMON DEFINITIONS IN THE OTHER SUBROUTINES. 2. COMMANDS ARE ADDED WHICH CAUSE THE SAMPLER To BE INITAILIZED. 3. INPUT SPECIFICATIONS FOR.SAMPLER.DELIVERY ACTIONS MAY NOW BE ENTERED. 4. THE REAL TIME CLOCK IS STARTED IN THIS ROUTINE BEFORE EXITING. 5. *xxNOTE*** NOT ALL THE COMMAND STRING DOCUMENTAION AND HELP COMMAND LISTINGS HAVE BEEN BROUGHT UP TO DATE (IO/11/76). CHANGES *IE: I. CHANGE ISAMPL To SAPINT SUB NAME 2. CORRECT TYPING ERRORS CHANGES VERSION: 2. 01 I. COMMANDS ADDED TO TAKE THE PLACE OF FILE,SETUP SUBROUTINE. .2. ADDED COMMANDS TO ALLOW BATCH STREAMING OF INPUT SPECIFICATIONS. ‘3. ADDED COMMANDS TO ALLOW'EXECUTION OF TWO USER.SUBROUINES. 4. ADDED COMMAND TO ALLOW OUTPUT OF COMMENT TO LINE.PRINTER. CHANGES VERSION 2.02: I. BATCH MODE COMMAND ERROR CAUSES MODE TO GO TO LOCAL 2. DATE AND PROGRAM VERSION NUMBER.ADDED TO OUTPUT FILES CHANGES VERSIONS 2.03 AND 2.04: I. FILE OUTPUT FORMS ARE MODIFIED CHANGES VERSION 2.06: I. MODIFIED TO READ GBA SWITCH REGISTER NOT COMPUTER.SW'REG. CHANGES VERSION 2.07: 1. FILE OUTPUT STRUCTURE CHANGED TO SHAPE 810013.6 2. BACKGROUND RUN DESOLVATE,DELAY STEPS MODIFIED CHANGES VERSION 2.09: 1. LIMIT CHECKS MOVED TO FLOW'ROUTINE FROM INPUT. OOOOQOOOOOOOOOOO00000000000OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO 178 CHANGES VERSION 2.10: I. COMMAND MSG AND / ADDED TO FACILITATE BATCH STREAM OPERATION 2. COMMAND TO CHANGE FILE DATA TAG ADDED CHANGES VERSION 3.0]: I. EXPANDED TO INCLUDE SIMPLEX ROUTINES. METHOD : I. PICK UP THE CURRENT DATE FROM THE SYSTEM 2. ISSUE A PROMPT AND RING TERMINAL BELL 3. READ A COMMAND STRING IN A6 FORMAT AND STORE AS VARIABLE 'ARG' 4. IF IN BATCH MODE ECHO COMMAND TO ADDS TERMINAL 5. CHECK ARG VERSUS EACH INDIVIDUAL COMMAND POSSIBLE. ARG EQUALS A LEGAL COMMAND? . YES- EXECUTE THE REQUESTED TASKIOR.TASKS. GO TO 6 NO- ECHO A QUESTION MARK.AND THE ARC. GO TO 2 6. WAS ARG THE GO COMMAND? NO- GO TO 2 YES- A. IS THERE A PARAMETER LIMIT VIOLATION? NO- GO TO B YES- PRINT ERROR MESSAGE. GO TO 2 B. HAVE POSITONER. DARK CURRENT. AND AUTOSAMPLER BEEN INITIALIZED? NO- PRINT ERROR MESSAGE GO TO 2 YES- GO TO C C. SCANNING? NO- SET VARIABLES SO THAT FLOW’RECOGNIZES NOT SCANNING YES- GO TO D D. PRINT LINE PRINTER.HEADING IF REQUESTED (LPT) E. SET CLOCK RATE AND CLEAR TIME TO 0 SEC F. WAIT FOR POSITIONER TO REACH DESTINATION ‘THEN SEND TO SAMPLE DELIVERY POSITION G. SET FIRST CALL INDICATOR TO TRUE F. RETURN TO MAIN COMMAND DESCRIPTION: THERE ARE THREE TYPES OF COMMANDS. 'THE 'SPECIAL COMMANDS" CAUSE AN IMMEDIATE EXECUTION OF SOME FUNCTION BUT DO NOT CHANGE ANY VARIABLE VALUES. THE 'CHANGE OF OPTION' COMMANDS SET THE VALUE OF A LOGICAL VARIABLE TO .TRUE. OR .FALSE.. ‘THE I'CHANGE NUMERICAL ARGUMENT' COMMANDS WHEN CALLED IMMEDIATELY REQUEST A NEW VALUE FOR THE VARIABLE WHICH IS IMPLIED IN THE COMMAND. THESE COMMANDS -§HOULD BE TYPED FOLLOWED BY A CARRIAGE RETURN. AT THIS TIME GBA MONITOR.SHOULD RESPOND WITH A ' = ' AND THE NEW VALUE OF THE VARIABLE MAY BE ENTERED. SPECIAL COMMANDS- .GO BEGIN EXECUTION WTTH PRESENT ARGUMENT VALUES. .RS RESTART INTERRUPTED TASK -NO VARIABLE INITIALIZATTON .HL GIVE PRESENT STATUS OF ALL VARIABLES .HLTIME GIVE HEATING TIMES .HLPWR GIVE HEATING POWERS .HLOPT GIVE STATUS PROGRAMMING OPTIONS .HLSCAN GIVE SCAN VARIABLES STATUS . .HLCOM GIVE LIST OF ALL GBA MONITOR COMMANDS .HLLPT GIVE STATUS OF ALL VARIABLES ON THE LINE PRINTER .HLPOS GIVE STATUS OF POSITION VARIABLES .HLRUN GIVE TOTAL NUMBER OF RUNS REQUIRED FOR COMPLETION mines or OPTION comps- . PLT PLOT on ADDS .NPLT no nor PLOT on ADDS 000000000000 96 I" 00000000000000000000000000000000002000000000000000000 179 OUTPUT DATA TO LINE PRINTER DO NOT OUTPUT DATA TO THE LINE PRINTER USE RADIATION PROGRAMMING FOR ATOMIZATION USE POWER PROGRAMMING FOR ALL HEATING STEPS USE HYDROGEN DIFFUSION FLAME DO NOT USE HYDROGEN DIFFUSION FLAME WAIT AFTER EACH COMPLETE RUN FOR OPERATOR INTERVENTION DO NOT WAIT: GO TO NEXT RUN IMMEDIATELY ALLOW SCANNING DO NOT ALLOW SCANNING USE AUTO SAMPLER DO NOT USE AUTO SAMPLER CHANGE OF NUMERICAL ARGUMMENT COMMANDS- . DEST . ASHT . ATMT . DELT . DESP . ASHP . ATMP . VER . HOR . VERI . HORI O VEMJ . HORL . NMRUN . NMSCAN .TIT'LE .AMNT CHANGE THE DESOLVATE TIME TO THE NEXT VALUE .ENT'ERED CHANGE THE ASH TIME TO THE NEXT VALUE ENTERED CHANGE THE ATOMIZE TIME TO THE NEXT VALUE ENTERED CHANGE THE DELAY TIME TO THE NEXT VALUE ENTERED CHANGE THE DESOLVATE POWER TO THE NEXT VALUE ENTERED CHANGE THE ASH POWER CHANGE THE ATOMIZE POWER CHANGE THE VERTICAL STARTING POSITION CHANGE THE HORIZONTAL STARTING POSTION CHANGE THE VERTICAL INCREMENT CHANGE THE HORIZONTAL INCREMENT CHANGE THE VERTICAL LIMIT CHANGE THE HORIZONTAL LIMIT CHANGE NUMBER OF RUNS PER POSITION CHANGE NUMBER OF SCANS READ IN 72 CHARACHTERS OF EXPERIMENT ID CHANGE THE SAMPLE SIZE *NOTES ON ADDING COMMANDS I. THE COMMAND MUST BE 6 CHARACTERS OR. LESS 2. DECIDE WHAT TYPE OF COMMAND IT IS: A. SPECAIL I- REQUIRES MORE THAN ONE EXECUTEABLE COMMAND. BUT DOES NOT CHANGE THE VALUE OF A VARIELE B. SPECAIL 2- LIKE A. BUT ONLY ONE EXECUTEABLE COMMAND C. LOGICAL- CHANGES A LOGIC VARIABLE'S VALUE D. NUMERICAL- CHANGES VALUE OF NUMERICAL VARIABLE 3. INSERT PROPER CODE AT POINTS MARKED C*SI.C*S2.C*N. OR C*L DEPENDING ON WHAT TYPE OF COMMAND IS TO BE INSERTED USE THE EXAMPLE OF A SIMILIAR TYPE OF COMMAND TO DETERMINE THE EXACT CODE TO BE INSERTED. 4. IF A NUMERICAL OR LOGICAL COMMAND IS INSERTED YOU MUST ALSO UPDATE THE COMMON.LOGICAL. AND DATA STATEMENTS OF THE AFFECTED PROGRAM SUCH AS MAIN AND EPBKDT.F4. ADDITIONAL COMMANDS VERSION *IE AND VERSION 2.0! .REWIND SET INPUT SPECIFICATION FILE BACK TO BEGINNING . LOCAL . BATCH . USEI . USE2 . NUSEI . NUSE2 . OPEN I . OPEN2 .CLOSEI SET MODE SWITCH TO READ FROM ADDS TERMINAL SET MODE SWITCH TO READ FROM INPUT BATCH STREAM FILE SET TO CALL USER SUBROUTINE FROM DATA TAKING PROGRAM SET TO CALL USER SUBROUTINE FROM CALCULATION SUBROUTINE DISREGARD USER SUBROUTINE I DISREGARD USER SUBROUTINE 2 SET TO OUTPUT INTEGRATED ABSORBANCE DATA TO FILE! SET TO OUTPUT PEAK SHAPE RAW DATA TO FILE2 WRITE END FILE IN FILEI AND PREVENT FUTHER WRITING ATTEMPTS 000000000000000000000000000000 .CLOSE2 .HDLPT 180 AS ABOVE FOR.FIEE2 SET TO READ FROM KEYBOARD AND OUTPUT COMMENT TO LINE PRINTER .HEADI AND HEAD2 READ FROM KEYBORARD OUTPUT TO FILE .COMI AND COM2 READ FROM.KEYBOARD OUTPUT TO SPECIFIED FILE .EXIT .DARK .BURN .PSIN .SPIN .POSDEM .SAMPDM .TUNE .PARM .FLI .NFL2 RETURN TO KEYBOARD MONITOR.ENTER FILES IN DIRECTORY TAKE 100 DARK CURRENT READINGS AND RETURN'THE AVERAGE ALLOW TEMPORARY HEATING OF THE BRAID INITIALIZE THE POSITIONER INITIALIZE THE SAMPLER ALLOW USER SECIFIED POSITIONER MOVEMENTS ALLOW USER SPECIFIED SAMPLER ACTIONS ALLOW TUNING OF POSITION OF SAMPLER ABOVE‘THE BRAID OUTPUT INSTRUMENT PARAMETERS TO OPEN OUTPUT FILES ACTIVATE DATA WRITING COMMANDS TO FILE I INACTIVATE DATA WRITING COMMANDS TO FILEI .FL2 AND .NFL2 AS ABOVE BUT FOR FILE 2 .RSBAT .SAMPT .SPI .SP2 .BELL .MSG .TAG RESTART DATA ACQUISTION WHERE INTERRUPTED AND SET MODE TO REMOTE SET TO USE AUTOSAMPLER DELIVERIES BUT DO NOT ASK FOR SAMPLER DELIVERY SPECIFICATIONS SPARE VARIABLE ONE SPARE VARIABLE TWO RINGS TERMINAL BELL REPEATEDLY UNTIL A KEY IS STRUCK. WRITE MESSAGE TO TERMINAL IF IN BATCH MODE CHANGE FILE DATA IDENTIFICATION TAG OUTPUT ADDITIONAL COMMANDS VESION 3.01: 08m .NSMP SET TO SIMPLEX OPTIMAMIZATION MODE TO NOT USE SIMPLEX OPTIMIZATION MODE IO 50 100 105 106 c- 08:8 1 107 199 110 1101 III 112 181 SUBROUTINE INPUT COMMON PLT'I'. LPT.RAD.HDF.WAIT.DEST.ASHT.ATMT.DELT.DEP COMMON ASHP . ATMP . SCAN . VER. HOR. VERI . HORI . VERL. HORL COMMON NMSCAN.NMRUN.SAMP.TAGI COMMON FIRSTI . ISAMC.NSCAN.HPOS.VPOS. IRUN. ISAMP COMMON AMNT. ISAMCA. ABS INT. XIOIDKJIIDK COMMON FREQ. INTST. INTSP COMMON /A/ ISAMPL( 4-0) . NRUN COMMON /CBLK/MODE. SUBI . SUB2.FILEI .FILE2.DARKT.PINIT.STNIT.SUB3 COMMON /SPBLK/SP I . SP2 . SP3 . SP4 . SP5 .SP6 COMMON /IDEB/ITER. VINIT(5.4) .PM. ISXVARI 4) . ITYPE.LSMP.KR. IL COMMON /ISIM/ IDIM.V(5.4) .R( 5) .ALIM(3.4) . IRET( 5) . IMV. IWRST LOGICAL PL'IT. LPT. RAD. HDF. WAIT. SCAN. SAMP.FIRSTI LOGICAL SUBI .SUB2.FILEI .FILE2.DARKT.PINIT.SINIT.SNT.SUB3.LSMP DIMENSION XID( 11) .USR(11) .TYDATA(7) DIMENSION FORMTI(2) .FORMT2(2) DATA KID/’NO TITLE'.9*’ ‘/ DATA USR.FILL/II*' '.1*' '/ DATA FORI'IT'I.FOR.M'12/’(A2.7GIS.6)’.’(A2.IOG13.6)’/ DATA TYDATM'TMAX.HPOS.VPOS.XSAMP.AMNT.AMAX.ABSINT’/ DATA XNUI‘LYNUM/7. .50./ DATA VE/3.0l/ ASSIGN 205 TO ERROR ASSIGN 50 TO START GET PRESENT DATE FROM OS/8 CALL DATE( IM. ID. IY) IY= IY-I9OO W=1. G=O. =-l. FIRSTI= .T. WRITE(0. IO)VE FORMAT(’ GBA VERSION: ’.F6.2) CALL CLOCK( 500) CALL CLTIME BEGIN PROGRAM EXECUTION BY ISSUEING A PROMPT WRITE(0. 100) FORMAT( ' : ’ .0) CALL ANYCHR(7) PICK UP COMMAND STRING - IF IN BATCH MODE ECHO TO TERMINAL READ(MODE.105)ARG IF( MODE.EO..4) WRITE(O.106)ARG FORMAT(A6) FORMAT( ’ ' .A6) ALLOW COMMENTS IN BATCH MODE IF(ARG.EQ.'/’) GO TO START INSERT LONG SPECIAL COMMANDS HERE IO=3 IF (ARG.EQ.5HHLLPT) GO TO 107 IF HL IS REQUESTED GIVE PRESENT STATUS ALL VARIABLES IF(ARG.NE.2HHL)GO TO 115 10:0 WRITE( IO. 109)XID. IM. ID. IY FORMAT( ' TITLE: ’ . IIA6. I2. '/‘ . I2. ’/’ . I2./I WRITE( IO. 1 IO)PLTT. LPT.RAD.HDF.WAIT.SCAN.SAMP.LSMP FORMAT( ’ PLT‘ .L2. ' LPT’ .L2. ’ RAD’ .L2. ' HDF’ .L2 .' WAIT" .L2.‘ SCAN’.L2.' SAMP’.L2.' SMP ’.L2./) WRITE( IO. 1 101)SUBI .SU82.SUB3.FILEI.FILE2.SINIT.PINIT.DARKT FORMAT( ’ SBI’.L2.‘ SB2'.L2.' SB3'.L2.' FL1’.L3.' FL2'.L2. ’ SPIN'.L2.' PSIN'.L2.' DARK’.L2./) WRITE( IO. 1 I 1)DELT.DEST.ASHT.ATMT FORMAT(’ DELT'-'-‘.F7.2.' DEST‘=’.F7.2.‘ ASHT".F9.2 .’ ATMT-1'.F7.2./) WRITE( IO. 112) DESP.ASHP.ATMP ' FORMAT(' DF8P='.F7.3.' ASHP=‘.F7.3.’ ATMP'-".F9.3./) 113 117 120 1202 140 0*82 141 1411 I 1 ”HH— ~_H~ 182 WRITE( IO. 113JVER. HOR~AMNT.NMRUN.FREQ FORMAT(' = ’.F8. 4.’ HOR=‘.F8.4.’ AMNT".F9.2. ' NMRUN=‘.16.’ FREQ= '.F6.I./) IF (.NOT.SCAN) GO TO START WRITE(IO.114JVERI.HORI.VERL.HORL.NMSCAN FORMAT(’ VERI='.F7.4.' HORI='.F7.4.' VERL='.F9.4 .' HORL='.F7.4.' NMSCAN=’.I2./) GO TO START IF HLRUN REQUESTED CALCULATE NUMBER OF RUNS TO COMPEETE TASK IF(ARG.NE.5HHLRUN) GO TO 120 N=I M=l L31 ' IF(HORI.NE.O.) N=HORL/HORI IF(VERI.NE.O.) M=VERL/VERI IF (NMSCAN.GT.O) L=NMSCAN ‘IRUNT=NMRUN*N*M*L WRITE(O.117)IRUNT FORMAT(’ TOTAL NUMBER OF RUNS REQUIRED='.I§) GO TO START IF COMMAND IS GO FIRST CHECK FOR.LIMIT VIOLATIONS IF (ARG.EQ.’RS‘) RETURN IF (ARG.NE.’RSBAT’) GO TO 1202 MODE=4 RETURN IF (ARG.NE.2HGO) GO TO 140 FIRSTI=.T. RETURN GIVE HELP INFORMATION IF REQUESTED IF(ARG.EQ.’HLOPT’) WRITE(O.1IO)PLTT.LPT.RAD.HDF.WATT.SCAN.SAMP IF(ARG.EQ.'HLTIME’) WRITE(0.III)DELT.DEST.ASHT.ATMT IF(ARG.EQ.'HLPWR') WRITE(0.II2)DESP.ASHP.ATMP IF(ARG.EQ.’HLPOS') WRITE(O.113)VER.HOR.AMNT.NMRUN.FREQ IF(ARG.EQ.’HLSCAN’)WRITE(0.114)VERI.HORI.VERL.HORL.NMSGAN IF(ARG.EQ.'HLCOM’)WRITE(0.141) INSERT SHORT SPECAIL COMMANDS HERE FORMAT(’ GO. HL. HLTIME. HLPWR. HLOPT. HLSCAN. HLCOM.THLLPT'./. ' HLPOS. HLRUN. PLT. NPLT. LPT. NPLT. RAD. PWR?./ ’ HDF. NHDF. WAIT. NWAIT. SCAN. NSCAN. SAMP. NSAMP'./. ' DEST. ASHT. ATMT. DELT. DESP. ASHP. ATMP‘./. ' VER. HOR. VERI. HORI. VERL. HORL. TITLE') IF(ARG.EQ.’HLCOM') WRITE(0.1411) ‘FORMAT(' NMRUN. NMSCAN. REWIND. LOCAL. BATCH. USEI. NUSEI’./ ’ USE2. NUSE2. OPENI. CLOSE]. OPEN2. CLOSE2.'./ ’ HDLPT. HEADI. HEADZ. COMI. COM2. DARK. TUNE’./, ’ BURN. POSINT. SPIN. POSDEM.‘SAMPDM. USE3. NUSE3‘./, ’ FL1. NFLI. FL2. NFL2. RS. RSBAT. BELL. MSG') C*SI.82.L.N INSERT NEW COMMANDS IN LISTING OF COMMANDS ABOVE C IF(SINIT)SNT=. T. IF(.NOT.SINIT)SNT*.F. THE FOLLOWING IF STATMENTS CHANGE LOGICAL VARIABLE VALUES IF (ARG.EQ.3HPLT) PLT'I‘=.T'RUE. IF (ARG.EQ.4HNPET) PLTT=.FALSE. IF (ARG.EQ.3HLPT) LPT=.TRUE. IF (ARG.EQ.4HNLPT) LPT=.FALSE. IF (ARG.EQ.3HRAD) RAD=.TRUE. IF (ARG.EQ.4HNRAD) RAD=.FALSE. IF (ARG.EQ.3HHDF) HDF=.TRUE. IF (ARG.EQ.4HNHDF) HDF=.FAI.SE. IF (ARG.EQ.4HWAIT) WAIT=.TRUE. IF (ARG.EQ.5HNWAIT) WAIT=.FALSE. IF (ARC.EQ.4HSCAN) SCAN=.TRUE. IF (ARG.EQ.5HNSCAN) SCAN=.FALSE. IF(ARG.EQ.4HSAMP) SAMP=.TRUE. IF(ARG.EO»4HSAMP) CALL SAP 14115 C*L I412 c*SZ.L I42 HHHI‘HD‘ C*N “Hi-H I43 145 I50 170 180 185 183 IF(ARG.EQ.5HNSAMP) SAMP8.FALSE. IF (ARG.EQ.4HDARK) CALL DARK IF (ARG.EQ.4HTUNE) CALL TUNE(SNTT IF (ARG.EQ.6HPOSDEM) CALL POSDEM IF (ARG.EQ.6HSAMPDM) CALL SAPDEM IF(ARC.EQ.4HBURN) CALL BURNDM IF (ARG.NE.4HPSIN) GO TO 14115 CALL POS(Q.G.G) CALL POS(W.G.G) CALL POS(G.G.G) PINIT=.T. IF (ARG.NE.4HSPIN) GO TO 1412 SINIT=.TRUE. CALL SAPINT INSERT NEW LOGICAL COMMANDS BEFORE'THIS COMMENT AND IN IF STATEMENT 142 IF NOT SCANNING SET SCAN PARAMETERS SO’THAT MAIN PROGRAM RECOGNIZES THIS IF(SCAN) GO TO 142 HORI=O. VERI=O. HORL=HOR VERL=VER SHORT SPECIAL COMMANDS AND LOGICAL COMMANDS IF ADDED TO THE PROGRAM SHOULD ALSO BE ADDED‘TO‘THE FOLLOWING LOGICAL IF STATEMENT WHICH CHECKS FOR LEGAL COMMANDS IF(ARG.EQ.3HPLT.OR.ARG.EQ.4HNPLT.OR.ARG.EQ.3HLPT .OR.ARG.EQ.4HNLPT.OR.3HRAD.EQ.ARG.OR.ARG.EQ.4HNRAD.OR~ ARG.EQ.3HHDF.OR.ARG.EQ.4HNHDF.OR.ARG.EQ.4HWAITr0R.ARC .EQ.5HNWAIT.OR.ARG.EQ.4HSCAN.OR.ARG.EQ.5HNSCAN.OR~ARG.EO. 5HHLCOM.OR.5HHLPWR.EQ.ARG.OR.ARG.EQ.6HHLTIME.OR. ARC.EQ.6HHLSCAN.OR.ARG.EQ.5HHLPOS.OR.ARG.EQ.4HSAMP.OR. ARG.EQ.5HHLOPT§OR.ARG.EQ.5HNSAMP)GO TO START IF(ARG.EQ.4HBURN.OR.ARG.EQ.4HTUNE)GO TO START IF(ARG.EQ.6HPOSDEM.OR.ARG.EQ.6HSAMPDM)GO TO START IF(ARG.EQ.4HFILE.OR.ARG.EQ.4HDARK) GO TO START IF(ARC.EQ.4HSPIN.OR.ARG.EQ.4HPSIN)GO TO START IS THIS A CHANGE NUMERICAL ARGUMENT CONNAND ‘WHEN NEW NUMERICAL ARGUMENT COMMANDS ARE ADDED'THEY MUST ALSO BE ADDED TO THIS IF STATEMENT . IF(ARC.EQ.4HDESP.OR.ARG.EQ.4HASHP.0R.ARG.EQ.4HATMP.OR. ARG.EQ.4HDELT.OR.ARG.EQ.4HASHT.OR.ARG.EQ.4HATMT.OR. ARG.EQ.5HNMRUN.OR.ARG.EQ.4HDEST.OR.ARG.EQ.6HNMSCAN.OR. ARG.EQ.3HVER.OR.ARG.EQ.4HAMNT.OR.ARG.EQ.3HHOR.OR. ARG.EQ.4HVERI.OR.ARG.EQa4HHORI.OR.ARG.EO.4HVERL.OR. ARG.EQ.4HHORL.OR.ARG.EQ.5HTITLE.OR.ARG.EQ.4HFREQ) GO TO 145 IF(ARG.EQ.’SPI’.OR.ARG.EQ.’SP2'.OR.ARG.EQ.’SP3' ' .OR.ARG.EQ.’SP4’.OR.ARG.EQ»'TAG’) GO TO 145 GO TO 300 WRITE(0.I50) FORMAT(' ='..) IF(ARO.EQW4HDEST) READ(MODE.170)DEST IF(ARG.EQ.4HDELT) READ(MODE.I70)DELT IF(ARG.EQn4HASHT) READ(MODE.170)ASHT IF(ARG.EQ.4HATMT) READ(MODE.I70)ATMT IF(ARG.EQ.4HFREQ) READ(MODE.I70)FREQ IF(ARG.EQ.4HDESP) READ(MODE.180)DESP IF(ARG.EQ.4HASHP) READ(MODE.180)ASHP IF(ARG.EQ.4HATMP) READ(MODE.180)ATMP IF(ARG.EQ.5HNMRUN) READ(MODE.185)NMRUN IF(ARG.EQ.6HNMSCAN) READ(MODE.185)NMSCAN 'FORMAT(F6.2) FORMAT(F5.3) FORMAT( I4) IF(ARG.EQ.’SPI’) READCMODE.180)SPI 190 C*N c- 205 210 c- c- 300 303 C- 305 310 320 c- 330 340 350 360 370 380 390 391 ~400 401 1814 IF(ARG.EOm'SP2') READ(MODE.180)SP2 IF(ARG.EQ.'SP3') READ(MODE.180)SP3 IF(ARG.EQ.’SP4’) READ(MODE.180)SP4 IF(ARG.EQ.'TAG') READ(MODE.105)TAGI CONTINUE CHECKING FOR NUMERICAL ARGUMENT COMMANDS IF(ARG.EQ~3HVER) READ(MODE.I90)VER IF(ARG.EQ.3HHOR) READ(MODE.I90)HOR IF(ARG.EQ.4HVERI) READ(MODE.I90)VERI IF(ARG.EQ.4HHORI) READ(MODE.190)HORI IF(ARG.EQ.4HVERL) READ(MODE.I90)VERL IF(ARG.EQ.4HHORL) READ(MODE.I90)HORL IF(ARG.EQ.5HTITLE)READ(MODE.310)XID IF(ARG.EQ.4HAMNT) READ(MODE.I70) AMNT FORMAT(F7.5) INSERT NEW NUMERICAL COMMAND IF CHECKS HERE GO TO START IF ILLEGAL COMMAND RESPOND WITH ERROR MESSAGE WRITE(0.2IO)ARG FORMAT(’ ?’.A6) IF IN BATCH MODE SET TO LOCAL MODE IF ERROR.IS DETECTED MODE=0 GO TO START THIS PAGE WAS ADDED TO CONTAIN VERSION 2.01 COMMANDS COMMAND USED TO WRITE A MESSAGE ON THE TERMINAL (BATCH‘MODE) IF(ARG.NE.'MSG’) GO TO 305 READ(MODE.310)USR WRITE(0.303)USR FORMAT(' MSG’.IIA6) COMMAND TO PUT COMMENT ON THE LINE PRINTER IF (ARG.NE.'HDLPT’) GO TO 330 READ(MODE.310)USR FORMAT(11A6) WRITE(3.320)USR FORMAT(1H0.11A6) COMMENTS AND READINGS TO FILES HANDLED HERE IF(ARG.NE.'HEADI’) GO TO 350 IF(.NOT.FILEI) GO TO 415 ‘READ(MODE.310)USR WRITE(5.340)USR FORMAT(‘HD’.IIA6) IF(ARG.NE.’HEAD2’) GO TO 360 IF(.NOT.FILE2) GO TO 415 READ(MODE.310)USR WRITE(6.340)USR IF(ARG.NE.’COMI’) GO TO 380 IF(.NOT.FILEI) GO TO 415 READ(MODE.310)USR WRITE(5.370)USR FORMAT(‘CC'.IIA6) IF(ARG.NE.'COM2’) GO TO 390 IF(.NOT.FILE2) GO TO 415 READ(MODE.310)USR WRITE(6.370)USR IF(ARG.NE.'CLOSE1’) GO TO 400 IF(.NOT.FILE1) GO TO 415 WRITE(5.39I) FORMAT(‘EF‘) END FILE 5 'FILEI=.F. IF (ARG.NE.’CLOSE2') GO TO 401 IF(.NOT.FILE2) GO TO 415 WRITE(6.391) END FILE 6 FILE2=.F. IF(ARG.NE.'OPENI’) GO TO 404 402 403 4031 4033 4034 4035 4036 404 405 406 410 69 70 71 72 73 74 75 c- 413 185 FILEI'.T. WRITE( 5 .402) FORMTI . XNUM FORMAT(’FO'.2A6/'FN'.G13.6) WRITE(5.403)VE.TYDATA FORMAT('VE'.GI3.6.7A6) WRITE(5.403I)IM.ID.IY 'FORMAT(’TI’.3I3) IF(.NOTzLSMPICO To 404 . NRITE(5.4033)ITYPE.xn.IL,(ISXVANIJ),J=I.IDIM) TONMATI 'SM’ .° ITYPE‘ .143 IGIUN’.I4.‘ 1m LMT'.I4.' VAR 0PT‘4I4) WRITE(5.4034)((ALIM(I.J).I=I.3).J=I.IDIM) FORMAT(‘SL'.3GI3.6) no 4035 I=I.IDIM+I WRITE(5.4036)(VINIT(I.J).J=1.IDIM) FORMAT(’SI'.4GI3.6) IF(ARG.NE.’0PEN2') GO TO 405 FILE2=.T. WRITE(6.402)FORMM2.YNUM WRITE(6.403)VE WRITE(6.403I)IM.ID.IY ADDITIONAL COMMANDS VERSION 3.01 IF(ARG.NE.’SMP’) CO TO 406 LSMP=.T. CALL PARIN co TO START IF(ARG.NE.'NSMP’) GO TO 410 LSMP=.F. GO TO START IF (ARG.NE.’PARM’) GO TO 413 1FN=5 IF(.NOT.(FILEI.OR.F1LF2)) CO To 415 IF(FILE2.AND..NOT.FILEI) IFN=6 WRITE(IFN.70)PLTT.LPT.RAD.HDF.WAIT.SCAN,SAMP FORMAT(‘PA'.’ PLTT’.L2.’ LPT’.L2.’ RAD’.L2.’ HDF‘.L2. ' WAIT’.L2.' SCAN‘.L2.' SAMP’.L2) -WRITE(IFN.7I)SUBI.SUB2.SUB3.FILE].FILE2.SINITSPINIT§DARKT FORMAT(‘PB’.’ SBI’.L2.' SB2’.L2.' SB3'.L2.' FL1'.L2. ' FL2'.L2.' SINT’.L2.’ PINT'.L2.’DARKT'.L2) WRITE(IFN.72)DELT.DEST.ASHT.ATMT FORMAT(‘PC’.’ DELT’.GI3.6.' DEST‘.GI$.6.' ASHT'.GI3.6. ' ATMT" .GI3.6) WRITE(IFN.73)DESP.ASHP.ATMP.FREQ FORMAT(‘PD’.’ DESP‘.G13.6.' ASHP'.G13.6.’ ATMP'.GI3.6. ' FREQ‘.G13.6) WRITE(IFN.74)VER.HOR~AMNT.NMRUN FORMAT(‘PE'.’ VER’.GI3.6.’ HOR‘.GI3.6.' AMNT’.GI3.6. ’NMRUN'.GI3.6) IF(SCAN)WRITE(IFN.75)VERI.HORI.VERL.HORL{NMSCAN ~ FORMAT(’ VERI'.GI3.6.' HORI’.GI3.6.' VERL'.G13.6.’ HORL'. GI3.6.'NSCAN'.GI3.6) IF(IFN.EQAG) GO TO 413 IFN=6 IF(FILE2.AND.FILE1) GO TO 70 LOGICAL TYPE COMMANDS IF (ARG.EQ.’REWIND') REWIND 4 IF (ARG.EQ.'LOCAL’) MODE=0 IF (ARG.EQ.’BATCH') MODE=4 IF (ARG.EQ.'USEI') SUBI=.T3 IF (ARG.EQ.’USE2') SUB2=.T. IF (ARG.EQ.‘USE3') SUB3=.T. IF (ARG.EQ.'NUSE1') SUB1=.F. IF (ARG.EQ.'NUSE2') SUBZ=.F. IF (ARG.EQ.’NUSE3‘) SUB3=.F. IF (ARG.EQ.'EXIT') CALL EXIT IF (ARG.EQ.'FL2’) FILE2=.T. 186 IF (ARG.EQ. ’NFL2’) FILE2=.F. IF (ARG.EQ. ’NFLI’) FILEI'.F. IF (ARG.EQ.‘FLI‘) FILEI=.T. IF (ARG.EQ. 'SAMPT’) SAMP=.T. IF (ARG.EQ.’BELL’) CALL BELL C- NOW CHECK TO SEE IF IT WAS A LEGAL COMMAND IF(ARG.EQ. ’REWIND' .OR.ARG. EQ. ’LOCAL’ .OR.ARG.EQ. 'BATCH’ .OR. ARG.EQ. ’USEI ’ .OR.ARG.EQ. ’USE2’ .OR.ARG.EQ. ’NUSEI ’ .OR. ARG.EQ. 'NUSE2’ .OR.ARG.EQ. 'OPENI ' .OR.ARG.EQ. 'CLOSEI ’ .OR. ARG.EQ. ‘OPEN2' .OR.ARG. EQ. ’CLOSE2’ .OR. ARG.EQ. ’HDLPT' .OR. ARG.EQ. ’HEADI ’ .OR.ARG.EQ. ’HEAD2' .OR.ARG.EQ. 'COMI ' .OR. ARG.EQ. 'COM2'.OR.ARG.EQ. 'USE3’ .OR.ARG.EQ. ’NUSE3') GO TO 420 IF( ARG.EQ. ‘PARM' .OR.ARG.EQ. 'FLI ’ .OR.ARG.EQ. 'NFLI ’ .OR. ARG.EQ. ’FL2’ .OR.ARG.EQ. 'NFL2’ .OR.ARG.EQ. ’SAMPT' .OR. ARG.EQ. 'BELL' .OR.ARG.EQ. 'MSG’) GO TO 420 GO TO ERROR fl—Hflfl “H 415 WRITE(0.416) 416 FORMAT(' N01! FILE IS NOT OPENED’) 420 D0 430 IK=I.6 430 USR( 1K) =FILL GO TO START END 000000000000000000000000000000000000000 187 PROGRAM FUNCTION: PROGRAM SUPERVISEE PARAMETER CHANGES NECBSARY FOR MULTIPLE SAMPLE RUN EXPERIMENTS PROGRAMMER: E. H. PALS VERSION: *IE-I (2.04) DATE: 10/9/76 FILENAME: EPFLOW.F4 CALLING FORM: CALL FLOW EXTERNAL ROUTINES: NONE SUMMARY: THE PRIMARY FUNCTION OF "THIS ROUTINE IS'TO KEEP TRACK OF WHERE THE POSITIONER. SAMPLER. ETC. ARE AT AND WHAT CONDITIONS ARE REQUIRED FOR THE NEXT REQUESTED SAMPLE RUN. THE ROUTINE ALSO DETECTS THE COMPLETION OF A TASK AND TAKES APPROPRIATE RE- INITIALIZATION STEPS. CHANGES VERSIONNHB: 1. ADD THE COMMON AND LOGICAL SPECIFICATIONS CHANGE VERSION *IC: 1. DEFINE ISAMPL AS LABELED COMMON ARRAY CHANGES VERSIONS 1E AND 2.01: 1. UPDATE COMMENTS 2. UPDATE COMION STATEMENT AND FIX POSITIONER CALL 3. INSERT SWITCH REGISTER OPTION CHECKS. 4. FIX MULTIPLE RUN WHEN NOT SAMPLING OR SCANNING CHANGES VERSION 2.02: I. FORCE TO SET TO LOCAL MODE IF ERROR DURING BATCH STREAMING CHANGES VERSION 2.03: 1. LIMIT CHECKS MOVED HERE FROM INPUT. 2. OPTION TO WAIT WHEN NOT PLOTTING ADDED. 000000OOOOOOOOOOOOOOOOOODOOOOOO0000000000000 188 "METHOD: 1. FIRST CALL? YES- INITIALIZE RUN COUNTER AND POSITION POINT'ERS. NO- GO TO 4 2. SCANNING OR SAMPLING? YES- INITIALIZE SCAN PARAMETERS. NO- . GO TO 4 3. SAMPLING? YES- DECODE SAMPLE SPECIFICATION WORD AND IF IT IS ZERO GO TO I3 OTHERWISE GO TO 12. NO- GO TO 4 4. COMPLETED REQUESTED NUMBER OF RUNS YET? YES- GO TO 5 NO- GO TO 12 5. NOT SAMPLING OR SCANNING? YES- GO TO TASK COMPLETE ROUTINE NO- GO TO 6 6. SAMPLING? YES- GO TO 7 ‘2 NO- GO TO 8 7. SAMPLE RUN COUNTER EQUALS REQUESTED NUMBER OF RUNS? YES- GO TO 8 NO- GO TO 12 8. REACHED VERTICAL LIMIT? YES- REINITIALIZE VERTICAL POSITION AND GO TO 9 NO- GO TO 12 9. COMPLEMENT HORIZONTAL DIRECTION IO. REACHED HORIZONTAL LIMIT IN POSITIVE DIRECTION? YES- REINITIALIZE GO TO 11 NO- GO TO 12 II. COMPLETED REQUESTED NUMBER OF SCANS? YES- GO TO 13 NO- GO TO 12 ' 12. READ SWITCH REGISTER AND EXECUTE REQUESTED FUNCTIONS. SWB- GO TO 13 (INTERUPT TASK BEFORE COMPLETION) SW5- WRITE SELECTED GENERAL PARAMETERS ON TERMINAL SW6- WRITE SELECTED SCAN VARIABLE STATUS TO TERMINAL SW7- WRITE SELECTED SAMPLING VARIABLE STATUS TO TERMINAL I3. QUERRY OPERATOR TO ALLOW EXIT TO GBA MONITOR OR TO RESTART DATA ACQUSITION WITH PRESENT CONDITIONS. 1000 1010 I201 121 I 25 122 189 ' SUBROUTINE FLOW COMMON PLTI‘.LPT.RAD.HDF.WAIT.DEST.ASHT.ATMT.DELT.DFSP COMMON ASHP.ATMP.SCAN.VER.HOR.VERI.HORI.VERL.HORL COMMON NMSCAN.NMRUN.SAMP.SAMPSZ COMMON FIRST! . ISAMC.NSCAN.HPOS.VPOS. IRUN. ISAMP COMMON AMNT. ISAMCA. TAG. XIOIDK. XIDK COMMON FREQ COMMON /A/ISAMPL( 40) .NRUN. IGOTO COMMON /B/DATAI( 100) .DATA2( 100) .AMIN.AMAX. IDIR COMMON /CBLK/MODE.SUBI .SUB2. FILE] .FILE2.DARKT.PINIT. SINIT.SUB3 LOGICAL PLTT'.LPT.RAD.HDF.WAIT.SAMP.SCAN.FIRSTI LOGICAL DARKT.SINIT.PINIT ASSIGN I 'IO'DECODE ASSIGN 2 TO RETRN ASSIGN 3 TO EXIT ALLOW WAITING HERE WHEN IN WAIT MODE AND NOT PLOTTING IF (.NOT.(.NOT.PLT'I‘.AND.WAIT))GO TO 1100 WRITE“). 1010) FORMAT(’ CONTINUING) OR TO GBA MONITORU‘D? ’.0) READ(O.II)AA IF(AA.EQ.’C’) GO TO 1100 IF(AA.NE.’M’) GO TO 1000 MODE = 0 IGOTO = I RETURN DETERMINE IF INITAIL VARIABLE SETUP NECESSARY IF(.NOT.FIRSTI) GO TO 100 IGOTO=3 IF(LIMIT(VERL.0. .26.01. ’VERL') .GT.0) IGOTO’I IF(LIMIT(HORL.-I2.7.+l2.7.’HORL').GT.0) IGOTO=I INSERT VARIABLE LIMIT VIOLATION CHECKS HERE IF (PINIT.AND.DARKT.AND.(SINIT.OR..NOT.SAMP)) GO TO 121 WRITE(0.1201) FORMAT( ’ NON EITHER DARK CURRENT. SAMPLER. OR POSITIONER’ ’NOT INITIALIZED' ./) IF NOT SCANNING SET SCAN VARIABLES TO COINCIDE WITH THIS IGOTO = 1 IF( IGOTO.EQ. URETURN IF(SCAN) GO TO 125 HORI=0. VERI=0. HORL=HOR VERL=VER IF REQUESTED WRITE READING ON LINE PRINTER OUTPUT IF( LPT) WRITE(3. I22) FORMAT( 1H0. ’SAMP' .2X. 'AMOUNT’ .3X. 'HPOS' .SX. ’VPOS' .UX. 'TMAX' .3X. ’ABSMAX‘ .SX. ' INTABS') MAKE SURE ALL FLAGS SET BEFORE EXITING CALL CLOCK( 500) CALL CLTIME WAIT FOR POSITIONER TO INITAILIZE CALL POS(W.0. .0.) XNULL=0. HPOS=HOR VPOS=VER 'SEND POSITIONER TO SAMPLE DELIVERY POSITION CALL POS(XNULL. HULL. HULL) MAKE SURE RAD FLAG INITIALLY CLEAR CALL FLAG(- I..0..0. ) NRUN=0 G=0. $000 ~C§OC5OC§ 000 I03 I02 190 IDIR=I ISAMC=0 NSCAN=0 HPOS=HOR. VPOS=VER IF(.NOT.(SCAN.OR.SAMP)) GO TO 2 IF(HORL-HPOS)9.8.9 HORL=HORL-I. IF(VERL-VPOS)16.17.16 VERL=VERL-I. IF (.NOT.SAMP) GO TO RETRN ISAMCA=0 IF SAMPLE SPECIFICATION EQUALS ZERO GO TO EXIT ROUTINE ISAMC=ISAMC+I IXX=ISAMPL(ISAME) IF (IXX)3.3.4 DECODE SAMPLE SPECIFICATION WORD Y3FLOAT(ISAMPL(ISAMC))/l00000. IRUN=IFIX(Y) ISAMP=IFIX((Y‘FLOAT(IRUN))*I00.) AMNT=((Y‘FLOAT(IRUN)-(FLOAT(ISAMP)/100.))81000.)+.005 IF NOT FIRST CALL BEGIN CHECKING RUN VARIABLES CHECK RUN COUNTER NRUN=NRUN+I IF(NMRUN-NRUN)101.IOI.2 NRUN=0 IF(.NOT.(SAMP.OR.SCAN)) GO’TO 3 IF(.NOT.SAMP)GO TO 102 IF(SAMP.AND.SCAN) GO TO 19 CHECK SAMPLE RUN COUNTER ISAMCA=ISAMCA+I IF(IRUN-ISAMCA)103.103.2 ISAMCA=0 IF(SAMP.AND..NOT.SCAN) GO TO DECODE CHECK VERTICAL POSITION VPOS=VPOS+VERI IF(VERL-VPOS)20.2.2 VPOS=VER COMPLEMENT’HORTZONTAL DIRECTION IDIRF-IDIR CHECK HORIZONTAL POSITION HPOS=ABS(HPOS)+HORI IF(HORL-HPOS)23.2.2 HPOS=-HPOS GO TO 2 HPOS=HOR CHECK NUMBER OF SCANS NSCAN=NSCAN+I IDIR=I 110 ”GOO 398 399 400 40 l 402 403 404 405 I-COOOO 191 IF(NMSCAN-NSCAN) 110. 110.2 NSCAN=0 IF( .NOT.SAMP) GO TO EXIT GO TO DECODE ALLOW TASK INTERUPTION OR RUN COUNTING. PROGRESS REPORT IGOTO = 3 XPT‘S=ATMT*FREQ IF(LIMIT(DEST‘.1)..20..‘DEST’).GT.0) IGOTO=! IF(LIMIT(ASHT.0..30..’ASHT').GT.0) IGOTO=! IF(LIMIT(ATMT.0..5.0.‘ATMT’).GT.0) IGOTO=] IF(LIMIT( DELT,5. .60. . ’DELT' ) .GT.0) IGOTO= I IF(LIMIT(DESP.0..10.00.’DEBP’).GT.0) IGOTO=! IF(LIMIT(ASHP.0..I0.00.'ASHP’).GT.0) IGOTO=! IF(LIMIT(ATMP.0..I0.00.’ATMP').GT.0) IGOTO=] IF(LIMIT(VER.0..26.01.'VER').GT.0) IGOTO=I IF(LIMIT(HOR.-l2.7,+l2.7.'HOR’).GT.0) IGOTO=! IF(LIMIT(VERI,-26.0I.+26.0I.'VERI').GT.0) IGOTO=! IF(LIMIT(HORI.-26.0l.+26.0l.’HORI').GT.0) IGOTO=! IF(LIMIT(AMNT.0..200..'AMNT’).GT.0) IGOTO=! IF(LIMIT(FR.EQ.I..1000..'FREQ’).GT.0) IGOTO=] IF(LIMIT(XPT‘S.I..1000..’NUMPT‘S’).GT.0)IGOTO=I IF (IGOTO.EQ.3) GO TO 398 MODE-=0 RETURN IF (SWITCH(0.).EQ.0.) GO TO 399 MODE=0 GO TO 3 IF (SWITCH(I.).EQ.0.) GO TO 401 WRITE(0.400) FIRSTI.SCAN.SAMP.NMRUN.NRUN.HPOS.VPOS FORMAT( ' FIRST] SCAN SAMP NMRUN NRUN HPOS VPOS‘./ .L4.L7.L5.I5.I6.F6.2.F5.2) IF(SWITCH(2.).EQ.0.) GO TO 403 WRITE(0.402) IDIR.NMSCAN.NSCAN.VER. HOR.VERL.HORL FORMAT(’ IDIR NMSCAN NSCAN VER HOR VERL HORL’,/ .I4.2I6.3X..4F5.2) IF(SWITOH(3.).EQ.0.)GO TO 405 WRITE(0.404) ISAMC. ISAMCA. IRUN. ISAMP.AMNT FORMAT(' ISAMC ISAMCA IRUN ISAMP AMNT'./ .I4.I6.16.I5.9X.F5.2) 'FIRSTIP- .F. I GOTO= 3 RETURN ALLOW EXIT TO GBA MONITOR WRITE(0.15) FORMAT( ’ EXIT TO GBA MONITOIK M) OR DATA TAKING( D) ') READ( MODE. 1 I) AA FORMAT( Al) IF( AA.EQ. 'M' ) IGOTO= I IF( AA. EQ. ’D’ ) IGOTO=-3 FIRST]8 .T. RETURN END OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO 192 COMBINED ROUTINE TO ACQUIRE DATA AND CAIEULATE RESULTS ‘FUNCTION: THIS ROUTINE HANDLES DATA ACQUISTION PROGRAMMER: E. H. PALS FILNAME: EPDATA.F4 DATE: 9/10/76 (4/11/77) VERSION: *IB (2.10)-T CALLING FORM: CALL'DATA PURPOSE: THIS ROUTINE CONTROLS THE TAKING AND STORING OF RAW DATA FROM ONE SAMPLE RUN AND CALCULATES INTEGRATED ABSORBANCE. CHANGES VERSION *IB: 1. FLAG ROUTINE CALLED TO SET RAD FLAG. EPCURT NO LONGER A SUBROUTINE. CHANGES VERSION 2.0!: I. DESOLVATE BEFORE TAKING 100%T DURING POSITIONER MOVE 2. ADD OPTION TO CALL USER SUBROUTINE WHEN DATA TAKEN 3. USE FAST A/D ACQUISTION ROUTINES CHANGES VERSION 2.02: I. FORMAT OF FILE WRITING CHANGED CHANGES VERSION 2. I0: I. DATA FILE OUTPUT FORMAT IS CHANGED TO ALLOW USER DEFINITION OF DATA TAG ALSO OUTPUT ORDER IS ALTERRED. CHANGES VERSION T: I. MODIFIED TO ALLOW BURN OFF OF SAMPLE BETWEEN SAMPLE AND BACKGROUND RUNS . 'EXTERNAL ROUTINES REQUIRED: I . FREQS( FREQ) .SET( ARRAY. NCON. IERR) .GO FILE-EPADCR.RA AND EPADBM.RA FREQS- STARTS T'HE ADC CLOCK AT REQUESTED FREQUECY SET- PASSES REQUESTED NUMBER OF CONVERS IONS DATA ARRAY AND IERR INFORMS USER OF ILLEGAL CALLS GO- START‘S THE DATA TAKING PROCESS SET UP BY FREQS AND GO 2. DAC( VOLT) FILE- EPDAC. RA OUTPUTS VOLT VOLTS AT REFERENCE INPUT OF GBA POWER SUPPLY. ‘ 3. POS(I.HPOS.VPOS) ‘ FILE- EPPOS.RA I=-I: HARDWARE RESET OF POSITIONER 1= 1: WAIT FOR POSITIONER TO REACH DESTINATION I: 0: START MOVE TO POSITION HPOS.VPOS. 4. SAMP(DATAI.DATA2) FILE- EPSAMS.RA DELIVER AMNT MICROLITERS OF SAMPLE SOLUTION NUMBER ISAMP. IF ISAMP<0 WAIT FOR COMPLETION BEFORE RETURNING. 5. CLOCK ROUTINES FILE- CLOCK.RA CLOCK( FREQ)- START CLOCK AT FREQ FREQUENCY CLTIME- CLEAR CLOCK COUNTER TIME(SEC)- RETURN TIME IN SEC SINCE CLTIME WAS LAST CALLED. 000000000000000000000000000000000000 I. 2. 3. 4. 5. 6. 7. 8. 9. 10. II. ‘2. 13. I4. ‘5. 16. I7. 18. I9. 20. 21. 22. 23. 193 'METHOD: WAIT FOR POSITIONER TO REACH SAMPLE DELIVERY POSITION WAIT FOR DELAY TIME TO ELAPSE IF REQUESTED DEPOSIT SAMPLE LATCH DESOLVATE POWER TO DAC AND WAIT FOR DESOLVATE TIME TO ELAPSE TAKE 100 PTS 0F IOOZT AND CALCULATE AVERAGE ASH AT ASH POWER FOR REQUESTED ASH TIME SET UP GBA ADC CLOCK TO REQUESTED FREQUENCY. POINT RESULTS TO ARRAY XVAL (DONE BY CALLING FREQS) ' SET RADIATION PROGRAMING FLAG IF REQUESTED LATCH TO DAC THE ATOMIZATION POWER AND WAIT FOR ATOMIZATION TIME TO ELAPSE CLEAR RADIATION PROGRAMMING FLAG. SET DAC TO 0 VOLTS WAIT FOR DELAY TIME TO ELAPSE RE-EXECUT'E STEPS 4.6-10 BUT DEPOSIT RESULTS IN BACK NOT XVAL CLEAR CLOCK TO 0 SECONDS ( I.E. START DELAY TIME) START POSITIONER TOWARD SAMPLE DELIVER POSITION. ALLOW EXECUTION OF A USER SUBROUTINE AND IF ISKP SET=O IN THE SUBROUTINE GO TO STEP l9. OTHERWISE CONTINUE (THIS ALLOWS AN ALTERNATE CALCULATION ROUTINE) INITIALIZE VARIABLES FOR CALCULATIONS CALCULATE THE INTEGRATED ABSORBANCE FIND ABSORBANCE MAXIMUM.MINIMUM AMD TIME OF MAXIMUM ABS ALLOW EXECUTION OF A USER DEFINED SUBROUTINE. IF ISICP IS SET IN THE SUBROUTINE TO 0 EXIT TO MAIN. IF ISICP 8 I GO TO 22 IF ISKP NOT 0 OR I CONTINUE TO 20 WRITE RESULTS ON LINE PRINTER IF REQUESTED WRITE RESULTS 0N EITHER OF TWO FILES PLOT REQUESTED? NO- RETURN TO MAIN YES‘ PACK A REPRESENTATIVE SET OF T'RANSMIT'I‘ANCE VALUES INTO DATA ARRAYS FOR FUTURE PLOT'I‘ING RETURN TO MAIN H000 000 000 000 000 91 23 25 1914 SUBROUTINE DATA COMMON PLTT.LPT.RAD.HDF.WAIT}DEST.ASHT.ATMT.DELT}DESP COMMON ASHP.ATMP.SCAN.VER.HOR.VERI.HORI.VERL.HORL COMMON NMSCAN.NMRUN.SAMP.TAGI 'COMMON FIRSTI.ISAMC.NSCAN.HPOS.VPOS.IRUN.ISAMP COMMON AMNT.ISAMCA.ABSINT.XIOIDK.XIDK COMMON FREQ COMMON /B/DATAI(IOO).DATA2(IOO).AMIN.AMAX.IDIR COMMON /CBLK7MODEI.SUBI.SUB2.FILEI.FILEZ.DARKT.PINIT.SINIT.SUB3 COMMON /SPBLK/BRNT.BRNP LOGICAL PLTT.LPT.RAD.HDF.WAIT.SCAN.SAMP.FIRSTI LOGICAL F.SUBI.SUB2.FILEI.FILE2 DIMENSION BACK(IOOO).XVAL(IOOO) DATA lSKP/2/ WAIT FOR POSITIONER.TO REACH DESTINATION XNULL=O. WAITP=I. CALL POS(WAITP.0..0.) WAIT FOR DELAY TIME TO ELAPSE CALL TIME(XT) IF (XT.LT.DELT) GO TO 10 DEPOSIT SAMPLE IF REQUESTED IF(.NOT.SAMP) GO TO 90 XSAMP=FLOAT(ISAMP) AMWTTfiAMNT CALL DAC(DESP) CALL SAMPD(XSAMP.AMNTT) CALL DAC(XNULL) DESOLVATE BEFORE TAKING IOOXT CALL CLOCK(500) CALL CLTIME CALL DAC(DESP) CALL TIME(XT) IF(XT.LT.DEST) 'GO TO I5 CALL CLTIME CALL DAC(0.) GET I(0)+I(DARK). AVERAGE 100 PTS AND RETURN CALL POS(XNULL.HPOS.VPOS) CALL POS(WAITP.HPOS.VPOS) Frnso:noo. CALL FREQS(FFREQ) NCON=IOO CALL SET(BACK.NCON.IERR) CALL GO SUM=O. DO 91 I'I.IOO SUM=SUM+BACK(I) XIOIDK=SUM/IOO. NPTS=IFIX(ATMT*FREQJ START HEATING STEPS F=.T. DO 60 J=I.2 CALL CLTIME CALL DAC(ASHP) CALL TIME(XT) 40 49 00¢! 90 00‘ 0| 0000000000000 000 100 195 IF (XT.LT.ASHT) GO TO 25 START ACQUIRI NG DATA SETF=I. CLEAR3-I. FQ=FREQ CALL FREQS(FQ) IF(F) CALL SET(XVAL.NPTS.IERR) IF( .NOT.F) CALL SET( BACK.NPTS. IERR) IF(RAD) CALL FLAG(SETF.O..O.) CALL DAC(ATMP) CALL GO F=.F. CALL FLAG( CLEAR.CLEAR.0.) XNULL=0. , WAIT FOR 10 SECOND DELAY CALL DAC( XNULL) IF (J.EQ.2) GO TO 65 CALL CLTIME CALL FLAG( CLEAR. CLEAR.CLEAR) CALL DAC( BRNP) CALL TIME( XT) IF(XT.LT.BRNT) GO TO 49 CALL DAC( XNULL) CALL CLTIME CALL TIME( XT) IF (XT.LT.3.) GO TO 50 CONTINUE START DELAY CLOCK CALL CLTIME START POSITIONER BACK TO ORIGIN CALL POS(XNULL..OI.XNULL) THIS PORTION OF THE ROUTINE WAS ORIGINALLY AN INDEPENDENT CALCULATION SUBROUTINE. CONSULT EPCALC.F4 VERSION I FOR ORGINAL VERSION OF THIS ROUTINE. ALLOW INTERPOSISITION OF A USER SUBROUTINE FOR MASSAGING ' THE RAW DATA OR FOR ALTERNATE CALCULATION METHODS IF (SUBI) CALL SUBONE( ISKP.XVAL.BACK) IF (ISKP.EQ.O) GO TO 105 SET UP VARIABLES FOR ABSORBANCE CALCULATIONS ABSINT=I. AMIN= 10. **IO AMAX=~AMIN Q=XIOIDK-XIDK T'MAX=O. NOW CALCULATE THE INTEGRATED ABSORBANCE DO 100 I'I.NPTS T'DIF=Q/(XVAL( I)-BACK( I)+Q) IF (AMAX.LT.TDIF) AMAX‘TDIF IF (AMIN.GT.T'DIF) AMIN=TDIF IF (AMAX.EQ.TDIF) TMAXBFLOAT(I)/FREQ ABSINT= ABSINT‘RTDIF ABSINT=ABS(ABSINT) ABSINT=ALOGIO(ABSINT) c- 105 I IO C- I20 125 I35 I40 I45 I46 I47 I48 I51 196 AMAX=ABS(AMAX) AMAX=ALOGIO(AMAX) AMIN=ABS(AMIN) AMIN=ALOGIO(AMIN) ALLOW USER SUBROUTINE FOR DATA TREATMENT AND/OR ANALYSIS ISICP=2 IF( SUB2) CALL SUBTWO( ISKP.XVAL.BACK) IF (ISICP.EQ.O)RETURN IF (ISKP.EQ.I) GO TO 135 IF REQUESTED OUTPUT THIS DATA TO LINE PRINTER IF(.NOT.LPT) GO TO 120 WRITE(3. IIO) ISAMP.AMNT.HPOS.VPOS.TMAX.AMAX.ABSINT FORMAT( ’ ’ . I3.2X.F8.2. IX.F7.3.2X. F7.3. IX.F?.2.F8.2..‘2X.FIO.2) IF REQUESTED WRITE DATA ON OUTPUT FILE IF( .NOT.FILEI)GO TO 135 WRITE(5. I25)TAGI.TMAX.HPOS.VPOS.XSAMP.AMNT.AMAX.ABSINT FORMAT(A2.7GI3.6,/) IF PLOT REQUESTED SET UP DATA ARRAYS IN COMMON TO PASS DATA IF (.NOT.FLT'I‘.AND.(SWIT‘CH(4.) .NE. 1.))GO TO 145 FINC=(FLOAT( NPTS) )/IOO. P13 1 O DATA1(I)=XVAL( I) DATA2( I)=BACK( I) DO I40 I=2. 100 PT=PT+F INC IPFFLOAT( PT) DATA“ I)=XVAL( IPT) DATA2( I) =BACK( IPT) ALLOW OUTPUTTING SHAPE TO FILE STRUCTURE) DEVICE IF(.NOT.FILE2) RETURN DO 146 I=I.NPTS XVAL( I)8ALOGIO(ABS(Q/(XVAL( I)-BACK( I)+Q))) DO I47 I=I. NPTS. 10 WRITE(6. I48) TAGI. (XVAL(K).K=NPTS. NPTS+IO) FORMAT(A2. IOGI3. 6) WRITE(6. I51) FORMAT(‘ER') RETURN END 00000000000000000000000000000000000000000000000 197 FUNCTION: PLOTTER ROUTINE FOR GBA SAMPII RUN PROGRAMMER: E. H. PALS VERSION: *IB-I (2.02) DATE: 9/20/76 ( I2/3I/76) FILE: EPPLOT.F4 (EPPTV2.F4) CALLING FORM: CALL POT SUMMARY: THIS ROUTINE TAKES THE RAW DATA COLLECTED IN DATA] AND DATA2. CALCULATES ABSORBANCES AND THEN PLOTS THE RESULTS ON THE ADDS. IF THE WAIT OPTION WAS REQUESTED. OPTIONS ARE AVAILABLE TO GET A HARDCOPY PLOT ON THE LPT. OR A PLOT OF THE TRANSMITTANCE OF THE BACKGROUND RUN. EXTERNAL ROUTINES: THIS ROUTINE USES ALL THE ROUTINES IN ERJ'S ADDS PLOT'I‘ING PACKAGE. CHANGES VERSION *IB: I . TAKE DATA OUT OF COMMON CHANGES VERSION 2.01: I. RESTRICT PLOTTING OPERATION TO THE 100 PTS IN ARRAYS DATAI AND DATA2 . METHOD : I. CALL PLINT TO SET UP PLOTTING LIMITS 2. CALL AXIS TO DRAW AXIS 3. CALL LABEL TO LABEL AXIS TIME AND ABSORBANCE 4. CALCULATE INDIVIDUAL ABSORBANCES FOR DATA STORED IN PASSED ARRAYS 5. CALL PLT TO PLOT EACH POINT AS IT IS CALCULATED 6. WAIT REQUESTED? NO- RETURN TO MAIN YES- A. PRINT HARDCOPY IF REQUESTED B. IS PIOT OF BACKGROUND REQUESTED? ' NO- RETURN TO MAIN YES- GO TO 7 7. FIND MAXIMUM AND MINIMUM TRANMIT'I‘ANCES 8. PASS MAX ANS MIN. DRAW AXIS AND LABEL 9. CALCULATE AND PLOT INDIVIDUAL TRANSMITTANCES IO. WAIT FOR USER TO REQUEST CONTINUING 10 20 35 70 80 50 00 90 I00 I 10 COMMON NMSCAN . NMRUN . SAMP . SAMPSZ 198 SUBROUTINE POT COMMON PLTT. LPT. RAD. HDF . WAIT. DIST. ASHT. ATMT. DELT. DESP COMMON ASHP . ATMP . SCAN . VER. HOR. VERI . HORI . VERL. HORL COMMON FIRST] . ISAMC.NSCAN.HPOS.VPOS. IRUN. ISAMP COMMON AMNT. ISAMCA.ABSINT. X10 IDK. XIDK COMMON FREQ COMMON /B/DATAI( 100) .DATA2( 100) .AMIN.AMAX. IDIR DIMENSION PLTDAT( 224) .XTXT( I) .YTXT(2) .YYT'XT(2) LOGICAL PLT'I‘.LPT.RAD.HDF.WAIT.SCAN.SAMP.FIRSTI DATA XTXTV’ TIME '/. YTXT/‘ABSORBANCE’I DATA YYTXT/‘BKG %T'/ SET UP PLOT'I'ING LIMITS INTIALIZE AATMT‘=ATMT AAMIN=AMIN AAMAX=AMAX CALL PLINT( 0. .. AATMT. AAMIN. AAMAX. PLTDAT) CREATE AXIS CALL AXIS( 1.1.1) LABEL AXIS CALL LABEL( XTXT. 6 . YTXT. 10) Q=XIOIDK-XIDK NPTS= IF I X( ATM'NFREQ) DO 10 I: I . 100 X= ATMT*FLOAT( I)/100. Y=ALOGIO( ABS( Q/( DATA“ I)-DATA2( I)+Q) ) ) CALL PLT( - I . X. Y. PLT'DAT) WRITE(O.20)AMIN.AMAX.ABSINT FORMAT( ’ AMIN’ .GI3.6.’ AMAX’.G13.6. ' ABSINT’ .'GI3.6) IF WAIT IS NOT REQUESTED RETURN IMMEDIATELY IF (.NOT.WAIT) RETURN WRITE(0.80) FORMAT( ’ BACKGROUND ADDS PLOT? ’ .3) READ(0.50) ARC FORMAT(AI) IF(ARG.EQ.’N’) GO TO 100 IF(ARG.NE.’Y’) GO TO 70 ’ THIS PORTION OF THE ROUTINE PLOTS‘THE BKG NOTE THAT 0 T=XIDK AND IOOFXIOIDK-XIDK TRMAX=-10.**10 TRMIN=-T'RMAX DO 85 I=I.NPTS TT=DATA2( I) IF (TRMAX.LT.TT) T'RMAX=TT IF (TRMIN.GT.TT) TRMIN=TT TRMAX=((TRMAX-XIOIDK)/Q)*100. TRMIN=( ( TRMIN-XIOIDK) /Q)*100. CALL PLINT(O. .ATMT.TRMIN.TRMAX.PLTDAT) CALL AXIS( I. I. I) CALL LABEL(XI'XT.6.YYTXT.6) DO 90 I=I. 100 T‘=( (DATA2( I)-XIOIDIO /Q)8100. X=ATMT¥FLOAT( I)/100. CALL PLT(-1.x. T. PLTDAT) WRITE(O. IIO) FORMAT( ’ CONTINUE? TYPE Y' .0) READ(0.50)ARG IF(ARG.NE.’Y') GO TO 100 RETURN END 3199 PROGRAM FUNCTION: 8 CODE FOR FAST ADC TO F4 CONVERSIONS PROGRAMMER: E. H. PALS VERSION: #16 (2.01) DATE: 11/15/76 (12/7/76) FILENAME: EPADBM.RA EXTERNAL ROUTINES: THIS ROUTINE Is USED IN CONJUNCTION WITH THE RALF PORTION OF THE PAST COVERSION PACKAGE (EPADRA.RA). LOADING INSTRUCTIONS: MUST BE LOADED IN LEVEL 0. ERROR CONDITIONS: IF THE REQUESTED CONVERSION FREQUENCY IS TO FAST FOR DATA STORAGE BY THIS ROUTINE AN ERROR *HALT* ‘WITH THE ACCUMULATOR =I WILL RESULT. THIS SHOULD NEVER OCCUR FOR A FREQUENCY REQUESTED OF IKHZ OR LESS. HIGHER FREQUENCIES ARE POSSIBLE IF THE NUMBER OF DATA POINTS REQUESTED IS SMALL. METHOD: THIS ROUTINE IS THE COMBINED BMODE PIPORTIONS OF THE INDIVIDUAL ROUTINES EPFREQ.RA AND EPADC8.RA. NOTES CONCERNING EACH OF THESE PORGRAMS ARE LISTED TOGETHER HERE FOR CONVENIENCE. CHANGES VERSION *IB EPADC8.RA: I. EAE INSTRUCTION SCA=7441 NOT 7411. 2. CORRECT DATA FIELD COUNTER DO NOT NEGATE POINTER. CHANGES VERSION *IC: 1. REWRITE SUBROUTINE CALL TO CORRECT PROBLEM IN CROSSING DATA FIELD BOUNDRIES. CHANGES VERSION *IB EPFREQ.RA(8MODE CODE): 1. BECAUSE OF THE NEW MODE OF DATA STORAGE IT IS NOT NECESSARY TO OPEN SYSTEM PAGE ZERO TO HOLD A CROSS PROGRAM COMMUNICATION FLAG. CHANGES VERSION 2.01: I. THE BRAID POWER IS SET TO ZERO BEFORE EXITING. NOTE: THIS PROGRAM IS WRITTEN FOR AN A/D CONVERTOR THAT IS WIRED FOR A STRAIGHT BINARY OUTPUT. THE NUMBERS RETURNED ARE POSITIVE FLOATING VARIABLES BETWEEN 0. AND 4096. THE EXTENDED ARITHMETIC ELEMENT IS USED TO AID IN THE CONVERSION TO A FORTRAN 4 VARIABLE COMPATIBLE FORM. BRIEFLY. THE AC- AND MQ ARE CLEARED THEN THE A/D VALUE LOADED INTO THE AC THE AC AND MQ ARE THEN SWAPPED AND NORMALIZED. THE STEP COUNTER IS USED TO FORM THE F4 EXPONET AND THE AC IS USED TO FORM THE FIRST WORD OF THE F4 VARIBLE MANTISSA. //////////////////////////////////////////////// ADC8 IS ALL 8 MODE CODE THIS PORTION PICKS UP VALUES SENDS TO F4/ ////////////////////////////(/////////////////// DEFINE I/O INSTRUCTIONS AND EAE INSTRUCTIONS SCA=7441 IEAE STEP COUNTER.OR?D INTO ACC CAM=7621 /CLEAR AC AND MQ SWP=7521 /SWAP THE AC AND MO \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\ //// //// / / AGAIN. CHECK. NMI=7411 SKPAD=6532 READB=6534 CLRFG=6524 FIELD] ADCB 0 IOF CAM TAD AR AND N7 CLL RTL RAL TAD N620l DCA .+1 0 AD .-I DCA CCDF JIZP CHECK 200 /FORHALIZE TO F4 LIKE VARIABLE /SKIP ON A/D FLAG /READ A/D BUFFER /CLEAR A/D FLAG /SAVE RETURN /DON‘T BOTHER ME I'M BUSY /CLEAR AC AND HQ /PICK UP DATA FIELD /MASK /MOVE TO /PROPER BITS /SKELETON OF CDF INSTR /SET TO EXECUTE AS /IN LINE CODE /SAVE FOR FUTURE REFERENCE /ELSEWHERE /DON'T CHECK IF TO SLOW ON ENTERING THE FOLLONING CODE IS RE-EXECUTED UNTIL ALL DESIRED VALUES HAVE BEEN OBTAINED. SKPAD JNP CHECK CLA 6111 IAC BLT SKPAD JIIP .‘I CAN READB CLRFG SW? NMI DCA TEMP SCA CIA TAD N27 DCAZ ARfI ISZ ARfI SKP JHS SUB TAD TEMP DCAZ AR+I ISZ ARfI SK? JMS SUB DCAZ AR+I ISZ AR+I SK? JHS SUB ISZ IIIIUI'I J”? AGAIN ION CDF CIF 0 JMPZ ADCB /GOINC TO SLOW? /NO. CONTINUE /CLEAR AC FOR POWER LEVEL =0 ICLEAR BRAID POWER SUPPLY LEVEL TO OFF /YES. LOAD I INTO ACC /***ERROR HALT WITH AC=I*** /GOT A VALUE? /NO. WAIT /CLEAR AC AND HQ /YES. READ IT /AND CLEAR THE FLAG /SWAP AC AND HQ SO EAE WONT THINK.NEG /USE EAE TO NORMALIZE /STORE TEMPORARILY /PICK UP NUM OF STEPS /NEGATE /ADD 27(OCTAL) /DEPOSIT EXPONET /INC POINTER. END DF? /NO. CONTINUE /YES. GO CHANGE THE DATA FIELD /GET MANTISSA IDEPOSIT IN F4 MANTISSA WORDI /DEPOSIT 0 IN 2 WORD F4 MANTISSA /DONE YET? /N0. GET ANOTHER POINT /ALL RIGHT I'M DONE /YES. GET SET TO RETURN THIS CODE CHANCES THE DATA FIELD 201 / SUB. 0 /SAVE RETURN LOCATION CLA CLL TAD N10 /TO INCREHENT CHANGE DATA FIELD INSTRUCTION TAD CCDF /PICK UP LAST CNIYGE DATA FIELD INSTRUCTION DCA .+l /SET TO EXECUTE AS IN LINE CODE CCDF, 0 /DO IT CLA CLL JHPN SUB /RETURN POINTING TO NEXT DATA FIELD ENTRY AR AR, 0000 /NILL CONTAIN DF IN BITS 9-11 0030 /WILL CONTAIN THE ADDRESS N7. 030? /FOR HASKING DATA FIELD N10. 0010 /T0 INCREHENT DATA FIELD N620]. 6201 /SKELETON OF CDF INSTR. TEMP, 0000 /TEHPORARY MANTISSA STORAGE N27. 0027 /NEEDED TO CORRECT EXPONET ENTRY MHNUHB ‘ MHNUHB, 0000 /ROOH FOR PASSING NUHBER OF CONVERSIONS 0030 . IEHEL COO /8HODE VARIABLE IS HERE / . ///////////////////////////////////////////////////////// / 8 MODE CODE FOR SETTING ADC HARDWARE CLOCK / ///////////////////////////////////////////////////////// / / BIT PATTERNS FOR THE RATE ENABLE WORD / RATE=(M)*(10EY) / AC6 MUST BE SET TO ENABLE CLOCK CHIP / / AC? 0 0 l I / AC8 0 l O I / ......................... / H: 0 I 2 5 / / AC9 I 0 O O O I l I / ACIO O I I 0 O I 1 0 / ACII 0 I 0 l O I O I / ................... - / = 4 3 2 I 0 -I -2 -3 / I/O DEFINITIONS RATE=652I /LATCH RATE WORD AND START IF AC6=0 CLRFG=6524 /CLEAR.A/D FLAG ENTRY #FREQ #FREQ. 0 /SAVE FOR RETURN IOF /CRITICAL CODE HERE CLRFG /MAKE SURE FLAG INITIALLY CLEAR CLA CLL TAD “8+2 /PICK UP M RTL RAL /PUT IN PROPER POSITION TAD E8 /PICK UP CLOCK ENABLE BIT TAD EXP8+2 /PICK UP EXPONET RATE /LATCH OUT AND START CLOCK CLA CLL /SET AC TO 7777 ION /ENABLE INTERRUPT SYSTEM CDF CIF O /RETURN JNPZ #FREQ /DEFINE 8 MODE CONSTANTS ENTRY EXPB EXPB, 0:0;O; /EXPONENT HERE ENTRY H8 H8, 030:0 IMANTISSA HERE E8. 0040 /CLOCK ENABLE BIT \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 202 PROGRAM FUNCTION: THIS mum WITH THE BIDDE MDULE EPADDMJIA CONTROL THE GBA A/D CONVERTOR. PROGRAMMER: E. H. PALS VERSION: 31A DATE: 12/7/76 FILENAME: EPADCR.RA LOADING INSTRUCTIONS: MAY BE LOADED IN ANY LEVEL. EXTERNAL ROUTINES: NONE OTHER THAN F4 LIBRARY ROUTINES AND THOSE IN THE BMODE PACKAGE (EPADBM.RA). METHOD! THIS MODULE IS A PACKAGE OF THREE SUBROUTINE- CALLING FORIB: CALL. FREQS(FFREQ) CALL SET( ARRAY. HUM. IERR) CALL GO VARIABLE DEFINITIONS: FREQ-CONVERS ION FREQUENCY ARRAY- NAME OF DATA STORAGE ARRAY NUM- NUMBER OF CONVERS IONS REQUESTED IERR- RETURN VALUE )0 INDICATES ERROR FOR FURTHER EXPLANATIONS CHECK INDIVIDUAL PROGRAM LISTINGS THAT FOLLOW. NOTE: SUBROUTINES GO AND FREQ WERE ENTIRELY COMPOSED BY THE AUTHOR. SET IS AN EDITED VERSION OF THE RALF LISTING FILE PRODUCED BY COI‘IPILING A FORTRAN 4 SOURCE FILE. THIS SOURCE FILE MAY BE FOUND ELSEWHERE IN THE GBA DOCUMENTATION. NOTE: THE BMODE CODE OF THIS PACKAGE COULD HANDLE UP TO 4096 REQUESTED CONVERSIONS AND SET COULD EASILY BE MODIFIED T0 ACCOMDATE THIS HOWEVER THE LIMIT HAS BEEN ARBITRARILY SET AT 2000 CONVERSIONS MAXIMUM. ERROR CONDITIONS: IF HUM IS (0 IERR IS IETURNED AS 1. IF M2000 IERRISRETURNASZ. IERRISRETURNEDASOWHENTHEREARE _NO ERRORS. AN ERROR *HAL'DR OCCURS WITH I IN THE ACCUMULATOR IF THE REQUESTED CONVERSIONS FREQUENCY IS TO FAST FOR PROGRAM EXECUTION. PROGRAM FUNCTION: START GBA ADC AT REQUESTED FREQUENCY PROGRAMMER: E.H.PALS VERSION: *IB DATE: 10/5/76 FILENAME: EPFREQ.RA CALLING FROM: CALL FREQS(FFREQ) WHERE - FFREQ IS FLOATING VALUE OF FREQUENCY CONVERSION mum. NOTE: THE FREQUENCY OF CONVERSION REQUESTED IS ROUNDED DOWN 'IO MULTIPLES OF 1.. 2.. AND 5. EXTERNAL ROUTINES: NONE. BUT THIS ROUTINE IS COMI'IONLY USED WITH SET AND GO ’IO PICK UP VALUFS \ FROM THE ADC. EXTERN EXPO / IN EXTERNAL BMODE MODULE EXTERN MB ITHIS ONE ALSO EXTERN J‘FREQ NAME OF BMODE ENTRY POINT SECT FREQS J A IFRQST . ‘ BPFREQ. F 0. XRFREQ. FRQTMP, EXP, FRORTN. *FRQST. \\\ MDET. FIVE. OUT. LARGE. SMALL. Q'fl'fl'fl"! JA BASE STARTD FLDA FSTA FLDA SETX SETB BASE FSTA LDX FLDAX FSTA STARTF 1083 FRQRTN.0 0 XRFREQ BPFREQ BPFREQ BPFREQ 191 BPFREQ,1 FRQTMP 203 ‘RALF CODE CALCULATE VALUES FOR.SETTING RATE FCLA FSTA FLDAX FSTA JEQ FSUB JLT FSUB JGE FADD FSUB JGE FLDA JA FSUB JGE FLDA JA FLDA ALN FSTA FLDA ALN FSTA FCLA TRAP4 FCLA JA FLDA FADDM FLDA FDIV FSUB JLT FADD FSTA JA FADD JA FLDA FSUB FSTA FLDA EXP FRQTMP TEMP OUT F01 SMALL F09 LARGE F010 F02 TWO FCI ‘ OUT F03 FIVE F02 OUT F03 0 MB EXP 0 EXPO IFREQ FRQRTN FCI EXP TEMP F010 F010 LDET F010 TEMP LARGE F010 MDET EXP F01 EXP TEMP ISET EXP 3 0 /LOAD FREQ /SAVE IT /IF ARG=0 DISABLE ADC /LESS THAN 1 NZ? IYES. FIND NEG. EXP /NO, GREATER THAN 1H2? /YES. FIND POS. EXP lRESTORE VALUE /LESS THAN 2? /NO . CONTINUE CHECKING lYES. SET M?2 /LESS THAN FIVE? /NO. GO SET TO'5 /YES. SET MF2 /BECOMES Mi5 IN 8 CODE /PASS TO 8 CODE /PASS TO 8 CODE /* TO DETERMINE EXP>0 IRESET. AND GO DETERMINE M /* TO DETERMINE EXP<0 \\\\\\\\\\\\\\\\\\ cxn, 'RET. IBASE. ARRAY. 1m, IGOBAKQ IARGS. 'TMP. ’LIT, FMUL FSUB JCT FADD FSTA JA FADD JA F I. F 2. F 3. F 9. F 10. PROGRAMMER: E. PROGRAM'FUNCTION: F010 F01 SDET F01 SMALL F01 MDET DATA ACQUSITTON. DATE: 11/30/76 2014 /RESET, AND GO DETERMINE M H. PALS SET UP ROUTINE.FOR.FAST FILENAME: EPSET.RA VERSION: METHOD: MODULE T0 EXECUTE PROPERLY. 81A THIS PROGRAM IS A MODIFIED VERSION OF THE RALF LISTING FILE OUTPUT OF FORTRAN IV COMPILER. THE ORGINAL FORTRAN FILE IS SAVED UNDER.THE READING OF EPSET.F4. NOTE: THIS ROUTINE NEEDS EPAD08.RA WHICH IS AN BMDDE IT IS IN THIS ROUTINE THAT THE EXTERNALS REFERENCED IN THIS PROGRAM ARE DEFINED. 'EXTERN AR 'EXTERN MHNUMB EXTERR FLOAT SECT SET JA #ST ORG .+10 “TEXT +SET + SETX IXR SETB IBASE JA 0+8 ORG .+6 ORG .+3 ORG .+3 ORG .+3 ORG IBASE+30 FNOP JA IRET FNOP 0:0 ORG .+3 ORG .+0003 ORG .+0011 0000 0000 0000 0001 2000 0000 0002 2000 0000 0002 3000 ITELL LOADER VARIABLE IS NOT IN THIS MDULE /SAME FOR.THIS VARIABLE cm. :ST. #00001. #00002. #00003. 'LHL IBASE 'GOBAK 'GOBAK30 IXR vBASE 0,1 IBASE OARGS rBASE.1+ AR ARRAY IBASE.1+ NUH IBASE.1+ IERR 0002.0 0003.0 ILIT*0000 IERR 0004.0 NUM 'LITW0017 '00001 ILIT+0003 IERR 0005.0 NUM 'LITW0000 000002 lLIT+0006 IERR 0006.0 IERR lLIT*0000 #00003 #NE ORTN 0007.0 NUM 300004 FLOAT .+0004 0 XNUM 0 MMNUMB 0010.0 'NE ORTN 0012.0 205 /PASS THIS.ADDRESS TO BCODE xnmxz IT'NEGATIVE ICHANGE.TO BMODE COMPATABILTTY IPASS VALUE‘TO OCODE \\\ ISTGO. EXTERN 'NE J A 'RTN THIS SECTION EXTERN ADCB SECT GO J A 'STGO 0 BASE 0 STARTD FLDA 30 FSTA IGORN FCLA STARTF TRAP4 ADCB FCLA J A IGORN 206 INITIATES THE DATA ACQUSITION PROCESS LOADER . SYMBOL ABS ADCRTC ADCB ADPLOT AINT ALOG ALOGIO ANYCHR ARGERR AXIS AXISS BACKB BURNDM CBLK CGET CHAR CLOCK CLTIME CPUT DAC DARK DATA DATE EXIT EXPB FLAG FLOAT FLOW FREQS FUNC GRAPH GRAPHS HEAD IABS IDEB IFIX INPUT INT IPLOT ISIGN ISIM LABEL LABELS LIMIT LOOKUP MMNUMB ONQB ONQI OUT PARIN PLINT PLINTS PLT PLTS POS POSDEM V23 09 /14 I77 VALUE LVL OVLY 13417 17372 11267 10600 32000 17242 17515 16133 16714 10670 00204 25445 32745 13615 11713 10101 32400 14756 20165 12600 20066 15654 16066 20175 10200 32400 20400 17066 00223 10720 11000 15353 20400 15143 24366 15634 27175 35400 32400 17372 15011 17242 20400 17242 17273 20027 16460 26336 32400 32400 17027 10677 10723 11510 11400 12400 32400 23117 32400 23464 32400 10400 33104 enou—a—oooooeeae—csea—coconut—o—o—eaooauaooooooocoeooa—ooooeoueooo 00 00 00 00 00 00 00 00 00 00 00 03 11 00 00 00 03 00 00 00 00 00 00 00 00 02 02 00 00 00 00 00 01 00 04 00 03 01 10 00 00 00 00 00 00 00 00 03 12 00 00 00 00 00 00 00 06 03 11 03 13 00 03 207 POSITN POS IT‘S POT PT PTS RESPND ROTATE RUN SAMPD SAP SAPDEM SAPINT SET SFL2 SIGN SMXNM SMXOPT SMXSUB SPBLK SUBONE SUBTHR SUBTWO SWITCH TIME TUNE TUNES MAIN 36000 00 00 01 02 03 04 00 00 01 02 03 04 05 06 07 10 11 12 13 00 00 01 an»uowaaaaoaaaan---~o 27402 35400 20400 24501 34400 32400 16765 32400 16370 32714 32400 11600 15372 32400 17754 22136 20400 20400 16672 13000 13000 13000 10000 16105 33121 11671 13000 ' 18T FREE LOCATION LVL OVLY LENGTH 20352 10416 03342 07660 07351 11116 00370 01260 00275 01162 01224 00737 01102 01616 01163 01651 01236 00637 01015 00744 00347 00205 sconce-Queen-oaooaaoaoam—u—a- 00 Ex: EX: Ex: 208 APPENDIX B Simple Hardware Control Approach for Sequencing Chemical Instruments Reprinted with permission from Analytical Chemistrx, Vol. 50, Page 291A, February 1978, Copyright 1978 by the American Chemical Society. 209 S. R. Crouch,‘ D. N. Baxter,” E. H. Pals, and E. R. Johnson3 Department at Chemistry Michigan State University East Lansing, Mich, 48824 210 Simple Hardware Control Approach for Sequencing Chemical Instruments In modern analytical instrumenta- tion. digital controllers have become more and more complex and flexible as instruments have become more highly automated. The controller di- rects the sequencing of various instru- ment functions. For example. in an automated gas chromatography sys- tem. the controller might be required to send signals to an automatic sam- pler for introduction of the sample into the column. to control the oven temperature and its temperature pro- gram. to control the sensitivity of the detection system. and to control the detection and integration of the vari- ous chromatographic hands as they elute from the column. Such control- lers may be simple fixed order sequen- cers or may require branching to skip certain functions if certain instrument conditions are set by the user li.e.. un- less the temperature program button and rate have been set. the Gf‘ con- troller would skip this part of its se- quencel. In modern instruments. controllers take the form of hardwired logic sys- tems. minicomputers or microproces- sors. The microprm‘essor is certain to become the controller of choice in the future for many operations. because the program (sequence) can be altered without changes in hardware. Also. even the most complex control opera- tions. with multiple and nested branches. can be readily carried out under the supervision of a micropro- cessor. However, the microprocessor requires the instrument designer to be re-educated in terms of software and processor capabilities. This edu- cation process may require months to ' To whom correspondence should be ad- dressed. ? Present address. Eastman Kodak (‘o.. Kodak Park. Building 82. Rochester. NY. 14650. " Present address. Department of (‘hem- istry. \\ ayne Statel niyersity. Detroit. Mich. JR'JHL’. years in order to get working systems into the laboratory with "intelligent“ instrument controllers. A few years ago our research group became heavily involved in controllers when we decided to undertake a project that involved the spatial pro- filing of atomic concentration above a filamentotype electrothermal atom- izer using atomic absorption spec- trometry. We desired to automate fully the operations of sample intro- duction to the filament. movement of the filament in both x and y directions away from the AA optical axis to pre- determined destinations. temperature programming of the filament. data ac- quisition of backgroundworrected peak area. and automatic return to po- sition "zero" for pickup of a new sam- ple. The filament position controller was intended to move the atomization cell freely over a total displacement of] in. in eitheriif'twodimensions. through the use of stepper motordriv- en micrometer translation stages. The controller was required to function in either a “local" mode. in which the de- sired filament position could be set by the user via front panel BCl) switches. or in an "on line" mode in which the controller received binary information from a minicomputer and functioned as a hardware slave to the processor. In addition. we required the controller to convert BCD position code to bina- ry Code in the local mode. to use posi- tion instead of displacement as the input tie. to remember where it is and to determine the direction to move and how far to gol, and to be ca- pable ofa hardware reset to an opti- cally defined reference position. Final- ly. we required the controller to cor- rect for backlash in the leadscrews of the translation stages in that if a re- quested movement was in the positive direction (away from the optical refer- ence). the controller would intention- ally move the cell to a known distance beyond the desired destination and then return to the true destination. in Contrast to movement in the negative direction. which would proceed direct~ ly to the destination without such ov- ershoot. In this manner. no matter whether the net movement was posi- tive or negative. the cell would be moved last in the negative direction. thus leaving the leadscrews tightly meshed in that direction of move- ment. Because of the complexity of our application. we did not look forward to relearning combinatorial and se- quential logic methods. component minimization techniques. and other forgotten digital design methods. Mi- croprocessor approaches were consid- ered but later abandoned because the interleaving of real-time tasks each with their own timing requirements put the problem on a level of complex- ity where our then meager micropro- cessor experience could not hope to reach in a reasonable time. Fortunate- ly. the sinking feeling we had original- ly experienced was short-lived when we discovered the simple approach to the design of complicated controllers described in this paper. Even for our complex application. this systems- level approach to controller design en- abled us to design in about 3 h a unit requiring over 50 10's per motor con- troller. Construction and debugging of the position controller required ad- ditional time. of course. The speed of our design was made possible by the use of a method. originally described by Richards (1 ). that allows all the complex sequential operations to be treated by using only a simple flow chart description at the beginning and by implementing the flow chart with 3-4 MSl lC's. To understand the approach. we present in the first section of this paper the general concepts and princi- ples of the “state" of a controller (2) and the simple implementation that results from the Richards (Hap- proach. We then present a chemical example of a "fall-through" sequencer 211 'III’OII YOAISIII FDIC Y I OI IO .L_. ”It"! I Pl” one thauann 'Dltilo. '—'..1AYI he; 7'. 'IIFOII YOAISVII rue'c‘r‘ro. L—«Deti\rl not Figure 1. Basic flow chart units for transfer conditions and transfer functions. N: state number that controls an automatic fraction collector used in elution chromatogra- phy. 1n the last section we describe a branching sequencer and illustrate its use as an electrothermal atomizer po- sition controller. Concept ot the State Automatic sequencing of measure- ment and control operations is highly desirable for modern chemical instru- ments. We assume here that the oper- ations to be sequenced are ON-OFF operations that can be controlled by logic level signals. The sequencer must then produce logic level outputs for each controlled operation and must be responsible for the timing relation- ships of the appropriate logic level sig- nals. There are a variety of approaches to the design of sequencers (3). How- ever. the systematic approach present- WI ed here allows even the most complex sequencing applications to be handled with ease. To help understand this approach, several terms must be defined. This can be done most conveniently with the aid of an example. Consider the controller for the thermostat on a temperature bath. The method de~ scribed by Richards (1) considers it to have three states: State 0 - thermo- stat off-heater off ; State 1 . heater on: and State 2 = heater off. in State 0 the thermostat controller waits for the condition of the thermostat power switch to be on. The on condition of the switch then is referred to as a transfer condition. When the transfer condition for State 0 is true. i.e.. the switch is on. the controller advances to State 1. The process of this advance causes a transfer function to occur. I "OI Illt I II ISO. The heater is turned on. The second state (State 1) tests to see if the bath temperature exceeds the limit set on the thermostat. When the bath tem- perature does exceed the limit. the controller steps to State 2. which causes another transfer function to occur. The heater is turned off. The transfer condition for State 2 is a bath temperature below the thermostat limit. When this condition is met. no transfer function is required except to return to State 0 and repeat the cycle. Viewing such a trivial example in terms of states, transfer conditions. and transfer functions may seem over- ly complicated. but it is useful for two reasons. First. the method is also ap- plicable to much more complex con- trol applications. Second. with this ap- proach the circuit design is greatly simplified by use of a standard circuit for the heart of the controller. The application of this approach in- volves first converting the states. transfer conditions. and transfer func- tions into a standard flow chart for- mat. The two basic flow chart units for each state are shown in Figure 1. The unit used depends on what is to occur at that particular state. Either unit contains a diamond-shaped box that represents the state and contains the transfer condition. Depending on the application. the basic unit will also contain one or two rectangles that rep- resent the transfer functions which are to occur when the transfer conditions are met or not met. in this method the transfer function on the “no" leg (if one exists) is available only if the transfer condition not being met causes a move to a State I other than the present one. This transfer func- tion, if it is used. is called a secondary transfer function. as opposed to the primary transfer function on the “yes" leg. Figure 2 shows the flow chart for the bath thermostat exam- ple. No secondary transfer functions are required for this application; therefore. the controller is an example ‘reecrtea e Figure 2. Sequencer flow chart for bath thermostat example 212 OOIA . I .I7 I ' I -1’ "Put. ‘35:”. ggcg‘gg O—OOICOIDAIV I use-ant ’ "”1"" ' 'UUCIIOI‘ C CLOCI—I SIAILI I'm ..3 ._.p to ureut (inlet ""’ on 0' ALL __I JUI' FUNCTIONS I . .‘LICI HCLIC‘ . ' —'. I 00"”? IIQDLC I —. II'UI —- 2 I —. 'RIIAIY 'Ilaulfth ' a g" g g" ' IIAIOFII COIOIIIDU. e IULTI'L‘I‘I O‘CODI. e '”.c"°.. a '“I'I.' O -III'I I'I F—H’ —- ll et—D Figure 3. General schematic diagram at controller of a fall-through sequencer (no condi- tional branches). The “heart" of a sequencer based on this approach can be implemented with the standard integrated circuits shown in Figure 3. From the flow chart. the number of states in the se- quence and the various transfer condi- tions and functions are known. If no secondary transfer functions are nec- essary. the secondary n-bit decoder can be eliminated. Thus. the heart of a sequencer consists of a k-bit coun- ter. an n-bit multiplexer. and one or two n -bit decoders. where n is the number of states in the sequence and n S 2*. The fit -bit counter keeps track of the state of the controller. Logic level sig- nals representing the. various transfer conditions are connected to the n -bit multiplexer. The outputs of the state counter determine which transfer con- dition is supplied by the multiplexer to one or two n -bit decoders. The mul- tiplexer output also allows the state counter to increment to the next state on the next clock pulse after a “true“ transfer condition. The presence of a “true" transfer condition at the multi- plexer output causes the appropriate primary transfer function (as selected by the state counter) at the output of the decoder to go true. However. only a pulse occurs on the selected decoder output line. because the next clock pulse increments the state counter to the next state. If the transfer condi- tion is false. either a secondary trans- fer function can be generated (at the secondary decoder output ). or the se- quencer merely waits in the same state until the transfer condition becomes true. To provide the capability for the sequencer to skip certain states under the appropriate conditions. a state counter capable of parallel loading is used. When a jump or branch in the sequence is necessary. the load (LD) line of the state counter is activated. and the new state is loaded into the counter through the data inputs. An eight-state sequencer can be readily implemented with a 74163 counter. a 74151 multiplexer. and one or two 7442 decoders. At current sin- gle unit prices. they can be obtained for just over $3.00. Fall-Through Sequencer The fall-through sequencer is the simplest type. In this sequencer the only decision to be made is whether to remain in the present state or pro- ceed to the next state. ln a closed-loop operation this decision is based on re- ceiving an “all done" signal (flag) from a previously actuated circuit. In an open-loop operation the change of state may be immediate or may occur upon receiving a signal that a time delay has elapsed. A chemical example of a fall- through sequencer is a controller for an automatic fraction collector used in elution chromatography. Typically. the fraction collector has a rotatable tray that contains vials sequentially rotated beneath the column outlet valve. When a vial is directly beneath the outlet valve. the valve is opened for a preset time. then closed. and the next vial rotated into the receiving po- sition. These motions are repeated until the desired number of fractions has been collected. In Figure 4 the decisions and ac- tions involved in controlling this ap- paratus are represented in flow di- agram form. along with the external inputs used to make the decisions. As- sume that the operator has initialized the apparatus. by rotating the first vial into position beneath the valve. and loaded the number of fractions desired into a counting register. Also, assume that the controller is initially in State 0. Condition A is satisfied since the counter is nonzero; therefore. the controller generates Function A. which is to open the delivery valve and to start the delay timer. Now the con- troller moves to State 1 and repeated- ly queries the delay timer until it sig- nals that enough solution has been de- I CI 'UICIIOI A 'WCII" O 3.73.“; 5:33: ._I SIAII I'll! DILM' 1”? VIII. IDVII. 'UICI I 0' C NCQIIII‘I VIAC‘IIOI CWIIII 10' ‘ IA! ‘ Figure 4. Sequencer tlow chart for automatic traction collector CORD] 1 I 0" CAI'IACTIOI COUITII I. IOIIEIO CUHIII IILAY I. 00" CCIIICIOSIIVCN I'IUCI rt TIT? 213 cs A egg-1" . 'UICIIOIS .. I u ' r'troese nus. sun H s sin stictess nus. novs sit a t. trustee um. ester-cur m—cu cu e>—r1’ t" .A 0e 'c u uses: ' II a ID—F'E e s: : ‘9 sh cs . r a II c . ce——li e s 1 cc “l: nutrinsxse s s s s 1 Flame 5. Schematic diagam of traction collector controller livered (Condition B). When Condi- tion 8 has been satisfied, the control- ler closes the valve and starts the vial tray moving (Function B). Now the controller moves to State 2 and waits for a position indicator microswitch beneath the outlet valve to be tripped (Condition C). When Condition C is met. the controller must decrement the fraction counter register, stop the tray. and effect a jump back to con- troller State 0 (Function C). This se- quence is then repeated until the frac- tion counter register is decremented to zero. When this happens. Condition A can never be met. The apparatus halts since it becomes hung up in State 0. This controller can be quite easily implemented with three IC's: a 74163 counter. a 74151 multiplexer. and a 7M2 decoder. Of course. additional packages may be necessary for such things as delay timing. but these three IC's handle the generation of all the signals necessary to initiate the ac- tions at the appropriate times. Figure 5 shows how these lC‘s are intercon- nected and also the input and output signals required in this particular ap- plication. When power is turned on, an initialize pulse (INIT) is required to clear the fraction counter register and to assert the CLEAR (CLR) input of the state counter. This forces the state counter to State 0. The Q. Q3. and Qc outputs of the state counter are all LO (zero). which sets the multi- plexer’s Y output L0. This LO signal is fed to the state counter's ENABLE P (EN P) input. which inhibits the counter from counting clock pulses at its CLOCK ( C LK) input. Thus. it re- mains in State 0. The multiplexer's W output (the complement of the Y out- put) is directed to the decoder’s D input. Output W is HI. and examina- tion of the truth table for the decoder indicates that the 0-7 decoder outputs must be H] when D is HI (LO true logic is used at these outputs so that a function is generated only when the output goes L0). This means that ini- tially none of the functions is being as- serted. When the operator gives the “GO" command. the number of frac- tions desired is loaded into the frac- tion counter register. and Condition A is satisfied. Now the multiplexer's W output goes L0. and the decoder points to a decimal 0. whi_ch asserts the Function A signal (FA). Function A triggers external circuit- ry to open the delivery valve and start a time delay circuit. In addition. the multiplexer Y output is H1. so that the state counter's ENABLE P input is asserted. and on the first clock pulse the counter is incremented once (State 1). Now the multiplexer shifts from selecting data channel 0 (Condition A) to data channel 1 (Condition B). If the required time delay has not yet elapsed, Condition B is not yet satis- fied so that the multiplexer Y output falls. locking the state counter in State 1. and the W output goes HI. concludo ing function A and inhibiting the de- coder from generating any functions. When the required time delay has elapsed. Condition B is satisfied. and a similar sequence occurs in the state counter. multiplexer. and decoder. The multiplexer's W output enables the decoder. and its A. B. C, and D in- puts point to decimal 1. Thus. output 1 (Function B) is asserted. This triggers the valve to close and starts the tray moving. The multiplexer Y output goes H1. allowing the counter to count one pulse and move to State 2. Now the state counter requests the multiplexer to address the status of Condition C. When the new sample vial reaches the position beneath the outlet valve. a microswitch is tripped and Condi- tion C is satisfied. Again this activates the decoder. and Function C is assert- ed. Function C stops the tray and dec- rements the fraction counter register. Also. since this is the last function in the sequence. it is used to assert the CLEAR input of the state counter and return the controller to State 0. Unless this was the last fraction to be collected. the fraction counter reg- ister will be nonzero when the state counter enters State 0 so that Condi- tion A is immediately satisfied. Thus. as soon as the Function C pulse has cleared the state counter to State 0. Function A will be generated. and on the next clock pulse State 1 will be achieved. This entire delivery se- quence will continue until the fraction counter register reaches zero. which prevents Condition A from being sat- isfied. Then the apparatus will halt because the controller becomes hung up in State 0 until the operator inter- venes to start a new collection se- quence. Branching Sequencer In many cases. it is desirable to have a sequencer capable of branching; that is. one in which sections of the basic state sequence may be skipped. re- peated. or otherwise altered as re- quested by the instrumentation under control. An example of such a sequen- cer is the electrothermal atomizer po- sition controller mentioned previous- y. The flow diagram of its sequence is shown in Figure 6. The system waits in State 0 until data representing a new location are received. and a com- mand to move is given. Upon receipt of this command. the overflow flag is cleared. and the system determines if it is being operated under local or computer control. If control is local. the desired destination has been en- tered in BC D format from front panel thumb-wheel switches. which requires a BCD to binary conversion. A check is made to see if the system is free of overflow; if so. another check is made to see if BCD to binary conversion is complete. If conversion is not com- plete. the registers are clocked. and the checks for overflow and complete conversion are repeated. If an over- flow should occur. the sequence will abort to State 0 with the overflow flag set. (Overflow results from entering a destination outside the defined lim- its of the system.) If no overflow oc- curs. then upon completion of the con- version. the stepper motor direction is determined, and the stage begins to move. If control is from the computer. the BCD to binary conversion is un- necessary. Thus. this section of the se- quence is omitted. The stage moves until the destina- 21“ tion is reached. At this point the sys- tem checks to see if the direction of movement was positive. If so. the stage continues to move 10 additional increments positive. and when fin- ished. reverses direction and comes back 10 increments negative. lf move- ment was originally negative. the se- quence is concluded immediately. In this manner. gear play is removed from the mechanism by assuring that movement always occurs last in the negative direction. To implement a branching sequen- cer such as this. it is necessary to add only one additional decoder 1C to the basic controller circuit. The actual wiring is shown in Figure 7. The ac. tions of this controller are identical to the simpler three-chip system pre- viously discussed as long as the basic. nonbranching sequence is followed. If a branch is called for. however (if the selected data channel of the multi- plexer is LO when a potentially bran- chable state is reached). the following events occur. The L0 state of output Y from the multiplexer causes the function pulse to be generated by the second decoder instead of the first de- coder. This function pulse is used by the instrument to perform tasks in the same manner as any function pulse from the first decoder. In addition. this pulse is also fed back to the state counter where it serves simultaneously to provide binary data representing the state to which to branch as well as to load those data into the state coun- ter. For example, in the positioner se- quence. if the system is under comput- er control when State 1 is entered. the LO level at the data Channel 1 of the multiplexer disables the first decoder. but causes the second decoder to gen- erate Function BZ. Function B2 is used in the circuitry to update the di- rection of movement and start the motor. just as Function 01 of the first decoder does under local control. But it is also present at the C and Load (L) inputs of the state counter so that as it occurs. the state counter is forced to skip directly to State 4 through par- allel loading. All additional functions that are part of other such branches are similarly directed back to the Load and appropriate data inputs of the state counter. by use of simple gates as shown to OR them together as required. By adding additional multiplexer and decoder chips to the controller. it is possible to produce sequencers of even greater complexity in which the branches consist not only of single rescue- I! O" ensure- "I“ It!!! IMHO! It stern ‘ III!!!" 0.81!” O In!!!” t! I'M'Iu Cll F I'm?!” '(l — II? N Figure 6. Sequencer flow chart tor «mm positioner yer-cue- si Jaim- 215 I1 AT! COUIYII IULTIPLIIII chfloll UICDDII Figure 7. Schematic diagram at filament positioning controller function pulses. but also of additional states or even complete subsequences reminiscent of nested computer sub- routines (1). Similarly. it is also possi- ble to substitute basic chips different from those employed here to produce sequences of more than eight basic states However. such systems can quickly become unwieldy In their complexity and might very well be better performed using microproces- sor-managed controllers even if the user has no previous experience with such devices (4—6). Conclusions We have described in this paper a hardware approach for designing in- strument sequencers. We feel that this approach greatly reduces design time, yet allows complex sequences to be readily implemented The increasing education of chemists as to the poten- tial. the software, and the interfacing of microprocessors will certainly lead to a level of controller complexity at which a microprocessor is the sequen- cer of choice. Even so. the concepts presented here should enable simple controllers to be designed and imple- mented readily by chemists unfamiliar with microprocessors or for applica. tions in which it is undesirable to “tie up" the processor in simple. unchang- ing control tasks In addition. the hardware approach is advantageous for high- speed control functions and for applications that in- volve the interleaving of tasks with quite dissimilar timing requirements. In fact. we have found In our own lab- oratories that hardware sequencers are important adjuncts to instrumen- tation systems supervised by mini- computers or microcomputers. Be- sides the electrothermal atomizer po- sitioning systems. we have used this approach to design a minicomputer data acquisition system and a commu- nications network between several mi- croprocessors and a minicomputer. The simplicity and power of the ap- proach should prove valuable to other chemists involved in the automation of chemical instrumentation. Acknowledgment We are grateful to T. V. Atkinson for his assistance in the use of a com- puterized graphics facility for the pro- duction of our figures. Relerences (l) C L. Richards.£lerlronics, 46(3). 107 (l 97)3 (2) T. R.B esklee.‘ Digital Deslign with Standardl M51 and LSI". 17 20. “9’71ey-lnterscience. New ork N. Y.. (3)19H.5 V. Malmstadt. C. G. Enke andS. RC rcou .“Electronic Measurements for Scientists". pp 6627 York. N.Y. 179 . (4) D R. McGlynn.“Micr rocesso rs" Wiley- lnteracience Ne! 'ork. N Y.. (5) B. Soucek “Microprocessors and Mi- crocom uters .“'iley- lnterscience. New York. M (6 ) T. R. Bla kleslee.‘ Digital Design with Standard MS! and LSl' -232 “9'i7ley- -lnterscience New York?0 N. .Benjamin New '..B was recipientn briflh a summer and full- year ACS Analytical Fellowship under the span- somhip of (Procter & Gamble Co. Cincinnati. S. R. Crouch D. N. Baxter E. H. Pals E, R. Johnson