//Set the TMREV5 pulses from the Spin Rate

if (srate > 500) then 
   $pwHtm5 = 1.0e6/(15.0*srate)
   pwHtm5 = 0.4*trunc($pwHtm5/0.4 + 0.5)
   srate = 1.0e6/(15.0*pwHtm5)
   aHtm5 = aH90*(4.0*pwH90)/pwHtm5
   if (aHtm5 = 4095) then 
      write('error','reset_tm5 Error: aHr18 is >= to 4095')
   endif
endif

if (qHtm5 < 1) then qHtm5 = 1 endif















