; VGR.PRO

; Written by Sandy Kramer, Hughes STX, Code 692, NASA/GSFC  07/11/96

; To execute:
;    Start IDL, type       $ IDL
;    Compile this program, IDL> .run vgr
;    Run program           IDL> vgr
 
Pro Start

   common Data0,unit,load,size,start,valid
   common Data1,val,tempval,hdr1index,engindex,lfmindex
   common Data2,reccnt,hdr1cnt,engcnt,lfmcnt
   common Times,edays,days,start_day,end_day

; Written by sandy Kramer, HSTX, code 692, 06/17/96

   print, 'Event for Start '
   dir = pickfile(path='voyager:[voyager.data.summary]',filter='*.*')
   if (strlen(dir) ne 0) then begin
      if !version.os ne 'vms' then begin
         print,'This program is designed for VMS only!'
      endif else begin
         print,'Selected file = ',dir
         postn = strpos(dir,']')
         path = strmid(dir,0,postn+1)
         print,'Path = ',strcompress(path)
         print,'VMS read....'
         VGR_Summary_Read, dir
      endelse
   endif else print,'Start * No Directory Selection made.' 

   return
end

Pro VGR_Summary_Read, dsn

; Read Voyager summary data.

; start = -1  new file
; start =  0  open file, parameters selected
; start =  1  open file, parameters not selected
; load = 0    partially read file
; load = 1    completely read file
  
; Written by Sandy Kramer, HSTX, code 692, 06/17/96

   common Data0,unit,load,size,start,valid
   common Data1,val,tempval,hdr1index,engindex,lfmindex
   common Data2,reccnt,hdr1cnt,engcnt,lfmcnt

   if ( start ne -1 ) then goto, readdat

   get_lun,unit
   print,'Opening file ',dsn
   openr,unit,dsn,/variable
   s = fstat(unit)
   print,'File size: ',s.size ; file size including VMS control bytes
   max = 5000000L ; input block size
   if ( s.size lt max ) then begin
      size = s.size 
   endif else begin
      size = max
   endelse
;  val=bytarr(size)
   val=replicate(byte(255),size) ; load fill data into input array

   readdat:
   on_ioerror, badio
   print,'Reading summary data ...'
   readu,unit,val ; read file (no VMS control bytes) into byte array
   print,'first record of input block: ',string(val(0:3))
   load = 0
   start = 1
   VGR_Summary_Index,size
   print,'... data block read.'

   return

   badio: ; recover from EOF in middle of array read
   load = 1 ; assume i/o error flags EOF
   print,'End of file encountered.'

   VGR_Summary_Index,size

   return
end

Pro VGR_Summary_Index,n

   common Data1,val,tempval,hdr1index,engindex,lfmindex
   common Data2,reccnt,hdr1cnt,engcnt,lfmcnt

; Build indices of records by keying on record type.
; This routine recognizes HDR1, ENG and LFM files only.

; Written by sandy Kramer, HSTX, code 692, 06/17/96

;    HDR1 record = 400 bytes
;    LFM  record = 2272 bytes
;    ENG  record = 14016 bytes

   lfmindex = lonarr(n/2272+1)
   engindex = lonarr(n/14016+1)
   hdr1index = lonarr(2)
   i = 0l
   reclen = 0l
   reccnt = 0l
   hdr1cnt = -1l
   lfmcnt = -1l
   engcnt = -1l
   while ( i lt n ) do begin
      if ( string(val(i:i+3)) eq "HDR1" ) then begin
         reclen = 400
         hdr1cnt = hdr1cnt + 1
         hdr1index(hdr1cnt) = i ; starting byte of HDR1 record
      endif else if ( string(val(i:i+3)) eq "LFM " ) then begin
         reclen = 2272
         lfmcnt = lfmcnt + 1
         lfmindex(lfmcnt) = i ; starting byte of MAG data record
      endif else if ( string(val(i:i+3)) eq "ENG " ) then begin
         reclen = 14016
         engcnt = engcnt + 1
         engindex(engcnt) = i ; starting byte of engineering record
      endif else begin
         print,'Undefined record encountered, assuming EOF'
         goto, enddat
      endelse
      i = i + reclen ; move index pointer to next record
      reccnt = reccnt + 1
   endwhile

   enddat:

   if ( reclen lt 400 ) then begin
      print,'Small file fragment.  No records indexed.'
      return
   endif

; determine last record, copy from val() and save

   goodval = i - reclen
   lastrec = string(val(goodval:goodval+3))
   if ( lastrec eq "HDR1" ) then begin
      hdr1cnt = hdr1cnt - 1
   endif else if ( lastrec eq "ENG " ) then begin
      engcnt = engcnt - 1
   endif else if ( lastrec eq "LFM " ) then begin
      lfmcnt = lfmcnt - 1
   endif
   print,'Last record type: ',lastrec
   print,'Last record start byte index: ',goodval
   idx = n - 1
   while ( val(idx) eq 255 ) do begin
      idx = idx - 1
   endwhile
   print,'Last record end byte index: ',idx
   tempval = val(goodval:idx)
;
   print,'Actual data size: ',idx
   print,'Record count: ',reccnt
   print,'HDR1 recs: ',hdr1cnt+1
   print,'LFM recs: ',lfmcnt+1
   print,'ENG recs: ',engcnt+1

   VGR_Data_Times

   return
end

Pro VGR_Data_Times

; determine range of times

   common Data1,val,tempval,hdr1index,engindex,lfmindex
   common Data2,reccnt,hdr1cnt,engcnt,lfmcnt
   common Times,edays,days,start_day,end_day

; Written by sandy Kramer, HSTX, code 692, 06/17/96

; extract engineering time tags

   if ( engcnt gt -1 ) then begin
      engtime = intarr(6,engcnt+1)
      k = 0l
      while ( k le engcnt ) do begin
         engtime(0,k) = fix(val,engindex(k)+12,6)
         k = k + 1
      endwhile
      print,'ENG Julian start time: ', $
            engtime(*,0),format = '(a,i2,1x,i3.3,3(1x,i2.2),1x,i3.3)'
      print,'ENG Julian stop time:  ', $
            engtime(*,engcnt),format = '(a,i2,1x,i3.3,3(1x,i2.2),1x,i3.3)'
      decday,engtime,edays
      print,'ENG decimal day start time: ',edays(0)
      print,'ENG decimal day stop time:  ',edays(engcnt)
   endif else print,'VGR_Data_Times * No engineering records found.'

; extract MAG time tags

   if ( lfmcnt gt -1 ) then begin
      lfmtime = intarr(6,lfmcnt+1)
      k = 0l
      while ( k le lfmcnt ) do begin
         lfmtime(0,k) = fix(val,lfmindex(k)+12,6)
         k = k + 1
      endwhile
      print,'MAG Julian start time: ', $
            lfmtime(*,0),format = '(a,i2,1x,i3.3,3(1x,i2.2),1x,i3.3)'
      print,'MAG Julian stop time:  ', $
            lfmtime(*,lfmcnt),format = '(a,i2,1x,i3.3,3(1x,i2.2),1x,i3.3)'
      decday,lfmtime,days
      print,'MAG decimal day start time: ',days(0)
      print,'MAG decimal day stop time:  ',days(lfmcnt)
   endif else print,'VGR_Data_Times * No MAG data found.'
   
   return
end

Pro Restart

   common Data0,unit,load,size,start,valid
   common Data2,reccnt,hdr1cnt,engcnt,lfmcnt
   common Times,edays,days,start_day,end_day

   if ( start eq -1 ) then begin
      print,'Restart * Data file not selected'
      goto, endRestart
   endif

   if ( lfmcnt eq -1 ) then begin
      print,'Restart * ','No MAG data available'
      goto, endRestart
   endif

   if ( engcnt eq -1 ) then begin
      print,'Restart * ','No ENG data available'
      start_day = days(0)
      end_day = days(lfmcnt)
      goto, endRestart
   endif 
 
   if ( edays(0) lt days(0) ) then begin
      start_day = edays(0)
   endif else start_day = days(0)

   if ( edays(engcnt) gt days(lfmcnt) ) then begin
      end_day = edays(engcnt)
   endif else end_day = days(lfmcnt)

   endRestart:

   return
end

Pro Get_ENG_Param,index1,x,y

   common Data0,unit,load,size,start,valid
   common Data1,val,tempval,hdr1index,engindex,lfmindex
   common Data2,reccnt,hdr1cnt,engcnt,lfmcnt
   common Ranges,rxmin,rxmax,rymin,rymax
   common Times,edays,days,start_day,end_day

; Get user selected engineering mesurement

; Written by Sandy Kramer, HSTX, code 692

; Engineering record structure:
;   32 word header
;   224 16 bit word decommutation map (last map value is fill)
;   60 * 224 bytes engineering data (1 byte words)

   if ( engcnt eq -1 ) then begin
      print,'Get_ENG_Param * No ENG data available.'
      valid = 0
      goto, noeng
   endif

   if ( start eq 1 ) then begin
      start_day = edays(0)
      end_day = edays(engcnt)
      start = 0 ; flag storage of start/end times 
   endif

   eind = where(edays ge start_day and edays lt end_day,cnt)
   if ( cnt le 0 ) then begin
      print,'Get_ENG_Param * No ENG data available for specified interval.'
      valid = 0
      goto, noeng
   endif
   n = size(eind)
   earr = n(1) ; number of records within specified time range
   edat = bytarr(721,earr)
   elast = earr - 1
   ecnt = 0
   k = 0
   while ( k le elast ) do begin
      map = fix(val,engindex(eind(k))+128,223) ; extract decommutation map
      engdat = byte(val,engindex(eind(k))+576,224*60) ; extract ENG data
      engdat = reform(engdat,224,60)

; valid engineering data begins with the 4 byte tag 3 145 94 211
; if id tag invalid, set all 224 byte elements to 0

      ind = where(engdat(0,*) ne 3,cnt)
      if ( cnt ne 0 ) then engdat(*,ind) = 0
 
      ind = where(engdat(1,*) ne 145,cnt)
      if ( cnt ne 0 ) then engdat(*,ind) = 0

      ind = where(engdat(2,*) ne 94,cnt)
      if ( cnt ne 0 ) then engdat(*,ind) = 0
 
      ind = where(engdat(3,*) ne 211,cnt)
      if ( cnt ne 0 ) then engdat(*,ind) = 0

; Extract measurement values.  When multiple values for a particular
; measurement are encountered, select the last non-zero measurement.
; Note that vector engdat(223,*) contains fill elements

      idx = where(map eq index1,cnt) ; find location of measurement
      if ( cnt gt 0 ) then begin
         i = idx(0)
         eval = engdat(i,*)
         ind = where(eval ne 0,cnt) 
         if ( cnt ne 0 ) then begin
            eval = eval(ind)
            n = size(eval)
            last = n(1) - 1
            edat(map(i),k) = eval(last) ; get last valid measurement 
            ecnt = ecnt + 1
         endif else begin
            edat(map(i),k) = 255
         endelse
      endif
      k = k + 1
   endwhile

   if ( ecnt eq 0 ) then begin
      print,'Get_ENG_Param * Measurement ',index1,' not found.', $
             format='(a,i3,a)'
   endif

   x = edays(eind)
   y = temporary(reform(edat(index1,*)))
   ygood = where(y ne 255 and y ne 0, cnt) ; skip fill values
   if ( cnt gt 0 ) then begin
    valid = 1
    x = temporary(x(ygood))
    y = temporary(y(ygood))
   endif else begin
    valid = 0
   endelse

   noeng:

   return
end

Pro Get_MAG_Param,index1,x,y

   common Data0,unit,load,size,start,valid
   common Data1,val,tempval,hdr1index,engindex,lfmindex
   common Data2,reccnt,hdr1cnt,engcnt,lfmcnt
   common Ranges,rxmin,rxmax,rymin,rymax
   common Times,edays,days,start_day,end_day

; get MAG values from LFM record

; Written by Sandy Kramer, HSTX, code 692
   
   if ( lfmcnt eq -1 ) then begin
      print,'Get_MAG_Param * No MAG data available.'
      valid = 0
      goto, nolfm
   endif

   if ( start eq 1 ) then begin
      start_day = days(0)
      end_day = days(lfmcnt)
      start = 0 ; flag storage of start/end times 
   endif

   lind = where(days ge start_day and days lt end_day,cnt)
   if ( cnt eq 0 ) then begin
      print,'Get_MAG_Param * No MAG data available for specified interval.'
      valid = 0
      goto, nolfm
   endif
   n = size(lind)
   larr = n(1) ; number of records within specified time range
   last = larr - 1 ; last element in range [0:last]
   VGR_MAG48_Data = { MAG48_Data, mag48: fltarr(10) }
   VGR_MAG48_Array = replicate(VGR_MAG48_Data,larr)
   VGR_MAG96_Data = { MAG96_Data, mag96: fltarr(50) }
   VGR_MAG96_Array = replicate(VGR_MAG96_Data,larr)
   VGR_MAG192_Data = { MAG192_Data, mag192: fltarr(250) }
   VGR_MAG192_Array = replicate(VGR_MAG192_Data,larr) 
   VGR_MAGSCF_Data = { MAGSCF_Data, magscf: fltarr(8) }
   VGR_MAGSCF_Array = replicate(VGR_MAGSCF_Data,larr)

; Extract 48, 9.6, 1.92 second field averages and 48 second 
; spacecraft field block.  Each summary record time tag 
; corresponds to a 48 second average.

   k = 0
   while ( k le last ) do begin
      VGR_MAG48_Array(k).mag48 = float(val,lfmindex(lind(k))+128,10)
      VGR_MAG96_Array(k).mag96 = float(val,lfmindex(lind(k))+172,50)
      VGR_MAG192_Array(k).mag192 = float(val,lfmindex(lind(k))+392,250)
      VGR_MAGSCF_Array(k).magscf = float(val,lfmindex(lind(k))+2080,8)
      k = k + 1
   endwhile
   y = VGR_MAG48_Array.mag48(index1)
   conv_unix_vax,y

   x = days(lind)
   ygood = where(y ne 999 and y lt 1,cnt)
   if ( cnt gt 0 ) then begin
    valid = 1
    x = temporary(x(ygood))
    y = temporary(y(ygood))
   endif else begin
    valid = 0
   endelse

   nolfm:

   return
end

Pro Plot_MAG,index1,titl,xtitl,ytitl

   common Data0,unit,load,size,start,valid
   common Data1,val,tempval,hdr1index,engindex,lfmindex
   common Data2,reccnt,hdr1cnt,engcnt,lfmcnt
   common Draw_Comm, DrawENG_Id, DrawMAG_Id
   common DrawWin,Drawx,Drawy,Basex,Basey
   common ENGPlot,ENG_index,ENG_title,ENG_xtitle,ENG_ytitle,ENG_plot
   common MAGPlot,MAG_index,MAG_title,MAG_xtitle,MAG_ytitle,MAG_plot
   common ImageRange,x1,y1,x2,y2,xmin,xmax,yminENG,yminMAG,ymaxENG,ymaxMAG
   common Ranges,rxmin,rxmax,rymin,rymax
   common Times,edays,days,start_day,end_day

; Plot magnetic field data selected by user

