include 'rtcconfig.inc' C ******************************************************************* C rtcdef.inc: nstx power supply real time control program C C Common block definitions. C C REVISONS: C -------- C 03/14/05 c. neumeyer Add axial force fz and tf joint calcs (v6) C 11/21/03 t.gibney Add nfaultFlag to nstx_pcs_gen. C 11/10/03 t.gibney Add scd and vdotmax to nstx_pcs_gen. C 07/29/03 t.gibney Change from double-precision to single-precision. C Add "dummy1" padding: requires change in o.d file. C 01/27/03 t.gibney Added nerracq to flag data out-of-sync or timeout. C 10/25/00 t gibney use parameters for NBRANCHES, NCOILS, etc. C 01/10/00 t.gibney Added zchimin, nchidelay, nchiarc. C 05/28/99 t.gibney Added ntdata. C 04/14/99 t.gibney Added nmode to nstx_pcs_gen. C 02/18/99 t.gibney Added a few elements to nstx_pcs_gen. C 12/02/98 c neumeyer added fixes during PTP-ECS-034 C 11/29/98 c neumeyer modifications for coil temp sim, fault log, display C 11/17/98 c neumeyer modifications for collected data C 10/21/98 c neumeyer various post FDR fixes C 10/04/98 c neumeyer various fixes in preparation for FDR C 09/16/98 b davis bug fix in build call. Calls to dtime. C 09/09/98 c neumeyer C ******************************************************************* C ----------------------------------------------------------------- C Arrays: C ----------------------------------------------------------------- real*4 a0,a1,a1old,a2,a2old real*4 amax,amaxmult,amin,aomeas,astdby,cosgamma real*4 das,dat,dimax,disd,dummy1,dvmax,ecr,ftime,fvalue real*4 fz,fzmax real*4 gain,i2t,i2tmax real*4 iboc,ic,icdot,icln,iclp,ierr real*4 iload,iloc,imeas,infmtx,intclierr,intierr,iref,ithresh real*4 kb,kip,koop,kmeas,kpb,m,mc real*4 p,q real*4 r,r20c,r20coil,r20pole,rc,rcoil,rpole,rps,rpss,s,scd real*4 t0coil,tbdelay,tccoil,tcoil,tcpole,tfault real*4 tireset,tmcoil,tpole,trcoil,trpole real*4 v0,v1,v2,vc,vdotmax,vclamp,vcomm,vmax,vprtc,vref,vsim,x real*4 nplink integer nap,napblock,napon,nbb,nbpoint,ncb,nclamp,ncs integer ncvt1,ncvt2,ndat,nfault,nfvc,nlock,nmeas integer np,npc,nppole,npsum,ns,nsc,ntype character*8 circuitname,fcircuit character*36 f C ----------------------------------------------------------------- C Variables: C ----------------------------------------------------------------- real*4 alaunch,ap13,coeff,damax real*4 dt,dtsim real*4 fac,finv,fmg,ftfjb,ftfjbmax,ichi0,itfmin real*4 mtfjip,mtfjoop,ptfj,ptfjmax real*4 pi,t0chi,t0pole,tmax,tmin,tmpole real*4 tpcend,tpcstart,tsop,vmg,vp13spa,zchimin logical newCycle logical testMode integer nchi_imin_done,nchi_imin_started integer nchiarc,nchiblock,nchidelay,nchisdsc,nchisdso integer nckt,nclampm,ndtin,ndtsim integer nerracq,nfaultFlag,nfcount integer nhcsoh,nhcspfchi,nhcstf,nhcsspa integer nlockp13,npsrtcready,nreset,nshot,nsim integer npcon,npcready,nmode,npulse,nsopeop,nsubmode,ntdata integer navailable1,navailable2,navailable3 character*36 faultname character*80 inputdir !directory containing c.d, o.d, etc. COMMON /nstx_pcs_collect_real/ a0(NCOILS),a1(NCOILS),a2(NCOILS), & amax(NCOILS),amin(NCOILS), & i2t(NCOILS),ierr(NCOILS), & iload(NCOILS),intclierr(NCOILS),intierr(NCOILS),iref(NCOILS), & rc(NCOILS),rcoil(NCOILS), & tbdelay(NCOILS),tcoil(NCOILS),tfault(NCOILS), & v0(NCOILS),v1(NCOILS),v2(NCOILS),vclamp(NCOILS), & vcomm(NCOILS),vprtc(NCOILS),vref(NCOILS),vsim(NCOILS), & ftfjb,fz(NCOILS_V0), & mtfjip,mtfjoop,ptfj,p,q,s,dummy1,tpole(NPOLES),imeas(NCHAN1R) COMMON /nstx_pcs_collect_integer/ napblock(NCOILS),napon(NCOILS), & nbb(NCOILS),nclamp(NCOILS),ncvt1(NCOILS),ncvt2(NCOILS), & nfault(NCOILS,2),nchiblock,nhcsoh,nhcspfchi,nhcstf,npcon, & npcready,npsrtcready,nclampm,nerracq,nhcsspa, & navailable3,navailable2,navailable1 COMMON /nstx_pcs_gen/ a1old(NCOILS),a2old(NCOILS), & amaxmult(NCOILS),aomeas(NBRANCHES,2),astdby(NCOILS), & cosgamma(NCOILS),das(NCHAN1R),dat(NCOILS,101,3), & dimax(NBRANCHES),disd(NCOILS),dvmax(NCOILS),ecr(NCOILS), & ftime(100),fvalue(100),fzmax(NCOILS_V0), & gain(NCOILS,2,2),i2tmax(NCOILS),iboc(NBRANCHES,2), & ic(NCOILS),icdot(NCOILS), & icln(NCOILS),iclp(NCOILS),iloc(NCOILS),infmtx(NFV,NCOILS_V0), & ithresh(NCOILS),kb(8),kip(5), & kmeas(NBRANCHES,2),koop(5),kpb(NBRANCHES), & m(NCOILS,NCOILS),mc(NCOILS,NCOILS), & r(NCOILS),r20c(NCOILS),r20coil(NCOILS), & r20pole(NPOLES),rpole(NPOLES),rps(NCOILS),rpss(NCOILS), & scd(NCOILS),tccoil(NCOILS),tcpole(NPOLES),tireset(NCOILS), & tmcoil(NCOILS),trcoil(NCOILS),trpole(NPOLES), & vc(NCOILS),vdotmax(NCOILS),vmax(NCOILS),x(NCOILS,NCOILS), & alaunch,ap13,coeff,damax,dt,dtsim,fac, & finv,fmg,ftfjbmax,ichi0,itfmin,pi,ptfjmax, & t0chi,t0coil(NCOILS), & t0pole,tmax,tmin,tmpole,tpcend,tpcstart,tsop,vmg,vp13spa, & zchimin, & nplink(NCOILS), !Note: real*4 & nap(NCOILS),nbpoint(NCOILS),ncb(NBRANCHES),ncs(NCOILS), & ndat(NCOILS),nfvc(NFV),nlock(NCOILS),nmeas(NBRANCHES,2), & np(NCOILS),npc(NCOILS),nppole(NPOLES), & npsum(NPOLES,2),ns(NCOILS),nsc(NCOILS),ntype(NCOILS), & circuitname(NCOILS),f(100),fcircuit(100), & nchi_imin_done,nchi_imin_started, & nchiarc,nchidelay,nchisdsc,nchisdso,nckt,ndtin,ndtsim, & newCycle,nfaultFlag,nfcount,nmode,nlockp13,npulse,nreset, & nshot,nsim,nsopeop,nsubmode,ntdata,faultname(25),inputdir, & testMode