     	FUNCTION TIMCOD( TIM )
C
C  PROGRAMMER:  R.S. ZHOU
C		ALFRED UNIVERSITY,  FEB-1987
C
C	THIS ROUTINE ENCODES D-500 SYSTEM TIME
C
     	CHARACTER TIM*8, ATIM*6

     	TIMCOD = 0.0
     	ATIM(1:2) = TIM(1:2)
     	ATIM(3:4) = TIM(4:5)
     	ATIM(5:6) = TIM(7:8)
     	DECODE( 6, 1, ATIM, ERR=9 ) VAL
     	TIMCOD = VAL
1	FORMAT(F7.0)
9	RETURN
     	END