; Written by Sandy Kramer, HSTX, code 692

   if ( start eq -1 ) then begin
      print,'Plot_MAG * Data file not selected'
      goto, EndPlot_MAG
   endif

   if ( index1 eq -1 ) then begin
    print,'Plot_MAG * MAG data parameter undefined'
    goto, EndPlot_MAG
   endif

   if ( MAG_plot eq 1 ) then begin
      delta_day = end_day - start_day
      end_day = start_day + delta_day * (xmin-x2) / (xmin-xmax)
      start_day = start_day + delta_day * (xmin-x1) / (xmin-xmax)
      print,'Plot_MAG * Start/End times ',start_day,end_day
      Plot_ENG,ENG_index,ENG_title,ENG_xtitle,ENG_ytitle
   endif

   Get_MAG_Param,index1,xdat,ydat

   wset, DrawMAG_Id
   erase
   set_plot, 'x'
   !x.style = 1
   rxmin = start_day
   rxmax = end_day
   if ( valid eq 1 ) then begin
      ymin = min(ydat)
      ymax = max(ydat)
      plot,xdat,ydat,title=titl,xtitle=xtitl,ytitle=ytitl, $
           xrange=[rxmin,rxmax],yrange=[ymin,ymax], $
           position=[xmin,yminMAG,xmax,ymaxMAG], /device
   endif else begin
      print,'Plot_MAG * No valid MAG data.'
   endelse

   MAG_index = index1
   MAG_title = titl
   MAG_xtitle = xtitl
   MAG_ytitle = ytitl

EndPlot_MAG:

   MAG_plot = 0

   return
end

Pro Plot_ENG,index1,titl,xtitl,ytitl

   common Data0,unit,load,size,start,valid
   common Data1,val,tempval,hdr1index,engindex,lfmindex
   common Data2,reccnt,hdr1cnt,engcnt,lfmcnt
   common Draw_Comm, DrawENG_Id, DrawMAG_Id
   common DrawWin,Drawx,Drawy,Basex,Basey
   common ENGPlot,ENG_index,ENG_title,ENG_xtitle,ENG_ytitle,ENG_plot
   common MAGPlot,MAG_index,MAG_title,MAG_xtitle,MAG_ytitle,MAG_plot
   common ImageRange,x1,y1,x2,y2,xmin,xmax,yminENG,yminMAG,ymaxENG,ymaxMAG
   common Ranges,rxmin,rxmax,rymin,rymax
   common Times,edays,days,start_day,end_day

   if ( start eq -1 ) then begin
      print,'Plot_ENG * Data file not selected'
      goto, EndPlot_ENG
   endif

   if ( index1 eq -1 ) then begin
      print,'Plot_ENG * Engineering data parameter undefined'
      goto, EndPlot_ENG
   endif

   if ( ENG_plot eq 1 ) then begin
      delta_day = end_day - start_day
      end_day = start_day + delta_day * (xmin-x2) / (xmin-xmax)
      start_day = start_day + delta_day * (xmin-x1) / (xmin-xmax)
      print,'Plot_ENG * Start/End times ',start_day,end_day
      Plot_MAG,MAG_index,MAG_title,MAG_xtitle,MAG_ytitle
   endif

   Get_ENG_Param,index1,xdat,ydat

   wset, DrawENG_Id
   erase
   set_plot, 'x'
   !x.style = 1
   !y.style = 1
   !y.range = [0,255]
   rxmin = start_day
   rxmax = end_day
   if ( valid eq 1 ) then begin
      plot,xdat,ydat,title=titl,xtitle=xtitl,ytitle=ytitl, $
           xrange=[rxmin,rxmax], $
           position=[xmin,yminENG,xmax,ymaxENG], /device
   endif else begin
      print,'Plot_ENG * No valid engineering data.'
   endelse

   ENG_index = index1
   ENG_title = titl
   ENG_xtitle = xtitl
   ENG_ytitle = ytitl

EndPlot_ENG:

   ENG_plot = 0

   return
end

Pro MAIN_Event, Event

   common Data0,unit,load,size,start,valid
   common Data1,val,tempval,hdr1index,engindex,lfmindex
   common Data2,reccnt,hdr1cnt,engcnt,lfmcnt
   common Draw_Comm, DrawENG_Id, DrawMAG_Id
   common ENGPlot,ENG_index,ENG_title,ENG_xtitle,ENG_ytitle,ENG_plot
   common MAGPlot,MAG_index,MAG_title,MAG_xtitle,MAG_ytitle,MAG_plot
   common ImageRange,x1,y1,x2,y2,xmin,xmax,yminENG,yminMAG,ymaxENG,ymaxMAG

   WIDGET_CONTROL,Event.Id,GET_UVALUE=Ev

   CASE Ev OF 

  'DrawENG': BEGIN
; handle mouse button press
      if ( event.type eq 0 ) then begin
         x1 = event.x
         y1 = event.y
;         print,'MAIN_Event/DrawENG * ',x1,y1
      endif
; handle mouse button release 
      if ( event.type eq 1 ) then begin
         x2 = event.x
         y2 = event.y
;         print,'MAIN_Event/DrawENG * ',x2,y2
         ENG_plot = 1
; handle bad boundry defs
         if ( x1 lt xmin or x1 gt xmax or x2 lt x1 or x2 gt xmax ) then begin
            print,'MAIN_Event * Invalid x range selection'
            ENG_plot = 0
         endif else begin
            widget_control, /hourglass
            Plot_ENG,ENG_index,ENG_title,ENG_xtitle,ENG_ytitle
         endelse
      endif
      END

  'DrawMAG': BEGIN
; handle mouse button press
      if ( event.type eq 0 ) then begin
         x1 = event.x
         y1 = event.y
;         print,'MAIN_Event/DrawMAG * ',x1,y1
      endif
; handle mouse button release 
      if ( event.type eq 1 ) then begin
         x2 = event.x
         y2 = event.y
;         print,'MAIN_Event/DrawMAG * ',x2,y2
         MAG_plot = 1
; handle bad boundry defs
         if ( x1 lt xmin or x1 gt xmax or x2 lt x1 or x2 gt xmax ) then begin
            print,'MAIN_Event * Invalid x range selection'
            MAG_plot = 0
         endif else begin
            widget_control, /hourglass
            Plot_MAG,MAG_index,MAG_title,MAG_xtitle,MAG_ytitle
         endelse
      endif
      END

  'MAG48_F1': BEGIN
      print, '48 second F1 selected'
      Plot_MAG,0,'48 second F1','Time','Field'
      END

  'MAG48_F2': BEGIN
      print, '48 second F2 selected'
      Plot_MAG,1,'48 second F2','Time','Field'
      END

  'MAG48_DELTA': BEGIN
      print, '48 second DELTA selected'
      Plot_MAG,2,'48 second DELTA','Time','Field'
      END

  'MAG48_LAMBDA': BEGIN
      print, '48 second LAMBDA selected'
      Plot_MAG,3,'48 second LAMBDA','Time','Field'
      END

  'MAG48_B1': BEGIN
      print, '48 second B1 selected'
      Plot_MAG,4,'48 second B1','Time','Field'
      END

  'MAG48_B2': BEGIN
      print, '48 second B2 selected'
      Plot_MAG,5,'48 second B2','Time','Field'
      END

  'MAG48_B3': BEGIN
      print, '48 second B3 selected'
      Plot_MAG,6,'48 second B3','Time','Field'
      END

  'MAG48_RMSB1': BEGIN
      print, '48 second RMS B1 selected'
      Plot_MAG,7,'48 second RMS B1','Time','Field'
      END

  'MAG48_RMSB2': BEGIN
      print, '48 second RMS B2 selected'
      Plot_MAG,8,'48 second RMS B2','Time','Field'
      END

  'MAG48_RMSB3': BEGIN
      print, '48 second RMS B3 selected'
      Plot_MAG,9,'48 second RMS B3','Time','Field'
      END

  'NEXT_DATA': BEGIN
      widget_control, /hourglass
      print, 'Get next data block'
      if ( start ne -1 ) then begin
         VGR_Summary_Read
         Restart
         Plot_ENG,ENG_index,ENG_title,ENG_xtitle,ENG_ytitle
         Plot_MAG,MAG_index,MAG_title,MAG_xtitle,MAG_ytitle
      endif else print,'MAIN_Event/NEXT_DATA * Data file not selected'
      END

  'NEW_DATA': BEGIN
      print, 'Select new data'
      wset, DrawENG_Id
      erase
      wset, DrawMAG_Id
      erase
      if ( start ne -1 ) then close,unit
      start = -1
      Start
      END

  'RESET_RANGE': BEGIN
      print, 'Reset data range'
      widget_control, /hourglass
      if ( start ne -1 ) then begin
         Restart
         Plot_ENG,ENG_index,ENG_title,ENG_xtitle,ENG_ytitle
         Plot_MAG,MAG_index,MAG_title,MAG_xtitle,MAG_ytitle
      endif else print,'MAIN_Event/RESET_RANGE * Data file not selected'
      END

  'END_PGM': BEGIN
      print, 'Exiting Program'
      if ( start ne -1 ) then close,unit
      widget_control, /destroy, event.top
      END

   ELSE: if ( strpos(ev,'E',0) ne -1 ) then begin
            if ( strpos(ev,'E0',0) ne -1 ) then ENG_E0XX, Ev
            if ( strpos(ev,'E1',0) ne -1 ) then ENG_E1XX, Ev
            if ( strpos(ev,'E2',0) ne -1 ) then ENG_E2XX, Ev
            if ( strpos(ev,'E3',0) ne -1 ) then ENG_E3XX, Ev
            if ( strpos(ev,'E4',0) ne -1 ) then ENG_E4XX, Ev
            if ( strpos(ev,'E6',0) ne -1 ) then ENG_E6XX, Ev
            if ( strpos(ev,'E7',0) ne -1 ) then ENG_E7XX, Ev
         endif else begin
            print, Ev,' Main_Event * Error in selection, Try again.....'
         endelse
  ENDCASE

EndMAIN_Event:

END

PRO VGR, GROUP=Group

   common Data0,unit,load,size,start,valid
   common Data1,val,tempval,hdr1index,engindex,lfmindex
   common Data2,reccnt,hdr1cnt,engcnt,lfmcnt
   common Draw_Comm, DrawENG_Id, DrawMAG_Id
   common DrawWin,Drawx,Drawy,Basex,Basey
   common ENGPlot,ENG_index,ENG_title,ENG_xtitle,ENG_ytitle,ENG_plot
   common MAGPlot,MAG_index,MAG_title,MAG_xtitle,MAG_ytitle,MAG_plot
   common ImageRange,x1,y1,x2,y2,xmin,xmax,yminENG,yminMAG,ymaxENG,ymaxMAG
   common Ranges,rxmin,rxmax,rymin,rymax
   common Scratch,scratchdir

   unit = 0
   start = -1
   load = 1
   ENG_plot = 0
   MAG_plot = 0
   ENG_index = -1
   MAG_index = -1
   titl  = ''
   xtitl = ''
   ytitl = ''
   Device,Retain=2
   Device,get_screen_size=Screen
   Device,set_character_size=[6,10]
   print,'ScreenSize = ',Screen
   SomeScreen = 10
   Basex = Screen(0) - SomeScreen
   Basey = Screen(1) - SomeScreen
   Drawx = fix(0.66*Basex)
   Drawy = fix(0.73*Basey)
   buttwide = fix(0.16*Basex)
   buttsize = 19
   xmin = fix(0.11*Drawx)
   xmax = fix(0.97*Drawx)
   yminENG = fix(0.07*Basey)
   yminMAG = fix(0.08*Basey)
   ymaxENG = fix(0.23*Basey)
   ymaxMAG = fix(0.69*Basey)
   rxmin = 0
   rymin = 0
   rymax = 256
   Loadct,4

   IF N_ELEMENTS(Group) EQ 0 THEN GROUP=0

;   junk   = { CW_PDMENU_S, flags:0, name:'' }

;   if !version.os eq 'vms' then begin
;      scratchdir = '[.scratch]'
;      spawn,'$ delete ' + scratchdir + '*.*;* /nocon' 
;   endif else begin
;      scratchdir = './scratch'
;      spawn,'rm -f ' + scratchdir + '/*' 
;   endelse

; Define widgets

; Top level widget

   MAIN = WIDGET_BASE(GROUP_LEADER=Group, $
       ROW=1, $
       SPACE=1, $
       XPAD=0, $
       YPAD=0, $
       MAP=1, $
       TITLE='VOYAGER MAG SCIENCE ANALYSIS', $
       UVALUE='MAIN', $
       XSIZE=Basex, $
       YSIZE=Basey)
    
; Leftmost frame:  Engineering parameters

   BASE6 = WIDGET_BASE(MAIN, $
       COLUMN=1, $
       FRAME=1, $
       SPACE=1, $
       XPAD=0, $
       YPAD=0, $
       MAP=1, $
       UVALUE='BASE6', $
       XSIZE=buttwide, $
       YSIZE=Basey)

   LABEL100 = WIDGET_LABEL( BASE6, $
       FRAME=8, $
       UVALUE='LABEL100', $
       VALUE='ENG Subsystems')
 
   LABEL101 = WIDGET_LABEL( BASE6, $
       UVALUE='LABEL101', $
       VALUE='   ')

   MENUE01 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE01', $
       MENU=2, $
       VALUE='Structure')

       get_menue01,menue01,uvalue

   MENUE02 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE02', $
       MENU=2, $
       VALUE='Radio Frequency')

       get_menue02,menue02,uvalue

   MENUE03 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE03', $
       MENU=2, $
       VALUE='Mod/Demod')

       get_menue03,menue03,uvalue

   MENUE04 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE04', $
       MENU=2, $
       VALUE='Power')

       get_menue04,menue04,uvalue

   MENUE05 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE05', $
       MENU=2, $
       VALUE='Computer Command')

       get_menue05,menue05,uvalue

   MENUE06 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE06', $
       MENU=2, $
       VALUE='Flight Data')

       get_menue06,menue06,uvalue

   MENUE07 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE07', $
       MENU=2, $
       VALUE='Attitude and Articulation')

   MENUE07A = WIDGET_BUTTON( MENUE07, $
       UVALUE='MENUE07A', $
       MENU=2, $
       VALUE='Group 1')

       get_menue07a,menue07a,uvalue

   MENUE07B = WIDGET_BUTTON( MENUE07, $
       UVALUE='MENUE07B', $
       MENU=2, $
       VALUE='Group 2')

       get_menue07b,menue07b,uvalue

   MENUE07C = WIDGET_BUTTON( MENUE07, $
       UVALUE='MENUE07C', $
       MENU=2, $
       VALUE='Group 3')

       get_menue07c,menue07c,uvalue

   MENUE07D = WIDGET_BUTTON( MENUE07, $
       UVALUE='MENUE07D', $
       MENU=2, $
       VALUE='Group 4')

       get_menue07d,menue07d,uvalue

   MENUE08 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE08', $
       MENU=2, $
       VALUE='Pyrotechnic')

       get_menue08,menue08,uvalue

   MENUE09 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE09', $
       MENU=2, $
       VALUE='Propulsion')

   MENUE09A = WIDGET_BUTTON( MENUE09, $
       UVALUE='MENUE09A', $
       MENU=2, $
       VALUE='Group 1')

       get_menue09a,menue09a,uvalue

   MENUE09B = WIDGET_BUTTON( MENUE09, $
       UVALUE='MENUE09B', $
       MENU=2, $
       VALUE='Group 2')

       get_menue09b,menue09b,uvalue

   MENUE10 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE10', $
       MENU=2, $
       VALUE='Temperature Control')

       get_menue10,menue10,uvalue

   MENUE11 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE11', $
       MENU=2, $
       VALUE='Mechanical Devices')

       get_menue11,menue11,uvalue

   MENUE12 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE12', $
       MENU=2, $
       VALUE='Data Storage')

       get_menue12,menue12,uvalue

   MENUE13 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE13', $
       MENU=2, $
       VALUE='S/X Band Antenna')

       get_menue13,menue13,uvalue

   MENUE14 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE14', $
       MENU=2, $
       VALUE='Cosmic Ray')

       get_menue14,menue14,uvalue

   MENUE15 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE15', $
       MENU=2, $
       VALUE='PRA')

       get_menue15,menue15,uvalue

   MENUE16 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE16', $
       MENU=2, $
       VALUE='Plasma Wave')

       get_menue16,menue16,uvalue

   MENUE17 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE17', $
       MENU=2, $
       VALUE='LECP')

       get_menue17,menue17,uvalue

   MENUE18 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE18', $
       MENU=2, $
       VALUE='Photopolarimeter')

       get_menue18,menue18,uvalue

   MENUE19 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE19', $
       MENU=2, $
       VALUE='Plasma')

       get_menue19,menue19,uvalue

   MENUE20 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE20', $
       MENU=2, $
       VALUE='UVS')

       get_menue20,menue20,uvalue

   MENUE21 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE21', $
       MENU=2, $
       VALUE='MAG')

       get_menue21,menue21,uvalue

   MENUE22 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE22', $
       MENU=2, $
       VALUE='Imaging Science')

       get_menue22,menue22,uvalue

   MENUE23 = WIDGET_BUTTON( BASE6, $
       UVALUE='MENUE23', $
       MENU=2, $
       VALUE='MIRIS')

       get_menue23,menue23,uvalue

