[go: up one dir, main page]

0% found this document useful (0 votes)
5 views5 pages

JAMMC-20-189

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 5

Journal of Automatic Chemistry, Vol. 20, No. 6 (November-December 1998) pp.

189-193

Automation of Hitachi U-2000 spectro-


photometer with RS-232C-based computer
K. Senthil Kumar, B. S. Lakshmi and Gautam instrument controlled by commands (control bytes) sent
Pennathur from the personal computer. The selection of this mode
Sub-DIC Biotechnology Information Services, Centre for Biotechnolo, Anna inactivates all the other keys.
University, Madras 600 025, India

The interfacing of a commonly used spectrophotometer, the Hitachi


Hardware
U2000, through its RS-232C port to a IBM compatible computer
is described. The hardware for data acquisation was designed by
The RS-232C (serial, asynchronous interface) connects
suitably modifying readily available materials, and the software
an IBM AT/486 system with the spectrophotometer (U-
was written using the C programming language. The various steps
involved in these procedures are elucidated in detail. The ecacy of 2000 series) in the half duplex mode (data transfer takes
the procedure was tested experimentally by running the visible place in both directions, but only one at a time). It
contains 25 pins, out of which 6 pins only are used for
spectrum of a cyanine dye. The spectrum was plotted through a
connection. It connects the serial CO M port of the
printer hooked to the computer. The spectrum was also plotted by
transforming the abscissa to the wavenumber scale. This was computer with the serial port of the spectrophotometer.
carried out by using another module written in C. The eciency of The pin details and cable connections [10] are shown in
the whole set-up has been calculated using standard procedures. figure 1.
The Transistor-Transistor Logic level signal (TTL) ran-
ging from 0 to 5 V emanating from the line driver section
Introduction (MC 1488) of the computer is converted into an RS-
232C signal (ranging from -12 to + 12 V). The resulting
Over the last few years, laboratory automation has signal TxDATA from the computer goes to the receiving
focused on the transfer of digitized data from an analy- RxDATA pin of the spectrophotometer, where it gets
tical instrument to the computer, and has become converted to TTL level by the line receiver (HD 75189).
essential in most of the modern chemical laboratories Similarly, the signal sent out from the spectrophotometer
[1-3]. It allows easy calculations to be performed for is converted, and received by the computer. The pin
special data, e.g. measuring spectral area, rate of reac- numbers 1-7, 7-7 are short-circuited for protective and
tions, etc. The availability of computers and sophisticated common ground, respectively.
programming languages has largely alleviated this prob- The computer and spectrophotometer are not synchro-
lem [4, 5]. nized at the same clock rate, pin 4 RTS (Request-to-
In this article, we describe the interfacing of a Hitachi Send) of the computer and 5 CTS (Clear-to-Send) of the
U-2000 spectrometer with an IBM AT/486 compatible spectrophotometer, pin 5 CTS of the computer and pin 4
mini-computer using C language. The Hitachi U-2000 is RTS of the spectrophotometer are short-circuited to start
a compact low cost instrument working in the wave- and stop data transmission, which is called ’hardware
length of 1000-200 nm. The instrument is provided with handshaking’ process, but ’software handshaking’ (ac-
a standard RS-232C port for easy interfacing [6]. knowledge to the transmitting section that the trans-
mitted byte has been received properly) cannot be done
The advantage of using the C language compiler is its because the spectrophotometer lacks sophisticated micro-
superiority in terms of speed. Thus, it is best suited for processor functions.
developing interface modules. The other major factor is
portability, wherein programs written in C can be run on
any computer with little modification [7-9]. Software
The serial port of the computer is connected to the RS-
232C interface. The baud rate can be selected from the The software is written as per requirements and specifica-
following 4800, 1200, 600, 300, 150 and 110 bps. The tion of the user. It takes care of accessing the medium
data format is selected as 7E2 (7 bits + even parity + 2 (Medium Access Control Layer) and other interface
stop bits) [4, 5]. functions. The modules have been written in C compiler

Remote control Interface functions


The following sequential operations are carried out on The specification of the interface can be stated as follows.
the computer. The remote control option is selected on
the screen, then the instrument is put in the external (1) Protocol: Polling
mode. The computer is set to this mode and the (2) Link: One-to-one

