subroutine init_creep(invoke) use creep_module implicit none character*(*) invoke integer pol,i,j,addr(192),ke call vxgetn('LIN POLARITY',1,1,pol) muls=1 ; wts=100 ; nv=0 !stepsiz, wait ms, # variables if(index(invoke,'PHA').gt.0) then !linac phase nv=nv+1 ; mnems(nv)='PFN HI VOLTS' ; els(nv)=2 nv=nv+1 ; mnems(nv)='LRF KLY PHS ' ; els(nv)=1 ;muls(nv)=2 nv=nv+1 ; mnems(nv)='INJ PRB PHAS' ; els(nv)=1 nv=nv+1 ; mnems(nv)='INJ PRB PHAS' ; els(nv)=2 endif if(index(invoke,'SNT').gt.0) then !snout vars if(pol.eq.1) then nv=nv+1 ; mnems(nv)='LIN HORZ CUR' ; els(nv)=23 !h11 nv=nv+1 ; mnems(nv)='LIN HORZ CUR' ; els(nv)=24 !eta nv=nv+1 ; mnems(nv)='LIN HORZ CUR' ; els(nv)=25 ; wts(nv)=300 !sept else muls(nv+1:nv+3)=4 !desensitize e- nv=nv+1 ; mnems(nv)='LIN HORZ CUR' ; els(nv)=20 !8 deg nv=nv+1 ; mnems(nv)='LIN HORZ CUR' ; els(nv)=21 !4 deg nv=nv+1 ; mnems(nv)='LIN HORZ CUR' ; els(nv)=22 !septum endif nv=nv+1 ; mnems(nv)='SYN PEAKSTRP' ; els(nv)=1 endif if(index(invoke,'KC').gt.0) then !synch KC call vmgxbr('SYN V H CORR',1,192,addr) ke=192 !l5-l0 sector dfault if(index(invoke,'KCL1').gt.0) ke=34 if(index(invoke,'KCL2').gt.0) ke=66 if(index(invoke,'KCL3').gt.0) ke=98 if(index(invoke,'KCL4').gt.0) ke=130 if(index(invoke,'KCL5').gt.0) ke=162 do i=max(1,ke-34),ke if(addr(i).gt.0) then if(mod(nv,4).eq.0) then nv=nv+1 ; mnems(nv)='PFN HI VOLTS' ; els(nv)=2 endif nv=nv+1 ; mnems(nv)='SYN V H CORR' ; els(nv)=i ; muls(nv)=2 endif enddo print *,' end coil ',ke endif nsam=3 j=index(invoke,'NSAM=') if(j.gt.0) then read(invoke(j+5:j+6),444,err=777) nsam 444 format(i) 777 nsam=max(1,min(nsam,15)) endif j=index(invoke,'FAKE') if(j.gt.0) fake_on=.true. j=index(invoke,'LOOP') if(j.gt.0) continuous=.true. return end