; Middle frame:  Plots

   BASE5 = WIDGET_BASE(MAIN, $
       COLUMN=1, $
       SPACE=1, $
       FRAME=1, $
       XPAD=0, $
       YPAD=0, $
       MAP=1, $
       UVALUE='BASE5', $
       XSIZE=Drawx, $
       YSIZE=Basey)

   DrawENG = WIDGET_Draw( BASE5, $
       BUTTON_EVENTS=1, $
       FRAME=1, $
       MOTION_EVENTS=0, $
       RETAIN=1, $
       UVALUE='DrawENG', $
       XSIZE=Drawx, $
       YSIZE=Basey-Drawy)

   DrawMAG = WIDGET_Draw( BASE5, $
       BUTTON_EVENTS=1, $
       FRAME=1, $
       MOTION_EVENTS=0, $
       RETAIN=1, $
       UVALUE='DrawMAG', $
       XSIZE=Drawx, $
       YSIZE=Drawy)

; Rightmost frame:  Analysis

   BASE7 = WIDGET_BASE(MAIN, $
       COLUMN=1, $
       SPACE=1, $
       FRAME=1, $
       XPAD=0, $
       YPAD=0, $
       MAP=1, $
       UVALUE='BASE7', $
       XSIZE=buttwide, $
       YSIZE=Basey)

   LABEL900 = WIDGET_LABEL( BASE7, $
       FRAME=8, $
       UVALUE='LABEL900', $
       VALUE='Applications')

   LABEL901 = WIDGET_LABEL( BASE7, $
       UVALUE='LABEL901', $
       VALUE='   ')

   NEW_DATA = WIDGET_BUTTON( BASE7, $
       FRAME=4, $
       UVALUE='NEW_DATA', $
       VALUE='New File')

   RESET_RANGE = WIDGET_BUTTON( BASE7, $
       FRAME=4, $
       UVALUE='RESET_RANGE', $
       VALUE='Reset Range')

   NEXT_DATA = WIDGET_BUTTON( BASE7, $
       FRAME=4, $
       UVALUE='NEXT_DATA', $
       VALUE='Next Block')

   END_PGM = WIDGET_BUTTON( BASE7, $
       FRAME=4, $
       UVALUE='END_PGM', $
       VALUE='Exit Program')

   LABEL902 = WIDGET_LABEL( BASE7, $
       UVALUE='LABEL902', $
       VALUE='   ')

   LABEL903 = WIDGET_LABEL( BASE7, $
       UVALUE='LABEL903', $
       VALUE='   ')

   LABEL200 = WIDGET_LABEL( BASE7, $
       Frame=8, $
       UVALUE='LABEL200', $
       VALUE='MAG Data Type')

   LABEL201 = WIDGET_LABEL( BASE7, $
       UVALUE='LABEL201', $
       VALUE='   ')

; 48 Second Averages

   BUTTON200 = WIDGET_BUTTON( BASE7, $
       MENU = 2, $
       UVALUE='BUTTON200', $
       VALUE='48 Second Averages')

   MAG48_F1 = WIDGET_BUTTON( BUTTON200, $
       UVALUE='MAG48_F1', $
       VALUE='F1')

   MAG48_F2 = WIDGET_BUTTON( BUTTON200, $
       UVALUE='MAG48_F2', $
       VALUE='F2')

   MAG48_DELTA = WIDGET_BUTTON( BUTTON200, $
       UVALUE='MAG48_DELTA', $
       VALUE='DELTA')

   MAG48_LAMBDA = WIDGET_BUTTON( BUTTON200, $
       UVALUE='MAG48_LAMBDA', $
       VALUE='LAMBDA')

   MAG48_B1 = WIDGET_BUTTON( BUTTON200, $
       UVALUE='MAG48_B1', $
       VALUE='B1')

   MAG48_B2 = WIDGET_BUTTON( BUTTON200, $
       UVALUE='MAG48_B2', $
       VALUE='B2')

   MAG48_B3 = WIDGET_BUTTON( BUTTON200, $
       UVALUE='MAG48_B3', $
       VALUE='B3')

   MAG48_RMSB1 = WIDGET_BUTTON( BUTTON200, $
       UVALUE='MAG48_RMSB1', $
       VALUE='RMS B1')

   MAG48_RMSB2 = WIDGET_BUTTON( BUTTON200, $
       UVALUE='MAG48_RMSB2', $
       VALUE='RMS B2')

   MAG48_RMSB3 = WIDGET_BUTTON( BUTTON200, $
       UVALUE='MAG48_RMSB3', $
       VALUE='RMS B3')

; 9.6 Second Averages

   BUTTON300 = WIDGET_BUTTON( BASE7, $
       MENU = 2, $
       UVALUE='BUTTON300', $
       VALUE='9.6 Second Averages')

; 1.92 Second Averages

   BUTTON400 = WIDGET_BUTTON( BASE7, $
       MENU = 2, $
       UVALUE='BUTTON400', $
       VALUE='1.92 Second Averages')

; 48 Second SCF Block

   BUTTON500 = WIDGET_BUTTON( BASE7, $
       MENU = 2, $
       UVALUE='BUTTON500', $
       VALUE='48 Second SCF Block')
;

   LABEL202 = WIDGET_LABEL( BASE7, $
       UVALUE='LABEL202', $
       VALUE='   ')

   LABEL203 = WIDGET_LABEL( BASE7, $
       UVALUE='LABEL203', $
       VALUE='S. Kramer')

   LABEL204 = WIDGET_LABEL( BASE7, $
       UVALUE='LABEL204', $
       VALUE='NASA/GSFC 692')

   START ; call data input procedure 

   WIDGET_CONTROL, MAIN, /REALIZE

  ; Get drawable window index

   WIDGET_CONTROL, DrawENG, GET_VALUE=DrawENG_Id
   WIDGET_CONTROL, DrawMAG, GET_VALUE=DrawMAG_Id

   XMANAGER, 'MAIN', MAIN

END

pro get_menue01,menue01,uvalue

   E000 = WIDGET_BUTTON( MENUE01, $
   UVALUE='E000', $
   VALUE='Bay 1 Temp')

   E001 = WIDGET_BUTTON( MENUE01, $
   UVALUE='E001', $
   VALUE='Bay 2 Temp')

   E002 = WIDGET_BUTTON( MENUE01, $
   UVALUE='E002', $
   VALUE='Bay 3 Temp')

   E003 = WIDGET_BUTTON( MENUE01, $
   UVALUE='E003', $
   VALUE='Bay 4 Temp')

   E004 = WIDGET_BUTTON( MENUE01, $
   UVALUE='E004', $
   VALUE='Bay 5 Temp')

   E005 = WIDGET_BUTTON( MENUE01, $
   UVALUE='E005', $
   VALUE='Bay 6 Temp')

   E006 = WIDGET_BUTTON( MENUE01, $
   UVALUE='E006', $
   VALUE='Bay 7 Temp')

   E007 = WIDGET_BUTTON( MENUE01, $
   UVALUE='E007', $
   VALUE='Bay 8 Temp')

   E008 = WIDGET_BUTTON( MENUE01, $
   UVALUE='E008', $
   VALUE='Bay 9 Temp')

   E009 = WIDGET_BUTTON( MENUE01, $
   UVALUE='E009', $
   VALUE='Bay 10 Temp')

   return
end 

pro get_menue02,menue02,uvalue

   E020 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E020', $
   VALUE='RFS Status No. 1')


   E021 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E021', $
   VALUE='RFS Status No. 2')

   E022 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E022', $
   VALUE='Receiver VCO Coarse Voltage')

   E023 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E023', $
   VALUE='Receiver VCO Fine Voltage')

   E024 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E024', $
   VALUE='Receiver AGC')

   E025 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E025', $
   VALUE='* Receiver AGC')

   E026 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E026', $
   VALUE='Receiver Ranging AGC V')

   E027 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E027', $
   VALUE='Receiver Current')

   E028 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E028', $
   VALUE='Receiver Local Oscillator Drive')

   E029 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E029', $
   VALUE='Receiver VCO Temp')

   E030 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E030', $
   VALUE='USO Inner Oven Current')

   E031 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E031', $
   VALUE='S-Band TWT/SSA Base Temp')

   E032 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E032', $
   VALUE='S-Band Hybrid Temp')

   E033 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E033', $
   VALUE='S-Band TWT/SSA Regulated Voltage')

   E034 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E034', $
   VALUE='S-Band Transmitter Drive')

   E035 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E035', $
   VALUE='S-Band Cathode Current/SSA Input Current')

   E036 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E036', $
   VALUE='S-Band TWT Helix Current')

   E037 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E037', $
   VALUE='S-Band High Gain Antenna Drive')

   E038 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E038', $
   VALUE='S-Band Exciter Current')

   E039 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E039', $
   VALUE='X-Band TWT Base Temp')

   E040 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E040', $
   VALUE='X-Band Hybrid Temp')

   E041 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E041', $
   VALUE='X-Band RF Monitor Temp')

   E042 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E042', $
   VALUE='X-Band Exciter Temp')

   E043 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E043', $
   VALUE='X-Band TWT Regulated Voltage')

   E044 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E044', $
   VALUE='X-Band TWT Drive')

   E045 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E045', $
   VALUE='X-Band TWT Helix Current')

   E046 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E046', $
   VALUE='X-Band TWT Cathode Current')

   E047 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E047', $
   VALUE='X-Band Exciter Current')

   E048 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E048', $
   VALUE='X-Band High Gain Antenna Drive')

   E049 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E049', $
   VALUE='Transmitter RF Switch Temp')

   E050 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E050', $
   VALUE='Auxiliary Oscillator Temp')

   E051 = WIDGET_BUTTON( MENUE02, $
   UVALUE='E051', $
   VALUE='Low Gain Antenna Drive')

   return
end 

pro get_menue03,menue03,uvalue

   E060 = WIDGET_BUTTON( MENUE03, $
   UVALUE='E060A', $
   VALUE='MDS/FDS/PRA Status (CDU/TMU Status)')

   E061 = WIDGET_BUTTON( MENUE03, $
   UVALUE='E061', $
   VALUE='TMU Status 1')

   E062 = WIDGET_BUTTON( MENUE03, $
   UVALUE='E062', $
   VALUE='TMU Status 2')

   E063 = WIDGET_BUTTON( MENUE03, $
   UVALUE='E063', $
   VALUE='CDU SNR (Most Significant Byte)')

   E064 = WIDGET_BUTTON( MENUE03, $
   UVALUE='E064', $
   VALUE='CDU SNR (Least Significant Byte)')

   E065 = WIDGET_BUTTON( MENUE03, $
   UVALUE='E065', $
   VALUE='CDU Oscillator Monitor')

   return
end

pro get_menue04,menue04,uvalue

   E070 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E070', $
   VALUE='2.4 kHz Inverter Input Current')

   E071 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E071', $
   VALUE='2.4 kHz Inverter Output Voltage')

   E072 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E072', $
   VALUE='2.4 kHz Inverter Output Current')

   E073 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E073', $
   VALUE='DC Bus Voltage')

   E074 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E074', $
   VALUE='DC Bus Current')

   E075 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E075', $
   VALUE='Shunt Regulator Input Current')

   E076 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E076', $
   VALUE='* 2.4 kHz Inverter Input Current')

   E077 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E077', $
   VALUE='* 2.4 kHz Inverter Output Voltage')

   E078 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E078', $
   VALUE='* 2.4 kHz Inverter Output Current')

   E079 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E079', $
   VALUE='* DC Bus Voltage')

   E080 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E080', $
   VALUE='* DC Bus Current')

   E081 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E081', $
   VALUE='* Shunt Regulator Input Current')

   E082 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E082', $
   VALUE='Shunt Regulator Temp')

   E083 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E083', $
   VALUE='Shunt Regulator Temp 3')

   E084 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E084', $
   VALUE='Shunt Regulator Temp 4')

   E085 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E085', $
   VALUE='RDM Voltage Monitor')

   E100 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E100', $
   VALUE='RTG 1 Output Voltage')

   E101 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E101', $
   VALUE='RTG 2 Output Voltage')

   E102 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E102', $
   VALUE='RTG 3 Output Voltage')

   E103 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E103', $
   VALUE='RTG 1 Output Current')

   E104 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E104', $
   VALUE='RTG 2 Output Current')

   E105 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E105', $
   VALUE='RTG 3 Output Current')

   E106 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E106', $
   VALUE='* RTG 1 Output Current')

   E107 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E107', $
   VALUE='* RTG 2 Output Current')

   E108 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E108', $
   VALUE='* RTG 3 Output Current')

   E109 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E109', $
   VALUE='RTG 1 Case Temp 3')

   E110 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E110', $
   VALUE='RTG 1 Case Temp 2')

   E111 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E111', $
   VALUE='RTG 2 Case Temp 1')

   E112 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E112', $
   VALUE='RTG 2 Case Temp 3')

   E113 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E113', $
   VALUE='RTG 3 Case Temp 1')

   E114 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E114', $
   VALUE='RTG 3 Case Temp 2')

   E115 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E115', $
   VALUE='Battery Temp')

   E245 = WIDGET_BUTTON( MENUE04, $
   UVALUE='E245A', $
   VALUE='FDS/PWR/PYRO Status (2.4 kHz Inv Status)')

   return
end

pro get_menue05,menue05,uvalue

   E130 = WIDGET_BUTTON( MENUE05, $
   UVALUE='E130', $
   VALUE='CCS Output 1')
          
   E131 = WIDGET_BUTTON( MENUE05, $
   UVALUE='E131', $
   VALUE='CCS Output 2')
          
   E132 = WIDGET_BUTTON( MENUE05, $
   UVALUE='E132', $
   VALUE='* CCS Output 1')
          
   E133 = WIDGET_BUTTON( MENUE05, $
   UVALUE='E133', $
   VALUE='* CCS Output 2')

   return
end
          
