A FORTH-language, computer-controlled potentiometric titration

Aug 1, 1985 - A Simple Laboratory-Constructed Automatic Titrator. Kurt L. Headrick , Terry K. Davies and Aaron N. Haegele. Journal of Chemical Educati...
1 downloads 0 Views 1MB Size
commrter ~ e r i e62 ~.

edited by JOHNW MOORE Eastern Mlehlgan Unnveraty. Ypslianti, MI 48197

Bits and Pieces, 25 Most authors of Bits and Pieces will make available listings and/or machine-readable versions of their programs. Please read each descrintion carefullv to determine compatibility with your own computing environment before requesting materials from any of the authors. Revised Guidelines for Authors of Bits and Pieces appeared in the December 1982 and December 1983 issues of THE JOURNAL. Several programs described in this article and marked as such are available from Project SERAPHIM. If you do not already have a SERAPHIM Catalog, request one from: John W. Moore, Director, Project SERAPHIM, Department of Chemistry, Eastern Michigan University, Ypsilanti, MI 48197,

A. A. Verbeek

University of Natal P.O. Box 375 Pieterrnaritzburg3200. South Africa The use of inexnensive sinele-board microcomnuters in the undergradaute chemistry laboratory to gather data rapidlv and to control exnerimental vrocedures is now fairlv commonplace. ~ o w e v kif, rapid data collection is required, programs need to he written in assembly language or entered directly into memory as machine code because Basic, the common high level language available on such computers, runs rather slowly. The absence of machine instructions for arithmetic operations, other than addition and subtraction, makes it inconvenient to use assembly language for the calculations that are typically required as part of the overall oroeram. " For some years a n experiment involving a computer-controlled potentiometric titration has been part of the undergraduate lahoratory work done in this department. The experiment involves the use of a 6502-based. AIM-65 sineleboard microcomputer (Rockwell lnternathnal) to control the stirrer. the buret additions, the gathering of dieitized data from theelectrode system and to ialculateand print the endpoint volume. The control program was written in Basic, which effectively did no more than call assembly language subroutines for control and data-gathering purposes and then use the returned data for the necessary calculation. Recently, two AIM-65 ROM's were purchased and the entire program for the experiment has been written directly in FORTH. FORTH (1,2) is a fourth-generation language designed to provide a relatively high-level language which runs sufficiently quickly for assembly-language subroutines to he largely unnecessary, although, if full machine speed is essential, an assembler allows critical parts of the program to be that looksand behaves convertt.d toasseml~ly-lanyuayeci,de likr an ordinary FORTH definitiun. FORTH uses a stark data structure for most of its operations. A stack is a dedi-

.

cated part of memory into which variables and operatorscan he pushed and from which they can he popped Cjust like a stack of cafeteria trays). The language is based on a dictionary of definitions, which may be extended by the users as a program is huilt up, each newly defined word becoming part of the dictionarv. It encouraees ton-down nromam desizn and bottom-up k i t i n g and k i n g of progra&, each i e fined word beine canahle of indenendant testine and correction. I t uses ~ e i e r i Polish e ~ o i a t i o nand allows very easy machine access. The laneuaee is hierarchical in structure. its object code is space e f f k e i t in memory, and its p~ogr&ns are easily transportable between the different microprocessors in common use. It is being used as a programming :uage in some commercially available instrumentation example, in a computer-controlled sequential argon ICP emission spectrometer) and is a very useful programming language for instrumental and laboratory control purposes. The apparatus used in the experiment is indicated in Figure 1while Figures 2 and 3 show the interfacing in more detail. Apart from the microcomputer and the motor-driven uiston buret. which were available in the laboratorv. the rest bf the hardware was easily built from readily avaiiable, lowcost components. The viston buret is a Metrohm MultiDosimat ~ 4 1 5 which , has the advantage of having a fixed 0.10-ml addition mode of overation but does not have automatic sell-filling. An autom.aticself-filling huret could easily be substituted and wntrolled by the microcom~uter.The (250-V, 6magnetic stirrer is operated thro"gh a OAK R . ~ C amp contacts; 12-V, 100-ma coil) relay connected to the CB2 control line of 110 port B of the AIM-65. A similar relay is used, under CA2 control line of 110port A of the AIM-65, to control buret additions. The reference electrode is a standard calomel electrode from a pH meter, while the indicator electrode found most suitable is a nlatinum eauze electrode from an electrodeposition apparatus. This latter electrode was found to cause less interference in the stirrine of the solution in the 100-ml tall-form beaker used as a &ration

-

Figwe 1. Black diagram of apparatus for computer-controilsd patentlometric titration experiment.

Volume 62 Number 8 August 1965

687