Microcomputer control and data system for automated multiple flow injection analysis

Introduction Flow injection analysis has been shown to be a versatile technique for the analyses of many types of samples using unsegmented continuously flowing streams. Several recent reviews have discussed a variety of aspects of this field 1-5]. The automated version of flow injection analysis (usually called automated multiple flow injection analysis or AMFIA) is attractive for those laboratories processing large numbers of samples or which require good precision, and several workers have been exploring this type of flow injection analysis [6-25]. There are three general types of AMFIA systems (Figure 1): the standard configuration with low or medium dispersion, the titration system with the large dispersion and the dilution system with low dispersion [22]. Each type of AMFIA configuration requires precise control of the sample tray, probe and sample injection valve. The dilution system also requires the operation of a fraction collector. Data must be acquired and processed by both the standard and titration systems. In this communication methods are described for the automation of all three types of AMFIA systems. The system described uses the Rockwell AIM-65 microcomputer, some associated electronics and layered user-oriented software. This work is a continuation of earlier efforts to provide full automation of AMFIA systems [22,23]. Malmstadt et al and Slanina et al have also described the use of computers for the control of FIA systems 19,24,25 ].


Introduction
Flow injection analysis has been shown to be a versatile technique for the analyses of many types of samples using unsegmented continuously flowing streams. Several recent reviews have discussed a variety of aspects of this field [1][2][3][4][5]. The automated version of flow injection analysis (usually called automated multiple flow injection analysis or AMFIA) is attractive for those laboratories processing large numbers of samples or which require good precision, and several workers have been exploring this type of flow injection analysis [6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25]. There are three general types of AMFIA systems ( Figure 1): the standard configuration with low or medium dispersion, the titration system with the large dispersion and the dilution system with low dispersion [22]. Each type of AMFIA configuration requires precise control of the sample tray, probe and sample injection valve. The dilution system also requires the operation of a fraction collector. Data must be acquired and processed by both the standard and titration systems. In this communication methods are described for the automation of all three types of AMFIA systems. The system described uses the Rockwell AIM-65 microcomputer, some associated electronics and layered user-oriented software. This work is a continuation of earlier efforts to provide full automation of AMFIA systems [22,23]. Malmstadt  The pneumatic sample injection valve is activated by a 4-way solenoid valve and is configured in the "INJECT" position when the AC power is off; this arrangement reduces the level of electromagnetic interference (EMI) during data acquisition by the computer. The fraction collector tray advance mechanism is activated through its drop counting circuit. During normal operation, the fraction collector can be preset to change collection tubes after to 990 drops. To allow computer control, a 3-way manual switch was placed in the counter circuit ( Figure 2) to route the current, normally through the drop sensor (a photo diode), to an optically isolated solidstate relay. The AIM 65 simulates the drops by breaking closure in the drop-counting circuit. A low-pass filter in the control limits false triggering due to noise. As shown in Figure 2, filtered detector signals are amplified by a low-impedence (10-3 ohm) operational amplifier and digitised by a 12-bit analog-to-digital converter. A wide range of detector voltages (between-20 and +20 volts) can be evaluated by adjusting potentiometers and changing jumpers connected to the integrated circuit amplifier and A/D converter. The 12-bit analog-to-digital conversion yields a resolution of one part in 4096 or 1/100 mV for a typical 50 mV full scale signal. Detailed schematics and a parts list are available upon request from the authors.

