寫 CYCLE的 FIL
CIMFIL/ON,CYCLE
XLOC=POSTF(1,3,344)
YLOC=POSTF(1,3,345)
DPTH=POSTF(7,6)
RATE=POSTF(7,8)
CYTYP=POSTF(7,4)
CASE/CYTYP
WHEN/ICODEF(OFF)
RSLT=POSTF(13)
CFLG=0
WHEN/ICODEF(DRILL) $$ CYCLE/DRILL
CHK=POSTF(7,9)
IF(CHK.EQ.ICODEF(DWELL))THEN
DWEL=POSTF(7,10)
CLER=POSTF(7,12)
CLER2=POSTF(7,14)
ELSE
DWEL=0
CLER=POSTF(7,10)
CLER2=POSTF(7,12)
ENDIF
CALL/CANNED
Zloc=DPTH+CLER
DWEL=TEXT/CONVF,DWEL,3,1,0,0,1
INSERT/'G200 Q200=',omit,CLER,'\$'
SEQNO/OFF
INSERT/' Q201=-',omit,DPTH, '\$'
INSERT/' Q206=',omit,RATE, '\$'
INSERT/' Q202=+1' '\$'
INSERT/' Q210=+0' '\$'
INSERT/' Q203=+',omit,Zloc, '\$'
INSERT/' Q204=+',omit,CLER2, '\$'
INSERT/' Q211=',OMIT,DWEL, '$'
SEQNO/ON
POSTN/IN,X,XLOC,Y,YLOC,M,99
WHEN/ICODEF(DEEP) $$ CYCLE/DEEP
CHK=POSTF(7,9)
IF(CHK.EQ.ICODEF(DWELL))THEN
DWEL=POSTF(7,10)
PECK=POSTF(7,12)
CLER=POSTF(7,14)
CLER2=POSTF(7,16)
ELSE
DWEL=0
PECK=POSTF(7,10)
CLER=POSTF(7,12)
CLER2=POSTF(7,14)
ENDIF
CALL/CANNED
Zloc=DPTH+CLER
DWEL=TEXT/CONVF,DWEL,3,1,0,0,1
PECK=TEXT/CONVF,PECK,4,1,1,0,1
INSERT/'G203 Q200=',omit,CLER,'\$'
SEQNO/OFF
INSERT/' Q201=-',omit,DPTH, '\$'
INSERT/' Q206=',omit,RATE, '\$'
INSERT/' Q202=',OMIT,PECK, '\$'
INSERT/' Q210=+0' '\$'
INSERT/' Q203=+',omit,Zloc, '\$'
INSERT/' Q204=+',omit,CLER2, '\$'
INSERT/' Q212=+0' '\$'
INSERT/' Q213=3' '\$'
INSERT/' Q205=+0' '\$'
INSERT/' Q211=',OMIT,DWEL, '\$'
INSERT/' Q208=3000' '\$'
INSERT/' Q256=+0.2' '$'
SEQNO/ON
POSTN/IN,X,XLOC,Y,YLOC,M,99 |