pro get_menue06,menue06,uvalue

       E140 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E140', $
          VALUE='FDS Status 1')

       E141 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E141', $
          VALUE='FDS Status 2')

       E142 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E142', $
          VALUE='FDS Status 3')

       E143 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E143', $
          VALUE='FDS Status 4')

       E144 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E144', $
          VALUE='FDS Status 5')

       E145 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E145', $
          VALUE='FDS Status 6')

       E146 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E146', $
          VALUE='FDS Memory Word')

       E060 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E060B', $
          VALUE='MDS/FDS/PRA Status (4.8 kHz A/B Status)')

       E245 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E245B', $
          VALUE='FDS/PWR/PYRO Status (FDS ID)')

       E150 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E150', $
          VALUE='FDS Selected Source Voltage')

       E151 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E151', $
          VALUE='FDS 30V Inverter Output Voltage')

       E152 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E152', $
          VALUE='FDS 10V Bus Voltage')

       E153 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E153', $
          VALUE='FDS Power Converter A + 10 Current')

       E154 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E154', $
          VALUE='FDS Power Converter B + 10 Current')

       E155 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E155', $
          VALUE='FDS +3V ADC A Voltage')

       E156 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E156', $
          VALUE='FDS +3V ADC B Voltage')

       E157 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E157', $
          VALUE='FDS Timing +5V DC')

       E160 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E160', $
          VALUE='Frame Sync Code')

       E161 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E161', $
          VALUE='Frame Sync Code')

       E162 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E162', $
          VALUE='Frame Sync Code')

       E163 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E163', $
          VALUE='Frame Sync Code')

       E164 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E164', $
          VALUE='Format ID Word')

       E165 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E165', $
          VALUE='Mod 16 Counter')

       E166 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E166', $
          VALUE='Mod 60 and Line Count')

       E167 = WIDGET_BUTTON( MENUE06, $
          UVALUE='E167', $
          VALUE='Line Count')

       return
end

pro get_menue07a,menue07a,uvalue

       E170 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E170', $
          VALUE='AACS Output A')

       E171 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E171', $
          VALUE='AACS Output B')

       E172 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E172', $
          VALUE='Pitch Gyro Accumulated Position')

       E173 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E173', $
          VALUE='CST Tracker High Gate')

       E174 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E174', $
          VALUE='Pitch Sun Sensor Position')

       E175 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E175', $
          VALUE='Pitch Calculated Rate')

       E176 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E176', $
          VALUE='Pitch Estimated Position')

       E177 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E177', $
          VALUE='Pitch Sun Sensor Bias Angle, Fine')

       E178 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E178', $
          VALUE='Pitch Sun Sensor Bias Angle, Coarse')

       E179 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E179', $
          VALUE='Yaw Gyro Accumulated Position')

       E180 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E180', $
          VALUE='CST Tracker Low Gate')

       E181 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E181', $
          VALUE='Yaw Sun Sensor Position')

       E182 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E182', $
          VALUE='Yaw Calculated Rate')

       E183 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E183', $
          VALUE='Yaw Estimated Position')

       E184 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E184', $
          VALUE='Yaw Sun Sensor Bias Angle, Fine')

       E185 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E185', $
          VALUE='Yaw Sun Sensor Bias Angle, Coarse')

       E186 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E186', $
          VALUE='Roll Gyro Accumulated Position')

       E188 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E188', $
          VALUE='Roll Canopus Start Tracker Intensity')

       E189 = WIDGET_BUTTON( MENUE07A, $
          UVALUE='E189', $
          VALUE='Roll Canopus Start Tracker Position')

       return
end

pro get_menue07b,menue07b,uvalue

       E190 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E190', $
          VALUE='Roll Calculated Rate')

       E191 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E191', $
          VALUE='Roll Estimated Position')

       E192 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E192', $
          VALUE='Scan Platform Azimuth Position, Coarse')

       E193 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E193', $
          VALUE='Scan Platform Azimuth Position, Fine')

       E194 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E194', $
          VALUE='Scan Platform Elevation Position, Coarse')

       E195 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E195', $
          VALUE='Scan Platform Elevation Position, Fine')

       E196 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E196', $
          VALUE='Pitch/Yaw Sensor Intensity')

       E197 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E197', $
          VALUE='Roll Canopus Star Tracker Cone Angle')

       E200 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E200', $
          VALUE='AACS Status Word 1')

       E201 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E201', $
          VALUE='AACS Status Word 2')

       E202 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E202', $
          VALUE='AACS Status Word 3')

       E203 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E203', $
          VALUE='AACS Status Word 4')

       E204 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E204', $
          VALUE='AACS Status Word 5 (Mode Status)')

       E205 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E205', $
          VALUE='AACS Status Word 6 (Gyro Status)')

       E206 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E206', $
          VALUE='Configuration Register 1 (1st)')

       E207 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E207', $
          VALUE='Configuration Register 1 (2nd)')

       E208 = WIDGET_BUTTON( MENUE07B, $
          UVALUE='E208', $
          VALUE='Configuration Register 1 (3rd)')

       return
end

pro get_menue07c,menue07c,uvalue

       E209 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E209', $
          VALUE='Pos. Pitch AP Valve Pulse Counter Value')

       E210 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E210', $
          VALUE='Neg. Pitch AP Valve Pulse Counter Value')

       E211 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E211', $
          VALUE='Pos. Yaw AP Valve Pulse Counter Value')

       E212 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E212', $
          VALUE='Neg. Yaw AP Valve Pulse Counter Value')

       E213 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E213', $
          VALUE='AACS/FDS Subsystem Health Check')

       E214 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E214', $
          VALUE='Pos. Roll AP Valve Pulse Counter Value')

       E215 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E215', $
          VALUE='Neg. Roll AP Valve Pulse Counter Value')

       E216 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E216', $
          VALUE='Pos. Pitch TCM Valve Pulse Counter Value')

       E217 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E217', $
          VALUE='Neg. Pitch TCM Valve Pulse Counter Value')

       E218 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E218', $
          VALUE='Pos. Yaw TCM Valve Pulse Counter Value')

       E219 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E219', $
          VALUE='Neg. TCM Valve Pulse Counter Value')

       E220 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E220', $
          VALUE='Configuration Register 2 (1st)')

       E221 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E221', $
          VALUE='Configuration Register 2 (2nd)')

       E222 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E222', $
          VALUE='Configuration Register 2 (3rd)')

       E223 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E223', $
          VALUE='AACS Spare')

       E224 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E224', $
          VALUE='Pitch Estimated Acceleration')

       E225 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E225', $
          VALUE='Yaw Estimated Acceleration')

       E226 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E226', $
          VALUE='Roll Estimated Acceleration')

       E227 = WIDGET_BUTTON( MENUE07C, $
          UVALUE='E227', $
          VALUE='AACS Spare')

       return
end

pro get_menue07d,menue07d,uvalue

       E228 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E228', $
          VALUE='Sun Sensor High Gate')

       E229 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E229', $
          VALUE='Sun Sensor Low Gate')

       E230 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E230', $
          VALUE='Gyro A Temp')

       E231 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E231', $
          VALUE='Gyro B Temp')

       E232 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E232', $
          VALUE='Gyro C Temp')

       E233 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E233', $
          VALUE='Canopus Star Tracker 1 Temp')

       E234 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E234', $
          VALUE='Canopus Star Tracker 2 Temp')

       E235 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E235', $
          VALUE='Scan Azimuth Temp')

       E236 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E236', $
          VALUE='Sun Sensor Temp')

       E237 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E237', $
          VALUE='Memory Readout Address 1 (zeros)')

       E238 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E238', $
          VALUE='Memory Readout Address 2 (bits 9-12)')

       E239 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E239', $
          VALUE='Memory Readout Address 3 (bits 1-8)')

       E240 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E240', $
          VALUE='Memory Readout Address 1 (bits 17-18)')

       E241 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E241', $
          VALUE='Memory Readout Address 2 (bits 9-16)')

       E242 = WIDGET_BUTTON( MENUE07D, $
          UVALUE='E242', $
          VALUE='Memory Readout Address 3 (bits 1-8)')

       return
end

pro get_menue08,menue08,uvalue

       E245 = WIDGET_BUTTON( MENUE08, $
          UVALUE='E245C', $
          VALUE='FDS/PWR/PYRO Status (PYRO Amps Ind)')

       E246 = WIDGET_BUTTON( MENUE08, $
          UVALUE='E246', $
          VALUE='Capacitor Bank A Voltage')

       E247 = WIDGET_BUTTON( MENUE08, $
          UVALUE='E247', $
          VALUE='Capacitor Bank B Voltage')

       return
end

pro get_menue09a,menue09a,uvalue

       E270 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E270', $
          VALUE='Helium Pressure')

       E271 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E271', $
          VALUE='TCAPU N2H4 Pressure Branch 1')

       E272 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E272', $
          VALUE='TCAPU +Pitch TCM Thruster Chamber P')

       E273 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E273', $
          VALUE='TCAPU -Pitch TCM Thruster Chamber P')

       E274 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E274', $
          VALUE='TCAPU +Yaw TCM Thruster Chamber P')

       E275 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E275', $
          VALUE='TCAPU -Yaw TCM Thruster Chamber P')

       E276 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E276', $
          VALUE='+Pitch Thruster 1/+A Eng 1 Chamber P (MS Byte)')

       E277 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E277', $
          VALUE='+Pitch Thruster 1/+A Eng 1 Chamber P (LS Byte)')

       E278 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E278', $
          VALUE='-Pitch Thruster 1/-A Eng 1 Chamber P (MS Byte)')

       E279 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E279', $
          VALUE='-Pitch Thruster 1/-A Eng 1 Chamber P (LS Byte)')

       E280 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E280', $
          VALUE='+Yaw Thruster 1/+B Eng 2 Chamber P (MS Byte)')

       E281 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E281', $
          VALUE='+Yaw Thruster 1/+B Eng 2 Chamber P (LS Byte)')

       E282 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E282', $
          VALUE='+Roll Thruster 1/-B Eng 2 Chamber P (MS Byte)')

       E283 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E283', $
          VALUE='+Roll Thruster 1/-B Eng 2 Chamber P (LS Byte)')

       E284 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E284', $
          VALUE='+Pitch Thruster 2 Temp')

       E285 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E285', $
          VALUE='-Pitch Thruster 2 Temp')

       E286 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E286', $
          VALUE='-Yaw Thruster 1 Temp')

       E287 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E287', $
          VALUE='+Yaw Thruster 2 Temp')

       E288 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E288', $
          VALUE='-Yaw Thruster 2 Temp')

       E289 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E289', $
          VALUE='-Roll Thruster 1 Temp')

       E290 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E290', $
          VALUE='+Roll Thruster 2 Temp')

       E291 = WIDGET_BUTTON( MENUE09A, $
          UVALUE='E291', $
          VALUE='-Roll Thruster 2 Temp')

       return
end

pro get_menue09b,menue09b,uvalue

       E292 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E292', $
          VALUE='TCAPU Surface Temp 1')

       E293 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E293', $
          VALUE='TCAPU Surface Temp 2')

       E294 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E294', $
          VALUE='TCAPU Tank Temp 1')

       E295 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E295', $
          VALUE='TCAPU Tank Temp 2')

       E296 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E296', $
          VALUE='Feed System Temp 1')

       E297 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E297', $
          VALUE='Feed System Temp 2')

       E298 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E298', $
          VALUE='Isolation Valve Posistion BR 1')

       E299 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E299', $
          VALUE='Isolation Valve Posistion BR 2')

       E300 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E300', $
          VALUE='IPU Solid Motor Chamber Pressure')

       E301 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E301', $
          VALUE='* IPU Solid Motor Chamber Pressure')

       E302 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E302', $
          VALUE='IPU +Roll Engine 1 Temp')

       E303 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E303', $
          VALUE='IPU -Roll Engine 1 Temp')

       E304 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E304', $
          VALUE='IPU +Roll Engine 2 Temp')

       E305 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E305', $
          VALUE='IPU -Roll Engine 2 Temp')

       E306 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E306', $
          VALUE='IPU Line Temp 1')

       E307 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E307', $
          VALUE='IPU Line Temp 2')

       E308 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E308', $
          VALUE='IPU Solid Motor Temp 1')

       E309 = WIDGET_BUTTON( MENUE09B, $
          UVALUE='E309', $
          VALUE='IPU Solid Motor Temp 2')

       return
end

pro get_menue10,menue10,uvalue

       E320 = WIDGET_BUTTON( MENUE10, $
          UVALUE='E320', $
          VALUE='SCI Plume Shield Temp 1')

       E321 = WIDGET_BUTTON( MENUE10, $
          UVALUE='E321', $
          VALUE='SCI Plume Shield Temp 2')

       return
end

pro get_menue11,menue11,uvalue

       E330 = WIDGET_BUTTON( MENUE11, $
          UVALUE='E330', $
          VALUE='Science Latch Pressure')

       E331 = WIDGET_BUTTON( MENUE11, $
          UVALUE='E331', $
          VALUE='Devices/Cabling Status')

       return
end

pro get_menue12,menue12,uvalue

       E340 = WIDGET_BUTTON( MENUE12, $
          UVALUE='E340', $
          VALUE='DDS Motor Voltage')
 
       E341 = WIDGET_BUTTON( MENUE12, $
          UVALUE='E341', $
          VALUE='DDS Transport Pressure')
 
       E342 = WIDGET_BUTTON( MENUE12, $
          UVALUE='E342', $
          VALUE='Mode Status')
 
       E343 = WIDGET_BUTTON( MENUE12, $
          UVALUE='E343', $
          VALUE='Playback Status')
 
       return
end

pro get_menue13,menue13,uvalue

       E350 = WIDGET_BUTTON( MENUE13, $
          UVALUE='E350', $
          VALUE='HGA Main Reflector Temp')

       E351 = WIDGET_BUTTON( MENUE13, $
          UVALUE='E351', $
          VALUE='HGA S-Band Feed Temp')

       E352 = WIDGET_BUTTON( MENUE13, $
          UVALUE='E352', $
          VALUE='HGA X-Band Feed Temp')

       E353 = WIDGET_BUTTON( MENUE13, $
          UVALUE='E353', $
          VALUE='LGA Body Temp')

       return
end

pro get_menue14,menue14,uvalue

       E360 = WIDGET_BUTTON( MENUE14, $
          UVALUE='E360', $
          VALUE='CRS Analog Data')

       E361 = WIDGET_BUTTON( MENUE14, $
          UVALUE='E361', $
          VALUE='CRS Electronics Temp')

       E362 = WIDGET_BUTTON( MENUE14, $
          UVALUE='E362', $
          VALUE='CRS Telescope Temp')

       return
end

pro get_menue15,menue15,uvalue

       E410 = WIDGET_BUTTON( MENUE15, $
          UVALUE='E410', $
          VALUE='PRA Analog Data')

       E411 = WIDGET_BUTTON( MENUE15, $
          UVALUE='E411', $
          VALUE='PRA Electronics Temp')

       E060 = WIDGET_BUTTON( MENUE15, $
          UVALUE='E060C', $
          VALUE='MDS/FDS/PRA Status (PRA Ant A/B Deploy)')

       return
end

pro get_menue16,menue16,uvalue

       E430 = WIDGET_BUTTON( MENUE16, $
          UVALUE='E430', $
          VALUE='PWS Analog Output A')

       E431 = WIDGET_BUTTON( MENUE16, $
          UVALUE='E431', $
          VALUE='PWS Analog Output A')

       E432 = WIDGET_BUTTON( MENUE16, $
          UVALUE='E432', $
          VALUE='PWS Analog Output B')

       E433 = WIDGET_BUTTON( MENUE16, $
          UVALUE='E433', $
          VALUE='PWS Analog Output B')

       E434 = WIDGET_BUTTON( MENUE16, $
          UVALUE='E434', $
          VALUE='PWS Power Supply Voltage')

       E435 = WIDGET_BUTTON( MENUE16, $
          UVALUE='E435', $
          VALUE='PWS Temp')

       return
end

pro get_menue17,menue17,uvalue

       E450 = WIDGET_BUTTON( MENUE17, $
          UVALUE='E450', $
          VALUE='LECP Analog Engineering Data')

       E451 = WIDGET_BUTTON( MENUE17, $
          UVALUE='E451', $
          VALUE='LECP Analog Calibration Data')

       E452 = WIDGET_BUTTON( MENUE17, $
          UVALUE='E452', $
          VALUE='LECP LEPT Tel Temp')

       E453 = WIDGET_BUTTON( MENUE17, $
          UVALUE='E453', $
          VALUE='LECP LEMPA Tel Temp')

       return