0142-0453/98 $12 oo ) 1998 Taylor & Francis I,td


189
K. Senthil Kumar e! al. Automation of Hitachi U-2000 spectrophotometer with RS-232C-based computer

COMPUTER SPECTROPHOTOMETER

Line driver Line driver


MC 1488 FGI FG HD 75188
TxDATA 2 2 TxDATA
RxDA T A 3 :5 RxDATA

RTS 4 4 RTS
Line Receiver Line Receiver
o- 5 CTS
MC 1489 CTS 5 HD 75189
GND 7 o ,,o 7 GND

COM Post COM Post

TTL SIGNAL RS-232C SIGNAL TTL SIGNAL


Figure 1. Cable connections for RS-232C.

In order to avoid ’overrun error’ and to achieve maxi-


mum efficiency in terms of start, stop bits and character
length, the medium baud rate is set to 4800 bps. After
Set COM Port to 4800 bps speed sending a control byte from the computer to the spectro-
photometer, the response is awaited in an indefinite loop.
Set Spectrometer to "REMOTE CONTROL" mode If there is no response or if there is an expectation of a
signal from the computer side for the response and a
similar one in the spectrophotometer side for the re-
sponse, then the whole system will be in ’dead lock
condition’. As data flows from the spectrophotometer,
the computer is made to acquire data and store them in
an opened file. After the storage is made, the data are fed
Yes as an input to the data processing of the graph plotting
cod o Control byte from COM Port phase.
At the computer end of the flowchart, prior to sending
Yes No
Execute the the control bytes, the communication port is set at a
Control byte speed of 4800 bps. Polling (sending some control byte to
function
the receiver section) is done to receive the status of the
spectrophotometer. Control signals are sent to the spec-
Figure 2. Spectrophotometer end flowchart. trophotometer byte at a time with a proper time delay
between 2 bytes (to avoid overrun error) till the control
bytes buffer becomes empty. If there are data at the
(3) Medium: RS-232C(twisted pair) COM port, then the data are received, stored in a file
(4) Speed: 4800 bps and processed. In the spectrophotometer end of the
(5) Transmission: Serial, asynchronous and half duples flowchart, the instrument is set to ’REMOTE CON-
(6) Distance: < 15m TROL’ mode before setting to 4800 bps speed. If there
is any ’response’ from the computer, then a control byte is
Baud setting--set data transfer rate of the external
scanned from the COM port. If the ’Control byte’ is
system; Status viewing--check whether the spectrophoto-
meter is ’ON’ or ’OFF’; Data acquisation--acquire data
equal to the ’STOP KEY’ code, then terminate the
from the spectrophotometer, history about the received process, else perform the appropriate control byte func-
tion (interface function).
data; Graph plotting is shown in the graph (On-line and
Off-line); Peak detection, multiple spectra and area are
calculated under the selected portion of the curve.
Performance evaluation

Flow chart Analysis


The evaluation may be done on a time basis. The
The flow charts for interfacing at the spectrophotometer computer sends a poll byte to the spectrophotometer
and the computer ends are shown in figures 2 and 3, one at a time to check whether the spectrophotometer
respectively [9]. The COM port should be set to the is ON or OFF. The poll time taken to send a poll to the
desired baud rate. The maximum baud rate is 9600 bps. spectrophotometer and to receive an acknowledgement
190
K. Senthil Kumar et al. Automation of Hitachi U-2000 spectrophotometer with RS-232C-based computer

Set COM Port to 4800 bps speed

Send Polling byte

Set Spectro
STATUS to
OFF.]
] No

C;end Control byte to Spectro


Process stored DATA
from Control byfes buffer

Calculate EFFICIENCY
No Yes of the Interface

Figure 3. Computer end flowchart.

from it is 0.39 ms. The representation of poll exchange on Each time a byte is sent along with 3 bps (parity, start,
a 4800bps link between a computer and a spectro- stop bits).
photometer with no data to transmit is shown below In total 11 bits are sent each time.

Poll Efficiency of the interface E speed/overall baud rate


