Interfacing a multichannel analyser to a mainframe computer

Interfacing a multichannel analyser to a mainframe computer

Nuclear Instruments and Methods 215 (1983) 431 -432 North-Ilolland Publishing ('ompany ,:13I INTERFACING A MULTICI-|ANNEL ANAI.YSER T O A M A I N F ...

114KB Sizes 0 Downloads 59 Views

Nuclear Instruments and Methods 215 (1983) 431 -432 North-Ilolland Publishing ('ompany

,:13I

INTERFACING A MULTICI-|ANNEL ANAI.YSER T O A M A I N F R A M E C O M P U T E R P.N. C O O P E R l)e[~rlmoll
A simple m o d i f i c a t i o n to a p u l s e - h e i g h t a n a l v s e r ix d e s c r i b e d that e n a b l e s d a t a 1o be reliably t r a n x m i n c d to an interacti,.e

mainframe computer in conJunction with a slandard terminal.

It is nov,' c o m m o n to interface multichannel analysers to microcomputers both for data analysis and control. ] h i s generally involves adding a floppy disc recorder and a printer to the microcomputer and often requires special interfaces. M u h i c h a n n e l analvsers nowadays c o m m o n l y have as standard an RS232 serial port. This note describes how one such analyser ( C A N B E R R A model 30) has been interfaced to an interactive m a i n f r a m e c o m p u t e r ( f l A R R I S 500) for data analysis using the line connected to a normal remote terminal. Programmes written in advanced languages such as F O R T R A N can be used, enabling much speedier analysis than with .'1 microcomputer, and o u t p u t is obtained from a lineprinter forming part of the c o m p u t e r system. Control of the analyser from the c o m p u t e r is not feasible v.ith this multi-user c o m p u t e r because of time restrictions imposed on the connection time. The H A R R I S 500 c o m p u t e r is in the University' C o m p u t e r Centre and the cable run between the analyser a n d c o m p u t e r is in excess of 500 m. Over this distance the m a x i m u m feasible transmission rate for data was found to be 1200 baud. If the analyser RS232 o u t p u t is connected to the c o m p u t e r in place of the terminal some loss of information occurs at the beginning of each line of ot, tput due to the somewhat variable time needed at the receiving end to empty the buffer register, time d e p e n d i n g on the n u m b e r of users. This calls for a pause between lines v.,hich has been found on the present system to be not more than 0.5 s. Such a pause could easily be introduced in m a n u f a c t u r e by providing a string of null characters at the end of each line, but this would need changes to the R O M controlling the o u t p u t information. A simple method has been developed to insert a pause of predeterminal length at the end of each line using only' a small a m o u n t of additional electronics. While the method described is specific to the C A N B E R R A 30 m u h i c h a , m e l analyser it should be easily adaptable to other makes of analvser. 0 1 6 7 - 5 0 8 7 / 8 3 / 0 0 0 0 - 0 0 0 0 / $ 0 Y ( ) 0 ~: 1983 N o r t h - H o l l a n d

In order to initiate a pause it is necessary to identify an end of line, which is terminated on the analyser o u t p u t by R E T U R N + L I N E F E E D . The linefeed character, provided for teletype drive, is r e d u n d a n t since the c o m p u t e r only requires a R E T U R N as termination. ( ' o n s e q u e n t l y the L I N E F E E D character, v.hich is 0001010 in ASCII notation is used to initiate tile pause. Full access to all the output characters, in parallel form is available at the input to the U A R T that generates the serial output. Any particular character may be recognised by means of multi-input A N D gate after inverting the zero bits, and for the characters present on the full memory o u t p u t sequence it was only necessary to use bits 4,3 and 2 (101) to positively identify the L I N E F E E D character. It is also necessary to strobe the A N D gate with the inverted signal applied to the transmitter buffer register load input (TBRL) of the U A R T to avoid errors as the bits change state between characters. Hence a q u a d r u p l e input A N D gate is set up to recognise the L I N E F E E D character and the o u t p u t of this is used to trigger a monostable set to give a 0.5 s long output pulse. Type 7400 monostables have a low upper limit of timing resistance and hence require high values of capacity for this sort of pulse length. To reduce the size of capacity needed a C M O S monostable was chosen since much higher values of timing resistance ma3, i3e used. The serial output port of the C A N B E R R A 30 is not a true RS232 output since it lacks the necessary h a n d s h a k i n g signals. It does, however, have a nons t a n d a r d T T L level h a n d s h a k i n g connection: logic 0 applied to this connection inhibits output. Therefore the inverted output from the monostable is applied to this input to generate a pause in output. For an RS232 port v.ith handshaking, an O F F (negative) signal v.'ould need to be applied to the Data Set Ready (pin 6) line to generate a pause and the monostable output v.'ould need converting to RS232 logic levels. I:ig. 1 shows the corn-

432

I >N. ('ooper ./ Inl(,tJ}a( m g a m u l l / c h u m l e l wlal~

~('r t~* a m{zmJ}'=#~le

4.7~F

TBR L ~

;

~

~ .........

DB2 ~ - - ~ - - ~ 2

DB4>

2

~5

J

'~-4~"N

[

3

..... l

6 I

0.5s TTL

+5

I ..... o

3

4K7

-

'VVV~-< -,5

= 1 1

.......................

+12

C.._~1 I 74LS04 IC~2 74 LS21 IC3 4528 B

[iiiiii i

IC4 75150 P

RS 232

-12 Fig. I. Complete circuit of the interface.

plete circuit, including suggested modifications for RS232 handshaking. The complete circuit was m o u n t e d on a card and inserted into a spare board position intended for printer control. Signals available at this position include data bits 1 to 4 and the T B R L signal as well as the 5 V supply to power the integrated circuits. In order to use the line to the computer it is necessary to have a terminal ( V D U ) connected. A two way switch is arranged to connect the S E N D line (pin 3) of either the terminal or the analyser to the c o m p u t e r and the R E C E I V E line (pin 2) is p e r m a n e n t l y connected to the terminal. In full duplex mode this enables the analyser o u t p u t to be displayed on the terminal. It is necessary on some terminals to set them to ignore certain control characters such as ETX and D L E in

order to get a correctly formatted display. File creation a n d initiation of file input is carried out from the terminal. t h e S E N D line is then connected to the analyser and the data then transferred. ('ontrol is restored to the terminal to close the file and to call up the analysis programme. At 1200 baud a full 512 channel spectrum is transmitted in about 75 s, including the pauses. In the present application, fast neutron pulse height spectra are obtained with an NE213 scintillator, using pulse shape discrimination to reject g a m m a ra ~, events. The pulse height spectrum is turned into ii differential neutron energy spectrum using a differentiation method of analysis written in F O R T R A N 77, for which the c o m p u t i n g time is less than 1 s.