end

pro get_menue18,menue18,uvalue

       E600 = WIDGET_BUTTON( MENUE18, $
          UVALUE='E600', $
          VALUE='PPS Optics Temp')

       E601 = WIDGET_BUTTON( MENUE18, $
          UVALUE='E601', $
          VALUE='PPS Aperature Position')

       E602 = WIDGET_BUTTON( MENUE18, $
          UVALUE='E602', $
          VALUE='PPS Analyzer Position')

       E603 = WIDGET_BUTTON( MENUE18, $
          UVALUE='E603', $
          VALUE='PPS Filter Postion')

       E604 = WIDGET_BUTTON( MENUE18, $
          UVALUE='E604', $
          VALUE='PPS HVPS Monitor')

       E605 = WIDGET_BUTTON( MENUE18, $
          UVALUE='E605', $
          VALUE='PPS LVPS Monitor')

       E606 = WIDGET_BUTTON( MENUE18, $
          UVALUE='E606', $
          VALUE='PPS Solar Sensor')

       E607 = WIDGET_BUTTON( MENUE18, $
          UVALUE='E607', $
          VALUE='PPS Electronics Temp Transducer')

       return
end

pro get_menue19,menue19,uvalue

       E620 = WIDGET_BUTTON( MENUE19, $
          UVALUE='E620', $
          VALUE='PLS Analog Multiplexer Output')

       E621 = WIDGET_BUTTON( MENUE19, $
          UVALUE='E621', $
          VALUE='PLS Electronics Temp')

       E622 = WIDGET_BUTTON( MENUE19, $
          UVALUE='E622', $
          VALUE='PLS Sensor Temp')

       E623 = WIDGET_BUTTON( MENUE19, $
          UVALUE='E623', $
          VALUE='PLS Modulator Temp')

       return
end

pro get_menue20,menue20,uvalue

       E640 = WIDGET_BUTTON( MENUE20, $
          UVALUE='E640', $
          VALUE='UVS Temp')

       E641 = WIDGET_BUTTON( MENUE20, $
          UVALUE='E641', $
          VALUE='UVS High Voltage Monitor')

       return
end

pro get_menue21,menue21,uvalue

       E660 = WIDGET_BUTTON( MENUE21, $
          UVALUE='E660', $
          VALUE='Analog Multiplexer Output')

       E661 = WIDGET_BUTTON( MENUE21, $
          UVALUE='E661', $
          VALUE='OB LFM Sensor Temp')
 
       E662 = WIDGET_BUTTON( MENUE21, $
          UVALUE='E662', $
          VALUE='IB LFM Sensor Temp')

       E663 = WIDGET_BUTTON( MENUE21, $
          UVALUE='E663', $
          VALUE='OB HFM Sensor Temp')

       E664 = WIDGET_BUTTON( MENUE21, $
          UVALUE='E664', $
          VALUE='IB HFM Sensor Temp')

       return
end

pro get_menue22,menue22,uvalue

       E680 = WIDGET_BUTTON( MENUE22, $
          UVALUE='E680', $
          VALUE='ISS NA Analog Engr TLM')

       E681 = WIDGET_BUTTON( MENUE22, $
          UVALUE='E681', $
          VALUE='ISS WA Analog Engr TLM')

       E682 = WIDGET_BUTTON( MENUE22, $
          UVALUE='E682', $
          VALUE='ISS NA Vidicon Temp')

       E683 = WIDGET_BUTTON( MENUE22, $
          UVALUE='E683', $
          VALUE='ISS WA Vidicon Temp')

       E684 = WIDGET_BUTTON( MENUE22, $
          UVALUE='E684', $
          VALUE='ISS NA Front Optics Temp')

       E685 = WIDGET_BUTTON( MENUE22, $
          UVALUE='E685', $
          VALUE='ISS NA Rear Optics Temp')

       E686 = WIDGET_BUTTON( MENUE22, $
          UVALUE='E686', $
          VALUE='ISS WA Optics Temp')

       E687 = WIDGET_BUTTON( MENUE22, $
          UVALUE='E687', $
          VALUE='ISS NA Power Supply Temp')

       E688 = WIDGET_BUTTON( MENUE22, $
          UVALUE='E688', $
          VALUE='ISS WA Power Supply Temp')

       return
end

pro get_menue23,menue23,uvalue

       E710 = WIDGET_BUTTON( MENUE23, $
          UVALUE='E710', $
          VALUE='MIRIS Radiometer Analog')

       E711 = WIDGET_BUTTON( MENUE23, $
          UVALUE='E711', $
          VALUE='MIRIS Radiometer High Gain Analog')

       E712 = WIDGET_BUTTON( MENUE23, $
          UVALUE='E712', $
          VALUE='MIRIS Primary Mirror Temp')

       E713 = WIDGET_BUTTON( MENUE23, $
          UVALUE='E713', $
          VALUE='MIRIS Primary Mirror Heater Analog')

       E714 = WIDGET_BUTTON( MENUE23, $
          UVALUE='E714', $
          VALUE='MIRIS Secondary Mirror Temp')

       E715 = WIDGET_BUTTON( MENUE23, $
          UVALUE='E715', $
          VALUE='MIRIS Secondary Mirror Heater Analog')

       E716 = WIDGET_BUTTON( MENUE23, $
          UVALUE='E716', $
          VALUE='MIRIS Radiating Surface Temp')

       E717 = WIDGET_BUTTON( MENUE23, $
          UVALUE='E717', $
          VALUE='MIRIS Radiating Surface Heater Analog')

       E718 = WIDGET_BUTTON( MENUE23, $
          UVALUE='E718', $
          VALUE='MIRIS Electronics Temp')

       E719 = WIDGET_BUTTON( MENUE23, $
          UVALUE='E719', $
          VALUE='MIRIS Neon Analog')

       E720 = WIDGET_BUTTON( MENUE23, $
          UVALUE='E720', $
          VALUE='MIRIS Standby Supply Status')

       return
end

Pro ENG_E0XX, Ev

   case Ev of

   'E000': BEGIN
      print, 'Engineering measurement 000'
      title = ''
      ytitle = ''
      Plot_ENG,000,'Bay 1 Temp','Time','Value'
      END
   'E001': BEGIN
      print, 'Engineering measurement 001'
      title = ''
      ytitle = ''
      Plot_ENG,001,'Bay 2 Temp','Time','Value'
      END
   'E002': BEGIN
      print, 'Engineering measurement 002'
      title = ''
      ytitle = ''
      Plot_ENG,002,'Bay 3 Temp','Time','Value'
      END
   'E003': BEGIN
      print, 'Engineering measurement 003'
      title = ''
      ytitle = ''
      Plot_ENG,003,'Bay 4 Temp','Time','Value'
      END
   'E004': BEGIN
      print, 'Engineering measurement 004'
      title = ''
      ytitle = ''
      Plot_ENG,004,'Bay 5 Temp','Time','Value'
      END
   'E005': BEGIN
      print, 'Engineering measurement 005'
      title = ''
      ytitle = ''
      Plot_ENG,005,'Bay 6 Temp','Time','Value'
      END
   'E006': BEGIN
      print, 'Engineering measurement 006'
      title = ''
      ytitle = ''
      Plot_ENG,006,'Bay 7 Temp','Time','Value'
      END
   'E007': BEGIN
      print, 'Engineering measurement 007'
      title = ''
      ytitle = ''
      Plot_ENG,007,'Bay 8 Temp','Time','Value'
      END
   'E008': BEGIN
      print, 'Engineering measurement 008'
      title = ''
      ytitle = ''
      Plot_ENG,008,'Bay 9 Temp','Time','Value'
      END
   'E009': BEGIN
      print, 'Engineering measurement 009'
      title = ''
      ytitle = ''
      Plot_ENG,009,'Bay 10 Temp','Time','Value'
      END

   'E020': BEGIN
      print, 'Engineering measurement 020'
      title = ''
      ytitle = ''
      Plot_ENG,020,'RFS Status No. 1','Time','Value'
      END
   'E021': BEGIN
      print, 'Engineering measurement 021'
      title = ''
      ytitle = ''
      Plot_ENG,021,'RFS Status No. 2','Time','Value'
      END
   'E022': BEGIN
      print, 'Engineering measurement 022'
      title = ''
      ytitle = ''
      Plot_ENG,022,'Receiver VCO Coarse Voltage','Time','Value'
      END
   'E023': BEGIN
      print, 'Engineering measurement 023'
      title = ''
      ytitle = ''
      Plot_ENG,023,'Receiver VCO Fine Voltage','Time','Value'
      END
   'E024': BEGIN
      print, 'Engineering measurement 024'
      title = ''
      ytitle = ''
      Plot_ENG,024,'Receiver AGC','Time','Value'
      END
   'E025': BEGIN
      print, 'Engineering measurement 025'
      title = ''
      ytitle = ''
      Plot_ENG,025,'Receiver AGC','Time','Value'
      END
   'E026': BEGIN
      print, 'Engineering measurement 026'
      title = ''
      ytitle = ''
      Plot_ENG,026,'Receiver Ranging AGC V','Time','Value'
      END
   'E027': BEGIN
      print, 'Engineering measurement 027'
      title = ''
      ytitle = ''
      Plot_ENG,027,'Receiver Current','Time','Value'
      END
   'E028': BEGIN
      print, 'Engineering measurement 028'
      title = ''
      ytitle = ''
      Plot_ENG,028,'Receiver Local Oscillator Drive','Time','Value'
      END
   'E029': BEGIN
      print, 'Engineering measurement 029'
      title = ''
      ytitle = ''
      Plot_ENG,029,'Receiver VCO Temp','Time','Value'
      END
   'E030': BEGIN
      print, 'Engineering measurement 030'
      title = ''
      ytitle = ''
      Plot_ENG,030,'USO Inner Oven Current','Time','Value'
      END
   'E031': BEGIN
      print, 'Engineering measurement 031'
      title = ''
      ytitle = ''
      Plot_ENG,031,'S-Band TWT/SSA Base Temp','Time','Value'
      END
   'E032': BEGIN
      print, 'Engineering measurement 032'
      title = ''
      ytitle = ''
      Plot_ENG,032,'S-Band Hybrid Temp','Time','Value'
      END
   'E033': BEGIN
      print, 'Engineering measurement 033'
      title = ''
      ytitle = ''
      Plot_ENG,033,'S-Band TWT/SSA Regulated Voltage','Time','Value'
      END
   'E034': BEGIN
      print, 'Engineering measurement 034'
      title = ''
      ytitle = ''
      Plot_ENG,034,'S-Band Transmitter Drive','Time','Value'
      END
   'E035': BEGIN
      print, 'Engineering measurement 035'
      title = ''
      ytitle = ''
      Plot_ENG,035,'S-Band Cathode Current/SSA Input Current','Time','Value'
      END
   'E036': BEGIN
      print, 'Engineering measurement 036'
      title = ''
      ytitle = ''
      Plot_ENG,036,'S-Band TWT Helix Current','Time','Value'
      END
   'E037': BEGIN
      print, 'Engineering measurement 037'
      title = ''
      ytitle = ''
      Plot_ENG,037,'S-Band High Gain Antenna Drive','Time','Value'
      END
   'E038': BEGIN
      print, 'Engineering measurement 038'
      title = ''
      ytitle = ''
      Plot_ENG,038,'S-Band Exciter Current','Time','Value'
      END
   'E039': BEGIN
      print, 'Engineering measurement 039'
      title = ''
      ytitle = ''
      Plot_ENG,039,'X-Band TWT Base Temp','Time','Value'
      END
   'E040': BEGIN
      print, 'Engineering measurement 040'
      title = ''
      ytitle = ''
      Plot_ENG,040,'X-Band Hybrid Temp','Time','Value'
      END
   'E041': BEGIN
      print, 'Engineering measurement 041'
      title = ''
      ytitle = ''
      Plot_ENG,041,'X-Band RF Monitor Temp','Time','Value'
      END
   'E042': BEGIN
      print, 'Engineering measurement 042'
      title = ''
      ytitle = ''
      Plot_ENG,042,'X-Band Exciter Temp','Time','Value'
      END
   'E043': BEGIN
      print, 'Engineering measurement 043'
      title = ''
      ytitle = ''
      Plot_ENG,043,'X-Band TWT Regulated Voltage','Time','Value'
      END
   'E044': BEGIN
      print, 'Engineering measurement 044'
      title = ''
      ytitle = ''
      Plot_ENG,044,'X-Band TWT Drive','Time','Value'
      END
   'E045': BEGIN
      print, 'Engineering measurement 045'
      title = ''
      ytitle = ''
      Plot_ENG,045,'X-Band TWT Helix Current','Time','Value'
      END
   'E046': BEGIN
      print, 'Engineering measurement 046'
      title = ''
      ytitle = ''
      Plot_ENG,046,'X-Band TWT Cathode Current','Time','Value'
      END
   'E047': BEGIN
      print, 'Engineering measurement 047'
      title = ''
      ytitle = ''
      Plot_ENG,047,'X-Band Exciter Current','Time','Value'
      END
   'E048': BEGIN
      print, 'Engineering measurement 048'
      title = ''
      ytitle = ''
      Plot_ENG,048,'X-Band High Gain Antenna Drive','Time','Value'
      END
   'E049': BEGIN
      print, 'Engineering measurement 049'
      title = ''
      ytitle = ''
      Plot_ENG,049,'Transmitter RF Switch Temp','Time','Value'
      END
   'E050': BEGIN
      print, 'Engineering measurement 050'
      title = ''
      ytitle = ''
      Plot_ENG,050,'Auxiliary Oscillator Temp','Time','Value'
      END
   'E051': BEGIN
      print, 'Engineering measurement 051'
      title = ''
      ytitle = ''
      Plot_ENG,051,'Low Gain Antenna Drive','Time','Value'
      END
   'E060A': BEGIN
      print, 'Engineering measurement 060'
      title = ''
      ytitle = ''
      Plot_ENG,060,'MDS/FDS/PRA Status (CDU/TMU Status)','Time','Value'
      END
   'E060B': BEGIN
      print, 'Engineering measurement 060'
      title = ''
      ytitle = ''
      Plot_ENG,060,'MDS/FDS/PRA Status (4.8 kHz A/B Status)','Time','Value'
      END
   'E060C': BEGIN
      print, 'Engineering measurement 060'
      title = ''
      ytitle = ''
      Plot_ENG,060,'MDS/FDS/PRA Status (PRA Ant A/B Deploy)','Time','Value'
      END
   'E061': BEGIN
      print, 'Engineering measurement 061'
      title = ''
      ytitle = ''
      Plot_ENG,061,'TMU Status 1','Time','Value'
      END
   'E062': BEGIN
      print, 'Engineering measurement 062'
      title = ''
      ytitle = ''
      Plot_ENG,062,'TMU Status 2','Time','Value'
      END
   'E063': BEGIN
      print, 'Engineering measurement 063'
      title = ''
      ytitle = ''
      Plot_ENG,063,'CDU SNR (Most Significant Byte)','Time','Value'
      END
   'E064': BEGIN
      print, 'Engineering measurement 064'
      title = ''
      ytitle = ''
      Plot_ENG,064,'CDU SNR (Least Significant Byte)','Time','Value'
      END
   'E065': BEGIN
      print, 'Engineering measurement 065'
      title = ''
      ytitle = ''
      Plot_ENG,065,'CDU Oscillator Monitor','Time','Value'
      END
   'E070': BEGIN
      print, 'Engineering measurement 070'
      title = ''
      ytitle = ''
      Plot_ENG,070,'2.4 kHz Inverter Input Current','Time','Value'
      END
   'E071': BEGIN
      print, 'Engineering measurement 071'
      title = ''
      ytitle = ''
      Plot_ENG,071,'2.4 kHz Inverter Output Voltage','Time','Value'
      END
   'E072': BEGIN
      print, 'Engineering measurement 072'
      title = ''
      ytitle = ''
      Plot_ENG,072,'2.4 kHz Inverter Output Current','Time','Value'
      END
   'E073': BEGIN
      print, 'Engineering measurement 073'
      title = ''
      ytitle = ''
      Plot_ENG,073,'DC Bus Voltage','Time','Value'
      END
   'E074': BEGIN
      print, 'Engineering measurement 074'
      title = ''
      ytitle = ''
      Plot_ENG,074,'DC Bus Current','Time','Value'
      END
   'E075': BEGIN
      print, 'Engineering measurement 075'
      title = ''
      ytitle = ''
      Plot_ENG,075,'Shunt Regulator Input Current','Time','Value'
      END
   'E076': BEGIN
      print, 'Engineering measurement 076'
      title = ''
      ytitle = ''
      Plot_ENG,076,'2.4 kHz Inverter Input Current','Time','Value'
      END
   'E077': BEGIN
      print, 'Engineering measurement 077'
      title = ''
      ytitle = ''
      Plot_ENG,077,'2.4 kHz Inverter Output Voltage','Time','Value'
      END
   'E078': BEGIN
      print, 'Engineering measurement 078'
      title = ''
      ytitle = ''
      Plot_ENG,078,'2.4 kHz Inverter Output Current','Time','Value'
      END
   'E079': BEGIN
      print, 'Engineering measurement 079'
      title = ''
      ytitle = ''
      Plot_ENG,079,'DC Bus Voltage','Time','Value'
      END
   'E080': BEGIN
      print, 'Engineering measurement 080'
      title = ''
      ytitle = ''
      Plot_ENG,080,'DC Bus Current','Time','Value'
      END
   'E081': BEGIN
      print, 'Engineering measurement 081'
      title = ''
      ytitle = ''
      Plot_ENG,081,'Shunt Regulator Input Current','Time','Value'
      END
   'E082': BEGIN
      print, 'Engineering measurement 082'
      title = ''
      ytitle = ''
      Plot_ENG,082,'Shunt Regulator Temp','Time','Value'
      END
   'E083': BEGIN
      print, 'Engineering measurement 083'
      title = ''
      ytitle = ''
      Plot_ENG,083,'Shunt Regulator Temp 3','Time','Value'
      END
   'E084': BEGIN
      print, 'Engineering measurement 084'
      title = ''
      ytitle = ''
      Plot_ENG,084,'Shunt Regulator Temp 4','Time','Value'
      END
   'E085': BEGIN
      print, 'Engineering measurement 085'
      title = ''
      ytitle = ''
      Plot_ENG,085,'RDM Voltage Monitor','Time','Value'
      END
   else: print,ev,' ENG_E0XX * Selection not found'
   endcase

   return
