Monitoring and data recording system for the underground

Monitoring and data recording system for the underground

Microprocossing and Microprogramming 39 (1993) 281-284 281 North-Holland M o n i t o r i n g S y s t e m for and The Data R e c o r d i n g U n d ...

264KB Sizes 1 Downloads 58 Views

Microprocossing and Microprogramming 39 (1993) 281-284 281

North-Holland

M o n i t o r i n g S y s t e m for

and The

Data R e c o r d i n g U n d e r g r o u n d

Zdenek B l a z e k Czech T e c h n i c a l U n i v e r s i t y , Faculty of Electrical Engineering, C o m p u t e r s , K a r l o v o nam. 13, 121 35 P r a h a 2, C z e c h r e p u b l i c

Dept.

of

T h i s p a p e r g i v e s a s h o r t r e p o r t on a new g e n e r a t i o n o f m o n i t o r i n g and d a t a recording systems used in underground trains. The s y s t e m f u n c t i o n , its h a r d w a r e and s o f t w a r e , i n c l u d i n g d i a g n o s t i c s a r e d e s c r i b e d .

I. INTRODUCTION Engine driver's a c t i o n s and s y s t e m s t a t u s a r e n e c e s s a r y t o m o n i t o r and r e c o r d in t h e u n d e r g r o u n d t r a i n s as w e l l a s i n p l a n e s . I t was d e s i g n e d a system, on t h e b a s e o f p r e v i o u s experiences [Bla 92], which can s t o r e d a t a a b o u t e n g i n e d r i v e r and s y s t e m s t a t u s f o r 96 h o u r s and more, it is also able to work a s a tachometer, clock and travelled d i s t a n c e m e t e r . T h e s e demands l e d t o s y s t e m d e s i g n d e s c r i b e d b e l o w . The d e s i g n a l s o had t o a c c e p t demands for higher reliability and testability of t h e whole s y s t e m t h e demands r e s u l t from t h e f a c t t h a t t h e s y s t e m h a s t o work a l s o a s a so c a l l e d " B l a c k Box".

2. BASIC DESCRIPTION OF THE SYSTEM Data concerning engine driver's a c t i o n s a r e s t o r e d now a t a s p e c i a l paper roll, which is necessary to e v a l u a t e by w e l l t r a i n e d p e o p l e and t o p u t i t i n t o an a r c h i v e . A l l t h e s e means were v e r y e x p e n s i v e and t i m e and s p a c e c o n s u m i n g . T h a t i s why i t was d e c i d e d t h a t i t i s n e c e s s a r y t o e q u i p l o c o m o t i v e s w i t h a new s y s t e m , d e s i g n e d f o r c o m p u t e r e v a l u a t i o n and easy data storing. Elder systems were f i x e d on a v e r y d i f f i c u l t to

a c c e s s p l a c e and i t was a r e a s o n t o lodge the whole system in the c o c k p i t , w h e r e i t must a l s o t o work as a t a c h o m e t e r , c l o c k and t r a v e l l e d distance m e t e r ( s e e a b o v e } . As a c o n s e q u e n c e from h i g h e r r e l i a b i l i t y demand i t was a l s o necessary to design the whole system in a solid state phase - without any moveable part. Now, w h a t h a v e we t o m e a s u r e ? I t i s necessary to measure speed, direction of movement and some binary signals. Speed i s m e a s u r e d via sensor which provides 140 i m p u l s e s p e r one r e v o l u t i o n . Except of this signal, it is also able to transmit the second signal which is s h i f t e d 90 d e g r e e s more o r l e s s , i t d e p e n d s from d i r e c t i o n o f l o c o m o t i v e movement. T h e r e a r e 6 b i n a r y i n p u t s : brakes, emergency brakes, doors at left, doors at right, sound signal and r e v e r s e movement s e l e c t i o n . A t i m e f o r d a t a r e c o r d i n g was s t a t e d f o r 96 h o u r s ( t h e r e a s o n i s , t h a t data are not r e a d and e v a l u a t e d d u r i n g a w e e k e n d ) . Maximum a l l o w e d speed of the locomotive is 60 km./hr. (maximum o p e r a t i o n a l speed i s 80 k m . / h r . ) . Maximum s p e e d a t d i s p l a y was s t a t e d a t 1 0 0 k m . / h r . We voted sampling frequency 0,1 Hz. From the frequency ensue the following formulas:

