iCAx开思网

标题: 【原创】GPost FIL Tip#1 [打印本页]

作者: sinderal    时间: 2002-6-16 16:35
标题: 【原创】GPost FIL Tip#1
$$ Example FIL on 6/10/1998
  
REDEF/ON
  
$$ PRINT/ONRINT/ON,IN;rslt=POSTF(24,1)
  
A=1;B=2;C=3;D=4;E=5;F=6;G=7;H=8;I=9;J=10;K=11;L=12;M=13;N=14
O=15=16;Q=17;R=18;S=19;T=20;U=21;V=22;W=23;X=24;Y=25;Z=26
  
$$ -------------------------------------------------------------------------
$$ Start Up and Program Number
$$ This is for user to input the program number
$$ after the prompt on the screen and Post read in
$$ the text string then output to the MCD.
  
CIMFIL/ON,MACHIN                           $$ Startcode
  rslt=POSTF(13)                               $$ MUST DO  
  SEQNO/OFF
  prmpt=TEXT/'ENTER PROGRAM NUMBER'
  rslt=FILEF(0,1,prmpt)                       $$ File function and write to screen
  prgnm=TEXT/READ,0                       $$ Read from the screen
  INSERT/'O',prgnm,'$'
  PREFUN/90,NEXT                             $$ G90
  PREFUN/80,NEXT                             $$ G80  
  PREFUN/17,NEXT                             $$ G17
  PREFUN/0                                       $$ G00  
CIMFIL/OFF
  
$$ The fisrt 0 mean file on the screen and the second block 1 mean write  
$$ -------------------------------------------------------------------------
  
$$ ------------------------------------------------------------------------------
$$ Fixture Offset
  
CIMFIL/ON,SELECT                          $$ Output Fixture Offset with XY  G  
   fxt=POSTF(7,4)                            $$ Get G54 H
   REPEAT/X,Y,G,fxt,ALL                    $$ Output at XY same block
CIMFIL/OFF
  
$$ -----------------------------------------------------------------------
$$ TOOL PRE-SELECT
$$ -----------------------------------------------------------------------
  
1stc=0
  
CIMFIL/ON,LOADTL
  rslt=POSTF(2,1,1867,1)          $$ Set COMMAND value and let PP do the simulation mode
  rslt=POSTF(13)
  rslt=POSTF(2,1,1867,0)          $$ Set back to PP Excution mode
  IF(1stc.EQ.0)THEN
    1stn=POSTF(7,4)
    1stc=1
  ENDIF
  recnum=POSTF(7,1)
  max=999999
  DO/presel,inc=1,max                $$ start the do-loop
    rslt=POSTF(14)                     $$ Read next record
    rectyp=POSTF(7,2)               $$ Check the record type for 2000 record  
    CASE/rectyp
        WHEN/2000
            subtyp=POSTF(7,3)       $$ Check the sub-type record if the loadtl record
            IF(subtyp.EQ.(ICODEF(LOADTL)))THEN
               nxtnm=POSTF(7,4)
               inc=max+1
               rslt=POSTF(15,(recnum+1))
            ENDIF
        WHEN/14000
            nxtnm=1stn
            inc=max+1
            rslt=POSTF(15,(recnum+1))
    ENDCAS
  presel)CONTIN
  AUXFUN/6
  POSTN/OUT,T,nxtnm
CIMFIL/OFF
  
$$ ---------------------------------------------------------------------
$$ Turn the Spindle Off  
  
CIMFIL/ON,SPINDL
  recnum=POSTF(7,1)
  max=999999
  DO/prescn,inc=1,max                      $$ start the do-loop
    rslt=POSTF(14)                            $$ Read next record
    rectyp=POSTF(7,2)                      $$ Check the record type for 2000 record  
    CASE/rectyp
        WHEN/2000
            subtyp=POSTF(7,3)              $$ Check the sub-type record if the cycle record
            IF(subtyp.EQ.(ICODEF(CYCLE)))THEN
               cyctyp=POSTF(7,4)
               IF(cyctyp.EQ.(ICODEF(TAP)))THEN
               flag=1  
               inc=max+1
               rslt=POSTF(15,(recnum+1))
               ENDIF
            ENDIF  
            IF(subtyp.EQ.ICODEF(LOADTL))THEN
               flag=0
               inc=max+1
               rslt=POSTF(15,(recnum+1))
            ENDIF
        WHEN/14000
            flag=0
            inc=max+1
            rslt=POSTF(15,(recnum+1))
    ENDCAS
  prescn)CONTIN
  IF(flag.EQ.1)INSERT/'Taping Cycle Found$'
CIMFIL/OFF
作者: bbzzcl    时间: 2007-7-1 12:55
请高手讲解每段的含义!
作者: 84697082    时间: 2008-10-11 20:14
什么意思,不懂啊,请楼主讲解
作者: dadidehaizi    时间: 2013-8-26 12:41
翻出来看看




欢迎光临 iCAx开思网 (https://www.icax.org/) Powered by Discuz! X3.3