      subroutine hec_fadc_epio
c
c read raw FADC block from epio
c
      implicit none
c
      include'hec_par.inc'      !shared parameters
      include'hec_datacard.inc' !datacard values
      include'hec_epio.inc'     !epio
      include'hec_fadc.inc'     !fadc
      include'hec_geo.inc'      !geometry correspondence tables
c
c local variables
c
      integer ladc              !index of first adc word in adc bank
      integer ip
      integer iw       
   
c
c index of first adc in adc block
c number of adc channels read by epio
c
      if (irunpd .le. 5) then
         return
      else
        ladc = 5
        n_fadc_mod = ibankbuf(3)
        i_fadc_tim = ibankbuf(4) 
      endif
c     
c fill i_fadc_ic_t in hec_adc.inc from data array
c     
      ip = 0
      do iw = 2, 4*i_fadc_tim, 2 
         ip = ip + 2
         i_fadc_pk(iw-1) = ibankbuf(ladc - 1 + ip - 1)
         i_fadc_pk(iw) = ibankbuf(ladc - 1 + ip)
      enddo
      call hec_fadc_unpk
c     
ccc      print *, ' *** FADC read'
c
      end