end

Pro ENG_E1XX, Ev

   case Ev of

   'E100': BEGIN
      print, 'Engineering measurement 100'
      title = ''
      ytitle = ''
      Plot_ENG,100,'RTG 1 Output Voltage','Time','Value'
      END
   'E101': BEGIN
      print, 'Engineering measurement 101'
      title = ''
      ytitle = ''
      Plot_ENG,101,'RTG 2 Output Voltage','Time','Value'
      END
   'E102': BEGIN
      print, 'Engineering measurement 102'
      title = ''
      ytitle = ''
      Plot_ENG,102,'RTG 3 Output Voltage','Time','Value'
      END
   'E103': BEGIN
      print, 'Engineering measurement 103'
      title = ''
      ytitle = ''
      Plot_ENG,103,'RTG 1 Output Current','Time','Value'
      END
   'E104': BEGIN
      print, 'Engineering measurement 104'
      title = ''
      ytitle = ''
      Plot_ENG,104,'RTG 2 Output Current','Time','Value'
      END
   'E105': BEGIN
      print, 'Engineering measurement 105'
      title = ''
      ytitle = ''
      Plot_ENG,105,'RTG 1 Output Current','Time','Value'
      END
   'E106': BEGIN
      print, 'Engineering measurement 106'
      title = ''
      ytitle = ''
      Plot_ENG,106,'RTG 1 Output Current','Time','Value'
      END
   'E107': BEGIN
      print, 'Engineering measurement 107'
      title = ''
      ytitle = ''
      Plot_ENG,107,'RTG 2 Output Current','Time','Value'
      END
   'E108': BEGIN
      print, 'Engineering measurement 108'
      title = ''
      ytitle = ''
      Plot_ENG,108,'RTG 3 Output Current','Time','Value'
      END
   'E109': BEGIN
      print, 'Engineering measurement 109'
      title = ''
      ytitle = ''
      Plot_ENG,109,'RTG 1 Case Temp 3','Time','Value'
      END
   'E110': BEGIN
      print, 'Engineering measurement 110'
      title = ''
      ytitle = ''
      Plot_ENG,110,'RTG 1 Case Temp 2','Time','Value'
      END
   'E111': BEGIN
      print, 'Engineering measurement 111'
      title = ''
      ytitle = ''
      Plot_ENG,111,'RTG 2 Case Temp 1','Time','Value'
      END
   'E112': BEGIN
      print, 'Engineering measurement 112'
      title = ''
      ytitle = ''
      Plot_ENG,112,'RTG 2 Case Temp 3','Time','Value'
      END
   'E113': BEGIN
      print, 'Engineering measurement 113'
      title = ''
      ytitle = ''
      Plot_ENG,113,'RTG 3 Case Temp 1','Time','Value'
      END
   'E114': BEGIN
      print, 'Engineering measurement 114'
      title = ''
      ytitle = ''
      Plot_ENG,114,'RTG 3 Case Temp 2','Time','Value'
      END
   'E115': BEGIN
      print, 'Engineering measurement 115'
      title = ''
      ytitle = ''
      Plot_ENG,115,'Battery Temp','Time','Value'
      END
   'E130': BEGIN
      print, 'Engineering measurement 130'
      title = ''
      ytitle = ''
      Plot_ENG,130,'CCS Output 1','Time','Value'
      END
   'E131': BEGIN
      print, 'Engineering measurement 131'
      title = ''
      ytitle = ''
      Plot_ENG,131,'CCS Output 2','Time','Value'
      END
   'E132': BEGIN
      print, 'Engineering measurement 132'
      title = ''
      ytitle = ''
      Plot_ENG,132,'CCS Output 1','Time','Value'
      END
   'E133': BEGIN
      print, 'Engineering measurement 133'
      title = ''
      ytitle = ''
      Plot_ENG,133,'CCS Output 2','Time','Value'
      END
   'E140': BEGIN
      print, 'Engineering measurement 140'
      title = ''
      ytitle = ''
      Plot_ENG,140,'FDS Status 1','Time','Value'
      END
   'E141': BEGIN
      print, 'Engineering measurement 141'
      title = ''
      ytitle = ''
      Plot_ENG,141,'FDS Status 2','Time','Value'
      END
   'E142': BEGIN
      print, 'Engineering measurement 142'
      title = ''
      ytitle = ''
      Plot_ENG,142,'FDS Status 3','Time','Value'
      END
   'E143': BEGIN
      print, 'Engineering measurement 143'
      title = ''
      ytitle = ''
      Plot_ENG,143,'FDS Status 4','Time','Value'
      END
   'E144': BEGIN
      print, 'Engineering measurement 144'
      title = ''
      ytitle = ''
      Plot_ENG,144,'FDS Status 5','Time','Value'
      END
   'E145': BEGIN
      print, 'Engineering measurement 145'
      title = ''
      ytitle = ''
      Plot_ENG,145,'FDS Status 6','Time','Value'
      END
   'E146': BEGIN
      print, 'Engineering measurement 146'
      title = ''
      ytitle = ''
      Plot_ENG,146,'FDS Memory Word','Time','Value'
      END
   'E150': BEGIN
      print, 'Engineering measurement 150'
      title = ''
      ytitle = ''
      Plot_ENG,150,'FDS Selected Source Voltage','Time','Value'
      END
   'E151': BEGIN
      print, 'Engineering measurement 151'
      title = ''
      ytitle = ''
      Plot_ENG,151,'FDS 30V Inverter Output Voltage','Time','Value'
      END
   'E152': BEGIN
      print, 'Engineering measurement 152'
      title = ''
      ytitle = ''
      Plot_ENG,152,'FDS 10V Bus Voltage','Time','Value'
      END
   'E153': BEGIN
      print, 'Engineering measurement 153'
      title = ''
      ytitle = ''
      Plot_ENG,153,'FDS Power Converter A + 10 Current','Time','Value'
      END
   'E154': BEGIN
      print, 'Engineering measurement 154'
      title = ''
      ytitle = ''
      Plot_ENG,154,'FDS Power Converter B + 10 Current','Time','Value'
      END
   'E155': BEGIN
      print, 'Engineering measurement 155'
      title = ''
      ytitle = ''
      Plot_ENG,155,'FDS +3V ADC A Voltage','Time','Value'
      END
   'E156': BEGIN
      print, 'Engineering measurement 156'
      title = ''
      ytitle = ''
      Plot_ENG,156,'FDS +3V ADC B Voltage','Time','Value'
      END
   'E157': BEGIN
      print, 'Engineering measurement 157'
      title = ''
      ytitle = ''
      Plot_ENG,157,'FDS Timing +5V DC','Time','Value'
      END
   'E160': BEGIN
      print, 'Engineering measurement 160'
      title = ''
      ytitle = ''
      Plot_ENG,160,'Frame Sync Code','Time','Value'
      END
   'E161': BEGIN
      print, 'Engineering measurement 161'
      title = ''
      ytitle = ''
      Plot_ENG,161,'Frame Sync Code','Time','Value'
      END
   'E162': BEGIN
      print, 'Engineering measurement 162'
      title = ''
      ytitle = ''
      Plot_ENG,162,'Frame Sync Code','Time','Value'
      END
   'E163': BEGIN
      print, 'Engineering measurement 163'
      title = ''
      ytitle = ''
      Plot_ENG,163,'Frame Sync Code','Time','Value'
      END
   'E164': BEGIN
      print, 'Engineering measurement 164'
      title = ''
      ytitle = ''
      Plot_ENG,164,'Format ID Word','Time','Value'
      END
   'E165': BEGIN
      print, 'Engineering measurement 165'
      title = ''
      ytitle = ''
      Plot_ENG,165,'Mod 16 Counter','Time','Value'
      END
   'E166': BEGIN
      print, 'Engineering measurement 166'
      title = ''
      ytitle = ''
      Plot_ENG,166,'Mod 60 and Line Count','Time','Value'
      END
   'E167': BEGIN
      print, 'Engineering measurement 167'
      title = ''
      ytitle = ''
      Plot_ENG,167,'Line Count','Time','Value'
      END
   'E170': BEGIN
      print, 'Engineering measurement 170'
      title = ''
      ytitle = ''
      Plot_ENG,170,'AACS Output A','Time','Value'
      END
   'E171': BEGIN
      print, 'Engineering measurement 171'
      title = ''
      ytitle = ''
      Plot_ENG,171,'AACS Output B','Time','Value'
      END
   'E172': BEGIN
      print, 'Engineering measurement 172'
      title = ''
      ytitle = ''
      Plot_ENG,172,'Pitch Gyro Accumulated Position','Time','Value'
      END
   'E173': BEGIN
      print, 'Engineering measurement 173'
      title = ''
      ytitle = ''
      Plot_ENG,173,'CST Tracker High Gate','Time','Value'
      END
   'E174': BEGIN
      print, 'Engineering measurement 174'
      title = ''
      ytitle = ''
      Plot_ENG,174,'Pitch Sun Sensor Position','Time','Value'
      END
   'E175': BEGIN
      print, 'Engineering measurement 175'
      title = ''
      ytitle = ''
      Plot_ENG,175,'Pitch Calculated Rate','Time','Value'
      END
   'E176': BEGIN
      print, 'Engineering measurement 176'
      title = ''
      ytitle = ''
      Plot_ENG,176,'Pitch Estimated Position','Time','Value'
      END
   'E177': BEGIN
      print, 'Engineering measurement 177'
      title = ''
      ytitle = ''
      Plot_ENG,177,'Pitch Sun Sensor Bias Angle, Fine','Time','Value'
      END
   'E178': BEGIN
      print, 'Engineering measurement 178'
      title = ''
      ytitle = ''
      Plot_ENG,178,'Pitch Sun Sensor Bias Angle, Coarse','Time','Value'
      END
   'E179': BEGIN
      print, 'Engineering measurement 179'
      title = ''
      ytitle = ''
      Plot_ENG,179,'Yaw Gyro Accumulated Position','Time','Value'
      END
   'E180': BEGIN
      print, 'Engineering measurement 180'
      title = ''
      ytitle = ''
      Plot_ENG,180,'CST Tracker Low Gate','Time','Value'
      END
   'E181': BEGIN
      print, 'Engineering measurement 181'
      title = ''
      ytitle = ''
      Plot_ENG,181,'Yaw Sun Sensor Position','Time','Value'
      END
   'E182': BEGIN
      print, 'Engineering measurement 182'
      title = ''
      ytitle = ''
      Plot_ENG,182,'Yaw Calculated Rate','Time','Value'
      END
   'E183': BEGIN
      print, 'Engineering measurement 183'
      title = ''
      ytitle = ''
      Plot_ENG,183,'Yaw Estimated Position','Time','Value'
      END
   'E184': BEGIN
      print, 'Engineering measurement 184'
      title = ''
      ytitle = ''
      Plot_ENG,184,'Yaw Sun Sensor Bias Angle, Fine','Time','Value'
      END
   'E185': BEGIN
      print, 'Engineering measurement 185'
      title = ''
      ytitle = ''
      Plot_ENG,185,'Yaw Sun Sensor Bias Angle, Coarse','Time','Value'
      END
   'E186': BEGIN
      print, 'Engineering measurement 186'
      title = ''
      ytitle = ''
      Plot_ENG,186,'Roll Gyro Accumulated Position','Time','Value'
      END
   'E188': BEGIN
      print, 'Engineering measurement 188'
      title = ''
      ytitle = ''
      Plot_ENG,188,'Roll Canopus Start Tracker Intensity','Time','Value'
      END
   'E189': BEGIN
      print, 'Engineering measurement 189'
      title = ''
      ytitle = ''
      Plot_ENG,189,'Roll Canopus Start Tracker Position','Time','Value'
      END
   'E190': BEGIN
      print, 'Engineering measurement 190'
      title = ''
      ytitle = ''
      Plot_ENG,190,'Roll Calculated Rate','Time','Value'
      END
   'E191': BEGIN
      print, 'Engineering measurement 191'
      title = ''
      ytitle = ''
      Plot_ENG,191,'Roll Estimated Position','Time','Value'
      END
   'E192': BEGIN
      print, 'Engineering measurement 192'
      title = ''
      ytitle = ''
      Plot_ENG,192,'Scan Platform Azimuth Position, Coarse','Time','Value'
      END
   'E193': BEGIN
      print, 'Engineering measurement 193'
      title = ''
      ytitle = ''
      Plot_ENG,193,'Scan Platform Azimuth Position, Fine','Time','Value'
      END
   'E194': BEGIN
      print, 'Engineering measurement 194'
      title = ''
      ytitle = ''
      Plot_ENG,194,'Scan Platform Elevation Position, Coarse','Time','Value'
      END
   'E195': BEGIN
      print, 'Engineering measurement 195'
      title = ''
      ytitle = ''
      Plot_ENG,195,'Scan Platform Elevation Position, Fine','Time','Value'
      END
   'E196': BEGIN
      print, 'Engineering measurement 196'
      title = ''
      ytitle = ''
      Plot_ENG,196,'Pitch/Yaw Sensor Intensity','Time','Value'
      END
   'E197': BEGIN
      print, 'Engineering measurement 197'
      title = ''
      ytitle = ''
      Plot_ENG,197,'Roll Canopus Star Tracker Cone Angle','Time','Value'
      END

   else: print,ev,' ENG_E1XX * Selection not found'
   endcase

   return