Z Blazek

282 99. V

d.

n

-

122500 w h e r e d - w h e e l d i a m e t e r [mm] n - number o f i m p u l s e s during sample period v - velocity [km./hr. ] 4454545 nl = d w h e r e n l - number o f i m p u l s e s f o r lOOm d i s t a n c e d - wheel diameter [mm]

3. HARDWARE AND DESCRIPTION

ITS

DIAGNOSTICS

The h a r d w a r e d e s i g n had t o be b a s e d on p r o v e d and c h e c k e d e l e m e n t s t o e l i m i n a t e f a u l t s c a u s e d by m i s t a k e s in new components or by new construction. The f a c t altogether with other reasons led to selection of elder but proved microcontroller 80C31. T h i s m i c r o c o n t r o l l e r works a s a control element of the whole system. The system consists of s e v e r a l t e s t a b l e p a r t s . At f i r s t it is a unit of processor which is created by already stated microcontroller, Watch-dog system, RS232/422 i n t e r f a c e , special optical interface (the system can communicate with host computer via t h r e e ways - o p t i c a l l i n k (lblb p e r s e c o n d ) , RS422 (100 Kb p e r s e c o n d ) , RS232 (9600 Bd)) and ROM memory. Processor test begins immediately a f t e r t e s t o f ROM memory. The memory i s t e s t e d o n l y v i a c h e c k s u m . We t e s t in the microcontroller inner Rh~i memory and registers, counters/timers and some o f c o n t r o l registers. Watch-Dog system is tested separately. We can s t a t e , as t h e second p a r t , a u n i t o f f r e q u e n c y i n p u t s . The u n i t is made from three 16 bits

counters/timers (channels) and from block of diagnostic logic. The logic makes possible to t e s t each channel separately and in the case of f a i l u r e to use another channel. A warning message is sent for engine d r i v e r and t h e s y s t e m i s s t o p p e d i n the case of greater failure e.g., in t h e c a s e o f two c h a n n e l s f a i l u r e . The d i r e c t i o n o f l o c o m o t i v e movement is evaluated via phase shift of s i g n a l s from v e l o c i t y s e n s o r . F l a s h EEPROMs 28F020 were s e l e c t e d as a d a t a c a r r i e r . Each o f t h e s e memories has c a p a c i t y of 2 Mbits. These memories are t e s t e d during o p e r a t i o n c o n t i n u o u s l y and we a l l o w 255 f a i l u r e s . T h i s number i s n o t i m p o r t a n t from s t a t i s t i c a l point of v i e w and i t h a s no s e n s e t o s t o p t h e w h o l e s y s t e m o n l y b e c a u s e o f one failure. It is possible in such case to reconstruct data via evaluation program at a host computer. Binary inputs are the other part of t h e s y s t e m . The w h o l e u n i t i s f u l l y testable only during cold start of the system. Defined value is at these inputs during the start, so we c a n t e s t a l l way from t h e i n p u t s v i a galvanic separation up to the microcontroller. Real-time b l o c k i s b a s e d on IC DP8571A, which i s known a s good industrial standard. It makes possible not only real-time reading and c o u n t i n g , b u t a l s o t o m o n i t o r a status of lithium battery (it is used as a back-up f o r the r e a l - t i m e IC), to switch over power automatical]y without any of external components, to monitor external power s u p p l y and i n t h e case of necessity to generate an interrupt request. It is also possible t o u s e an i n t e r n a l RWM (also b a c k e d up by b a t t e r y ) and e x t r a i n t e r n a l t i m e r s ( t h e y c a n work a l s o a s Watch-Dog s y s t e m ) . We u s e nearly all these possibilities

Monitoring and data recording system for the underground

as a bar-graph w i t h 50 LEDs ( e a c h LED means two k i l o m e t r e s p e r h o u r ) . The b l o c k d i a g r a m o f t h e s y s t e m i s a t F i g . 1.

