hexagon logo

Logic

Hey guys I was wondering if anyone had a quick line of code they could throw my way
for dmis to re-run a feature if it was out of tolerance.

Was thinking about adding it to my A0B0 calibration if it read anything above .0002
To automatically just re-run that tool until it got within the 0.000-.0002 range.
Also to add it to certain programs that if it read it out as it was measuring that it would
at least ask if i wanted to re-measure because it was out.

Thanks
Parents
  • try this

    MEASURE_CIR_1=LABEL/
    CIR_1      =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR
                THEO/<0,0,0>,<0,0,1>,2,0
                ACTL/<0,0,0>,<0,0,1>,2,0
                TARG/<0,0,0>,<0,0,1>
                START ANG=0,END ANG=180
                ANGLE VEC=<0,1,0>
                DIRECTION=CCW
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=YES
                  NUMHITS=4,DEPTH=0,PITCH=0
                  SAMPLE METHOD=SAMPLE_HITS
                  SAMPLE HITS=0,SPACER=0
                  AVOIDANCE MOVE=NO,DISTANCE=0.3937
                  FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                SHOW HITS=NO
    DIM LOC1= LOCATION OF CIRCLE CIR_1  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX    NOMINAL       +TOL       -TOL       MEAS        DEV     OUTTOL
    D       2.0000     0.0020     0.0020     2.0000     0.0000     0.0000 ---#----
    END OF DIMENSION LOC1
                ASSIGN/CIR_OOT=LOC1.D.OUTTOL
                IF_GOTO/CIR_OOT>0,GOTO = BAD
    GOOD       =LABEL/
                GOTO/END_PROG
    BAD        =LABEL/
                COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                "CIR_1 IS OUT OF TOLERACNE BY " +CIR_OOT
    C1         =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                DO YOU WANT TO RE MEASURE?
                IF_GOTO/C1.INPUT=="YES",GOTO = MEASURE_CIR_1
    END_PROG   =LABEL/
    


    FYI, type {code}, return to the next line and paste your code, then return again to the next line and type {/code}, except us straight brackets instead of curly ones
Reply
  • try this

    MEASURE_CIR_1=LABEL/
    CIR_1      =FEAT/CONTACT/CIRCLE/DEFAULT,CARTESIAN,OUT,LEAST_SQR
                THEO/<0,0,0>,<0,0,1>,2,0
                ACTL/<0,0,0>,<0,0,1>,2,0
                TARG/<0,0,0>,<0,0,1>
                START ANG=0,END ANG=180
                ANGLE VEC=<0,1,0>
                DIRECTION=CCW
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=YES
                  NUMHITS=4,DEPTH=0,PITCH=0
                  SAMPLE METHOD=SAMPLE_HITS
                  SAMPLE HITS=0,SPACER=0
                  AVOIDANCE MOVE=NO,DISTANCE=0.3937
                  FIND HOLE=DISABLED,ONERROR=NO,READ POS=NO
                SHOW HITS=NO
    DIM LOC1= LOCATION OF CIRCLE CIR_1  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH  HALF ANGLE=NO
    AX    NOMINAL       +TOL       -TOL       MEAS        DEV     OUTTOL
    D       2.0000     0.0020     0.0020     2.0000     0.0000     0.0000 ---#----
    END OF DIMENSION LOC1
                ASSIGN/CIR_OOT=LOC1.D.OUTTOL
                IF_GOTO/CIR_OOT>0,GOTO = BAD
    GOOD       =LABEL/
                GOTO/END_PROG
    BAD        =LABEL/
                COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                "CIR_1 IS OUT OF TOLERACNE BY " +CIR_OOT
    C1         =COMMENT/YESNO,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
                DO YOU WANT TO RE MEASURE?
                IF_GOTO/C1.INPUT=="YES",GOTO = MEASURE_CIR_1
    END_PROG   =LABEL/
    


    FYI, type {code}, return to the next line and paste your code, then return again to the next line and type {/code}, except us straight brackets instead of curly ones
Children