program bump_pol ! use lattice name to set pulsed bump polarity 28 e/w use sim_utils implicit none integer :: w,e,ll,len_trim,junk character :: latnam*80, nowlat*80, filename*200 ! ----------------end_declare--------------------------- call mnet_connectf('INJ') !get in touch with hardware call vstget('CSR LATTICE ',1,1,nowlat,junk) call str_upcase(nowlat,nowlat) ll=len_trim(nowlat) call fullfilename('$CESR_ONLINE/machine_data/savesets/route/bump_pol.dat', & filename) open(unit=1,file=filename,readonly,shared,type='old') do while(.true.) read(1,111,end=666) w,e,latnam 111 format(2i,a) call str_upcase(latnam,latnam) 44 format(2i5,1x,a) if(latnam(1:ll).eq.nowlat(1:ll)) goto 888 !match enddo 666 continue call say('Bump_pol',' WARNING WARNING NO info for bump polarity ') print *,' WARNING WARNING::: NO Info for bump polarity ' w=0 !"normal" settings e=1 888 continue call vxputn('CSR BUMP POL',1,1,w) call vxputn('CSR BUMP POL',2,2,e) close(unit=1) print *,' pulsed bump set w,e ',w,e call mnet_disconnectf !so mpm_byebye omits traceback stop end program bump_pol