(inner RWM s e r v e s for diagnostic purposes, timer works as the second Watch-Dog, ...). The c i r c u i t is tested only by special compare programme w h i c h m o n i t o r s r e a l - t i m e counters r u n . (Watch-Dog i s t e s t e d during cold start of the system). The r e s t r i c t i o n was s e l e c t e d b e c a u s e of real-time i s one o f t h e m o s t i m p o r t a n t d a t a . I t s e r v e s a s an a x i s for data storing. So i f time is r u n n i n g , t h e o t h e r DP8571A f u n c t i o n s a r e n o t s o i m p o r t a n t from t h e p o i n t of view of the wbole system reliability. Display and k e y b o a r d s e r v e s for

4. SOFTWARE DESCRIPTION

T h e r e a r e s e v e r a l programme b l o c k s , which are necessary t o p r o c e s s by microcontroller. These programmes are: *programmes for communication with service personnel and w i t h host computer *programmes for diagnostics (see above) *programmes f o r d a t a a c q u i s i t i o n and their processing (see above formulas) *programmes working w i t h Flash memories (they check address space borders and for defined border reaching s t a r t memory erasing).

communication between service personnel and the system. There is a 16-key keyboard. We stated that all system is designed on the solid state phase. It resulted in fact that the display was designed

:i

>

:: : : i : : : i CPU: :: :: ::ili:i:i:

:::Binary, ::::analogue, ::! f r e q u e n c y ! : inputs ::

reai £ i me ' ::support & interfacei i:i ::

circuits

283

external inputs < <-

::

II. System

[

bus

I

I I

I II!i:!!ii!Display & Keyboardi!i!l

II iiiiiii ii!i modul e iiiiii iiiiii!ii ililI

I

Engine driver or service personnel Fig.

1

Block diagram

of the system

II MemorY

I

:°'5

Modules

interface + I optical

II link

284

Z. Blazek

The l a s t m e n t i o n e d programmes a l s o t e s t memory Q p e r a t i o n and e v a l u a t e if there are fulfilled conditions f o r d a t a s t o r i n g . These c o n d i t i o n s are: speed is 2 km./hr, h i g h e r then the l a s t written in, change of any of binary inputs, 100 m t r a v e l l e d , difference between selected and real direction movement of locomotive, f a u l t of the system and time period of 1 hour. Data format for recording is: lhours+distancel00m+directionlmin+ f a u l t l s e c l s p e e d l b i n ,inputsl The array length is 5 bytes. There is one i n t e r e s t i n g moment in the software for data processing and data storing. I t is a way of these programmes t e s t i n g . Programme t e s t is necessary to perform in a very short time without Watch-Dog usage. The t e s t is based on entrances and e x i t s to and from programme loops. We can then place a t e s t on a b i t value of certain byte/s in the e n t r y / e x i t points. The value can be changed and transferred as an indicator of programme t r a n s i t of defined place. Because we always know the value which must be in the place, so we can very e a s i l y monitor of programme run. And more, we can eliminate also f a i l u r e s which need not to a c t i v a t e Watch-Dog system. There i t is necessary to s t a t e that for this purpose is very a d v a n t a g e o u s t o use Boolean

possibilities of used microcontroller. The whole s y s t e m was s u c c e s s f u l l y t e s t e d in t r a i n s o f t h e u n d e r g r o u n d and in Aeronautical Test and Research Institute.

REFERENCES

[Bla92] " T w o - p r o c e s s o r M o n i t o r i n g System f o r A i r p l a n e s " , M i c r o p r o c e s s i n g and Microprogramming - The EUROMICRO J o u r n a l , Edt. by A. Nunez, Vol. 37, Nos. 1-5, J a n u a r y 1993, North Holland Elsevier Science P u b l i s h e r s , pp. 77-80 Company literature used during d e s i g n works. 1. Embedded C o n t r o l l e r s & P r o c e s s o r s , I n t e l , 1992, USA 2. MAXIM: New R e l e a s e s Databook, Maxim, 1992, USA 3. L i n e a r Databook 1992 S u p p l e m e n t , L i n e a r T e c h n o l o g y C o r p . , 1992, USA 4. 8051-Based 8 - b i t Micro controllers, P h i l i p s , 1991, The N e t h e r l a n d s 5. CMOS Logic Databook, N a t i o n a l Semiconductor', Rev. I, 1991, USA 6. Data Acquisition Linear Devices Databook, National Semiconductor, 1989, USA 7. General Purpose Linear Databook, National Semiconductor, 1989, USA