3936/4800
> =82%
0.39 ms Response
Computer end > Spectrophotometer end Experimental
Control byte
The spectrum of a typical cyanine dye 3, 3t-diethylcar
> boxycyanine iodide was measured. A standard solution of
Response 2 the dye was prepared by dissolving 10 mg of the dye into
25 ml of methanol.
> A 1-ml aliquot was further diluted to 10 ml in a standard
A major problem associated with polling is the overhead flask. The solutions were prepared in diffused light. The
required in processing the non-productive polls, i.e. polls diluted solution was used for further spectral studies. A
for which the spectrophotometer has no data to transmit. pair of matched fused silica cells of path length cm was
On this 4800 bps (including overhead) link, it requires used for optical measurements.
approximately 0.01 of link time to transmit a poll and its The spectra of the dye as plotted from the computer to
response. the printer is shown in figure 4. The spectrum wherein
the abscissa is transformed into the wave number scale is
shown in figure 5.
Efficiency
Time taken to send a poll and to receive response Results and discussion
4.065 ms
Time taken to send a byte 2.033 ms The Hitachi U-2000 is a microprocessor-controlled UV-
visible spectrophotometer. The function keys are set in
The speed in bytes per second =492 bytes/s front of the spectrophotometer and the wavelength
range, absorbance and other functions can be set through
or the keyboard.
A major problem associated with polling is the overhead
Speed for data transfer (bps)=492*8 bps required in processing the non-productive polls, i.e.
191
K. Senthil Kumar et al. Automation of Hitachi U-2000 spectrophotometer with RS-232C-based computer

1.000
Wavelength 56:5.0

Absorbance 0.164

Area 7.419
0.750

0.500
0

0.250

0 O0
485 -’ 507 529 551
WeveIength nm
57:5

Figure 4. Wavelength scan of the cyanine dye (,max 563 nm).

1.000

0.7,.50

0.500-

0.250

0.000
2.061 1.972 1.890 1.814 1.745 1.680

V (10 cm-’)
Figure 5. Plot of wavenumber versus absorbance.

polls for which the spectrophotometer has no data to achieved through this alternate interface way of sharing
transmit. the printer attached to the computer at low cost.

References
Conclusion
l. LAHIRI, S., YUAN, B. and STILLMAN, M.J., 1994, Anal. Chem, 66,
The components (ICs, connectors, cables, RS-232C) used 2954-2962.
here are easily available in the market. The efficiency of 2. KORENAGA, T., ZHOU, X., MORLwAKE, T., MURAKI, H., NAITO, T.
and SANUKI, S., 1994, Anal. Chem., 66, 73-78.
this interface is 82%. The interfacing can be done using a 3. GLESEMANN, A., JAGER, U. J., NORMAN, A. L., KROUSE, H. R. and
range of IBM PC/XT, PC/AT compatibles. Further, this BRAND, W. A., 1994, Anal Chem., 66, 2816-2819.
is in dedicated mode, but can be converted to interrupted 4. TANENAUM, A. S., 1990, Computer Networks, 2nd edition,
mode by making the program a Terminate Stay Resident (Englewood Cliffs, USA: Prentice-Hall inc.).
5. AHUJA, V., 1988, Design and Analysis of Computer Communication
(TSR) program invokable through either software or Networks, 2nd edition.
hardware interrupts. If the keyboard section or printer 6. Hitachi Instruction Manual for Model U-2000 Double Beam
section of the spectrophotometer fails, those functions are Spectrophotometer.

192
K. Senthil Kumar et al. Automation of Hitachi U-2000 spec;rophotometer with RS-232C-based computer

7. WANG, W. and BIBB, K., 1991, Illustrated Turbo C++, Asia-Pacific 10. Institute of Electrical and Electronics Engineers, 1993, Inc
edition (Texas: Wordware publishing). spectrum, Annual review, products and application.
8. HOROWITZ, E. and SAN, S., 1982, Fundamentals of Data Structures in 11. JORDAN, L. and CHURCmLL, B., 1990, Communication and Networking
Pascal (Maryland: Computer Science Press). for IBM PC/XT Compatibles Revised and Expanded, (New York:
9. K;RNIGHAN, B.W. and RTCHE, D. M., 1990, The C Programming Prentice-Hall).
Language, 2nd edition (Texas: Wordware publishing). 12. BERRY, J.T., 1988, C++ Programming, 2nd edition, (Indianapolis:
H. W. Sams).

193

You might also like