end

Pro ENG_E2XX, Ev

   case Ev of

   'E200': BEGIN
      print, 'Engineering measurement 200'
      title = ''
      ytitle = ''
      Plot_ENG,200,'AACS Status Word 1','Time','Value'
      END
   'E201': BEGIN
      print, 'Engineering measurement 201'
      title = ''
      ytitle = ''
      Plot_ENG,201,'AACS Status Word 2','Time','Value'
      END
   'E202': BEGIN
      print, 'Engineering measurement 202'
      title = ''
      ytitle = ''
      Plot_ENG,202,'AACS Status Word 3','Time','Value'
      END
   'E203': BEGIN
      print, 'Engineering measurement 203'
      title = ''
      ytitle = ''
      Plot_ENG,203,'AACS Status Word 4','Time','Value'
      END
   'E204': BEGIN
      print, 'Engineering measurement 204'
      title = ''
      ytitle = ''
      Plot_ENG,204,'AACS Status Word 5 (Mode Status)','Time','Value'
      END
   'E205': BEGIN
      print, 'Engineering measurement 205'
      title = ''
      ytitle = ''
      Plot_ENG,205,'AACS Status Word 6 (Gyro Status)','Time','Value'
      END
   'E206': BEGIN
      print, 'Engineering measurement 206'
      title = ''
      ytitle = ''
      Plot_ENG,206,'Configuration Register 1 (1st)','Time','Value'
      END
   'E207': BEGIN
      print, 'Engineering measurement 207'
      title = ''
      ytitle = ''
      Plot_ENG,207,'Configuration Register 1 (2nd)','Time','Value'
      END
   'E208': BEGIN
      print, 'Engineering measurement 208'
      title = ''
      ytitle = ''
      Plot_ENG,208,'Configuration Register 1 (3rd)','Time','Value'
      END
   'E209': BEGIN
      print, 'Engineering measurement 209'
      title = ''
      ytitle = ''
      Plot_ENG,209,'Pos. Pitch AP Valve Pulse Counter Value','Time','Value'
      END
   'E210': BEGIN
      print, 'Engineering measurement 210'
      title = ''
      ytitle = ''
      Plot_ENG,210,'Neg. Pitch AP Valve Pulse Counter Value','Time','Value'
      END
   'E211': BEGIN
      print, 'Engineering measurement 211'
      title = ''
      ytitle = ''
      Plot_ENG,211,'Pos. Yaw AP Valve Pulse Counter Value','Time','Value'
      END
   'E212': BEGIN
      print, 'Engineering measurement 212'
      title = ''
      ytitle = ''
      Plot_ENG,212,'Neg. Yaw AP Valve Pulse Counter Value','Time','Value'
      END
   'E213': BEGIN
      print, 'Engineering measurement 213'
      title = ''
      ytitle = ''
      Plot_ENG,213,'AACS/FDS Subsystem Health Check','Time','Value'
      END
   'E214': BEGIN
      print, 'Engineering measurement 214'
      title = ''
      ytitle = ''
      Plot_ENG,214,'Pos. Roll AP Valve Pulse Counter Value','Time','Value'
      END
   'E215': BEGIN
      print, 'Engineering measurement 215'
      title = ''
      ytitle = ''
      Plot_ENG,215,'Neg. Roll AP Valve Pulse Counter Value','Time','Value'
      END
   'E216': BEGIN
      print, 'Engineering measurement 216'
      title = ''
      ytitle = ''
      Plot_ENG,216,'Pos. Pitch TCM Valve Pulse Counter Value','Time','Value'
      END
   'E217': BEGIN
      print, 'Engineering measurement 217'
      title = ''
      ytitle = ''
      Plot_ENG,217,'Neg. Pitch TCM Valve Pulse Counter Value','Time','Value'
      END
   'E218': BEGIN
      print, 'Engineering measurement 218'
      title = ''
      ytitle = ''
      Plot_ENG,218,'Pos. Yaw TCM Valve Pulse Counter Value','Time','Value'
      END
   'E219': BEGIN
      print, 'Engineering measurement 219'
      title = ''
      ytitle = ''
      Plot_ENG,219,'Neg. TCM Valve Pulse Counter Value','Time','Value'
      END
   'E220': BEGIN
      print, 'Engineering measurement 220'
      title = ''
      ytitle = ''
      Plot_ENG,220,'Configuration Register 2 (1st)','Time','Value'
      END
   'E221': BEGIN
      print, 'Engineering measurement 221'
      title = ''
      ytitle = ''
      Plot_ENG,221,'Configuration Register 2 (2nd)','Time','Value'
      END
   'E222': BEGIN
      print, 'Engineering measurement 222'
      title = ''
      ytitle = ''
      Plot_ENG,222,'Configuration Register 2 (3rd)','Time','Value'
      END
   'E223': BEGIN
      print, 'Engineering measurement 223'
      title = ''
      ytitle = ''
      Plot_ENG,223,'AACS Spare','Time','Value'
      END
   'E224': BEGIN
      print, 'Engineering measurement 224'
      title = ''
      ytitle = ''
      Plot_ENG,224,'Pitch Estimated Acceleration','Time','Value'
      END
   'E225': BEGIN
      print, 'Engineering measurement 225'
      title = ''
      ytitle = ''
      Plot_ENG,225,'Yaw Estimated Acceleration','Time','Value'
      END
   'E226': BEGIN
      print, 'Engineering measurement 226'
      title = ''
      ytitle = ''
      Plot_ENG,226,'Roll Estimated Acceleration','Time','Value'
      END
   'E227': BEGIN
      print, 'Engineering measurement 227'
      title = ''
      ytitle = ''
      Plot_ENG,227,'AACS Spare','Time','Value'
      END
   'E228': BEGIN
      print, 'Engineering measurement 228'
      title = ''
      ytitle = ''
      Plot_ENG,228,'Sun Sensor High Gate','Time','Value'
      END
   'E229': BEGIN
      print, 'Engineering measurement 229'
      title = ''
      ytitle = ''
      Plot_ENG,229,'Sun Sensor Low Gate','Time','Value'
      END
   'E230': BEGIN
      print, 'Engineering measurement 230'
      title = ''
      ytitle = ''
      Plot_ENG,230,'Gyro A Temp','Time','Value'
      END
   'E231': BEGIN
      print, 'Engineering measurement 231'
      title = ''
      ytitle = ''
      Plot_ENG,231,'Gyro B Temp','Time','Value'
      END
   'E232': BEGIN
      print, 'Engineering measurement 232'
      title = ''
      ytitle = ''
      Plot_ENG,232,'Gyro C Temp','Time','Value'
      END
   'E233': BEGIN
      print, 'Engineering measurement 233'
      title = ''
      ytitle = ''
      Plot_ENG,233,'Canopus Star Tracker 1 Temp','Time','Value'
      END
   'E234': BEGIN
      print, 'Engineering measurement 234'
      title = ''
      ytitle = ''
      Plot_ENG,234,'Canopus Star Tracker 2 Temp','Time','Value'
      END
   'E235': BEGIN
      print, 'Engineering measurement 235'
      title = ''
      ytitle = ''
      Plot_ENG,235,'Scan Azimuth Temp','Time','Value'
      END
   'E236': BEGIN
      print, 'Engineering measurement 236'
      title = ''
      ytitle = ''
      Plot_ENG,236,'Sun Sensor Temp','Time','Value'
      END
   'E237': BEGIN
      print, 'Engineering measurement 237'
      title = ''
      ytitle = ''
      Plot_ENG,237,'Memory Readout Address 1 (zeros)','Time','Value'
      END
   'E238': BEGIN
      print, 'Engineering measurement 238'
      title = ''
      ytitle = ''
      Plot_ENG,238,'Memory Readout Address 2 (bits 9-12)','Time','Value'
      END
   'E239': BEGIN
      print, 'Engineering measurement 239'
      title = ''
      ytitle = ''
      Plot_ENG,239,'Memory Readout Address 3 (bits 1-8)','Time','Value'
      END
   'E240': BEGIN
      print, 'Engineering measurement 240'
      title = ''
      ytitle = ''
      Plot_ENG,240,'Memory Readout Address 1 (bits 17-18)','Time','Value'
      END
   'E241': BEGIN
      print, 'Engineering measurement 241'
      title = ''
      ytitle = ''
      Plot_ENG,241,'Memory Readout Address 2 (bits 9-16)','Time','Value'
      END
   'E242': BEGIN
      print, 'Engineering measurement 242'
      title = ''
      ytitle = ''
      Plot_ENG,242,'Memory Readout Address 3 (bits 1-8)','Time','Value'
      END
   'E245A': BEGIN
      print, 'Engineering measurement 245'
      title = ''
      ytitle = ''
      Plot_ENG,245,'FDS/PWR/PYRO Status (2.4 kHz Inv Status)','Time','Value'
      END
   'E245B': BEGIN
      print, 'Engineering measurement 245'
      title = ''
      ytitle = ''
      Plot_ENG,245,'FDS/PWR/PYRO Status (FDS ID)','Time','Value'
      END
   'E245C': BEGIN
      print, 'Engineering measurement 245'
      title = ''
      ytitle = ''
      Plot_ENG,245,'FDS/PWR/PYRO Status (PYRO Amps Ind)','Time','Value'
      END
   'E246': BEGIN
      print, 'Engineering measurement 246'
      title = ''
      ytitle = ''
      Plot_ENG,246,'Capacitor Bank A Voltage','Time','Value'
      END
   'E247': BEGIN
      print, 'Engineering measurement 247'
      title = ''
      ytitle = ''
      Plot_ENG,247,'Capacitor Bank B Voltage','Time','Value'
      END
   'E270': BEGIN
      print, 'Engineering measurement 270'
      title = ''
      ytitle = ''
      Plot_ENG,270,'Helium Pressure','Time','Value'
      END
   'E271': BEGIN
      print, 'Engineering measurement 271'
      title = ''
      ytitle = ''
      Plot_ENG,271,'TCAPU N2H4 Pressure Branch 1','Time','Value'
      END
   'E272': BEGIN
      print, 'Engineering measurement 272'
      title = ''
      ytitle = ''
      Plot_ENG,272,'TCAPU +Pitch TCM Thruster Chamber P','Time','Value'
      END
   'E273': BEGIN
      print, 'Engineering measurement 273'
      title = ''
      ytitle = ''
      Plot_ENG,273,'TCAPU -Pitch TCM Thruster Chamber P','Time','Value'
      END
   'E274': BEGIN
      print, 'Engineering measurement 274'
      title = ''
      ytitle = ''
      Plot_ENG,274,'TCAPU +Yaw TCM Thruster Chamber P','Time','Value'
      END
   'E275': BEGIN
      print, 'Engineering measurement 275'
      title = ''
      ytitle = ''
      Plot_ENG,275,'TCAPU -Yaw TCM Thruster Chamber P','Time','Value'
      END
   'E276': BEGIN
      print, 'Engineering measurement 276'
      title = ''
      ytitle = ''
      Plot_ENG,276,'+Pitch Thruster 1/+A Eng 1 Chamber P (MS Byte)','Time','Value'
      END
   'E277': BEGIN
      print, 'Engineering measurement 277'
      title = ''
      ytitle = ''
      Plot_ENG,277,'+Pitch Thruster 1/+A Eng 1 Chamber P (LS Byte)','Time','Value'
      END
   'E278': BEGIN
      print, 'Engineering measurement 278'
      title = ''
      ytitle = ''
      Plot_ENG,278,'-Pitch Thruster 1/-A Eng 1 Chamber P (MS Byte)','Time','Value'
      END
   'E279': BEGIN
      print, 'Engineering measurement 279'
      title = ''
      ytitle = ''
      Plot_ENG,279,'-Pitch Thruster 1/-A Eng 1 Chamber P (LS Byte)','Time','Value'
      END
   'E280': BEGIN
      print, 'Engineering measurement 280'
      title = ''
      ytitle = ''
      Plot_ENG,280,'+Yaw Thruster 1/+B Eng 2 Chamber P (MS Byte)','Time','Value'
      END
   'E281': BEGIN
      print, 'Engineering measurement 281'
      title = ''
      ytitle = ''
      Plot_ENG,281,'+Yaw Thruster 1/+B Eng 2 Chamber P (LS Byte)','Time','Value'
      END
   'E282': BEGIN
      print, 'Engineering measurement 282'
      title = ''
      ytitle = ''
      Plot_ENG,282,'+Roll Thruster 1/-B Eng 2 Chamber P (MS Byte)','Time','Value'
      END
   'E283': BEGIN
      print, 'Engineering measurement 283'
      title = ''
      ytitle = ''
      Plot_ENG,283,'+Roll Thruster 1/-B Eng 2 Chamber P (LS Byte)','Time','Value'
      END
   'E284': BEGIN
      print, 'Engineering measurement 284'
      title = ''
      ytitle = ''
      Plot_ENG,284,'+Pitch Thruster 2 Temp','Time','Value'
      END
   'E285': BEGIN
      print, 'Engineering measurement 285'
      title = ''
      ytitle = ''
      Plot_ENG,285,'-Pitch Thruster 2 Temp','Time','Value'
      END
   'E286': BEGIN
      print, 'Engineering measurement 286'
      title = ''
      ytitle = ''
      Plot_ENG,286,'-Yaw Thruster 1 Temp','Time','Value'
      END
   'E287': BEGIN
      print, 'Engineering measurement 287'
      title = ''
      ytitle = ''
      Plot_ENG,287,'+Yaw Thruster 2 Temp','Time','Value'
      END
   'E288': BEGIN
      print, 'Engineering measurement 288'
      title = ''
      ytitle = ''
      Plot_ENG,288,'-Yaw Thruster 2 Temp','Time','Value'
      END
   'E289': BEGIN
      print, 'Engineering measurement 289'
      title = ''
      ytitle = ''
      Plot_ENG,289,'-Roll Thruster 1 Temp','Time','Value'
      END
   'E290': BEGIN
      print, 'Engineering measurement 290'
      title = ''
      ytitle = ''
      Plot_ENG,290,'+Roll Thruster 2 Temp','Time','Value'
      END
   'E291': BEGIN
      print, 'Engineering measurement 291'
      title = ''
      ytitle = ''
      Plot_ENG,291,'-Roll Thruster 2 Temp','Time','Value'
      END
   'E292': BEGIN
      print, 'Engineering measurement 292'
      title = ''
      ytitle = ''
      Plot_ENG,292,'TCAPU Surface Temp 1','Time','Value'
      END
   'E293': BEGIN
      print, 'Engineering measurement 293'
      title = ''
      ytitle = ''
      Plot_ENG,293,'TCAPU Surface Temp 2','Time','Value'
      END
   'E294': BEGIN
      print, 'Engineering measurement 294'
      title = ''
      ytitle = ''
      Plot_ENG,294,'TCAPU Tank Temp 1','Time','Value'
      END
   'E295': BEGIN
      print, 'Engineering measurement 295'
      title = ''
      ytitle = ''
      Plot_ENG,295,'TCAPU Tank Temp 2','Time','Value'
      END
   'E296': BEGIN
      print, 'Engineering measurement 296'
      title = ''
      ytitle = ''
      Plot_ENG,296,'Feed System Temp 1','Time','Value'
      END
   'E297': BEGIN
      print, 'Engineering measurement 297'
      title = ''
      ytitle = ''
      Plot_ENG,297,'Feed System Temp 2','Time','Value'
      END
   'E298': BEGIN
      print, 'Engineering measurement 298'
      title = ''
      ytitle = ''
      Plot_ENG,298,'Isolation Valve Posistion BR 1','Time','Value'
      END
   'E299': BEGIN
      print, 'Engineering measurement 299'
      title = ''
      ytitle = ''
      Plot_ENG,299,'Isolation Valve Posistion BR 2','Time','Value'
      END

   else: print,ev,' ENG_E2XX * Selection not found'
   endcase

   return