Software
The instrument control and data system (ICDS) was developed to provide three levels of operation depending on the operator, analysis and hardware configuration. When one of the typical AMFIA configurations is used to perform a well-defined routine analysis, the system can be operated as a "turnkey" instrument by persons with minimal training.
At a higher level of user sophistication with typical AMFIA hardware, the turnkey can be modified to perform novel analytical procedures. Operating the system in the turnkey mode and .programming the functions to be carried out during turnkey operation are both supervised by the ICDS program. Expansion of the system to include different hardware and software must be performed outside ICDS program control and requires a moderate knowledge of electronics and of programming in BASIC and 6502 assembly language. Depending on the needs and training of the operator, predetermined operations may be executed in the turnkey mode, a new set of "turnkey" operations may be set up in the program mode or the ICDS operating system may itself be modified. Complete flexibility is available to the analyst in setting up the turnkey, while the demands on the operator in executing the turnkey are very simple.
The ICDS software and data occupy three regions of the AIM 65 memory, and each can be saved or retrieved independently. Thus, new programs or data can be loaded in one region without disturbing others. An application of this capability would be the insertion of extensive BASIC calculation programs to operate on blocks of old data that had been stored on cassette tape. The first section of the AIM 65 memory is allocated to the BASIC program. The latter regions are allocated to the program/data stack and to the assembly language programs. The BASIC program interacts with the user, supervises execution of user programs and performs calculations. Since BASIC programs execute relatively slowly, tasks such as real-time peak measurements are programmed in assembly language. Sample data and user programs are stored in a 130 by 3-byte stack outside the BASIC memory region to permit packing as hexadecimal numbers. This conserves memory and also provides file protection. User programs are stored from the top down and sample data is stored from the bottom up. The stack holds information for N samples and 130-N program lines. In practice most user programs are less than 10 lines long and therefore storage is generally available for up to 120 samples in one or more runs.
Six user program instructions provide three timed output states, a conditional jump and two data acquisition modes. As described in Table 1, each instruction has one or more arguments that are specifically called by prompts display as the instruction is entered into the user program. Each instruction performs a complete functional task required by the AMFIA system. The timed output instructioris specify the states of four relays for periods up to 100 minutes in 1/10 second increments. As their names imply, "SAMPLE" fills the sample loop, "INJECT" places the sample in the stream to the detector and "PULSE 4" briefly interrupts relay 4 to advance the fraction collector or to activate an event marker on a recorder.  The "JUMPIF" instruction will cause conditional or unconditional jumps to any user program line or stop the program. The first argument for this instruction specifies the input condition from the A/D converter under which the jump is to occur. If the input equals or exceeds the argument value, then program execution jumps to the program line specified in the second argument. Since the A/D output to the AIM 65 is always at least zero, unconditional jumps can be programmed by setting the first argument to zero. A value assigned to the second argument that is beyond available user program space will terminate execution of the user program.
Sample peak area is an essential measurement for standard AMFIA operations, and peak width is required for titrations.
Acquisition of data for sample peak area or width is accomplished with the "GETPKA" or "GETPKW" after the detector signal persists above a threshold that is set by the first argument of the GETPKW instruction and ended when the detector output persists below the value of the second argument. The second argument must always be less than the first argument. At the conclusion of each area or width evaluation, the cup number and sample data are printed and stored in memory. The pre-integration baseline is also printed for data corrections and identification of system failures.
Printed copies of these programs are available upon request from the authors. Operation A flow diagram of the display prompts, the operator keyboard entries and the printer outputs is shown in Figure 3 for the turnkey mode. The turnkey operation starts by printing the assay name and prompting entry of up to 60 characters of run identification. When the run identification has been entered, the assay name, identification, standard concentrations and user program are printed as part of the experiment record, and the display prompts the user to enter the first cup number and the number of cups in the run. These values are then printed and. the display queries whether or not to execute the analysis. A negative response at this point returns the program to the beginning request for "RUN ID", and an affirmative response initiates the analysis. As the run is executed, the active program function and number of counts to the next program step are displayed. When an  individual analysis is complete, the cup number, peak area/ width and base-line are printed. At any time during the run, program execution can be interrupted for hardware adjustments by hitting the F1 special function key and then continued from the same point or with any cup number by entering "CONT". When the analysis of all samples is complete (which may include multiple runs), a standard curve is calculated using a least squares fit of the standard concentrations and data from the first and last six samples in the data set. The printout includes the assay name, "RUN ID", standards, user program, area or width, and concentration.
Data can also be stored on cassette tape or transmitted serially to a central computer system (programs for communication between the AIM 65 and other computers will be presented elsewhere). During turnkey operation, the operator need only confirm the assay name, supply identificaton of the samples in the run and specify the number of cups and starting location.
If it becomes necessary to generate a new turnkey system, the analyst can enter the edit mode by typing "EDIT" in response to the "RUN ID" prompt ( Figure 3). In the edit mode, the analyst can list the area/width data or the current program, alter the existing turnkey program and standard values or return to the turnkey mode. Individual parameters can be altered without disturbing the rest of the system. The six program words (see Table 1) available for control and data processing in ICDS are sufficient for the typical AMFIA operations in the author's laboratory; most assays can be performed with four-line programs. Figure 4 shows a program for operating a standard AMFIA system (output and data aquisition arguments are in tenths of second). Line of the user program causes the sampler probe to dip into the sample and the sample injection valve to switch to the load

Discussion
Routine chemical analyses of large numbers of samples are required by many divergent professions in such fields as medicine, public health, agriculture and industry. The developer of automated analytical systems is challenged to accommodate the range of professional training and levels of computer skills found in these environments. Analytical protocols are often well defined for routine analysis, and microprocessor controlled systems designed to automate them can function satisfactorily with little user input. These turnkey instruments are attractive since they can be operated after minimal training, require no prior experience with computers, are insulated from user carelessness or ignorance, yet can operate complex assay systems. However, these same systems must often perform concurrently in a research environment where experimental conditions and methods are less well established. Here turnkey instruments often do not allow the sophisticated user adequate control and computational flexibility, and a less rigid system would be desirable. A common response to this conflict is to abandon automated equipment in the research setting or to purchase a different instrument tha't requires considerable user sophistication. The two-instrument approach is expensive and is a barrier to the transfer of methodology from the research environment to the routine analysis laboratory.
The systematic development of automated analytical instruments that serve both expert and novice is important for the continuing development and acceptance of automated chemistry. Microprocessor controlled instruments should allow not only turnkey operation but structured alteration of all functional parameters and full access to the microprocessor and its associated peripherals. The modular, inexpensive control and data system for automated multiple flow injection analysis described in this communication is an attempt to provide this type of instrumentation. The ICDS software was developed to simplify the demands on the user in operating the various configurations of AMFIA without compromising the potential for system expansion and change. In the simplest case, the user need only load the ICDS software into the AIM 65 from a cassette tape by following a few monitor  4 October 1981 display prompts, enter the run identification and sample cup locations, and request calculations at the end of the analysis. The final printout supplies hard copy of the experiment, and the data can be saved on cassette tape through a simple prompted procedure.
In circumstances requiring greater control and computrational flexibility, the system allows limited (ICDS) or complete access to the microcomputer hardware and software and illustrates a stratified and alterable approach to automated systems software development. At one level the analyst can change the turnkey program and parameters essential to AMFIA operation without having to know the AIM 65 programming languages; at another level, the entire system can be changed. In the author's laboratory it has often been desirable for an "intelligent" instrument to control some associated but originally unrelated device or to include new features in its program. The system described here provides the potential for changes such as these that were not envisaged by designers at the time of instrument development.
The concepts discussed in this communication are a further extension of the basic premises that automated instrumentation should have modular hardware and software and should be useful at several levels of sophistication. The rapid proliferation of microprocessors in the laboratory, the evolution of user sophistication with micro-electronic devices and resurgence of the concept of modularity make it appropriate to implement these features whenever possible.