end

Pro ENG_E3XX, Ev

   case Ev of

   'E300': BEGIN
      print, 'Engineering measurement 300'
      title = ''
      ytitle = ''
      Plot_ENG,300,'IPU Solid Motor Chamber Pressure','Time','Value'
      END
   'E301': BEGIN
      print, 'Engineering measurement 301'
      title = ''
      ytitle = ''
      Plot_ENG,301,'IPU Solid Motor Chamber Pressure','Time','Value'
      END
   'E302': BEGIN
      print, 'Engineering measurement 302'
      title = ''
      ytitle = ''
      Plot_ENG,302,'IPU +Roll Engine 1 Temp','Time','Value'
      END
   'E303': BEGIN
      print, 'Engineering measurement 303'
      title = ''
      ytitle = ''
      Plot_ENG,303,'IPU -Roll Engine 1 Temp','Time','Value'
      END
   'E304': BEGIN
      print, 'Engineering measurement 304'
      title = ''
      ytitle = ''
      Plot_ENG,304,'IPU +Roll Engine 2 Temp','Time','Value'
      END
   'E305': BEGIN
      print, 'Engineering measurement 305'
      title = ''
      ytitle = ''
      Plot_ENG,305,'IPU -Roll Engine 2 Temp','Time','Value'
      END
   'E306': BEGIN
      print, 'Engineering measurement 306'
      title = ''
      ytitle = ''
      Plot_ENG,306,'IPU Line Temp 1','Time','Value'
      END
   'E307': BEGIN
      print, 'Engineering measurement 307'
      title = ''
      ytitle = ''
      Plot_ENG,307,'IPU Line Temp 2','Time','Value'
      END
   'E308': BEGIN
      print, 'Engineering measurement 308'
      title = ''
      ytitle = ''
      Plot_ENG,308,'IPU Solid Motor Temp 1','Time','Value'
      END
   'E309': BEGIN
      print, 'Engineering measurement 309'
      title = ''
      ytitle = ''
      Plot_ENG,309,'IPU Solid Motor Temp 2','Time','Value'
      END
   'E320': BEGIN
      print, 'Engineering measurement 320'
      title = ''
      ytitle = ''
      Plot_ENG,320,'SCI Plume Shield Temp 1','Time','Value'
      END
   'E321': BEGIN
      print, 'Engineering measurement 321'
      title = ''
      ytitle = ''
      Plot_ENG,321,'SCI Plume Shield Temp 2','Time','Value'
      END

   'E330': BEGIN
      print, 'Engineering measurement 330'
      title = ''
      ytitle = ''
      Plot_ENG,330,'Science Latch Pressure','Time','Value'
      END
   'E331': BEGIN
      print, 'Engineering measurement 331'
      title = ''
      ytitle = ''
      Plot_ENG,331,'Devices/Cabling Status','Time','Value'
      END


   'E340': BEGIN
      print, 'Engineering measurement 340'
      title = ''
      ytitle = ''
      Plot_ENG,340,'DDS Motor Voltage','Time','Value'
      END
   'E341': BEGIN
      print, 'Engineering measurement 341'
      title = ''
      ytitle = ''
      Plot_ENG,341,'DDS Transport Pressure','Time','Value'
      END
   'E342': BEGIN
      print, 'Engineering measurement 342'
      title = ''
      ytitle = ''
      Plot_ENG,342,'Mode Status','Time','Value'
      END
   'E343': BEGIN
      print, 'Engineering measurement 343'
      title = ''
      ytitle = ''
      Plot_ENG,343,'Playback Status','Time','Value'
      END

   'E350': BEGIN
      print, 'Engineering measurement 350'
      title = ''
      ytitle = ''
      Plot_ENG,350,'HGA Main Reflector Temp','Time','Value'
      END
   'E351': BEGIN
      print, 'Engineering measurement 351'
      title = ''
      ytitle = ''
      Plot_ENG,351,'HGA S-Band Feed Temp','Time','Value'
      END
   'E352': BEGIN
      print, 'Engineering measurement 352'
      title = ''
      ytitle = ''
      Plot_ENG,352,'HGA X-Band Feed Temp','Time','Value'
      END
   'E353': BEGIN
      print, 'Engineering measurement 353'
      title = ''
      ytitle = ''
      Plot_ENG,353,'LGA Body Temp','Time','Value'
      END

   'E360': BEGIN
      print, 'Engineering measurement 360'
      title = ''
      ytitle = ''
      Plot_ENG,360,'CRS Analog Data','Time','Value'
      END
   'E361': BEGIN
      print, 'Engineering measurement 361'
      title = ''
      ytitle = ''
      Plot_ENG,361,'CRS Electronics Temp','Time','Value'
      END
   'E362': BEGIN
      print, 'Engineering measurement 362'
      title = ''
      ytitle = ''
      Plot_ENG,362,'CRS Telescope Temp','Time','Value'
      END

   else: print,ev,' ENG_E3XX * Selection not found'
   endcase

   return
end

Pro ENG_E4XX, Ev

   case Ev of

   'E410': BEGIN
      print, 'Engineering measurement 410'
      title = ''
      ytitle = ''
      Plot_ENG,410,'PRA Analog Data','Time','Value'
      END
   'E411': BEGIN
      print, 'Engineering measurement 411'
      title = ''
      ytitle = ''
      Plot_ENG,411,'PRA Electronics Temp','Time','Value'
      END
   'E430': BEGIN
      print, 'Engineering measurement 430'
      title = ''
      ytitle = ''
      Plot_ENG,430,'PWS Analog Output A','Time','Value'
      END
   'E431': BEGIN
      print, 'Engineering measurement 431'
      title = ''
      ytitle = ''
      Plot_ENG,431,'PWS Analog Output A','Time','Value'
      END
   'E432': BEGIN
      print, 'Engineering measurement 432'
      title = ''
      ytitle = ''
      Plot_ENG,432,'PWS Analog Output B','Time','Value'
      END
   'E433': BEGIN
      print, 'Engineering measurement 433'
      title = ''
      ytitle = ''
      Plot_ENG,433,'PWS Analog Output B','Time','Value'
      END
   'E434': BEGIN
      print, 'Engineering measurement 434'
      title = ''
      ytitle = ''
      Plot_ENG,434,'PWS Power Supply Voltage','Time','Value'
      END
   'E435': BEGIN
      print, 'Engineering measurement 435'
      title = ''
      ytitle = ''
      Plot_ENG,435,'PWS Temp','Time','Value'
      END

   'E450': BEGIN
      print, 'Engineering measurement 450'
      title = ''
      ytitle = ''
      Plot_ENG,450,'LECP Analog Engineering Data','Time','Value'
      END
   'E451': BEGIN
      print, 'Engineering measurement 451'
      title = ''
      ytitle = ''
      Plot_ENG,451,'LECP Analog Calibration Data','Time','Value'
      END
   'E452': BEGIN
      print, 'Engineering measurement 452'
      title = ''
      ytitle = ''
      Plot_ENG,452,'LECP LEPT Tel Temp','Time','Value'
      END
   'E453': BEGIN
      print, 'Engineering measurement 453'
      title = ''
      ytitle = ''
      Plot_ENG,453,'LECP LEMPA Tel Temp','Time','Value'
      END

   else: print,ev,' ENG_E4XX * Selection not found'
   endcase

   return
end

Pro ENG_E6XX, Ev

   case Ev of

   'E600': BEGIN
      print, 'Engineering measurement 600'
      title = ''
      ytitle = ''
      Plot_ENG,600,'PPS Optics Temp','Time','Value'
      END
   'E601': BEGIN
      print, 'Engineering measurement 601'
      title = ''
      ytitle = ''
      Plot_ENG,601,'PPS Aperature Position','Time','Value'
      END
   'E602': BEGIN
      print, 'Engineering measurement 602'
      title = ''
      ytitle = ''
      Plot_ENG,602,'PPS Analyzer Position','Time','Value'
      END
   'E603': BEGIN
      print, 'Engineering measurement 603'
      title = ''
      ytitle = ''
      Plot_ENG,603,'PPS Filter Position','Time','Value'
      END
   'E604': BEGIN
      print, 'Engineering measurement 604'
      title = ''
      ytitle = ''
      Plot_ENG,604,'PPS HVPS Monitor','Time','Value'
      END
   'E605': BEGIN
      print, 'Engineering measurement 605'
      title = ''
      ytitle = ''
      Plot_ENG,605,'PPS LVPS Monitor','Time','Value'
      END
   'E606': BEGIN
      print, 'Engineering measurement 606'
      title = ''
      ytitle = ''
      Plot_ENG,606,'PPS Solar Sensor','Time','Value'
      END
   'E607': BEGIN
      print, 'Engineering measurement 607'
      title = ''
      ytitle = ''
      Plot_ENG,607,'PPS Electronics Temp Transducer','Time','Value'
      END

   'E620': BEGIN
      print, 'Engineering measurement 620'
      title = ''
      ytitle = ''
      Plot_ENG,620,'PLS Analog Multiplexer Output','Time','Value'
      END
   'E621': BEGIN
      print, 'Engineering measurement 621'
      title = ''
      ytitle = ''
      Plot_ENG,621,'PLS Electronics Temp','Time','Value'
      END
   'E622': BEGIN
      print, 'Engineering measurement 622'
      title = ''
      ytitle = ''
      Plot_ENG,622,'PLS Sensor Temp','Time','Value'
      END
   'E623': BEGIN
      print, 'Engineering measurement 623'
      title = ''
      ytitle = ''
      Plot_ENG,623,'PLS Modulator Temp','Time','Value'
      END

   'E640': BEGIN
      print, 'Engineering measurement 640'
      title = ''
      ytitle = ''
      Plot_ENG,640,'UVS Temp','Time','Value'
      END
   'E641': BEGIN
      print, 'Engineering measurement 641'
      title = ''
      ytitle = ''
      Plot_ENG,641,'UVS High Voltage Monitor','Time','Value'
      END

   'E660': BEGIN
      print, 'Engineering measurement 660'
      title = ''
      ytitle = ''
      Plot_ENG,660,'Analog Multiplexer Output','Time','Value'
      END
   'E661': BEGIN
      print, 'Engineering measurement 661 selected'
      title = ''
      ytitle = ''
      Plot_ENG,661,'OB LFM Sensor Temp','Time','Value'
      END
   'E662': BEGIN
      print, 'Engineering measurement 662 selected'
      title = ''
      ytitle = ''
      Plot_ENG,662,'IB LFM Sensor Temp','Time','Value'
      END
   'E663': BEGIN
      print, 'Engineering measurement 663 selected'
      title = ''
      ytitle = ''
      Plot_ENG,663,'OB HFM Sensor Temp','Time','Value'
      END
   'E664': BEGIN
      print, 'Engineering measurement 664 selected'
      title = ''
      ytitle = ''
      Plot_ENG,664,'IB HFM Sensor Temp','Time','Value'
      END

   'E680': BEGIN
      print, 'Engineering measurement 680 selected'
      title = ''
      ytitle = ''
      Plot_ENG,680,'ISS NA Analog Engr TLM','Time','Value'
      END
   'E681': BEGIN
      print, 'Engineering measurement 681 selected'
      title = ''
      ytitle = ''
      Plot_ENG,681,'ISS WA Analog Engr TLM','Time','Value'
      END
   'E682': BEGIN
      print, 'Engineering measurement 682 selected'
      title = ''
      ytitle = ''
      Plot_ENG,682,'ISS NA Vidicon Temp','Time','Value'
      END
   'E683': BEGIN
      print, 'Engineering measurement 683 selected'
      title = ''
      ytitle = ''
      Plot_ENG,683,'ISS WA Vidicon Temp','Time','Value'
      END
   'E684': BEGIN
      print, 'Engineering measurement 684 selected'
      title = ''
      ytitle = ''
      Plot_ENG,684,'ISS NA Front Optics Temp','Time','Value'
      END
   'E685': BEGIN
      print, 'Engineering measurement 685 selected'
      title = ''
      ytitle = ''
      Plot_ENG,685,'ISS NA Rear Optics Temp','Time','Value'
      END
   'E686': BEGIN
      print, 'Engineering measurement 686 selected'
      title = ''
      ytitle = ''
      Plot_ENG,686,'ISS WA Optics Temp','Time','Value'
      END
   'E687': BEGIN
      print, 'Engineering measurement 687 selected'
      title = ''
      ytitle = ''
      Plot_ENG,687,'ISS NA Power Supply Temp','Time','Value'
      END
   'E688': BEGIN
      print, 'Engineering measurement 688 selected'
      title = ''
      ytitle = ''
      Plot_ENG,688,'ISS WA Power Supply Temp','Time','Value'
      END

   else: print,ev,' ENG_E6XX * Selection not found'
   endcase

   return
end

Pro ENG_E7XX, Ev

   case Ev of

   'E710': BEGIN
      print, 'Engineering measurement 710 selected'
      title = ''
      ytitle = ''
      Plot_ENG,710,'MIRIS Radiometer Analog','Time','Value'
      END
   'E711': BEGIN
      print, 'Engineering measurement 711 selected'
      title = ''
      ytitle = ''
      Plot_ENG,711,'MIRIS Radiometer High Gain Analog','Time','Value'
      END
   'E712': BEGIN
      print, 'Engineering measurement 712 selected'
      title = ''
      ytitle = ''
      Plot_ENG,712,'MIRIS Primary Mirror Temp','Time','Value'
      END
   'E713': BEGIN
      print, 'Engineering measurement 713 selected'
      title = ''
      ytitle = ''
      Plot_ENG,713,'MIRIS Primary Mirror Heater Analog','Time','Value'
      END
   'E714': BEGIN
      print, 'Engineering measurement 714 selected'
      title = ''
      ytitle = ''
      Plot_ENG,714,'MIRIS Secondary Mirror Temp','Time','Value'
      END
   'E715': BEGIN
      print, 'Engineering measurement 715 selected'
      title = ''
      ytitle = ''
      Plot_ENG,715,'MIRIS Secondary Mirror Heater Analog','Time','Value'
      END
   'E716': BEGIN
      print, 'Engineering measurement 716 selected'
      title = ''
      ytitle = ''
      Plot_ENG,716,'MIRIS Radiating Surface Temp','Time','Value'
      END
   'E717': BEGIN
      print, 'Engineering measurement 717 selected'
      title = ''
      ytitle = ''
      Plot_ENG,717,'MIRIS Radiating Surface Heater Analog','Time','Value'
      END
   'E718': BEGIN
      print, 'Engineering measurement 718 selected'
      title = ''
      ytitle = ''
      Plot_ENG,718,'MIRIS Electronics Temp','Time','Value'
      END
   'E719': BEGIN
      print, 'Engineering measurement 719 selected'
      title = ''
      ytitle = ''
      Plot_ENG,719,'MIRIS Neon Analog','Time','Value'
      END
   'E720': BEGIN
      print, 'Engineering measurement 720 selected'
      title = ''
      ytitle = ''
      Plot_ENG,720,'MIRIS Standby Supply Status','Time','Value'
      END

   else: print,ev,' ENG_E7XX * Selection not found'
   endcase

   return
end
